我有以下 XML:
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/">
<SOAP-ENV:Header>
</SOAP-ENV:Header>
<SOAP-ENV:Body>
<MessageRequest></MessageRequest>
</SOAP-ENV:Envelope>
我正在访问这样的子元素的名称:
childNode(SOAP-ENV:Body").ChildNodes(0).Name
,但如果元素之间有空格,则返回子"\n "
节点名没有空间,它会返回<SOAP-ENV:Body>
<MessageRequest>
"\n "
<MessageRequest>