Hi there,
I dont normally use DOM XML but have been given the task of
integrating it with a web site using PHP. I have to use DOM XML as
this is what is provided by the server.
Basically what I am tryin to do is get it to load an XML document
(that I can do) and find a specific node by its id attribute. The code
I am up to is:
<?php
$doc = domxml_open_file('xml/prices.xml');
....and for the xml document will be something like:
<?xml...
<items>
<item id="subscription">
<signup>40.00</signup>
<monthly>15.00</monthly>
</item>
..
..
..etc
....please dont be too blown away by my progress :-), I have no idea
how to simply from there locate an item with a specific id attribute
(ie. subscription) and then firstly get the text for <signup> and then
<monthly>. Also, some items with other id attributes many have just
<price> nodes instead of <signup> and <monthly> so I will need to
identify these nodes by their tag name.
I apologies as I know that there are tutorials available but they all
seem to get a bit heavy and not really simple methods. I have had
trouble finding a tutorial page that basically tells you how to locate
a node by attribute or name. Any help would be much appreciated,
cheers
burnsy