Hi all,
I've tried and tried but I only fail and fail. My problem, a regex query on some XML data.
I have some data
File 1
File 2
I wan't to check if these documents contains the name Yo Daa between the <user> </user> tags (File 1 is of interest, not File 2). Have tried several methods with regex with no success. I use JDOM in some of the other procedures in my app, but it is to slow to use in the procedures where I make searches among several XML documents.
I read the files as normal text (FileReader and BufferedReader). I then compile a Pattern and use matches() (Matcher) to find the string combination.
Is there anyone outthere that might have a solution to this problem?
I've tried and tried but I only fail and fail. My problem, a regex query on some XML data.
I have some data
File 1
Code:
<user>
<username>abcabc</username>
<name>Yo Daa</name>
<email>yo.daa@tektips.com</email>
</user>
<customer>
<name>David Dave</name>
<email>david.dave@tektips.com</email>
</customer>
File 2
Code:
<user>
<username>abcabc</username>
<name>Jake Snake</name>
<email>jake.snake@tektips.com</email>
</user>
<customer>
<name>Yo Daa</name>
<email>yo.daa@tektips.com</email>
</customer>
I wan't to check if these documents contains the name Yo Daa between the <user> </user> tags (File 1 is of interest, not File 2). Have tried several methods with regex with no success. I use JDOM in some of the other procedures in my app, but it is to slow to use in the procedures where I make searches among several XML documents.
I read the files as normal text (FileReader and BufferedReader). I then compile a Pattern and use matches() (Matcher) to find the string combination.
Is there anyone outthere that might have a solution to this problem?