> and then you dynamically create xml tags on that
> document object, one by one, the resulting xml
> document does not preserve the sequentail order of the
> xml tags in the order in which I created them.

Can you show us how you create these elements
sequentially and can you show us how you serialize
your dom4j document?

> And like I said, the xml ordering is important in
> order for it to pass the schema validation, because
> the XSD file specifies that the xml tags need to be in
> order (i.e. the XSD uses the <sequence> tag to
> specify the xml tag ordering).

The order of XML Elements is indeed very important.

I could not reproduce your problem, using the
following code:

Document document = DocumentHelper.createDocument();
Element root = document.addElement("Document");
Element records = root.addElement("RecordsList");
records.addElement("FirstName").setText("John");
records.addElement("LastName").setText("John");
records.addElement("Age").setText("55");

XMLWriter writer = new XMLWriter(System.out);
writer.write(document);

Regards,
Edwin
-- 
http://www.edankert.com/

-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
dom4j-user mailing list
dom4j-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/dom4j-user

Reply via email to