SitePoint Sponsor

User Tag List

Results 1 to 2 of 2
  1. #1
    SitePoint Addict
    Join Date
    May 2007
    Posts
    242
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    About semi-colon usage in Xml files

    Hello. Some special characters e.g. <,> and & cant be used in xml file. When used they throw an error. But semi-colon usage doesnt provide an error like ampersand does, although semicolon is a special character in entities. Why using semicolon in xml files is safe?


    Thanks in advance.

  2. #2
    SitePoint Zealot c.t.c.'s Avatar
    Join Date
    Apr 2007
    Posts
    176
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    A character needs to be escaped only if it tells the XML parser that something "special" follows it. Semicolons appear at the end of a named entity. The ampersand that appears at the start of a named entity is what signals the entity and needs escaping if you want it to be printed literally.


Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •