0
Is there any way to insert html into xml? I wanted to insert some html properties into my code, can I do that? How? If it’s possible to help me, I’m new in the area so don’t listen to me.
0
Is there any way to insert html into xml? I wanted to insert some html properties into my code, can I do that? How? If it’s possible to help me, I’m new in the area so don’t listen to me.
3
Yes, it is possible, just use CDATA: https://en.wikipedia.org/wiki/CDATA
Example:
<xml>
<title>Your HTML title</title>
<htmlData><![CDATA[<html>
<head>
<script/>
</head>
<body>
Your HTML's body
</body>
</html>
]]>
</htmlData>
</xml>
Credits from the example: https://stackoverflow.com/questions/4412395/is-it-possible-to-insert-html-content-in-xml-document
Good luck
Browser other questions tagged html xml
You are not signed in. Login or sign up in order to post.
This makes no sense. XML is a context-free markup language, i.e., the context defines how XML should be interpreted. Can you use HTML in XML? In XML of what? It makes sense HTML in the context of the XML you are using?
– Andre
Could you give us an example? It’s the same thing as wanting to put csv inside json or using Nosql inside SQL, it doesn’t make sense. Examples for your case
– Costamilam