MSXML2 to .Net xml Conversion Problem

Andy

New member
Joined
Jan 10, 2003
Messages
2
Location
Vienna, VA
In the process of converting a working application and I have run into this problem. Not all the properties that I thought were standard are available in the .Net xml dom. In sample below childnodes no longer has a basename property. In addition length is changed to count and most likely it is 1 based now instead of zero.

Is there another more backward friendly object I should use.

Should I just include a reference and use MSXML2s dom. Any issues I should know before going down that path.

Thanks in advance.




VB 6 Way

Private Sub ProcessDBInfo(ByVal DBInfo As MSXML2.IXMLDOMNode)
Dim i As Long

For i = 0 To DBInfo.childNodes.length - 1
Select Case DBInfo.childNodes(i).baseName
...

.Net Way ???


Private Sub ProcessDBInfo(ByVal DBInfo As xml.xmlNode)
Dim i As Long

For i = 0 To DBInfo.childNodes.Count - 1
Select Case DBInfo.childNodes(i).baseName <-- Not Available
 
Answer

The answer is.

It was renamed "LocalName" in the .NET framework, because this is what its called in the W3C DOM spec.

Answer supplied by Chris Lovett.
 
Back
Top