ich hab eine Xerces Frage. Ich hab die auch schon in einer Newsgroup gestellt, deswegen ist sie in Englisch. Ihr könnt aber auf deutsch antworten, wenn Antworten vorhanden sind.
-----
Hi,
I use Xerces C++ 2.5 to create and read XML documents.
I have to use many Namespaces/prefixes in one XML document.
See an abstract xml here:
Code:
<?xml version="1.0" encoding="UTF-8"?>
<root xmlns="http://quantos.net/root"
xmlns:mml="http://quantos.net/mml"
xmlns:q3="http://quantos.net/q3">
<mml:op>+</mml:op>
<mml:op>-</mml:op>
<q3:message>test test test</q3:message>
</root>
<root xmlns="http://quantos.net/root"
xmlns:mml="http://quantos.net/mml"
xmlns:q3="http://quantos.net/q3">
<mml:op>+</mml:op>
<mml:op>-</mml:op>
<q3:message>test test test</q3:message>
</root>
How I can create more than one xmlns definition in the root
element ? I can specify only one xmlns when I create the DOMDocument.
When I create an DOMAttr for the root element with name="xmlns:q3"
and set the value of the attribute to the URI "http://quantos.net/mml",
then it printed in the root element, but it is not recognized as
a prefix definition, so I can't use setPrefix() method on a node in the document, because Xerces says there is no namespace URI for this prefix
"q3".
I think there is a way to set multiple xmlns correctly in the root element, so I can use the prefix in any node without a NAMESPACE_ERR,
but I can't find any example for that.
Best Regards,
Mario