The easiest way is to use the selectNodes() method to find all the <rdf:li> elements (or their text nodes) and then extract the text from each of those. e.g.
List list = myXPath.selectNodes(myDocument); for (Iterator iter = list.iterator(); iter.hasNext(); ) { Node myNode = (Node) iter.next(); String x = myNode.getStringValue(); ... } James ----- Original Message ----- From: <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Wednesday, December 19, 2001 12:54 PM Subject: [dom4j-dev] <no subject> > Hi! Me again :-) > > When I'm using xpath looking for a certain Attribute which value is a Bag-Type similiar to this XML-extract: > ... > <prf:Attribute> > <rdf:Bag> > <rdf:li>Value1</rdf:li> > <rdf:li>Value2</rdf:li> > <rdf:li>Value3</rdf:li> > </rdf:Bag> > </prf:Attribute> > ... > > I receive by using: > > ... > myNode = myXPath.selectSingleNode(myDocument); > String x = myNode.getStringValue(); > ... > > in String x: > " > > Value1 > Value2 > Value3 > > " > > Is there a better way to get each Value as a single string or do I really have to parse my string for valid information, so discarding containing linefeeds & blanks? > > Hope I'm not bothering you... > > Regards, > Marc > ________________________________________________________________ > Keine verlorenen Lotto-Quittungen, keine vergessenen Gewinne mehr! > Beim WEB.DE Lottoservice: http://tippen2.web.de/?x=13 > > > > _______________________________________________ > dom4j-dev mailing list > [EMAIL PROTECTED] > https://lists.sourceforge.net/lists/listinfo/dom4j-dev > _________________________________________________________ Do You Yahoo!? Get your free @yahoo.com address at http://mail.yahoo.com _______________________________________________ dom4j-dev mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/dom4j-dev