Skip to Content
Former Member
Oct 23, 2006 at 04:45 PM

Unnecessary Namespace declarations



When mapping (graphic) to an externally defined XML schema where some elements belong to different namespaces I get namespace declarations on each element in the resulting XML instance even though they refer to the same ns name. The problem is that the XML document, even though valid, is very verbose. Is there a way to get all ns declarations in the root element instead without using XSLT?

Example output

<?xml version="1.0" encoding="utf-8" ?>">" />" />" />


I would like to get something like this instead:

<?xml version="1.0" encoding="utf-8" ?>" xmlns:ns2="">

<ns2:Element1 />

<ns2:Element2 />

<ns2:Element3 />


Kind regards Johan