Does your xml has white spaces around the text data? such as: <Year> 2001 </Year>
This may cause you problems, since spaces or newlines may be in the final string you are trying to parse, depending on your parser setup. If this is not the case, then you probably need to provide more detailed example xml and code to debug. -JJ "R. Blaine Mincey" wrote: > Hi all. > > I am experiencing a problem that I thought was fairly simple to resolve > but I am now at the point of walking off the balcony --- well, maybe I > won't go that far since I still have to see the latest "Star > Wars"...anyway, I am parsing some integer values out of an XML > document. The XML document is almost as simple as: > > <Record> > <Year>2001</Year> > <Week>23</Week> > <Code>1</Code> > </Record> > > Within the characters() method, I pass the String value to a separate > method that keeps a reference to a "Record" object. Before setting > week, year, so on, I keep getting a NumberFormatException when I do a > Integer.parseInt(elementValue) on the value I have parsed from the XML. > I was just curious if anyone else has had this issue? > > Thanks so much for your help and have a great weekend! > > Blaine Mincey > [EMAIL PROTECTED] > > To change your membership options, refer to: > http://www.sys-con.com/java/list.cfm To change your membership options, refer to: http://www.sys-con.com/java/list.cfm
