Forums Register Login

looking for java parasers for parsing string expressions

+Pie Number of slices to send: Send
Hi,
I am looking for java parasers for parsing string expressions.
could pls someone tell me about few good java parsers for parsing a string.
+Pie Number of slices to send: Send
u can pars object of any class into its child class ....
but here ur question is quite ambigous to understand actually...
what is ur requirment....
explain ur requirment first
+Pie Number of slices to send: Send
hi
u could provide a bit more info regarding wot u wanna parse exactly. hav u tried using string tokenizers?
for example, if i define a string as follows:
String expr="<HTML> <H1> parse this </H1> </HTML>";
-say i wanna parse this and extract from it each of the html tags, say <HTML>, then i create a string tokenizer:
StringTokenizer tokens = new StringTokenizer(expr);
-to get the first token or sub-string <HTML>, i just say:
Sting html=tokens.nextToken();
-so u could hav a loop which prints all the sub strings:
while(tokens.hasMoreElements())
{
System.out.println(tokens.nextToken());
}
-hope this helps.
neamz
+Pie Number of slices to send: Send
sorry about the way my answer has come out. i used a string expression which had html tags in it. the browser has outputted these in HTML - this wasnt my intention. maybe i picked a bad example...
neamz
+Pie Number of slices to send: Send
hi,
thanks to everyone for their responses.....
you all are real helpful
tx
AA
All of the following truths are shameless lies. But what about this tiny ad:
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com


reply
reply
This thread has been viewed 1145 times.
Similar Threads
Printing repeated Characters
Javascript: Replace
looking for java parasers for parsing string expressions
Query regarding String.split
XML parsing
More...

All times above are in ranch (not your local) time.
The current ranch time is
Mar 28, 2024 11:13:27.