我使用了一个名为 TinyXML2 的库来创建包含所有数据的 XML 文件。现在我想通过 UDP 传输我的 XML 文件。我知道我必须在我的 XML 文件中逐个节点传输。但我不知道具体的程序。谁能告诉我该怎么做?
<xml>
<child>
<firstchild id = "1">
<age>10</age>
</firstchild>
<firstchild id = "2">
<age>20</age>
</firstchild>
</child>
</xml>