Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. XML / XSL
  4. Transform XML document

Transform XML document

Scheduled Pinned Locked Moved XML / XSL
xml
4 Posts 3 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • S Offline
    S Offline
    sonukadole
    wrote on last edited by
    #1

    I have successfully transformed one xml document into another xml document which is being saved using XMLTextWriter . Now I want to transform this transformed document into another xml document, while doing this I got exception saying "Document cannot have mutilple document elements"

    G L 2 Replies Last reply
    0
    • S sonukadole

      I have successfully transformed one xml document into another xml document which is being saved using XMLTextWriter . Now I want to transform this transformed document into another xml document, while doing this I got exception saying "Document cannot have mutilple document elements"

      G Offline
      G Offline
      George L Jackson
      wrote on last edited by
      #2

      The "one-and-only" document element is the root element of the document, and, thus, contains all the other elements. You must first create a document element to enclose your transformation output.

      "We make a living by what we get, we make a life by what we give." --Winston Churchill

      modified on Tuesday, March 24, 2009 10:23 AM

      1 Reply Last reply
      0
      • S sonukadole

        I have successfully transformed one xml document into another xml document which is being saved using XMLTextWriter . Now I want to transform this transformed document into another xml document, while doing this I got exception saying "Document cannot have mutilple document elements"

        L Offline
        L Offline
        logiclabz
        wrote on last edited by
        #3

        I think you have more than one parent nodes in an xml file i.e .. .. it should be

        ----------------- logiclabz

        G 1 Reply Last reply
        0
        • L logiclabz

          I think you have more than one parent nodes in an xml file i.e .. .. it should be

          ----------------- logiclabz

          G Offline
          G Offline
          George L Jackson
          wrote on last edited by
          #4

          The document element is the top most "parent" node. Also, your example code is not showing.

          "We make a living by what we get, we make a life by what we give." --Winston Churchill

          1 Reply Last reply
          0
          Reply
          • Reply as topic
          Log in to reply
          • Oldest to Newest
          • Newest to Oldest
          • Most Votes


          • Login

          • Don't have an account? Register

          • Login or register to search.
          • First post
            Last post
          0
          • Categories
          • Recent
          • Tags
          • Popular
          • World
          • Users
          • Groups