Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

reading attributes of the elements in xml file

Status
Not open for further replies.

oqmalik

ISP
May 2, 2005
2
US
i am retrieving the table columns and rows from MSQL server and it is coming back in the format
<tPropertyCfg CfgID="1" FeatureClassID="4102" FieldName="CID" GroupID="1" FieldOrder="1" FieldLabel="Hydrant Number:" ControlType="1" Width="100" SQLValue="" htmlCode="" />
<tPropertyCfg CfgID="2" FeatureClassID="4102" FieldName="STATUS" GroupID="2" FieldOrder="2" FieldLabel="Status" ControlType="2" SQLValue="SELECT t4101_Status.ItemID, t4101_Status.Description FROM t4101_Status ORDER BY t4101_Status.Description" />
<tPropertyCfg CfgID="3" FeatureClassID="4102" FieldName="PRIVATE" GroupID="1" FieldOrder="4" FieldLabel="Private?" ControlType="3" />
</root>

can any body help to read the attributes of the element through DOM parser as i can read the attributes of first child
'get the first child attributes

set objFirstChild=xmlDoc.documentElement.firstChild
set objAttributes=objFirstChild.attributes

For each Attr in objAttributes
document.write(Attr.name & " ")
document.write(Attr.value & "<br>")
next

but i want to read the attributes of all the elements any suggestions will be apprecitate
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top