Is it possible to have HTML text or CDATA inside an XML attribute?

后端 未结 6 1554
情话喂你
情话喂你 2020-11-29 11:04

I keep getting \"XML parser failure: Unterminated attribute\" with my parser when I attempt to put HTML text or CDATA inside my XML attribute. Is there a way to do this or

6条回答
  •  一整个雨季
    2020-11-29 11:19

    Yes you can when you encode the content within the XML tags. I.e. use & < > " ', that way it will not be seen as markup inside your markup.

提交回复
热议问题