0

How can I put the char < in XML?
Whenever I try to put it, it shows some kind of error. I know how to put double quotes and quotes, but for me this is getting difficult.

zx485
  • 28,498
  • 28
  • 50
  • 59
Allo
  • 3
  • 1
  • 4
    Possible duplicate of [Is there a way to include greater than or less than signs in an XML file?](http://stackoverflow.com/questions/29398950/is-there-a-way-to-include-greater-than-or-less-than-signs-in-an-xml-file) – CJBS Jan 03 '17 at 20:01

1 Answers1

0

Putting an XML-entity like < in an XML file is accomplished by using the appropriate escape-value.
This WikiPedia article explains that the correct encoding for the < char is &lt;.

zx485
  • 28,498
  • 28
  • 50
  • 59
  • Thanks but i have one more quest i.e. how to make the code area in application similar to the code area in android studio website. I mean we see the background of codes on these websites are different than the normal text background. How to highlight the syntax and keyword on android application page. – Allo Jan 04 '17 at 15:36
  • I'm sorry. but this is a whole new question. So you should open it as another question. I don't know much about _Android Studio_, so opening a new question for another audience will seriously improve your chances of getting a helpful answer. – zx485 Jan 04 '17 at 22:34