Beefy Boxes and Bandwidth Generously Provided by pair Networks
Clear questions and runnable code
get the best and fastest answer
 
PerlMonks  

Re: [OT] Re: Converting very nested XHTML to XML

by richill (Monk)
on Jul 10, 2006 at 16:05 UTC ( #560176=note: print w/ replies, xml ) Need Help??


in reply to [OT] Re: Converting very nested XHTML to XML
in thread Converting very nested XHTML to XML

The actual html is here, the trouble Im having is that the relationships between the <node> and the following <node> is indicated by the number of images preceeding the TD containing the node name. I guess I need to learn more xslt better because I dont know how to write a rule for that at the moment..

<html> <head> <meta name="generator" content="HTML Tidy for Windows (vers 1st April 2002), see www.w3.org" +/> <title>Hierarchy</title> </head> <body> <!-- Begin Placeholding Table --><!-- Begin Table --> <table><!-- begin title --> <tr> <td style='height: 11px; padding: 1px; text-align: LEFT; background-color: + #111111; font-weight: 111; font-size: 11pt; font-family: Geneva, Ari +al; color: #CCCCCC;' colspan="1"><!-- begin title table --> <table background="images/tab-header-background-main.gif" width="" cellspacing="1" cellpadding="1"> <tr> <td style="margin: 1px; padding-bottom: 1px; padding-left: 1px; padding-ri +ght: 1px; padding-top: 1px; width: 1px;"> <img src="images/tab-header-vertical-line.gif" align="left" width="1" height="11" /></td> <td align="left" width="11"><img src="images/main-spacer.gif" width="11" /></td> <td align="left" width="11"><img src="images/tab-header-arrow.gif" width="11" height="11" style="margin-top: 1px;" /></td> <td align="left" width="1"><img src="images/main-spacer.gif" width="1" /></td> <td align="left" valign="middle" nowrap="nowrap"><span class='tabHeader'><!-- Begin Table --></span> <table width="" cellspacing="1" cellpadding="1"> <tr> <td>Hierarchy</td> <td><img src="images/main-docs.gif" width="11" /></td> </tr> </table> <!-- End Table --></td> <td width="1"><img src="images/tab-header-vertical-line.gif" width="1" height="11" /></td> </tr> </table> </td> </tr> <!-- end title --> <tr bgcolor="#D1D1D1"> <td colspan="1"> <div align="left"><strong>Branch</strong>:ooHome &gt;Life Sciences &gt; Life Sciences &gt; Life Sciences</div> </td> </tr> <tr bgcolor="#CFCFCF"> <td> <table> <tr> <td><img src="images/main-spacer.gif" /><img src="images/main-spacer.gif" /><img src="images/main-spacer.gif" /><img src="images/explore-last-item.gif" /><a href="x"><img src="images/explore-node-open.gif" alt="Close" /></a><img src="images/main-spacer.gif" /></td> <td>Life Sciences</td> </tr> </table> </td> <td><img src="images/main-drop-down.gif" onmouseover="(this, 111);" /></td> <td> <table border='1' align='right'> <tr> <td>.</td> <td>.</td> <td>.</td> </tr> </table> </td> </tr> <tr bgcolor="#D1D1D1"> <td> <table> <tr> <td><img src="images/main-spacer.gif" /><img src="images/main-spacer.gif" /><img src="images/main-spacer.gif" /><img src="images/main-spacer.gif" /><img src="images/explore-another-item.gif" /><a href="x"><img src="images/explore-node-open.gif" alt="Close" /></a><img src="images/main-spacer.gif" /></td> <td>TESTING AREA</td> </tr> </table> </td> <td><img src="images/main-drop-down.gif" /></td> <td></td> </tr> <tr bgcolor="#CFCFCF"> <td> <table> <tr> <td><img src="images/main-spacer.gif" /><img src="images/main-spacer.gif" /><img src="images/main-spacer.gif" /><img src="images/main-spacer.gif" /><img src="images/explore-straight-down.gif" /><img src="images/explore-another-item.gif" /><a href="x"><img src="images/explore-node-open.gif" alt="Close" /></a><img src="images/main-spacer.gif" /></td> <td>Wellcome Trust Four Year Ph.D. Test 1</td> </tr> </table> </td> <td><img src="images/main-drop-down.gif" /></td> <td></td> </tr> <tr bgcolor="#D1D1D1"> <td> <table> <tr> <td><img src="images/main-spacer.gif" /><img src="images/main-spacer.gif" /><img src="images/main-spacer.gif" /><img src="images/main-spacer.gif" /><img src="images/explore-straight-down.gif" /><img src="images/explore-straight-down.gif" /><img src="images/explore-another-item.gif" /><img src="images/explore-node-leaf.gif" alt="Leaf" /><img src="images/main-spacer.gif" /></td> <td>nav-pagelayout</td> </tr> </table> </td> <td><img src="images/main-drop-down.gif" /></td> <td></td> </tr> <tr bgcolor="#CFCFCF"> <td> <table> <tr> <td><img src="images/main-spacer.gif" /><img src="images/main-spacer.gif" /><img src="images/main-spacer.gif" /><img src="images/main-spacer.gif" /><img src="images/explore-straight-down.gif" /><img src="images/explore-straight-down.gif" /><img src="images/explore-last-item.gif" /><img src="images/explore-node-leaf.gif" alt="Leaf" /><img src="images/main-spacer.gif" /></td> <td>nav-locator</td> </tr> </table> </td> <td><img src="images/main-drop-down.gif" /></td> <td></td> </tr> <tr bgcolor="#D1D1D1"> <td> <table> <tr> <td><img src="images/main-spacer.gif" /><img src="images/main-spacer.gif" /><img src="images/main-spacer.gif" /><img src="images/main-spacer.gif" /><img src="images/explore-straight-down.gif" /><img src="images/explore-another-item.gif" /><a href="x"><img src="images/explore-node-open.gif" alt="Close" /></a><img src="images/main-spacer.gif" /></td> <td>Wellcome Trust Four Year Ph.D. Test 1</td> </tr> </table> </td> <td><img src="images/main-drop-down.gif" /></td> <td></td> </tr> <tr bgcolor="#CFCFCF"> <td> <table> <tr> <td><img src="images/main-spacer.gif" /><img src="images/main-spacer.gif" /><img src="images/main-spacer.gif" /><img src="images/main-spacer.gif" /><img src="images/explore-straight-down.gif" /><img src="images/explore-straight-down.gif" /><img src="images/explore-last-item.gif" /><img src="images/explore-node-leaf.gif" alt="Leaf" /><img src="images/main-spacer.gif" /></td> <td>nav-locator</td> </tr> </table> </td> <td><img src="images/main-drop-down.gif" /></td> <td></td> </tr> <tr bgcolor="#D1D1D1"> <td> <table> <tr> <td><img src="images/main-spacer.gif" /><img src="images/main-spacer.gif" /><img src="images/main-spacer.gif" /><img src="images/main-spacer.gif" /><img src="images/explore-straight-down.gif" /><img src="images/explore-another-item.gif" /><a href="x"><img src="images/explore-node-open.gif" alt="Close" /></a><img src="images/main-spacer.gif" /></td> <td>Teaching &amp; Learning</td> </tr> </table> </td> <td><img src="images/main-drop-down.gif" /></td> <td></td> </tr> <tr bgcolor="#CFCFCF"> <td> <table> <tr> <td><img src="images/main-spacer.gif" /><img src="images/main-spacer.gif" /><img src="images/main-spacer.gif" /><img src="images/main-spacer.gif" /><img src="images/explore-straight-down.gif" /><img src="images/explore-straight-down.gif" /><img src="images/explore-another-item.gif" /><a href="x"><img src="images/explore-node-open.gif" alt="Close" /></a><img src="images/main-spacer.gif" /></td> <td>Postgraduate</td> </tr> </table> </td> <td><img src="images/main-drop-down.gif" /></td> <td></td> </tr> <tr bgcolor="#D1D1D1"> <td> <table> <tr> <td><img src="images/main-spacer.gif" /><img src="images/main-spacer.gif" /><img src="images/main-spacer.gif" /><img src="images/main-spacer.gif" /><img src="images/explore-straight-down.gif" /><img src="images/explore-straight-down.gif" /><img src="" /><img src="images/explore-another-item.gif" /><img src="images/explore-node-leaf.gif" alt="Leaf" /><img src="images/main-spacer.gif" /></td> <td>Research (Ph.D., M.Phil. &amp; M.Res.) Programmeso<img src="images/main-link-section-int.gif" width="11" height="1" alt="Internal Link Section" title="Internal Link Section" /></td> </tr> </table> </td> <td><img src="images/main-drop-down.gif" /></td> <td></td> </tr> <tr bgcolor="#CFCFCF"> <td> <table> <tr> <td><img src="images/main-spacer.gif" /><img src="images/main-spacer.gif" /><img src="images/main-spacer.gif" /><img src="images/main-spacer.gif" /><img src="images/explore-straight-down.gif" /><img src="images/explore-straight-down.gif" /><img src="" /><img src="images/explore-another-item.gif" /><img src="images/explore-node-leaf.gif" alt="Leaf" /><img src="images/main-spacer.gif" /></td> <td>Marie Curie Training Fellowshipso<img src="images/main-link-section-int.gif" width="11" height="1" alt="Internal Link Section" title="Internal Link Section" /></td> </tr> </table> </td> <td><img src="images/main-drop-down.gif" /></td> <td></td> </tr> <tr bgcolor="#D1D1D1"> <td> <table> <tr> <td><img src="images/main-spacer.gif" /><img src="images/main-spacer.gif" /><img src="images/main-spacer.gif" /><img src="images/main-spacer.gif" /><img src="images/explore-straight-down.gif" /><img src="images/explore-straight-down.gif" /><img src="" /><img src="images/explore-another-item.gif" /><img src="images/explore-node-leaf.gif" alt="Leaf" /><img src="images/main-spacer.gif" /></td> <td>Taught (M.Sc.) Programmeso<img src="images/main-link-section-int.gif" width="11" height="1" alt="Internal Link Section" title="Internal Link Section" /></td> </tr> </table> </td> <td><img src="images/main-drop-down.gif" /></td> <td></td> </tr> <tr bgcolor="#CFCFCF"> <td> <table> <tr> <td><img src="images/main-spacer.gif" /><img src="images/main-spacer.gif" /><img src="images/main-spacer.gif" /><img src="images/main-spacer.gif" /><img src="images/explore-straight-down.gif" /><img src="images/explore-straight-down.gif" /><img src="" /><img src="images/explore-another-item.gif" /><img src="images/explore-node-leaf.gif" alt="Leaf" /><img src="images/main-spacer.gif" /></td> <td>Graduate Training Programmeo<img src="images/main-link-section-int.gif" width="11" height="1" alt="Internal Link Section" title="Internal Link Section" /></td> </tr> </table> </td> <td><img src="images/main-drop-down.gif" /></td> <td></td> </tr> <tr bgcolor="#D1D1D1"> <td> <table> <tr> <td><img src="images/main-spacer.gif" /><img src="images/main-spacer.gif" /><img src="images/main-spacer.gif" /><img src="images/main-spacer.gif" /><img src="images/explore-straight-down.gif" /><img src="images/explore-straight-down.gif" /><img src="" /><img src="images/explore-another-item.gif" /><img src="images/explore-node-leaf.gif" alt="Leaf" /><img src="images/main-spacer.gif" /></td> <td>Student Support &amp; Mentoringo<img src="images/main-link-section-int.gif" width="11" height="1" alt="Internal Link Section" title="Internal Link Section" /></td> </tr> </table> </td> <td><img src="images/main-drop-down.gif" /></td> <td></td> </tr> <!-- close this off --> </table> </body> </html>


Comment on Re: [OT] Re: Converting very nested XHTML to XML
Download Code

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://560176]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others musing on the Monastery: (14)
As of 2014-08-01 15:12 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    Who would be the most fun to work for?















    Results (27 votes), past polls