使用 xerces 将元素添加到 xml 文件
我有一个名为 LOD.xml 的 xml 文件,该文件中有一个模型列表。
我想向此文件添加另一个 DomElement。我不想再次解析所有列表。我只想解析文件并获取 DomDocument 和 RootDomElement。
将新的 DomElement 附加到 RootDomElement 后,我想再次将 DomDocument 写入此文件。
你知道我该怎么做吗?
我使用 xerces 和 c++
i have an xml file named LOD.xml and in this file there is a list of models.
i want to add another DomElement to this file. i dont want to parse all the list again. i just want to parse file and get DomDocument and RootDomElement.
after appending my new DomElement to the RootDomElement, i want to write DomDocument to this file back again.
do you know how i can do this??
i use xerces and c++
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
IBMsdeveloperworks,
LocalFileFormatTarget
就是您要查找的内容。There is an article on XML serialization using Xerces-C++ on IBMs developerworks,
LocalFileFormatTarget
is what you are looking for.