0
나는이 간단한 코드와 간단한 XML 파일을 가지고 있습니다. 나는 각 노드를 읽고 다른 파일에 쓰고있다. 그리고 실제로 XML 리더는 모든 대체 레코드 노드를 건너 뛴다. 다음 파일에서 1, 3 번째 노드를 씁니다! 어떤 도움을 주셔서 감사합니다.XMLReader는 모든 대체 노드를 건너 뜁니다.
Do While (reader.Read())
If (reader.NodeType = XmlNodeType.Element And (reader.LocalName = "record" Or reader.LocalName = "record1")) Then
writer.WriteNode(reader, True)
writer.Flush()
End If
Loop
-
<?xml version="1.0" encoding="UTF-8"?>
<records xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="world-check.xsd">
<record>
<foo>
<bar>wtf3</bar>
<bar>wtf4</bar>
</foo>
</record>
<record>
<foo>
<bar>wtf4</bar>
<bar>wtf5</bar>
</foo>
</record>
</records>
있습니까? 그 코드는 그 표본의 모든 기록을 산출합니다 ... –