Auto-transform an XML document into a different XML document
Posted: Sun Nov 25, 2007 4:59 am
I am outputting GIS data features into an XML/GML feature document.
example GIS Output:
And I would like to transform the feature attributes and tags into something like this:
I have been using the Find/Replace to change tags throughout the GIS documnent, however I do not know how to delete features which are not required information. And so Deletion of features has been done manually.
Is there a way to automate this task?
Thank you!
Mars
example GIS Output:
Code: Select all
<gml:featureMember>
<gml2:CPSAesf2007>
<gml2:OBJECTID>1</gml2:OBJECTID>
<gml2:Opening/>
<gml2:Block_Code>0</gml2:Block_Code>
<gml2:Cutting_Permit>SA</gml2:Cutting_Permit>
<gml2:Opening_ID/>
<gml2:Shape_Length>717.814784004704</gml2:Shape_Length>
<gml2:Shape_Area>19865.6409278132</gml2:Shape_Area>
<gml2:cutBlockID>Blk 1</fta:cutBlockID>
<gml2:applicationPurpose>N</fta:applicationPurpose>
<gml2:plannedGrossArea>1.987</fta:plannedGrossArea>
<gml2:plannedNetArea>1.68</fta:plannedNetArea>
<gml2:plannedHarvestDate>2007-11-29</fta:plannedHarvestDate>
<gml:polygonProperty>
<gml:Polygon srsName="EPSG:42102">
<gml:outerBoundaryIs>
<gml:LinearRing>
<gml:coordinates>co-ordinate string</gml:coordinates>
</gml:LinearRing>
</gml:outerBoundaryIs>
</gml:Polygon>
</gml:polygonProperty>
</gml2:CPSAesf2007>
</gml:featureMember>
Code: Select all
<fta:cutblockMember>
<fta:CutBlockWithCP>
<fta:cutBlockID>Blk 1</fta:cutBlockID>
<fta:applicationPurpose>N</fta:applicationPurpose>
<fta:plannedGrossArea>1.987</fta:plannedGrossArea>
<fta:plannedNetArea>1.68</fta:plannedNetArea>
<fta:plannedHarvestDate>2007-11-29</fta:plannedHarvestDate>
<fta:extentOf>
<gml:Polygon srsName="EPSG:42102">
<gml:outerBoundaryIs>
<gml:LinearRing>
<gml:coordinates>co-ordinate string</gml:coordinates>
</gml:LinearRing>
</gml:outerBoundaryIs>
</gml:Polygon>
</fta:extentOf>
</fta:CutBlockWithCP>
</fta:cutblockMember>
Is there a way to automate this task?
Thank you!
Mars