Reputation: 1826
I have been using the c++ xml parser pugixml
for a long time. However, now I want to insert an xml inside another one.
I have tried both with XInclude
and external entity, but on both cases the xml_node
is not correctly read from pugixml
. So my question is: is there any way I can include an xml file inside another and being able to read the nodes in C++ with pugixml
?
Upvotes: 1
Views: 801
Reputation: 56
As you have figured out, pugixml
doesn't support XInclude
and ENTITY
tags yet.
You have to code this in your Library or Application. When you get a xml_node
named xi:include
, use its href
property, open that file and parse it with pugixml
. Then replace or add it to the xi:include
node of the base xml_document
.
Upvotes: 4