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. CrLf in XML quoted string

CrLf in XML quoted string

Scheduled Pinned Locked Moved XML / XSL
xmlhelptutorialquestion
3 Posts 2 Posters 2 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.
  • J Offline
    J Offline
    J Dunlap
    wrote on last edited by
    #1

    Does anyone know how to put a carriage return/linefeed sequence in an XML quoted string? I tried

    &

    &

    <br/>

    , etc. Help would be much appreciated.

    "Do unto others as you would have them do unto you." - Jesus
    "An eye for an eye only makes the whole world blind." - Mahatma Gandhi

    S 1 Reply Last reply
    0
    • J J Dunlap

      Does anyone know how to put a carriage return/linefeed sequence in an XML quoted string? I tried

      &

      &

      <br/>

      , etc. Help would be much appreciated.

      "Do unto others as you would have them do unto you." - Jesus
      "An eye for an eye only makes the whole world blind." - Mahatma Gandhi

      S Offline
      S Offline
      Stephane Rodriguez
      wrote on last edited by
      #2

      An quoted string can have carriage returns. There is no escaping sequence for it, so that's why etc. don't do anything. To answer your question, I need to know if you are just editing an Xml file by hand, or trying to tweak an xml file writer. If you are editing by hand, then just add carriage returns. It's compatible with the Xml snytax rules. Otherwise, depending on the language you are using to generate the xml file, make sure to add \r and\n to exported strings.

      J 1 Reply Last reply
      0
      • S Stephane Rodriguez

        An quoted string can have carriage returns. There is no escaping sequence for it, so that's why etc. don't do anything. To answer your question, I need to know if you are just editing an Xml file by hand, or trying to tweak an xml file writer. If you are editing by hand, then just add carriage returns. It's compatible with the Xml snytax rules. Otherwise, depending on the language you are using to generate the xml file, make sure to add \r and\n to exported strings.

        J Offline
        J Offline
        J Dunlap
        wrote on last edited by
        #3

        This is what I had thought, but when I do it that way, my whole XML file's display goes nuts. I am just doing an XML file by hand with an XSLT transform. Thanks for your help!

        "Do unto others as you would have them do unto you." - Jesus
        "An eye for an eye only makes the whole world blind." - Mahatma Gandhi

        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