Re: [xml] Adding a namespace to an existing document
- From: Jason Viers <lists beanalby net>
- To: "John J. Boyer" <john boyer abilitiessoft com>, xml gnome org
- Subject: Re: [xml] Adding a namespace to an existing document
- Date: Thu, 02 Jan 2014 10:22:02 -0500
On 12/31/2013 0:18, John J. Boyer wrote:
I need to add a number of elements to existing doocuments with a namespace different from any in the
document. I've looked at the namespace functions, but I can't see how to do this.
xmlNewNs[1] is used to add the namespace declaration to the document,
and it returns an xmlNsPtr. Pass that as the "ns" argument for things
like xmlNewDocNode[2] to create elements in that namespace.
[1] http://xmlsoft.org/html/libxml-tree.html#xmlNewNs
[2] http://xmlsoft.org/html/libxml-tree.html#xmlNewDocNode
[Date Prev][
Date Next] [Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]