I currently need to be able to read through an XML document, find certain nodes and either delete them (and child nodes) or edit the nodes name and possibly value. What would be the best way of going about this?


My Code/XML contents cannot be posted though.

The easiest way I've found is to use the "System.Xml.Linq" namespace so you can use XDocument.Load() on your file or page. Even if you don't use any actual Linq, the methods in that namespace seem to be easier to use than others.

I would suggest doing it the way thines01 has suggested. Take a look at this. there's plenty of examples floating about just do a quick search and you'll find them.

Hmm interesting :) was half expecting either XSLT or XPath as those are what the guys at work are suggesting looking into.

Personally im already hating XML :D

Hehe fair enough, thanks for the input lads :) Now to spend hours trawling tutorials!

This question has already been answered. Start a new discussion instead.