0

How Can I fetch the tag name of the below xml file only once,without use of getElementByTagName.

Like I have to display the XML as an HTML table.So the headings of the table would be


COMMON BOTANICAL ZONE LIGHT PRICE AVAILABILITY


I am getting tag name for all child nodes. How can I get it only once?

COMMON BOTANICAL ZONE LIGHT PRICE AVAILABILITY
COMMON BOTANICAL ZONE LIGHT PRICE AVAILABILITY
COMMON BOTANICAL ZONE LIGHT PRICE AVAILABILITY
COMMON BOTANICAL ZONE LIGHT PRICE AVAILABILITY
COMMON BOTANICAL ZONE LIGHT PRICE AVAILABILITY

<CATALOG>
−
<PLANT>
<COMMON>Bloodroot</COMMON>
<BOTANICAL>Sanguinaria canadensis</BOTANICAL>
<ZONE>4</ZONE>
<LIGHT>Mostly Shady</LIGHT>
<PRICE>$2.44</PRICE>
<AVAILABILITY>031599</AVAILABILITY>
</PLANT>
−
<PLANT>
<COMMON>Columbine</COMMON>
<BOTANICAL>Aquilegia canadensis</BOTANICAL>
<ZONE>3</ZONE>
<LIGHT>Mostly Shady</LIGHT>
<PRICE>$9.37</PRICE>
<AVAILABILITY>030699</AVAILABILITY>
</PLANT>
−
<PLANT>
<COMMON>Marsh Marigold</COMMON>
<BOTANICAL>Caltha palustris</BOTANICAL>
<ZONE>4</ZONE>
<LIGHT>Mostly Sunny</LIGHT>
<PRICE>$6.81</PRICE>
<AVAILABILITY>051799</AVAILABILITY>
</PLANT>
−

</CATALOG>
2
Contributors
1
Reply
2
Views
6 Years
Discussion Span
Last Post by fpmurphy
This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.