cancel
Showing results for 
Search instead for 
Did you mean: 

Extra namespace declerations at nodes

Former Member
0 Kudos

Hi all

I want to get rid of the namespace declerations at node levels , My file is liek this

<?xml version="1.0" encoding="utf-8"?>

<Invoice xmlns:main="http://rep.oio.dk/ubl/xml/schemas/0p71/maindoc/" xmlns:com="http://rep.oio.dk/ubl/xml/schemas/0p71/common/" xmlns="http://rep.oio.dk/ubl/xml/schemas/0p71/pie/">

<com:ID xmlns:com="http://rep.oio.dk/ubl/xml/schemas/0p71/common/" schemeID="N/A">0018000562</com:ID>

<com:IssueDate xmlns:com="http://rep.oio.dk/ubl/xml/schemas/0p71/common/">2008-10-02</com:IssueDate>

<com:TypeCode xmlns:com="http://rep.oio.dk/ubl/xml/schemas/0p71/common/">PIE</com:TypeCode>

<main:InvoiceCurrencyCode xmlns:main="http://rep.oio.dk/ubl/xml/schemas/0p71/maindoc/">USD</main:InvoiceCurrencyCode>

<com:BuyersReferenceID xmlns:com="http://rep.oio.dk/ubl/xml/schemas/0p71/common/" schemeID="EAN">5790001330217</com:BuyersReferenceID>

<com:ReferencedOrder xmlns:com="http://rep.oio.dk/ubl/xml/schemas/0p71/common/">

<com:BuyersOrderID>sdfsdfsd</com:BuyersOrderID>

<com:IssueDate>2008-09-30</com:IssueDate>

</com:ReferencedOrder>

<com:BuyerParty xmlns:com="http://rep.oio.dk/ubl/xml/schemas/0p71/common/">

<com:ID schemeID="EAN">5790001330217</com:ID>

<com:PartyName>

<com:Name>Fred the sold to party</com:Name>

</com:PartyName>

<com:BuyerContact>

<com:ID>contact person from ARLA</com:ID>

<com:Name>contact person from ARLA</com:Name>

</com:BuyerContact>

</com:BuyerParty>

<com:DestinationParty xmlns:com="http://rep.oio.dk/ubl/xml/schemas/0p71/common/">

<com:ID schemeID="EAN">5790001330217</com:ID>

<com:PartyName>

<com:Name>Fred the sold to party</com:Name>

</com:PartyName>

<com:Contact>

<com:ID>ARLA contact person</com:ID>

<com:Name>ARLA contact person</com:Name>

</com:Contact>

<com:Address>

<com:ID>Levering</com:ID>

<com:Street>14 Easy street</com:Street>

<com:CityName>north Andover</com:CityName>

<com:PostalZone>0184500</com:PostalZone>

<com:Country>

<com:Code>NL</com:Code>

</com:Country>

</com:Address>

</com:DestinationParty>

<com:SellerParty xmlns:com="http://rep.oio.dk/ubl/xml/schemas/0p71/common/">

<com:ID schemeID="EAN">Vendor's EAN number not implemented</com:ID>

<com:PartyName>

<com:Name>APV SYSTEMS US COMMERCIAL</com:Name>

</com:PartyName>

<com:PartyTaxScheme>

<com:CompanyTaxID schemeID="CVR">24730018</com:CompanyTaxID>

</com:PartyTaxScheme>

</com:SellerParty>

<com:TaxTotal xmlns:com="http://rep.oio.dk/ubl/xml/schemas/0p71/common/">

<com:TaxTypeCode>VAT</com:TaxTypeCode>

<com:TaxAmounts>

<com:TaxableAmount currencyID="USD">101.53</com:TaxableAmount>

<com:TaxAmount currencyID="DKK">60.00</com:TaxAmount>

</com:TaxAmounts>

<com:CategoryTotal>

<com:RateCategoryCodeID>VAT</com:RateCategoryCodeID>

<com:RatePercentNumeric>25</com:RatePercentNumeric>

<com:TaxAmounts>

<com:TaxableAmount currencyID="USD">101.53</com:TaxableAmount>

<com:TaxAmount currencyID="DKK">60.00</com:TaxAmount>

</com:TaxAmounts>

</com:CategoryTotal>

</com:TaxTotal>

<com:LegalTotals xmlns:com="http://rep.oio.dk/ubl/xml/schemas/0p71/common/">

<com:LineExtensionTotalAmount currencyID="USD">101.53</com:LineExtensionTotalAmount>

<com:ToBePaidTotalAmount currencyID="USD">101.53</com:ToBePaidTotalAmount>

</com:LegalTotals>

<com:InvoiceLine xmlns:com="http://rep.oio.dk/ubl/xml/schemas/0p71/common/">

<com:ID>000010</com:ID>

<com:InvoicedQuantity unitCode="ST" unitCodeListAgencyID="n/a">1.000</com:InvoicedQuantity>

<com:LineExtensionAmount currencyID="DKK">1000.00</com:LineExtensionAmount>

<com:Item>

<com:ID schemeID="n/a">DS1234</com:ID>

<com:Description>Test material for STO</com:Description>

<com:BasePrice>

<com:PriceAmount currencyID="DKK">1000.00</com:PriceAmount>

</com:BasePrice>

</com:Item>

<com:BasePrice>

<com:PriceAmount currencyID="DKK">1000.00</com:PriceAmount>

<com:BaseQuantity unitCode="ST" unitCodeListAgencyID="n/a">1.000</com:BaseQuantity>

</com:BasePrice>

</com:InvoiceLine>

</Invoice>

You could notice that some nodes are with namespace decleration

"<com:InvoiceLine xmlns:com="http://rep.oio.dk/ubl/xml/schemas/0p71/common/">"

I would like it to be just as

<com:InvoiceLine>

Any quick tricks ? I got response son this to write an XSLT constructing the whole message with out extra namespace declerations. Hoping for any tricks to get rid of this extra namespace deleration.

Thank you

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

Thanks