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
CODE PROJECT For Those Who Code
  • Home
  • Articles
  • FAQ
Community
  1. Home
  2. General Programming
  3. C#
  4. decode XmlDocument.OuterText

decode XmlDocument.OuterText

Scheduled Pinned Locked Moved C#
xmlquestion
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.
  • G Offline
    G Offline
    giddy_guitarist
    wrote on last edited by
    #1

    hi, Simple question. I'm trying to get the xml in an XmlDocument variable into a string. Seems like its a tough thing and I tried the OuterText property but it gives me encoded text like : >< So, does anybody have a decent solution to this. Thanks Gideon

    M P G 3 Replies Last reply
    0
    • G giddy_guitarist

      hi, Simple question. I'm trying to get the xml in an XmlDocument variable into a string. Seems like its a tough thing and I tried the OuterText property but it gives me encoded text like : >< So, does anybody have a decent solution to this. Thanks Gideon

      M Offline
      M Offline
      Migounette
      wrote on last edited by
      #2

      Try this: StringWriter sw = new StringWriter(); XmlTextWriter xw = new XmlTextWriter(sw); xmlDoc.WriteTo(xw); return sw.ToString(); where xmlDoc is your xml doc Let me know if it works

      1 Reply Last reply
      0
      • G giddy_guitarist

        hi, Simple question. I'm trying to get the xml in an XmlDocument variable into a string. Seems like its a tough thing and I tried the OuterText property but it gives me encoded text like : >< So, does anybody have a decent solution to this. Thanks Gideon

        P Offline
        P Offline
        PIEBALDconsult
        wrote on last edited by
        #3

        How about OuterXml ?

        1 Reply Last reply
        0
        • G giddy_guitarist

          hi, Simple question. I'm trying to get the xml in an XmlDocument variable into a string. Seems like its a tough thing and I tried the OuterText property but it gives me encoded text like : >< So, does anybody have a decent solution to this. Thanks Gideon

          G Offline
          G Offline
          giddy_guitarist
          wrote on last edited by
          #4

          nope, both solutions have encoded text!

          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