get the cdata of a particular element . for example , if the xml document contains : < foo > < mimetype > application/pdf < / mimetype > < / foo > passing this the foo node and mimetype will return application/pdf . why this is n't a core part of the xml api i do not know ... concode_field_sep PlaceHolder placeHolder concode_field_sep Document loadXML concode_elem_sep String[] getRepeatedElementData
String function ( Node arg0 , String arg1 ) { Node loc0 = XPathAPI . selectSingleNode ( arg0 , arg1 ) ; if ( loc0 == null ) { return null ; } Node loc1 = loc0 . getFirstChild ( ) ; if ( loc1 == null ) { return null ; } String loc2 = loc1 . getNodeValue ( ) . trim ( ) ; return loc2 ; }