Jump to content
SASE1984

text() Queries

Recommended Posts

Hi All, How to get the text() in between first child's preceding-sibling? I would like to check whether any texts between <Para><UnorderedList> and </UnorderedList></Para>. i.e 1: <Para><UnorderedList Mark="None"><ItemContent><Para>sample text</Para></ItemContent> <ItemContent><Para>sample text</Para></ItemContent></UnorderedList>sample text2</Para> i.e 2: <Para>sample text<UnorderedList Mark="None"><ItemContent><Para>sample text</Para></ItemContent><ItemContent><Para>sample text</Para></ItemContent></UnorderedList></Para> Note: first child my be any element name where i have given as a example. Regards,Selvakumar

Share this post


Link to post
Share on other sites

I am not sure I understand what you want to achieve. If the 'para' element is the context node and you want to access the first child element then using the path '*[1]' suffices, then any preceding text node sibling is '*[1]/preceding-sibling::text()'.

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...

×
×
  • Create New...