> element.attributeValue("xml:lang", "es");
This method does not add an attribute.
Use the following instead:
QName langAttributeName = QName.get("lang", Namespace.XML_NAMESPACE);
element.addAttribute(langAttributeName, "en-GB");
And to get the value for the attribute use the following:
elemen
Hi,
I'm new in dom and i'm trying to add the attribute xml:lang to a single node.
The problem is that i can add the attribute without any problem
element.attributeValue("xml:lang", "es");
But when i try to get the xml:lang for this node i get null:
element.attributeValue("xml:lang");
Any I