brendon99
01-12-2004, 10:04 PM
Hi,
I'm using the getElementsByTagName method to obtain a customer listing of records. So far so good. However, I also want to reference the child nodes of the customer records.
ie.
<customer id="1234" name="Mr Dodd">
<purchase po="1" value="3.00"/>
<purchase po="2" value="4.00"/>
<purchase po="3" value="5.00"/>
</customer>
I used getElementsByTagName("customer") to obtain the list of customers, but I'm having trouble referencing the child nodes ie. purchase.
Does getElementsByTagName("customer") also obtain the child nodes, or only the matching element?
thanks
I'm using the getElementsByTagName method to obtain a customer listing of records. So far so good. However, I also want to reference the child nodes of the customer records.
ie.
<customer id="1234" name="Mr Dodd">
<purchase po="1" value="3.00"/>
<purchase po="2" value="4.00"/>
<purchase po="3" value="5.00"/>
</customer>
I used getElementsByTagName("customer") to obtain the list of customers, but I'm having trouble referencing the child nodes ie. purchase.
Does getElementsByTagName("customer") also obtain the child nodes, or only the matching element?
thanks