473,325 Members | 2,671 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,325 software developers and data experts.

help me in manipulating XML documents using C#

2
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
Jul 17 '07 #1
0 895

Sign in to post your reply or Sign up for a free account.

Similar topics

6
by: mike | last post by:
Hello, After trying to validate this page for a couple of days now I was wondering if someone might be able to help me out. Below is a list of snippets where I am having the errors. 1. Line 334,...
2
by: Sune | last post by:
Hi, I'm in the situation that i need to print (to paper) some documents from a database using a website, and i need to manipulate the data on the fly, but my problem is that i don't know how to...
1
by: Piotre Ugrumov | last post by:
in this simulation I have implemented 4 classes, a class Animal(Animale), the classes Lion(Leone) and Zebra. A Lion died after 100000 iteration if he don't eat a zebra. If the distance between the...
4
by: Marek Krzeminski | last post by:
I am new to ASP and I am having some problems that I hope someone can help me with. I am using WindowsXP and a book to try to learn ASP. The book instructed me to install IIS & .Net Framework...
13
by: Siegfried Heintze | last post by:
I refered the engineer at my hosting service to http://support.microsoft.com/default.aspx?scid=kb;en-us;825738 where he tried to follow the directions there. He said there was no such file:...
2
by: slitchfield | last post by:
Sorry if this is real beginner's stuff, but I'm an old-school HTML guy and this is all another world to me. Is there an easy way to get the user to specify a number from 1 to 5 (in a pick list...
0
by: Miguel Dias Moura | last post by:
Hello, I am working on an Asp.Net 2.0 / SQL 2005 web site. I am using profile to save the users info on the database. For example, I have the following structure: Public Structure Name...
4
by: Jean-François Michaud | last post by:
Hello, I've been looking at this for a bit now and I don't see what's wrong with the code. Can anybody see a problem with this? Here is an XSLT snippet I use. <xsl:template match="graphic">...
3
by: jambonjamasb | last post by:
Hi I have two tables: email_tbl Data_table Data table is is used to create a Form Data_form
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.