The xml object created by the function LsdbCommand is actually an XMLDOM object so you can use the XMLDOM commands to manipulate the object. getElementsByTagName(element) instantiates your Element object from which you can extract the .length (how many times to loop) and also as a repository of your values. Loop through the XML using the .length value then use the Element object to extract your data. In the case below, .getAttribute(attributename) was used to pull the data.
<!--This is the command we use in Lodestar to extract data from a stored procedure in the XSL file-->
xmlTable = LsdbCommand("LSDB.sp-get-contractitem",{"UIDCONTRACT":PageParams1.UIDCONTRACT});
<!--Get a hold of the record Element in the XML so know how many times you're looping around it-->
xElement = xmlTable.getElementsByTagName("qrySel");
<!--Using the .length attribute, loop through the XML file -->
for (i = 0; i < xElement.length; i++){
<!--Get the attribute value by using the .getAttribute function-->
Response.Write("<br>UIDCONTRACTITEM: " + xElement [i].getAttribute("UIDCONTRACTITEM"));
}
No comments:
Post a Comment