Tecnologia do Blogger.
RSS

[androidbrasil-dev] Parsear html

Olá pessoal tudo bem?
Em uma app eu recebo um conteúdo html do servidor e faço o parse para pegar somente o que é necessário para mim, porem utilizei essa função Html.fromHtml(string).toString()  passando minhas string com o conteúdo html e o retorno foi interessante pois eu o html que eu passo é mais ou menos isso aqui:

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"            "http://www.w3.org/TR/1999/REC-html401-19991224/loose.dtd">        
<HTML>         <HEAD>          <TITLE></TITLE>         
 <META http-equiv="Content-Type" content="text/html; charset=" />         
 <META http-equiv="Expires" content="Fri, Jan 01 1900 00:00:00 GMT"/>        
  <META http-equiv="Pragma" content="no-cache"/>       
   <link rel="stylesheet" type="text/css" href="../_lib/css/Cromo/Cromo_form.css" />         
 <link rel="stylesheet" type="text/css" href="../_lib/buttons//.css" />        
 </HEAD>       
  <body class="form">    
      <table align="center" class="formBorder">
        <tr><td style="padding: 0">        
         <table style="width: 100%" class="formTable">
             <tr><td class="formData" style="padding: 15px 30px; text-align: center">           Usuário não autorizado          <br />       
   <form name="d" method="post"                               action="#"                               target="_self">          
  <input type="hidden" name="script_case_init" value="#"/>           
 <input type="hidden" name="script_case_session" value="#"/>         
   <input type="submit" name="sc_sai_seg" value="OK" class="" >           </form>        
   <script type="text/javascript">            function nm_m()            { }            function nm_at()            { }          </script>           </td></tr>
</table>          </td></tr></table>         </body>        </HTML>

Depois que utilizei a função a cima ele me retorna :
  Usuário não autorizado    
 function nm_m()            { }            function nm_at()            { }  

Então o que entendi é que essa função pega os valores que não são html? Alguém sabe?


Obrigado!

--
You received this message because you are subscribed to the Google Groups "Android Brasil - Dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to androidbrasil-dev+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

  • Digg
  • Del.icio.us
  • StumbleUpon
  • Reddit
  • RSS

0 comentários:

Postar um comentário