Sander Bos wrote:

Thomas ,

As elena and thomas mentioned you need to set  namespace  to true . I tested your program by setting
      xmlSerializer.setNamespaces(true);

and it works fine .

Regards
venu

Dear Thomas,

  
We ran into another namespace problem after switching to 
Xerces 2.4.0. We are searching a node with Xalan 2.4.1 and 
then output the node as string. Xerces 2.4.0 Serializer does 
not provide the full namespace information of that node, 
where 2.0.1 does, so that this node cannot stand alone 
anymore. The namespace information is still there, maybe 
Xalan somehow corrupts it.

Maybe (or likely) we are doing something wrong. Any help (or 
workaround) is greatly appreciated.
    

Maybe I am missing something here, is this not the same problem as you
had yesterday? If I remember what Elena said correctly, 2.4.0 apparently
does not have namespace fixup in the serializer on by default anymore,
so you have to turn that on on the serializer as she indicated.

So instead of
      xmlSerializer = new XMLSerializer(sw, outputFormat);
      xmlSerializer.serialize(element);
do
      xmlSerializer = new XMLSerializer(sw, outputFormat);
      xmlSerializer.setNamespaces(true);
      xmlSerializer.serialize(element);

(disclaimer: I did not test this and I do not use XMLSerializer on a
regular basis)

Kind regards,

--Sander.

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


  

Reply via email to