Egon, I solved my issue thanks to your clue. It turns out: by calling the getElementText() method in StaX:
String smarts = eventReader.getElementText(); All characters of a tag will be concatenated until the end tag is found. This is not the case if you call event.asCharacters().getData()... Thanks for the help. I appreciate it. Nick -----Original Message----- From: Egon Willighagen [mailto:[email protected]] Sent: Saturday, February 04, 2012 3:18 PM To: Nick Vandewiele Cc: [email protected]; [email protected] Subject: Re: [Cdk-user] SMARTS [#1] in xml parsing? On Sat, Feb 4, 2012 at 1:57 PM, Nick Vandewiele <[email protected]> wrote: > The SMARTS string would not contain the entire SMARTS string and be > cut-off after [#1] sequence, probably due to the .asCharacters() method. Another aspect to keep in mind is that in the XML parser world character events do not require a single event for all character content of a single element. You have to concatenate *all* char events between the start and end tag (see the CMLHandler and 'convention' classes it uses)... did you try that? Egon -- Dr E.L. Willighagen Postdoctoral Researcher Department of Bioinformatics - BiGCaT Maastricht University (http://www.bigcat.unimaas.nl/) Homepage: http://egonw.github.com/ LinkedIn: http://se.linkedin.com/in/egonw Blog: http://chem-bla-ics.blogspot.com/ PubList: http://www.citeulike.org/user/egonw/tag/papers ------------------------------------------------------------------------------ Try before you buy = See our experts in action! The most comprehensive online learning library for Microsoft developers is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3, Metro Style Apps, more. Free future releases when you subscribe now! http://p.sf.net/sfu/learndevnow-dev2 _______________________________________________ Cdk-user mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/cdk-user

