Edit XML From Dataset

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Derek Hart

    #1

    Edit XML From Dataset

    If I save an xml file (with the schema) from a dataset, using
    Dataset.WriteXM L, 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


  • Andrew Faust

    #2
    Re: Edit XML From Dataset

    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



    "Derek Hart" <derekmhart@yah oo.comwrote in message
    news:uiuwm%23ZI IHA.1212@TK2MSF TNGP05.phx.gbl. ..
    If I save an xml file (with the schema) from a dataset, using
    Dataset.WriteXM L, 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
    >

    Comment

    • Cowboy \(Gregory A. Beamer\)

      #3
      Re: Edit XML From Dataset

      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" <derekmhart@yah oo.comwrote in message
      news:uiuwm%23ZI IHA.1212@TK2MSF TNGP05.phx.gbl. ..
      If I save an xml file (with the schema) from a dataset, using
      Dataset.WriteXM L, 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
      >

      Comment

      Working...