Use of Greater Than Symbol in XML

XmlXsd

Xml Problem Overview


I had created the xml document with xml version="1.0".

In that document I need to use the greater than symbol > and less than symbol <.

How should I include those symbols? It's not working.

&gt; and &lt; are not working for me.

Is there any special encoder for this?

Xml Solutions


Solution 1 - Xml

Solution 2 - Xml

You can try to use CDATA to put all your symbols that don't work.

An example of something that will work in XML:

<![CDATA[
function matchwo(a,b) {
    if (a < b && a < 0) {
        return 1;
   } else {
       return 0;
   }
}
]]>

And of course you can use &lt; and &gt;.

Solution 3 - Xml

Use &gt; and &lt; for 'greater-than' and 'less-than' respectively

Attributions

All content for this solution is sourced from the original question on Stackoverflow.

The content on this page is licensed under the Attribution-ShareAlike 4.0 International (CC BY-SA 4.0) license.

Content TypeOriginal AuthorOriginal Content on Stackoverflow
QuestionpraveenjayapalView Question on Stackoverflow
Solution 1 - XmlGregView Answer on Stackoverflow
Solution 2 - XmlPatrick DesjardinsView Answer on Stackoverflow
Solution 3 - XmltonysView Answer on Stackoverflow