469,612 Members | 1,517 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,612 developers. It's quick & easy.

Edit XML From Dataset

If I save an xml file (with the schema) from a dataset, using
Dataset.WriteXML, I then wish to edit the file using XML Notepad. If I just
open it in XML Notepad and save it, without making any changes, the xml is
just about rendered useless, and I get an error "datatable does not support
schema" when trying to import it again. Is this a known issue, and is it
possible to edit with other tools?

Derek
Nov 8 '07 #1
2 1433
It sounds like XML Notepad is changing stuff. XML Notepad doesn't work like
a text editor. It actually has to parse the XML to display it to you as a
tree. When it writes it back out, it may be stripping out information such
as namespaces or some other key information that the Dataset needs.

Try editing it in a text editor instead and see if that works. You could
also grab Ultraedit (or another tool with file comparisons) and then
compare the version of the XML that XML notepad wrote out to the version
before loading in XML Notepad to see exactly what it's changing.

--
Andrew Faust
andrew[at]andrewfaust.com
http://www.andrewfaust.com
"Derek Hart" <de********@yahoo.comwrote in message
news:ui****************@TK2MSFTNGP05.phx.gbl...
If I save an xml file (with the schema) from a dataset, using
Dataset.WriteXML, I then wish to edit the file using XML Notepad. If I
just open it in XML Notepad and save it, without making any changes, the
xml is just about rendered useless, and I get an error "datatable does
not support schema" when trying to import it again. Is this a known
issue, and is it possible to edit with other tools?

Derek
Nov 8 '07 #2
As long as your edits are legal, the most likely cause is you are changing
code pages when you save. I would assume that the DataSet is saved as UTF-8.
Check notepad and see how you are saving. You can change code pages here.

The other option is you are making illegal changes to the XML.

--
Gregory A. Beamer
MVP, MCP: +I, SE, SD, DBA

*************************************************
| Think outside the box!
|
*************************************************
"Derek Hart" <de********@yahoo.comwrote in message
news:ui****************@TK2MSFTNGP05.phx.gbl...
If I save an xml file (with the schema) from a dataset, using
Dataset.WriteXML, I then wish to edit the file using XML Notepad. If I
just open it in XML Notepad and save it, without making any changes, the
xml is just about rendered useless, and I get an error "datatable does not
support schema" when trying to import it again. Is this a known issue, and
is it possible to edit with other tools?

Derek

Nov 8 '07 #3

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

6 posts views Thread by Tamir Khason | last post: by
reply views Thread by Steve Bishop | last post: by
reply views Thread by sJeev via DotNetMonster.com | last post: by
9 posts views Thread by rn5a | last post: by
3 posts views Thread by Joey | last post: by
reply views Thread by devrayhaan | last post: by
reply views Thread by gheharukoh7 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.