[xml] xmlTextWriter and namespace


In libxml, a node (xmlNodePtr) can have ns and also nsDef.

In streaming, by calling following:

   rc = xmlTextWriterStartElementNS(writer, "my_prefix", BAD_CAST
"ORDER", "www.my.com");

The node "ORDER" will have namespace set to "my_prefix" which has value
of "www.my.com" as following:

 <my_prefix:ORDER xmlns:my_prefix="www.my.com">

My question is, if I want to define several more namespaces (including
the default namespace) on node "ORDER", as following:

  <my_prefix:ORDER xmlns:my_prefix="www.my.com" xmlns="www.my1.com"

How do I do it? Which API to call?

Yong Chen

[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]