trying to build an xpath query...

Discussion in 'XML' started by Michael Dahlquist, Jul 1, 2003.

  1. 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
     
    Michael Dahlquist, Jul 1, 2003
    #1
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Learner
    Replies:
    1
    Views:
    1,004
    Marina Levit [MVP]
    Jan 30, 2006
  2. Anonymous
    Replies:
    0
    Views:
    1,512
    Anonymous
    Oct 13, 2005
  3. Michael Dahlquist

    Re: trying to build an xpath query...

    Michael Dahlquist, Jul 7, 2003, in forum: XML
    Replies:
    0
    Views:
    846
    Michael Dahlquist
    Jul 7, 2003
  4. Michael Dahlquist

    Re: trying to build an xpath query...

    Michael Dahlquist, Jul 9, 2003, in forum: XML
    Replies:
    0
    Views:
    829
    Michael Dahlquist
    Jul 9, 2003
  5. David Gordon

    xpath query query

    David Gordon, May 18, 2005, in forum: XML
    Replies:
    2
    Views:
    805
    David Gordon
    May 18, 2005
Loading...

Share This Page