I'm hoping to convert the content of 3 adjacent TD
elements in a TR
using Yahoo Pipes to a comma-delimited list of values. Source: Epic Systems Hospitals.
HTML snippet:
...
<table width="623" cellspacing="0" cellpadding="0" border="0">
<colgroup>
<tbody>
<tr height="20">
<td width="425" height="20">Institution 0</td>
<td width="134">Minneapolis</td>
<td width="64">MN</td>
</tr>
<tr height="20">
<td height="20">Institution 1</td>
<td>Philadelphia</td>
<td>PA</td>
</tr>
...
I've used the "XPath fetch page" source to correctly isolate the TR
elements using an XPATH=//tr[@height='20']
.
I'm having difficulty getting the TD
elements, however. It's not obvious to me which component I should be using, so I chose a Sub-element with the 'special variable substitution' syntax. Unfortunately, ${td.0.content}
doesn't work.
What am I not understanding?
** edit **
My goal is to create an XML stream that resembles:
<institutions>
<institution name='Institution 0' city='Minneapolis' region='MN'/>
<institution name='Institution 1' city='Philadelphia' region='PA'/>
...
<institutions/>