Thursday 19 September 2013

XMLDOMNode::childNodes fails to read all nodes

XMLDOMNode::childNodes fails to read all nodes

I am using MSXML to read an XML string from memory. A simplified version
of the structure is below. I am trying to read the //P1 list of Y1 using
XMLDOMNode::childNodes. The function does not fail but it reads only the
first Y1 field (XMLDOMNodeList::length returns 1). If I change the name of
//C1/P1 to //C1/P2, or move the list before //C1, then everything works
fine. I cannot modify the XML string.
Thank you.
<R1>
<T1>123</T1>
<C1>
<P1>2</P1>
</C1>
<P1>
<Y1></Y1>
<Y1></Y1>
</P1>
</R1>

No comments:

Post a Comment