开发者

To parse an xml having attributes

 <content type="xhtml">

        <apxh:div>
            <apxh:p>xyz</apxh:p>
            <apxh:p>xyz</apxh:p>
            <apxh:p>xyz</apxh:p>
            开发者_JAVA百科<apxh:p>xyz</apxh:p>
            <apxh:p>xyz</apxh:p>

        </apxh:div>
    </content>

I am able to get the "xhtml" present in type by,

       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);

        }
    });

Now how can i get the "apxh:div" as it is separated by ":"?

Thank you.


I think you need to parse it for SOAP parsing. The tag patterns of ur Xml shows that, try out using Soap parsing surely help you...

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜