How can I take the url / Xml dataa and use as a data source for a Php Form Page?

I have this url:

I want do do a search on this data using a form. If any matches exist I want the results to say
what matches were found.

I am using Code Charge Studio so I might find a way to do this using that, but I'll probally need some help.
Who is Participating?
KokoglenConnect With a Mentor Commented:
That XML aslo looks kinda big.  You probably want to do this on the server-side.  Would be much faster.
I do something similar with reading a blog XML and posting parts of it.  The PHP code for that is:
class RSSParser {
	var $insideitem = false;
	var $tag = "";
	var $title = "";
	var $summary = "";
	var $link = "";
	var $entryCount = 0;
	function startElement($parser, $tagName, $attrs) {
		if ($this->insideitem) {
			$this->tag = $tagName;
		} elseif ($tagName == "ENTRY") {
			$this->insideitem = true;
    if ($tagName == 'LINK') {
      if($attrs['REL'] == "replies") {
       $this->href = $attrs['HREF'];
	function endElement($parser, $tagName) {
		if (($tagName == "ENTRY") && ($this->entryCount < 5)) {
			printf("<li><a href='%s'>%s</a>",
			printf("<div class='description'>%s</div></li>",htmlspecialchars(trim($this->summary)));
			$this->title = "";
			$this->summary = "";
			$this->link = "";
			$this->href = "";
			$this->insideitem = false;
	function characterData($parser, $data) {
		if ($this->insideitem) {
		switch ($this->tag) {
			case "TITLE":
			$this->title .= $data;
			case "SUMMARY":
			$this->summary .= $data;
			case "LINK":
			$this->link = $this->href;
$xml_parser = xml_parser_create();
$rss_parser = new RSSParser();
xml_set_element_handler($xml_parser, "startElement", "endElement");
xml_set_character_data_handler($xml_parser, "characterData");
$fp = fopen("","r")
	or die("Blog items unavailable.  Please try again later.");
while ($data = fread($fp, 4096))
	xml_parse($xml_parser, $data, feof($fp))
		or die(sprintf("XML error: %s at line %d",

Open in new window

I find jQuery to be really good for this sort of thing.

However, if you wanted something else, there is this:

With jQuery they have selectors that you can find stuff in the XML as if it was CSS.  Like:
$("foo bar") would return all the of the <BAR> elements inside of <FOO> elements.
msammisAuthor Commented:
I'll test this out ... and get right back..
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.