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. XML Document Entity Replacement

XML Document Entity Replacement

Scheduled Pinned Locked Moved XML / XSL
testingbeta-testingxmlperformancequestion
2 Posts 2 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.
  • L Offline
    L Offline
    Leftyfarrell
    wrote on last edited by
    #1

    Ok, this should be simple, but it doesn't seem to be. XmlDocument object in memory that contains something like:

    <content>testing ' and " and ' and "</content>

    After I build my document with appropriate nodes, and set the value of the content node (with entities), I need to extract the xml as a string. So far, every method I've used to extract the xml as a string converts the enties, so ' becomes ' and " becomes ". The vendor that I'm working with is expecting the entities, not the converted characters. ??

    D 1 Reply Last reply
    0
    • L Leftyfarrell

      Ok, this should be simple, but it doesn't seem to be. XmlDocument object in memory that contains something like:

      <content>testing ' and " and ' and "</content>

      After I build my document with appropriate nodes, and set the value of the content node (with entities), I need to extract the xml as a string. So far, every method I've used to extract the xml as a string converts the enties, so ' becomes ' and " becomes ". The vendor that I'm working with is expecting the entities, not the converted characters. ??

      D Offline
      D Offline
      donchev_p
      wrote on last edited by
      #2

      You will need some how to replace the & character with & amp; This way the XmlDocument object will confuse and will translate the & amp; as & only. You will then have & amp;apos; in the memory, which should become & apos; when you get it. Hope it helps.

      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