Forums Register Login

String matches

+Pie Number of slices to send: Send
I have a arraylist which contains the nodes of an xml.
One typical node is "<event id="...">".
How do i find this entry using the ListIterator.
I tried :
ListIterator steitr=......;
while(setitr.hasPrevious())
{
String elementvalue=(String)setitr.previous();
elementvalue=elementvalue.trim();

if((elementvalue.matches("<event\\s*id")) && (.....))
{
....
}

}


How do I use matches(regex) to find this entry.
Beware the other head of science - it bites! Nibble on this message:
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com


reply
reply
This thread has been viewed 975 times.
Similar Threads
HttpServlet Request getParameter automatic converting
How to transform this?
Assigning iterators
jQuery Validator and select
Traversing an ArrayList
More...

All times above are in ranch (not your local) time.
The current ranch time is
Mar 28, 2024 10:38:35.