开发者

xml parsing separating tags problem to load in webview

开发者 https://www.devze.com 2023-03-19 19:09 出处:网络
i have a xml content like this , <bodytext> <p><div style=\'border:0px solid #d7d7d7; margin:2px 15px 2px 0px;width:230px;

i have a xml content like this ,

 <bodytext>
 <p><div style='border:0px solid #d7d7d7; margin:2px 15px 2px 0px;  width:230px;      
float:left'><div style='width:230px'><img src='images/sun-1.jpg' credit='' align='left'   
alt='Man' title='Man' border='1' valign='top' hspace='0' vspace='0' style='border:1px  
solid 开发者_如何转开发#d7d7d7; margin:2px 2px'/></div></div>
</p>
</bodytext>

i need to load content in webview .is that possible to load the content inside bodytext tag directly with parsing bodytext tag alone? or i need to parse each and every tag inside bodytext to show? i have tried parsing bodytext alone but content was null since it couldn't read other tags .. so is there any way to show bodytext content directly to webview? Thanks in advance for help.


Store data in a string replace opening and closing tag with or any other tag and load it

    [web loadHTMLString:str baseURL:nil];


yeah its possible to show content. just parse bodytext tag & pass all content to webview :)

0

精彩评论

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