EDN Admin
Well-known member
Hi Team,
I want to remove unnessary attribute from my xml file. I know we can remove by xsl. But i dont know how to do it. I search on internet i cant get expect result.
Here is my xml output
<pre class="prettyprint" style=" <?xml version="1.0" encoding="UTF-8" standalone="no"?>
<rsm:Invoice xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:rsm="http://www.ita.org/"
xmlns:ccts="urn:un:unece:uncefact:documentation:standard:CoreComponentsTechnicalSpecification:2"
xmlns:udt="urn:un:unece:uncefact:data:standard:UnqualifiedDataType:2"
xmlns:qdt="urn:un:unece:uncefact:data:standard:QualifiedDataType:2"
xmlns:ram="urn:un:unece:uncefact:data:standard:ReusableAggregateBusinessInformationEntity:2"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.ita.org/ Invoice_20.xsd
<rsm:HeaderExchangedDocument>
<ram:ID xmlns:ram="http://www.ita.org/ 103004</ram:ID>
<ram:TypeCode xmlns:ram="http://www.ita.org/ Invoice</ram:TypeCode>
<ram:IssueDateTime xmlns:ram="http://www.ita.org/ 2014-01-01</ram:IssueDateTime>
<ram:CopyIndicator xmlns:ram="http://www.ita.org/ Original</ram:CopyIndicator>
<ram:CustomsID xmlns:ram="http://www.ita.org/" />
<ram:HeaderInformation xmlns:ram="http://www.ita.org/" />
<ram:SummaryInformation xmlns:ram="http://www.ita.org/" />
</rsm:HeaderExchangedDocument>
<rsm:SpecifiedLogisticsConsignment>
<ram:IncludedSupplyChainConsignment xmlns:ram="http://www.ita.org/
<ram:BorderCrossingLogisticsTransportMovement>
<ram:ModeCode>1</ram:ModeCode>
<ram:Mode>Sea</ram:Mode>
<ram:ID />
</ram:BorderCrossingLogisticsTransportMovement>
</ram:IncludedSupplyChainConsignment>
</rsm:SpecifiedLogisticsConsignment>
</rsm:Invoice>[/code]
<br/>
I want to get below format
<pre class="prettyprint" style=" <?xml version="1.0" encoding="UTF-8"?>
<rsm:Invoice xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:rsm="http://www.ita.org/"
xmlns:ccts="urn:un:unece:uncefact:documentation:standard:TechnicalSpecification:2"
xmlns:udt="urn:un:unece:uncefact:data:standard:UnqualifiedDataType:2"
xmlns:qdt="urn:un:unece:uncefact:data:standard:QualifiedDataType:2"
xmlns:ram="urn:un:unece:uncefact:data:standard:ReusableAggregateBusinessInformationEntity:2"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.ita.org/ Invoice_20.xsd
<rsm:HeaderExchangedDocument>
<ram:ID>103004</ram:ID>
<ram:TypeCode>Invoice</ram:TypeCode>
<ram:IssueDateTime>2014-01-01</ram:IssueDateTime>
<ram:CopyIndicator>Original</ram:CopyIndicator>
<ram:CustomsID/>
<ram:HeaderInformation/>
<ram:SummaryInformation/>
</rsm:HeaderExchangedDocument>
<rsm:SpecifiedLogisticsConsignment>
<ram:IncludedSupplyChainConsignment>
<ram:BorderCrossingLogisticsTransportMovement>
<ram:ModeCode>1</ram:ModeCode>
<ram:Mode>Sea</ram:Mode>
<ram:ID />
</ram:BorderCrossingLogisticsTransportMovement>
</ram:IncludedSupplyChainConsignment>
</rsm:SpecifiedLogisticsConsignment>
</rsm:Invoice>[/code]
Please help to me.
Best Regards,
Yukon
<
Make Simple & Easy
<br/>
View the full article
I want to remove unnessary attribute from my xml file. I know we can remove by xsl. But i dont know how to do it. I search on internet i cant get expect result.
Here is my xml output
<pre class="prettyprint" style=" <?xml version="1.0" encoding="UTF-8" standalone="no"?>
<rsm:Invoice xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:rsm="http://www.ita.org/"
xmlns:ccts="urn:un:unece:uncefact:documentation:standard:CoreComponentsTechnicalSpecification:2"
xmlns:udt="urn:un:unece:uncefact:data:standard:UnqualifiedDataType:2"
xmlns:qdt="urn:un:unece:uncefact:data:standard:QualifiedDataType:2"
xmlns:ram="urn:un:unece:uncefact:data:standard:ReusableAggregateBusinessInformationEntity:2"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.ita.org/ Invoice_20.xsd
<rsm:HeaderExchangedDocument>
<ram:ID xmlns:ram="http://www.ita.org/ 103004</ram:ID>
<ram:TypeCode xmlns:ram="http://www.ita.org/ Invoice</ram:TypeCode>
<ram:IssueDateTime xmlns:ram="http://www.ita.org/ 2014-01-01</ram:IssueDateTime>
<ram:CopyIndicator xmlns:ram="http://www.ita.org/ Original</ram:CopyIndicator>
<ram:CustomsID xmlns:ram="http://www.ita.org/" />
<ram:HeaderInformation xmlns:ram="http://www.ita.org/" />
<ram:SummaryInformation xmlns:ram="http://www.ita.org/" />
</rsm:HeaderExchangedDocument>
<rsm:SpecifiedLogisticsConsignment>
<ram:IncludedSupplyChainConsignment xmlns:ram="http://www.ita.org/
<ram:BorderCrossingLogisticsTransportMovement>
<ram:ModeCode>1</ram:ModeCode>
<ram:Mode>Sea</ram:Mode>
<ram:ID />
</ram:BorderCrossingLogisticsTransportMovement>
</ram:IncludedSupplyChainConsignment>
</rsm:SpecifiedLogisticsConsignment>
</rsm:Invoice>[/code]
<br/>
I want to get below format
<pre class="prettyprint" style=" <?xml version="1.0" encoding="UTF-8"?>
<rsm:Invoice xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:rsm="http://www.ita.org/"
xmlns:ccts="urn:un:unece:uncefact:documentation:standard:TechnicalSpecification:2"
xmlns:udt="urn:un:unece:uncefact:data:standard:UnqualifiedDataType:2"
xmlns:qdt="urn:un:unece:uncefact:data:standard:QualifiedDataType:2"
xmlns:ram="urn:un:unece:uncefact:data:standard:ReusableAggregateBusinessInformationEntity:2"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.ita.org/ Invoice_20.xsd
<rsm:HeaderExchangedDocument>
<ram:ID>103004</ram:ID>
<ram:TypeCode>Invoice</ram:TypeCode>
<ram:IssueDateTime>2014-01-01</ram:IssueDateTime>
<ram:CopyIndicator>Original</ram:CopyIndicator>
<ram:CustomsID/>
<ram:HeaderInformation/>
<ram:SummaryInformation/>
</rsm:HeaderExchangedDocument>
<rsm:SpecifiedLogisticsConsignment>
<ram:IncludedSupplyChainConsignment>
<ram:BorderCrossingLogisticsTransportMovement>
<ram:ModeCode>1</ram:ModeCode>
<ram:Mode>Sea</ram:Mode>
<ram:ID />
</ram:BorderCrossingLogisticsTransportMovement>
</ram:IncludedSupplyChainConsignment>
</rsm:SpecifiedLogisticsConsignment>
</rsm:Invoice>[/code]
Please help to me.
Best Regards,
Yukon
<
Make Simple & Easy
<br/>
View the full article