Home. 
.

transparent

transparent

transparent

Altova Mailing List Archives


Re: Display related Nodes

From: gadrin7@---.---
To: NULL
Date: 4/30/2005 10:22:00 AM
xfile = strcat(dirscript(), "EntryTest.xml")

xmlDoc = ObjectOpen("Msxml2.DOMDocument.4.0")
xmlDoc.async = @False
xmlDoc.load(xfile)

err = xmlDoc.parseerror
if err.errorCode then gosub ShowParseErrors

;message("Debug", xmlDoc.xml)

;	first find the ENTRY nodes...
EntryNodeSet = xmlDoc.selectNodes("/main/entry")
for x = 0 to EntryNodeSet.length-1
;	message("Debug", EntryNodeSet.item(x).xml)
	NYNodeSet =
EntryNodeSet.item(x).selectNodes(".//address[./city='NY']")
	for y = 0 to NYNodeSet.length-1
		message("Debug", NYNodeSet.item(y).xml)
	next
next

exit

:ShowParseErrors
ec = err.errorCode
er = err.reason
el = err.line
elp = err.linepos
es  = err.srcText
message("XML Parse Error", strcat("Error Code: ", ec, @lf, "Reason: ",
er, @lf, "Line: ", el, " ", "Column: ", elp, @lf, "Text: ", es))



transparent
Print
Mail
Like It
Disclaimer
.

These Archives are provided for informational purposes only and have been generated directly from the Altova mailing list archive system and are comprised of the lists set forth on www.altova.com/list/index.html. Therefore, Altova does not warrant or guarantee the accuracy, reliability, completeness, usefulness, non-infringement of intellectual property rights, or quality of any content on the Altova Mailing List Archive(s), regardless of who originates that content. You expressly understand and agree that you bear all risks associated with using or relying on that content. Altova will not be liable or responsible in any way for any content posted including, but not limited to, any errors or omissions in content, or for any losses or damage of any kind incurred as a result of the use of or reliance on any content. This disclaimer and limitation on liability is in addition to the disclaimers and limitations contained in the Website Terms of Use and elsewhere on the site.

.
.

transparent

transparent