I have something like this:
<?cond_start condition="Online" ?>
<p>This section is tagged with Conditional "Online".</p>
<?cond_end?>
<?cond_start condition="Print" ?>
<p>This section is tagged with Conditional "Print".</p>
<?cond_end?>
I need to process the content between the PIs based on the value of the PIs (condition="Online" / condition="Print"). I can select a specific PI with e.g. this:
//processing-instruction('cond_start')
But I have no idea how to go beyond this … Especially not, as there can be nested PIs like this:
<?cond_start condition="Online" ?>
<p>This section is <?cond_start condition="Comment" ?>Are you sure?<?cond_end?> tagged with Conditional "Online".</p>
<?cond_end?>
Aynone any ideas?
pelements that are betweencond_startandcond_endPIs? And, more importantly, are you sure this is a representative sample of your input XML? Includepelements that should not be selected, for example, because as the input is now, a simple//pwould work. - Mathias Müller