Please can some one help. I have a web application which reads and XML file from disk into a org.w3c.Document object. Once I have the Document object I want to be able to write a method as follows:
public Document getDocumentSatisfyingCriteria(Document initialDom,
String criteria){
// In here I wish to write logic that searches the initalDom object for all occurrences of the criteria string. It then copies all those nodes consiting of the criteria string in their 'Text Value' into another Document object and returns it.
}
Any ideas on the best approach to use? And cde snippet woould be useful.