Special Characters(&,etc..) in a string between xml tags

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

    #1

    Special Characters(&,etc..) in a string between xml tags

    I have a xml open and close tag <abc</abc>. I assign a string variable to
    this tag. <abc& NAT & </abc. The value of the variable NAT = Cal&FLo. But
    due to the presence of the ampersand. There is an exception. What do I need
    to do to display & nd other special chracters correctly in xml tags.
  • Herfried K. Wagner [MVP]

    #2
    Re: Special Characters(&amp ;,etc..) in a string between xml tags

    "NAT" <NAT@discussion s.microsoft.com schrieb:
    >I have a xml open and close tag <abc</abc>. I assign a string variable to
    this tag. <abc& NAT & </abc. The value of the variable NAT = Cal&FLo.
    But
    due to the presence of the ampersand. There is an exception. What do I
    need
    to do to display & nd other special chracters correctly in xml tags.
    "&" -"&amp;".

    <URL:http://groups.google.d e/group/microsoft.publi c.de.german.ent wickler.dotnet. vb/browse_frm/thread/43752abd5ca5b1d e/aa4cfc5ab26203d 8>

    --
    M S Herfried K. Wagner
    M V P <URL:http://dotnet.mvps.org/>
    V B <URL:http://classicvb.org/petition/>

    Comment

    • MyndPhlyp

      #3
      Re: Special Characters(&amp ;,etc..) in a string between xml tags


      "NAT" <NAT@discussion s.microsoft.com wrote in message
      news:4760C26A-ECE6-42CF-A72D-187135FD37ED@mi crosoft.com...
      I have a xml open and close tag <abc</abc>. I assign a string variable
      to
      this tag. <abc& NAT & </abc. The value of the variable NAT = Cal&FLo.
      But
      due to the presence of the ampersand. There is an exception. What do I
      need
      to do to display & nd other special chracters correctly in xml tags.
      See if this helps...



      See: Section C.12 - Using Ampersands in Attribute Values (and Elsewhere)

      ....or, for the impatient, try using &amp; instead of the ampersand
      character.


      Comment

      Working...