creating xml element with two namespaces using libxml APIs

Posted by iSight on Stack Overflow See other posts from Stack Overflow or by iSight
Published on 2010-05-31T04:36:34Z Indexed on 2010/05/31 4:42 UTC
Read the original article Hit count: 286

Filed under:

Hi,

I want to create an xml element having two namespace as below:

element name="Root" xmlns:xsi="myXSI" xmlns:xsd="myXSD"

I have checked out with the existing APIs, but it is not getting in this form. I am getting as

Root xmlns:xsd:xsi="myXSI" xmlns:xmlns:xsd="myXSD"

I am using this APIss as below:

xmlTextWriterWriteAttributeNS(xmlWriter, BAD_CAST "xmlns:xsd", BAD_CAST "xsi" , BAD_CAST "myXSD", BAD_CAST "myXSI");

© Stack Overflow or respective owner

Related posts about libxml2