There is no facility right now to handle this kind of thing. I guess you
could always write your schema so that order is not important ;-)

James
----- Original Message -----
From: "Bram Huenaerts" <[EMAIL PROTECTED]>
To: "DOM4J-user (E-mail)" <[EMAIL PROTECTED]>
Sent: Friday, July 19, 2002 10:15 AM
Subject: [dom4j-user] Sequence in an XML-document


> Hi,
>
> is it possible with DOM4j to make/build an XML file from scratch if there
is
> a sequence according to the Schema?
> Can I insert a tag <location> for example after i added <edition>? How do
I
> know if it will be inserted on the right position?
> Because if it's not on the good position i will get a sequence error.
>
> <XML>
> <record>
> <location>BE</location> ????
> <edition>blabla</edition>
> <location>BE</location> ????
> </record>
> <XML>
>
> <XSD>
> <?xml version="1.0" encoding="UTF-8"?>
> <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema";
> elementFormDefault="qualified" attributeFormDefault="unqualified">
> <xs:element name="record">
> <xs:annotation>
> <xs:documentation>main element</xs:documentation>
> </xs:annotation>
> <xs:complexType>
> <xs:choice>
> <xs:element name="book">
> <xs:complexType>
> <xs:sequence>
> <xs:element
> name="location"/>
> <xs:element
> name="edition"/>
> <xs:element
> name="title"/>
> <xs:element
> name="author"/>
> </xs:sequence>
> </xs:complexType>
> </xs:element>
> </xs:choice>
> </xs:complexType>
> </xs:element>
> </xs:schema>
> <XSD>
>
> Can you add elements and let dom4j take care of the good position (with
the
> schema)??
>
> Regards
> --
> Bram
>
>
>
> -------------------------------------------------------
> This sf.net email is sponsored by:ThinkGeek
> Welcome to geek heaven.
> http://thinkgeek.com/sf
> _______________________________________________
> dom4j-user mailing list
> [EMAIL PROTECTED]
> https://lists.sourceforge.net/lists/listinfo/dom4j-user
>

__________________________________________________
Do You Yahoo!?
Everything you'll ever need on one web page
from News and Sport to Email and Music Charts
http://uk.my.yahoo.comm


-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
_______________________________________________
dom4j-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/dom4j-user

Reply via email to