This week's book giveaway is in the Big Data forum.
We're giving away four copies of Elasticsearch in Action and have Radu Gheorghe & Matthew Lee Hinman on-line!
See this thread for details.
The moose likes Beginning Java and the fly likes Test for integers in XML content? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Elasticsearch in Action this week in the Big Data forum!
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "Test for integers in XML content?" Watch "Test for integers in XML content?" New topic
Author

Test for integers in XML content?

Doug Zirbel
Greenhorn

Joined: May 13, 2002
Posts: 4
I'm using the Xerces DOM parser to read an XML file. One of the elements can contain either text or integers and I need to find out which. Is there some class already out there which does this, or would I have to write it myself?
Thanks!
Jessica Sant
Sheriff

Joined: Oct 17, 2001
Posts: 4313

how about Character.isDigit(char) and Character.isLetter(char)??
Doug Zirbel
Greenhorn

Joined: May 13, 2002
Posts: 4
Originally posted by Jessica Sant:
how about Character.isDigit(char) and Character.isLetter(char)??

THANKS!! Just what I was hoping for.
 
Consider Paul's rocket mass heater.
 
subject: Test for integers in XML content?