Read XML using VB6 DOM 4.0 with Namespaces - See Sample XML
Here is the XML sample
<?xml version='1.0' encoding='UTF-8'?>
<nvd xmlns:xsi=" http://www.*-*-*.com/ ;
xmlns:rec=" http://www.*-*-*.com/ "
xmlns:cvss=" http://www.*-*-*.com/ ">
<entry id="01-2345">
<rec:last-modified>2008-09-05T17:34:06</rec:last-modified>
<rec:cvss>
<cvss:base_metrics>
<cvss:score>5.0</cvss:score>
<cvss:grade>6th</cvss:grade>
</cvss:base_metrics>
</rec:cvss>
<rec:summary>Misc Summary</rec:summary>
</entry>
</nvd>
Can someone describe how I would get access to the elements in the
"base_metrics" section. I can read the last modified date element... but
can't seem to dig down to the lower elements with the additional namespace.
here is a segment of my code
docXML.setProperty "SelectionNamespaces",
"xmlns:rec="" http://www.*-*-*.com/ """
Set objChild = objNode.selectSingleNode("rec:" &
"last-modified-datetime")
tDate = objChild.Text
vDetail.LastModifiedDate = Left(tDate, InStr(1, tDate, "T") - 1)
But any attempts to read anything deeper fails.
Could someone help resolve this issue???
Thanks,