Writing XML attributes and namespace declarations in a specific order
问题 I am trying to make an XML file with a root element: <urn:Command complete="true" xmlns:urn="namespaceURI"> So I have an element Command a namespace namespaceURI a prefix urn and finally an attribute string with name complete a value true and no namespace. The code I have made to do this returns: <urn:Command xmlns:urn="namespaceURI" complete="true"> So the problem is I would like the attribute string to be before the namespace definition in the XML file and I can't find a similar problem on