I am trying to embedded a XML inside开发者_JAVA技巧 a HTML page with hidden div and using it latter to populate UI fields.
The problem is, I can't parse it since tag is missing.
How can I escape the entire tag?
Why not add that tag and then parse it?
I would be better to put the content inside a hidden textarea, to keep your HTML markup correct.
Either way, you should be able to escape it by changing <
to <
and >
to >
.
(This should be done to the all of the XML tags, not only the <?xml ?>
tag.)
精彩评论