Jump to content


Photo

Parse some XML and return part string


  • Please log in to reply
1 reply to this topic

#1 willpower

willpower
  • Members
  • PipPipPip
  • Advanced Member
  • 296 posts
  • LocationWarrington, Cheshire, UK

Posted 09 October 2006 - 04:05 PM

I have an XML response from a webservce.  I thought it was stored in array format...but apparently not.

I need to parse the string and extract the content between the <temperature>THIS IS WHAT I NEED</temperature> tags.

I have no way of knowing how many chars may come before, during or after.

Any ideas?

Thanks

Will
Wait...I've got it...Bollocks, it's gone again!

If at first you don't succeed....stop using ASP and get onto PHP

#2 obsidian

obsidian
  • Staff Alumni
  • Advanced Member
  • 3,202 posts
  • LocationSeattle, WA

Posted 09 October 2006 - 04:25 PM

look into using the PHP xml_parse() function set. you can get a good overview of XML parsing techniques in this ZEND tutorial
You can't win, you can't lose, you can't break even... you can't even get out of the game.

<?php
while (count($life->getQuestions()) > 0)
{   $life->study(); } ?>
  LINKS: PHP: Manual MySQL: Manual PostgreSQL: Manual (X)HTML: Validate It! CSS: A List Apart | IE bug fixes | Zen Garden | Validate It! JavaScript: Reference Cards RegEx: Everything RegEx




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users