Click here to Skip to main content
15,949,686 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hello,

Can any one guide me with a idea.

iam creating a XML file from C#.
I have a window with some textboxes and Button to create xml file.

i enter some data in textboxes and click on button which creates xml file.
if the file alredy exists iam appending data to the existing file.

here if the enter the same data i dont want to append the data to the xml. in my case it is appending the same data also.

so plz give me idea how can i check if the element and attribute values which i enter already exits in the xml file. if exists i dont want to add the data otherwise add the data to the xml file.

thanks,
Posted
Updated 27-Dec-11 17:50pm
v2

1 solution

You would need to form and XPath[^] query to check for existing data. There are many examples in the link
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900