the objective is to flatten a multilevel repeated xml into xpaths at a leaf level ; so that we can store it in a store and retrieve it
- generate a list of pairs where the Key is a "XPATH" and Values are the actual value of that leaf
- Should be able to assemble it back into an xml
- the xml is backed by an xsd ( is there a JAXB solution )
a sample xml looks like below
<?xml version="1.0" encoding="UTF-8"?>
<cars>
<regInfo>
<regName>car</regName>
<regCreationInfo>
<regCreationDate>2001-10-31T08:15:00.000z</regCreationDate>
<regCreator>Joe Smith</regCreator>
</regCreationInfo>
</regInfo>
<car uid="WxiMr123">
<name>XBR123</name>
<field>Big Field</field>
<fieldTest uid="SRP1">
<name>Slot Bay Centre</name>
<type>Site Reference Point</type>
<location uid="loc-1">
<carCRS uidRef="proj1">ED50 / UTM Zone 31N</carCRS>
<easting uom="m">425366.47</easting>
<northing uom="m">6623781.95</northing>
</location>
<location uid="loc-2">
<carCRS uidRef="localcar1">carOneWSP</carCRS>
<localX uom="m">12.63</localX>
<localY uom="m">-3.74</localY>
<description>Location of the Site Reference Point with respect to the car surface point</description>
</location>
</fieldTest>
<fieldTest uid="WRP2">
<name>Sea Bed</name>
<type>car Reference Point</type>
<elevation uom="ft" datum="SL">-118.40</elevation>
<measuredDepth uom="ft" datum="WR">173.09</measuredDepth>
<location uid="loc-1">
<carCRS uidRef="proj1">ED50 / UTM Zone 31N</carCRS>
<easting uom="m">425353.84</easting>
<northing uom="m">6623785.69</northing>
</location>
<location uid="loc-2">
<carCRS uidRef="geog1">ED50</carCRS>
<latitude uom="dega">59.743844</latitude>
<longitude uom="dega">1.67198083</longitude>
</location>
</fieldTest>
<commonData>
<dTimCreation>2001-04-30T08:15:00.000Z</dTimCreation>
<dTimLastChange>2001-05-31T08:15:00.000Z</dTimLastChange>
<itemState>plan</itemState>
<comments>These are the comments associated with the car data object.</comments>
<defaultDatum uidRef="WR">Wurst Ramon</defaultDatum>
</commonData>
</car>
</cars>
Any help is highly appreciated.
No comments:
Post a Comment