Hmmm - my very limited understanding of xpath says that /book/body/chapter/p
should work.

Some quick testing with XPath Expression Testbed shows both
/book/body/chapter/p and /book/body/chapter//p selecting the right nodes.

I'm not sure what's up.

Are you actually looking for /book/body/chapter/p/text() ? That would select
the text of the paras rather than the nodes.

I'm not too familiar with how DIH uses xpath expressions though.

The xpath test site I like to use (not that I have used much xpath) is:
http://www.whitebeam.org/library/guide/TechNotes/xpathtestbed.rhtm


-- 
- Mark

http://www.lucidimagination.com

On Wed, Jul 1, 2009 at 8:01 PM, Jay Hill <jayallenh...@gmail.com> wrote:

> I'm using the XPathEntityProcessor to parse an xml structure that looks
> like
> this:
>
> <book>
>    <author>Joe Smith</author>
>    <title>World Atlas</title>
>    <body>
>        <chapter>
>            <p>Content I want is here</p>
>            <p>More content I want is here.</p>
>            <p>Still more content here.>/p>
>        </chapter>
>    </body>
> </book>
>
> The author and title parse out fine:       <field column="title"
> xpath="/book/title"/>  <field column="author" xpath="/book/author"/>
>
> But I can't get at the data inside the <p> tags. I want to get all
> non-markup text inside the body tag with something like this:
>
> <field column="body" xpath="/book/body/chapter//p"/>
>
> but that is not supported.
>
> Does anyone know of a way that I can get the content within the <p> tags
> without the markup?
>
> Thanks,
> -Jay
>

Reply via email to