[jdom-interest] setAttributes method
Mauricio García
mmgh73 at hotmail.com
Mon Oct 11 17:56:18 PDT 2004
Hi ,
I've tried to use a List object to set the order of the attributes of my
element. For example I have the next code:
List list = elem.getAttributes();
Attribute attrib = new
Attribute("schemaLocation",getSchemaLocation(),getSchemaInstance());
list.add(0,attrib);
System.out.println(list);
elem.setAttributes(list);
System.out.println(elem);
But, when get the output of my element I can see it has no attributes, but
the list had 2 attributes. Console shows me:
[Attribute: xsi:schemaLocation="http://www.mmm.cl/SiiDte EnvioDTE_v10.xsd"],
[Attribute: version="1.0"]
[Element: <EnvioDTE [Namespace: http://www.mmm.cl/SiiDte]/>]
What can I do? Does not the Element's method "setAttributes" work?
Note: when I use:
elem.setAttribute("schemaLocation",getSchemaLocation(),getSchemaInstance());
it works! But I need this attribute be the first.
_________________________________________________________________
Express yourself instantly with MSN Messenger! Download today it's FREE!
http://messenger.msn.com/
More information about the jdom-interest
mailing list