Re: [dom4j-user] XML:LANG problem
> 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/vse012070mrt/direct/01/
___
dom4j-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/dom4j-user
[dom4j-user] XML:LANG problem
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 Idea?
Thank you
-
Sé un Mejor Amante del Cine
¿Quieres saber cómo? ¡Deja que otras personas te ayuden!.
-
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2005.
http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/___
dom4j-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/dom4j-user
