I think in XPath something like the following would work...
 
piece/text()[1]
 
or as Steve just said in a seperate mail, you could just iterate through the Text nodes, using the first one you find.
----- Original Message -----
Sent: Monday, September 23, 2002 9:18 PM
Subject: [dom4j-user] Extracting Text Fragments

Assume I have an XML document including the following fragment:
 
<piece>text1<blob1>stuff</blob1>text2</piece>
 
How do you extract text1 separately from text2 - that is, programmatically distinguish where text1 ends and text2 begins?
 
Regards,
 
Terry
 
 
 
   

Reply via email to