escaping special characters like & in android xml

前端 未结 3 1098
清歌不尽
清歌不尽 2020-12-14 06:08
something & something 

gives an error. How can i escape this?

Is this correct

         


        
3条回答
  •  感情败类
    2020-12-14 06:28

    Try reading this page: http://www.xmlnews.org/docs/xml-basics.html it looks like it contains the answer you are looking for.

    In summary, here is the list of escaped characters and the escape code

    Character  Predeclared Entity
    &          &
    <          <
    >          >
    "          "
    '          '
    

    Referenced from the link.

提交回复
热议问题