Question Locked

XMLDocument object or DataSet

0 helpful
2 replies
Closed to new repliesThis discussion is closed. It stays readable, but it takes no new replies.

I have a requirement,where i have to modify multiple XML files when i rename an entity in my UI.

Which one is best :

1.Copying the XML file into XMLDocument object,make the change and then save it.
OR
2.Read the XML file to a dataset.And modify the DataSet.And use TextWriter to WRITE the data to XML file again.
I have nested and complex XML file,like below.
"

.
.

"
Appreciate any help...

2 replies

by tony hopkinson

The only advantage of doing it in the databse is it will happen in a diferent thread, getting it in and out will cost you more than that gains unless you need to store it anyway.

Loading as a document and chunking through it with XPath is simple, but you need to keep an eye on things, it's a real processor drag if you are not careful.

XSL might be the way to go, but me I'd have a neutral name and then use some sort of mapping/config manouver.
Another document or in the source itself.

NameinUI=nameInDocument, sort of thing.

This discussion is closed to new replies.