I can easily add attribute namespace for xmlns:lc But how to set attribute namespace for xml:lang This is how i set xmlns:lc:
Document doc = createEmptyDocument();
doc.normalizeDocument();
Element pubElement = doc.createElement("publication");
pubElement.setAttributeNS(XMLConstants.XMLNS_ATTRIBUTE_NS_URI, "xmlns:lc", "http://.../lc");
pubElement.setAttributeNS(XMLConstants.XML_NS_URI, "xml:lang", "http://www.w3.org/XML/2000/10/xml.xsd");
I've search in stackoverflow about this question, but none of the answers helped