How are you parsing the document? Using XOM the following snippet works fine
String xml = "<?xml version=\"1.0\" encoding=\"ISO-8859-1\"?>\n" +
"<note>\n" +
"\t<to>C[#1]NC</to>\n" +
"</note>";
Builder parser = new Builder();
Document x = parser.build(new StringReader(xml));
Nodes nodes = x.query("//to");
System.out.println("nodes.get(0).getValue() = " +
nodes.get(0).getValue());
On Fri, Feb 3, 2012 at 12:46 PM, Nick Vandewiele
<[email protected]> wrote:
> Hey,
>
>
>
> I created a xml structured file containing SMARTS strings.
>
>
>
> When I try to parse this xml file, SMARTS strings containing the sequence
> [#1] are misread by the xml parser, more specifically: the remaining
> characters of the string are not read in anymore. This is probably due to an
> illegal xml character sequence.
>
>
>
> Since [#1] represents a hydrogen atom in SMARTS, I really need this
> character sequence.
>
>
>
> Since you probably have experience in xml parsing with CDK, do you know a
> way to avoid the xml misinterpretation? Or could you maybe point me out to a
> CDK xml parser that handles SMARTS strings? Or maybe, there is an
> alternative in representing a hydrogen in SMARTS?
>
>
>
> Regards,
>
>
>
> Nick
>
>
>
>
> ------------------------------------------------------------------------------
> 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
>
--
Rajarshi Guha
NIH Chemical Genomics Center
------------------------------------------------------------------------------
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