New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add xml namespace to xml_document #354
Comments
This code appends the xmlns attribute to the
|
Thanks for your reply.
Unfortunately the xml namespace declaration does not appear in the serialized string.
Any idea what is still missing? |
The code I noted adds the attribute to “rootnode” element and as such must be ran after you add rootnode to the document. |
I changed my code and as per your suggestion, and now it works perfectly. Thanks a lot for your help, I appreciate it. |
I quoted your answer over in stackoverflow.com, where I asked a similar question. Hope that is ok for you. |
How can I add an xml namespace declaration to my xml_document using pugixml?
I tried this, which results in a invalid xml (invalid char ":", says my validator):
I save the
xml_document
to a string stream and need that xml namespace declaration included.The text was updated successfully, but these errors were encountered: