Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我已经使用 c++ xml 解析器pugixml很长时间了。但是,现在我想在另一个中插入一个 xml。
pugixml
我已经尝试过使用XInclude外部实体和外部实体,但在这两种情况下xml_node都没有正确读取pugixml. 所以我的问题是:有什么方法可以在另一个文件中包含一个 xml 文件并能够使用 C++ 读取节点pugixml?
XInclude
xml_node
如您所知,pugixml尚不支持XInclude和ENTITY标记。
ENTITY
您必须在您的库或应用程序中对此进行编码。当你得到一个xml_nodenamedxi:include时,使用它的href属性,打开那个文件并用pugixml. 然后将其替换或添加到xi:includebase 的节点xml_document。
xi:include
href
xml_document