If it isn't already in the DOM try adding it to the root element using
setAttributeNS() [1] before you serialize.
[1]
http://xerces.apache.org/xerces2-j/javadocs/api/org/w3c/dom/Element.html#setAttributeNS(java.lang.String,%20java.lang.String,%20java.lang.String)
Michael Glavassevich
XML Parser D
Either attaching xsi:noNamespaceSchemaLocation or directly embedding xsd
schema to xml.
-Ursprüngliche Nachricht-
Von: Michael Glavassevich [mailto:[EMAIL PROTECTED]
Gesendet: Donnerstag, 06. März 2008 14:57
An: j-users@xerces.apache.org
Betreff: Re: DOM document serialization question
By attach do you mean adding the 'xsi:noNamespaceSchemaLocation' attribute
to the root element of your document?
Michael Glavassevich
XML Parser Development
IBM Toronto Lab
E-mail: [EMAIL PROTECTED]
E-mail: [EMAIL PROTECTED]
"Heinrich Roman" <[EMAIL PROTECTED]> wrote on 03/06/2008 07:55:50
AM:
>
Hello,
I have an DOM document, which I want to serialize and I want also to
attach xsd document inside the generated xml.
The ouput should be like this:
http://www.w3.org/2001/XMLSchema-instance";
xsi:noNamespaceSchemaLocation="shiporder.xsd">
John Smith
Ola Nordmann
Langgt 23
4000 Sta