PDA

View Full Version : Question about PV-Wave's XmlNewDoc routine



ash
02-01-2009, 05:30 PM
I am trying to write a XML file and I need to use more that one namespace and how can I do it using the XmlNewDoc routine. I want to add the namespace to the root element similar to the example below, I know it is possible to add them to a node element, but that's not what I am looking for.

Using the XmlNewDoc routine I am able to add the first one using prefix and href, but how to add the second namespace ?? I even tried passing an array to prefix and href it didnt work and I tried XmlSetAttr routine to add the second namespace didn't work either.


<root
xmlns:h="http://www.w3.org/TR/html4/"
xmlns:f="http://www.w3schools.com/furniture">

<h:table>
<h:tr>
<h:td>Apples</h:td>
<h:td>Bananas</h:td>
</h:tr>
</h:table>

<f:table>
<f:name>African Coffee Table</f:name>
<f:width>80</f:width>
<f:length>120</f:length>
</f:table>

</root>

Is this a limitation of the XmlNewDoc or am I missing something totally, please advice.

Thanks
Ash

rwagner
02-02-2009, 12:33 PM
Hi ash,
I found out that there is a limitation to PV-WAVE XML toolkit. It can only write one global namespace using the XMLNewDoc function.

-Ryan

ash
10-15-2009, 03:17 PM
Is there a fix/solution on the way for the xml one namespace limitation???

-Ash

rwagner
11-03-2009, 02:47 PM
There is a defect filed against this limitation, and hopefully it will be addressed in a future release. I looked into the code today and there is not a possible workaround due to the way we are calling libxml.

ash
11-19-2009, 08:56 AM
Is there any plans to retire libxml and use the libxml2 library, which confirms to the latest xml standards