> 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: element.attributeValue(langAttributeName); Kind regards, Edwin -- http://www.edankert.com/ ------------------------------------------------------------------------- This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2005. http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/ _______________________________________________ dom4j-user mailing list dom4j-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/dom4j-user