J
Johannes Koch
Given this XML
<a>
<b>
<d/><!-- may occur here -->
<e/>
</b>
<c>
<f/><!-- may occur here -->
<g/>
</c>
</a>
I'd like to put the contents of d, e, f, and g into an HTML table row,
with the following order:
<tr>
<td><!-- if f occurs in XML, otherwise no td -->
<f/>
</td>
<td><!-- if d occurs in XML, otherwise no td -->
<d/>
</td>
<td>
<e/>
</td>
<td>
<g/>
</td>
</tr>
Additionally, if f occurs in XML, put an attribute to its td, otherwise
if d occurs in XML, put an attribute to its td, otherwise put an
attribute to e's td. In other words, the first td in the result sould
get the attribute.
<a>
<b>
<d/><!-- may occur here -->
<e/>
</b>
<c>
<f/><!-- may occur here -->
<g/>
</c>
</a>
I'd like to put the contents of d, e, f, and g into an HTML table row,
with the following order:
<tr>
<td><!-- if f occurs in XML, otherwise no td -->
<f/>
</td>
<td><!-- if d occurs in XML, otherwise no td -->
<d/>
</td>
<td>
<e/>
</td>
<td>
<g/>
</td>
</tr>
Additionally, if f occurs in XML, put an attribute to its td, otherwise
if d occurs in XML, put an attribute to its td, otherwise put an
attribute to e's td. In other words, the first td in the result sould
get the attribute.