I get an xml document as input from other department. The input xml document i recieve has a particular word "rnx" which should not be there and my system doesn't support it. And there is also attribute xml:lang="EN" in some elements which should not be there. I am enclosing the code for reference.
I used to remove the occurences manually...but now I need an assembly which can do that for me in C#.I have to remove the occurences of the word "rnx" in elements and in some cases remove some attributes. here is only a part of the xml document.
<SalesCatalog xmlns:rnx="http://www.cisco.com/RNO/Extensions">
how can I make it to just <SalesCatalog> from <SalesCatalog
xmlns:rnx="http://www.cisco.com/RNO/Extensions">
- <ProductLineItem>
- <rnx:ChangeDate>
in the above element "rnx:" should not be there. The element should be only <ChangeDate>
<DateTimeStamp>20070417T114921.000Z</DateTimeStamp>
</rnx:ChangeDate>
above it should be </ChangeDate>
- <effectiveDate>
<DateStamp>20070418Z</DateStamp>
</effectiveDate>
<GlobalActionCode>Delete</GlobalActionCode>
- <authorizationPrerequirements>
<FreeFormText>NOT-USED</FreeFormText>
</authorizationPrerequirements>
- <minimumOrderQuantity>
<ProductQuantity>1</ProductQuantity>
</minimumOrderQuantity>
- <warrantyDescription>
<FreeFormText>NOT-USED</FreeFormText>
</warrantyDescription>
- <productUnit>
- <ProductPackageDescription>
- <ProductDescription>
- <TextualDescription>
- <primary>
<FreeFormText>NOT-USED</FreeFormText>
</primary>
- <detail>
<FreeFormText>MGX8850 Bundle for Wireless Voice Applicatiions</FreeFormText>
</detail>
- <summary>
<FreeFormText>NOT-USED</FreeFormText>
</summary>
</TextualDescription>
- <productName>
<FreeFormText>MGX-WLVOICE-BUND</FreeFormText>
</productName>
<GlobalProductIdentifier>12345678901234</GlobalProductIdentifier>
<ProprietaryProductIdentifier>MGX-WLVOICE-BUND</ProprietaryProductIdentifier>
<rnx:MajorOrderableIndicator>0</rnx:MajorOrderableIndicator>
<rnx:ConfigurableIndicator>1</rnx:ConfigurableIndicator>
- <proprietaryInformation>
<FreeFormText xml:lang="EN">serviceIndicator=N|webOrderableIndicator=N|leadTi me=36-42|serviceCategory=A|priceProtection=N</FreeFormText>
</proprietaryInformation>
<GlobalSerialIdentifier>12345678901234</GlobalSerialIdentifier>
- <PhysicalDimension>
<WeightDimension unit-of-measure="lbs">243.25</WeightDimension>
</PhysicalDimension>
<GlobalProductClassificationCode>43222609</GlobalProductClassificationCode>
</ProductDescription>
- <listPrice>
- <FinancialAmount>
<GlobalCurrencyCode>USD</GlobalCurrencyCode>
<rnx:PriceListIdentifier>1109</rnx:PriceListIdentifier>
<MonetaryAmount>200000.00</MonetaryAmount>
</FinancialAmount>
</listPrice>
</ProductPackageDescription>
</productUnit>
- <productAvailableInCountries>
<GlobalCountryCode>US</GlobalCountryCode>
</productAvailableInCountries>
<GlobalProductUnitOfMeasureCode>Each</GlobalProductUnitOfMeasureCode>
- <unitPrice>
- <FinancialAmount>
<GlobalCurrencyCode>USD</GlobalCurrencyCode>
<rnx:PriceListIdentifier>1109</rnx:PriceListIdentifier>
I have highlighted the error text in Bold. This is a small part of the document. The program should remove all the occurences. Can anybody help me...thanks