M
Michael Dahlquist
Hi -
I've got a nasty XML file that reads something like this:
<a>
<b>text</b>
<c>text</c>
<d>
<e></e>
<e></e>
</d>
<c>text</c>
<b>text</b>
<f>text</f>
<c>text</c>
<b>text</b>
</a>
Each <b> element represents a new section. I need to process one
section at a time - each <b> element is a heading, and everything
between <b> elements becomes a separate document. Each section may
include both descendants and siblings of the <b> element.
The only way I've been able to make this work is to edit the source
XML so that there's a wrapper around each section, starting after each
<b> element, ending just before the next <b> element.
I want to say, "for every <b> element, apply a transformation to
everything between this <b> element and the next <b> element."
Is this possible? Should I send more information? Am I barking up the
wrong tree?
Let me know, thanks -
Michael
I've got a nasty XML file that reads something like this:
<a>
<b>text</b>
<c>text</c>
<d>
<e></e>
<e></e>
</d>
<c>text</c>
<b>text</b>
<f>text</f>
<c>text</c>
<b>text</b>
</a>
Each <b> element represents a new section. I need to process one
section at a time - each <b> element is a heading, and everything
between <b> elements becomes a separate document. Each section may
include both descendants and siblings of the <b> element.
The only way I've been able to make this work is to edit the source
XML so that there's a wrapper around each section, starting after each
<b> element, ending just before the next <b> element.
I want to say, "for every <b> element, apply a transformation to
everything between this <b> element and the next <b> element."
Is this possible? Should I send more information? Am I barking up the
wrong tree?
Let me know, thanks -
Michael