Question

Locked

XMLDocument object or DataSet

By navaneetha.post ·
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.
"
<Root>
<Category>
<Application></Application>
<Application></Application>
</Category>
.
.
<Category>
<Application></Application>
<Application></Application>
</Category>
</Root>
"
Appreciate any help...

This conversation is currently closed to new comments.

2 total posts (Page 1 of 1)  
| Thread display: Collapse - | Expand +

All Answers

Collapse -

To be honest neither

by Tony Hopkinson In reply to XMLDocument object or Dat ...

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.

Back to Software Forum
2 total posts (Page 1 of 1)  

Related Discussions

Related Forums