我这样说:
<root>
<item>
<content type="HTML">
<![CDATA[<html>
<head></head>
<body>something goes there</body>
</html>]]>
</content>
</item>
<item>
<content type="Text">
Something goes there
</content>
</item>
</root>
内容为文本类型,我可以查阅node.getTextContent(。 问题在于,我想从Xml树中获取所有Html含量。 因此,我想得到的结果是:
"<html><head></head><body>some thing goes there</body></html>"
How can I do that with Document (DOM) in Android?
Note: Because I have to edit some xml content, so I can t use SAX.