开发者

Any alternative for getTextContent() to get the content of the xml document?

I want to get the xml document inside my document.I tried the below code

fullReport.append(docs.getElementsByTagName("report").item(0).getTextContent());

but I am getting an error for getTextContent() ie "The method getTextContent() is undefined for the type Node".I tried its casting method & I have also tried xml-apis-1.0.b2.jar implementation.I am running in updated jdk 1.6 only.Kindly tell me how to get correct t开发者_如何学运维his of this error.


The one reason may be is that getTextContent () is not defined under type Element dut to the fact your Android project target version should be less than 2.2.It is only available in the higher version of Android to enhance the lower version.Just try updating your version 2.2 or more

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜