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
<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