-
How to break a huge xml into small ones based on element value in xmlbeans?
Hi All,
I am new to xmlbeans. I have attached here the xsd I use. I get a very huge xml and my requirement is to chunk them based on 'Locality' which is a alphanumberic type. I should produce xml for identical localities.
Can you please provide me a hint on how to proceed with this. Should I use xquery/xpath or stax. Which would be more efficient as the Localities list is huge as well( we have 100 localities).
<?xml version="1.0" encoding="UTF-8" ?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
elementFormDefault="qualified" version="1.00">
<xs:include schemaLocation="simple_types_sys.xsd" />
<xs:include schemaLocation="complex_types_sys.xsd" />
<xs:element name="office" type="OfficeType" />
<xs:complexType name="OfficeType">
<xs:sequence>
<xs:group ref="Reference" />
<xs:element name="Location" type="LocType" minOccurs="0"
maxOccurs="99">
<xs:annotation>
<xs:documentation>
<description value="place" />
</xs:documentation>
</xs:annotation>
</xs:element>
</xs:sequence>
</xs:complexType>
<xs:group name="Reference">
<xs:sequence>
<xs:element name="RefType" type="Alphanumeric_Max5">
<xs:annotation>
<xs:documentation>
<description value="Reference Type" />
</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element name="Valid" type="Alpha_3">
<xs:annotation>
<xs:documentation>
<description value="Validity" />
</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element name="Insured" type="Alpha_3">
<xs:annotation>
<xs:documentation>
<description value="Insured" />
</xs:documentation>
</xs:annotation>
</xs:element>
</xs:sequence>
</xs:group>
<xs:complexType name="LocType">
<xs:annotation>
<xs:documentation>
<description value="place" />
</xs:documentation>
</xs:annotation>
<xs:sequence>
<xs:element name="Locality" type="LocalityType">
<xs:annotation>
<xs:documentation>
<description value="Locality" />
<codeList name="LCodeFullList" type="code" />
</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element name="Sys" type="SysType" maxOccurs="9">
<xs:annotation>
<xs:documentation>
<description value="Systems" />
</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element name="Function" type="FunctionType" maxOccurs="99">
<xs:annotation>
<xs:documentation>
<description value="Description" />
</xs:documentation>
</xs:annotation>
</xs:element>
</xs:sequence>
</xs:complexType>
</xs:schema>
Thanks in advance
Nicky
-
xpath
hi there,
maybe, this could be so simple as "//Locality", or the first one "//Locality[1]", or the last one as "//Locality[last()]", even maybe "//Locality/*".
best regards,
tonci korsano
Similar Threads
-
Replies: 1
Last Post: 03-03-2006, 08:16 AM
-
Replies: 1
Last Post: 08-07-2000, 10:16 AM
-
Replies: 0
Last Post: 06-17-2000, 04:46 AM
-
Replies: 0
Last Post: 06-16-2000, 05:41 PM
-
By Frank Devliegher in forum XML
Replies: 0
Last Post: 04-12-2000, 06:25 PM
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Development Centers
-- Android Development Center
-- Cloud Development Project Center
-- HTML5 Development Center
-- Windows Mobile Development Center
|