Edit XML From Dataset

Edit XML From Dataset

am 08.11.2007 01:38:30 von 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

Re: Edit XML From Dataset

am 08.11.2007 01:56:26 von 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!

On Nov 7, 4:38 pm, "Derek Hart" wrote:
> 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

Re: Edit XML From Dataset

am 08.11.2007 02:57:40 von 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.

--
Andrew Faust
andrew[at]andrewfaust.com
http://www.andrewfaust.com


"Derek Hart" wrote in message
news:uiuwm%23ZIIHA.1212@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
>

Re: Edit XML From Dataset

am 08.11.2007 17:19:49 von NoSpamMgbworld

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" wrote in message
news:uiuwm%23ZIIHA.1212@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
>