[UPHPU] php + xml noob
fungus at aros.net
Fri Dec 17 11:28:23 MST 2004
On Dec 16, 2004, at 7:58 PM, Steve Dibb wrote:
> Has anyone here worked with parsing XML files in PHP before?
> Basically what I have is an XML file I want to get a value out of one
> of the tags, and I have *no* idea where to start. I'm looking at the
> XML pages, and I'm a bit lost.
> All I'm trying to do is get "var" out of a structure similar to shis:
> Is there any _easy_ way to do that? I hope?
If the XML file is small, and you are running PHP 4.2.1 or higher, you
can use domxml_xmltree()
$xmldata = "
$tree = domxml_xmltree($xmldata);
$var = $tree->children->children->children->content;
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 2482 bytes
Desc: not available
Url : http://uphpu.org/pipermail/uphpu/attachments/20041217/e2699cdf/smime.bin
More information about the UPHPU