Ampersands in XML (was: UTF-8 editing problems with GEdit)

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Paul M. Bucalo wrote:

I believe the problem was the use
one or more illegal character entries (like adding "&" to a title) and
that was causing it to fail. I seem to recall that you need to precede
each of these with an "\" to keep it from being interpreted, just like
at a BASH console.

In XML and HTML (and I would guess all sorts of SGML), ampersand starts an entity reference (which ends with a semicolon). If you want a literal ampersand you must write it as "&amp;", that is, an entity reference that references the ampersand entity. Likewise, if you want a less-than sign you can't write just "<", because that starts a tag, so you write it as "&lt;".


Björn Persson



[Index of Archives]     [Current Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Yosemite News]     [Yosemite Photos]     [KDE Users]     [Fedora Tools]     [Fedora Docs]

  Powered by Linux