2
 <content type="xhtml">

        <apxh:div>
            <apxh:p>xyz</apxh:p>
            <apxh:p>xyz</apxh:p>
            <apxh:p>xyz</apxh:p>
            <apxh:p>xyz</apxh:p>
            <apxh:p>xyz</apxh:p>

        </apxh:div>
    </content>

我可以通过以下方式获取类型中的“xhtml”,

       item.getChild(url,CONTENT).setStartElementListener(new StartElementListener() {

        @Override
        public void start(Attributes attributes) {
        str=attributes.getValue("type");


        }
    });
    item.getChild(url,CONTENT).setEndElementListener(new EndElementListener() {

        @Override
        public void end() {
            currentMessage.setType(str);

        }
    });

现在我怎样才能得到“apxh:div”,因为它被“:”分隔?

谢谢你。

4

1 回答 1

1

我认为您需要对其进行解析以进行 SOAP 解析。您的 Xml 的标记模式表明,尝试使用 Soap 解析肯定会帮助您...

于 2011-09-29T10:53:43.060 回答