Edit XML From Dataset

D

Derek Hart

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
 
J

jdlwright

That's odd - all I can say from experience is that I *have* been able
to make changes (adding elements etc) to XML files created from
XmlDataDocument.

Not to helpful, but keep trying I guess!
 
A

Andrew Faust

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.
 
C

Cowboy \(Gregory A. Beamer\)

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!
|
*************************************************
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top