views:

25

answers:

1

Hi i have a document from which i am trying to extract a date. But the problem is within the node along with the date their is some text too. Something like

 <div class="postHeader">  
Posted on   
 July 20, 2009  9:22 PM PDT  

  </div>  

From this tag i just want the date item not the Posted on text. something like
./xhtml:div[@class = 'postHeader']
is getting everything. and to be precise, the document i have is basically a nodelist of this elements for eg i will get 10 nodes of these elements with different date values but to be worse the problem is sometime inside these tags some random other tags also pops us like anchors etc. Can i write a universal expath which will just get the date out of the div tag?

A: 

i am using java. I am not using XSL just extracting using xpaths

NA