开发者

using xpath for retrieving a particlar node

开发者 https://www.devze.com 2023-02-07 14:16 出处:网络
<TABLE cellSpacing=0 cellPadding=4 width=\"100%\" border=0> <TBODY><TR><TD><TABLE cellSpacing=0 cellPadding=0 width=515 bgColor=#ffffff border=0>
<TABLE cellSpacing=0 cellPadding=4 width="100%" border=0>
<TBODY><TR><TD><TABLE cellSpacing=0 cellPadding=0 width=515 bgColor=#ffffff border=0>
<TBODY><TR><TD>
<h4 class="style1"> RESULTS (PROVISIONAL)</h4>
<h4><br>

<br></b>
<br>

&nbsp;</h4>

<TR>
     <TD width="513">

<B>THONGAM DEEPAK SINGH (1kn06cs054) </B><br><br><br><br><hr>
<table><tr><td><b>Semester:</b></td><td><b>8</b></td><td></td>
<td> &nbsp;&nbsp;&nbsp;&nbsp;<b> Result:&nbs开发者_C百科p;&nbsp;FAIL </b></td></tr></table> 
<hr> <table><tr><td width=250>Subject</td><td width=60 align=center>External </td>
<td width=60 align=center>Internal</td><td align=center width=60>Total</td><td    align=center width=60>Result</td></tr><br><tr>
<td width=250><i>Programming Languages (06CS846)</i></td><td width=60  align=center>11</td><td width=60 align=center>18</td><td width=60 align=center>29</td><td  width=60 align=center><b>F</b></td></tr></table><br><br><table><tr><td></td><td></td><td>Total Marks:</td><td> 29 &nbsp;&nbsp;&nbsp; </td></tr></table>

This is the part of html result i am getting upon querying http://results.vtu.ac.in/ with usn=1kn06cs054.

I need to query the result table and store it in local database how can i query it using xpath. i need to store and display oputput as

Name=THONGAM DEEPAK SINGH  
Usn=1kn06cs054  
Semester=8  
Subject=Programming language  
Subject code=06cs846  
external-11  
internal-18  
total=29  
result = Fail  

I am new to parsing so not much idea about doing . solutions with code will be highly appreciated Thanks


What you get there can never be queried using XPATH, it's not valid XML.

0

精彩评论

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