In Xerces 2.0.1, when I used org.apache.xml.serialize.XMLSerializer, it
would automatically add namespace declarations when serializing subtrees.
This no longer works with 2.1 and is causing problems with our code.

For instance:

<test xmlns:foo="uri" foo:attr="blah">
        <hmm>dummy node</hmm>
        <namespace foo:a="a">
                <bb>hi</bb>
        </namespace>
</test>

With the above XML, serializing <namespace> in 2.0.1 looks like this:

<namespace xmlns:foo="uri" foo:a="a">
        <bb>hi</bb>
</namespace>


But with 2.1, it comes out as invalid XML without the namespace decl:

<namespace foo:a="a">
        <bb>hi</bb>
</namespace>



Is this a bug or by design?  Is there an easy fix?

Thanks,
Scott

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

Reply via email to