Hi All

I have another issue for apache poi, from our nicely generated beans from
the ooxml xsd. We have one particular bean which can have a number of
children, including text, hyperlinks and comments. The bean offers to give
us an ordered list of all the text, an ordered list of hyperlinks etc. The
snag is we can't figure out how to get all the entries in the order they
occur, irrespective of their type.

So, for this snippet of xml (scheme is at
http://people.apache.org/~nick/wml.xsd):
    <w:p w:rsidR="00812E80" w:rsidRDefault="00812E80">
      <w:r>
        <w:t xml:space="preserve">We have a </w:t>
      </w:r>
      <w:hyperlink r:id="rId4" w:history="1">
        <w:r w:rsidRPr="00812E80">
          <w:rPr>
            <w:rStyle w:val="Hyperlink"/>
          </w:rPr>
          <w:t>hyperlink</w:t>
        </w:r>
      </w:hyperlink>
      <w:r>
        <w:t xml:space="preserve"> here, and </w:t>
      </w:r>
    </w:p>

We want to be able to get back the children in this order, irrespective of
their types. This will allow us to get the textual data out in the order
it occurs. For now, all we can do is get all the r's, then all the
hyperlinks, and our text is then "We have a  here, and hyperlink", when we
really wanted "We have a hyperlink here, and "

Is there a trick to getting back all the children of the w:p, in the order
they occur, irrespective of the child's type?

Thanks
Nick

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to