943,569 Members | Top Members by Rank

Ad:
  • PHP Discussion Thread
  • Unsolved
  • Views: 20195
  • PHP RSS
Mar 14th, 2006
0

Searching XML documents with PHP

Expand Post »
So I want to create a website that allows me (or others) to type in a words and select a relevent search, and have it search multiple XML pages on another server (IE: they search my site and are given 3 other sites to go to with that relevent information).

The XML documents are setup and available on the other websites server but I want to access it through mine.

How can I do this and how can I use PHP to allow them to search through, and then display the relevent information?
Similar Threads
Reputation Points: 10
Solved Threads: 0
Newbie Poster
Virii is offline Offline
14 posts
since Jan 2006
Mar 14th, 2006
0

Re: Searching XML documents with PHP

Are you going to use PHP4 or PHP5? I think PHP5 is supposed to have more powerful XML parsing functions, but to be honest I don't know an awful lot about XML.
Reputation Points: 17
Solved Threads: 14
Posting Whiz
DanceInstructor is offline Offline
355 posts
since Feb 2005
Mar 15th, 2006
0

Re: Searching XML documents with PHP

Whether you are using PHP4 or 5, I have 2 PHP classes that will give you almost everything you need. They come with LOTS of code comments and clear examples.

class_http.php - Use this to pull the documents from the remote servers. Includes a caching feature to make you a good neighbor.
http://www.troywolf.com/articles/php/class_http/

class_xml.php - Use this to parse and access the XML data structure.
http://www.troywolf.com/articles/php/class_xml/

These 2 classes can be combined to build tools such as RSS Readers and WebDAV Interfaces to Microsoft Exchange Server.
Reputation Points: 36
Solved Threads: 6
Posting Whiz
Troy is offline Offline
354 posts
since Jun 2005
May 29th, 2007
0

Re: Searching XML documents with PHP

Thanks it worked for me i was looking for same. Just want to know if i have to search in XML what would be best way.

I know i can do search when i have all values in array in php. But i think to load full xml in array and then search would be long and not cool method to do so.

Do wehave anything that will help me to show only what i want to pick from XML lets say i want to pick all entries form xml starting with A or Z ?
Reputation Points: 11
Solved Threads: 2
Junior Poster
einfoway is offline Offline
145 posts
since Nov 2005
Sep 7th, 2009
0

Re: Searching XML documents with PHP

Click to Expand / Collapse  Quote originally posted by Troy ...
Whether you are using PHP4 or 5, I have 2 PHP classes that will give you almost everything you need. They come with LOTS of code comments and clear examples.

class_http.php - Use this to pull the documents from the remote servers. Includes a caching feature to make you a good neighbor.
http://www.troywolf.com/articles/php/class_http/

class_xml.php - Use this to parse and access the XML data structure.
http://www.troywolf.com/articles/php/class_xml/

These 2 classes can be combined to build tools such as RSS Readers and WebDAV Interfaces to Microsoft Exchange Server.
Hi Troy,

I need little help like that, I have a flash flip book which had to use php with xml at the backend. my images for flipbook are saved in xml file and I load these into the flipbook using flash parser, to parse the xml document. Now the problem is that I had tabs which is used to flip the pages. But when we drag the tabs it also exchange the linking reference with the tab by which we exchange the tab. for example previously if the tab1 links with pages 1/2 and when we exchange it with the position of the tab2 which controls the pages 3/4 now this must be exchanged with the pages 1/2 because I want to use tabs to sort the pages in the book. And for that I think it had to replaces the xml nodes every time I mone the tab to the new position. And this could be done in the php, but I haven't any idea how to do it. Please help me in this matter.

My sample flipbook is here. http://74.213.174.176/wasim/mdbook/sample.html

Thanks
chand
Reputation Points: 10
Solved Threads: 0
Junior Poster in Training
chand. is offline Offline
57 posts
since Apr 2009
Apr 9th, 2010
0
Re: Searching XML documents with PHP
Reputation Points: 15
Solved Threads: 21
Posting Whiz in Training
nikesh.yadav is offline Offline
219 posts
since Feb 2008

This thread is more than three months old

No one has posted to this discussion for at least three months. Please let old threads die and do not reply to them unless you feel you have something new and valuable to contribute that absolutely must be added to make the discussion complete. Otherwise, please start a new thread in this forum instead.
Message:
Previous Thread in PHP Forum Timeline: PHP imap help :( :(
Next Thread in PHP Forum Timeline: php





About Us | Contact Us | Advertise | Acceptable Use Policy
Forum Index | Build Custom RSS Feed


Follow us on Twitter


© 2011 DaniWeb® LLC