Altova Mailing List Archives>Archive Index >comp.text.xml Archive Home >Recent entries [Thread Prev] >Thread Next - Re: XPath: Problem with inline elements XPath: Problem with inline elementsTo: NULL Date: 10/6/2008 8:58:00 AM Hello everybody, I have a question concerning XPath expressions. Consider this XML snippet: <foo title="an attempt"> <ul> <li>This works fine</li> <li>Before the inline element <em>Inside the inline element</em> after the inline element</li> <li>This also works fine</li> </ul> </foo> In order to reach the first list element, I would use the XPath expression "/foo/ul/li[1]", which works fine. (I get the first list element with "This works fine", as expected.) However, I need an XPath expression that returns the second list element in three "portions": - "Before the inline element " - "Inside the inline element" - " after the inline element" I can get the inside of the inline element with "/foo/ul/li/em", but I have no idea how to get the surrounding strings. Any ideas? Kind regards, Rainer | ||||||
| Company | Legal | Press | Partners | Careers | Sitemap | Contact Us | Altova Blog | Mobile | Full Site | |||
|
