From: Burkhard S. <bur...@bu...> - 2006-05-02 16:48:41
|
Hi, it's true, in XML you need to escape the < and > characters so that the parser won't confuse them with element boundaries. In Java, you can use two calls to the String.replaceAll method to do this. See here: http://java.sun.com/j2se/1.4.2/docs/api/java/lang/String.html#replaceAll(java.lang.String,%20java.lang.String) Best regards, Burkhard Mar...@wa... wrote: > Hi Robert, > > sorry for the delay in replying. I've been on the road too much... > "V6" is a special flavor of JCAMP that doesn't always follow the original > specs, so I guess it needs some special treatment. > Maybe Brkhard has an idea for a less clumsy way to treat the <>s? > > Mit freundlichen Grüßen / Best regards > > Maren. > > > Dr. Maren Fiege > Senior Product Manager > > Waters GmbH > Europaallee 27, D-50226 Frechen, Germany > Tel.+49 2234 9207 - 0 Fax +49 2234 9207-99 > > http://www.waters.com/informatics > > > > "Prof. Robert John Lancashire" <rob...@uw...> wrote on > 11.04.2006 15:58:18: > >> Maren >> >> it is true that you can add a $$ and a comment at the end of a header > value >> but also true that you can put in a $$ at the start of a line with a > comment. >> In the first case it is perhaps easy enough to identify what the comment >> referred to but not so in the second case. >> >> In fact the IR protocol had suggested that after the ##JCAMP-DX= >> label that a comment was inserted that gave the software and >> version that created the file. This is not always done. >> >> I note that in the Bruker "vs 6" NMR files that they have things like >> ##TITLE= >> ##JCAMP-DX= >> ##DATA TYPE= >> >> >> and further down may have >> $$ ##TITLE= >> $$ ##JCAMP-DX= >> $$ ##DATA TYPE= >> >> >> which is something I was not expecting! >> >> To try to read every JCAMP comment line and convert < and > >> to XML/HTML < and > is a possibility but clumsy!? >> >> Robert >> >> >> >> on 11/04/2006 09:31 AM Mar...@wa... said the following: >>> Hi, >>> >>>> Yes. There's no explicit relation between an XML comment and the >>>> associated element. The same problem exists in JCAMP. It's hard to >>>> determine which data item a JCAMP comment belongs to. >>> Is that so? I thought you could put a JCAMP comment into a line that >>> already has a JCAMP label in it. Robert? >>> >>> Mit freundlichen Grüßen / Best regards >>> >>> Maren. >>> >>> >>> Dr. Maren Fiege >>> Product Manager >>> >>> Waters GmbH >>> Europaallee 27, D-50226 Frechen, Germany >>> Tel.+49 2234 9207 - 0 Fax. +49 2234 9207-99 >>> >>> http://www.waters.com/informatics >>> >>> >>> >>> >> >> -- >> Prof. Robert J. Lancashire mailto:rob...@uw... >> Department of Chemistry Tel (876) 512 3026 >> University of the West Indies, Kingston 7 Fax (876) 9771835 >> Mona Campus, JAMAICA. http://wwwchem.uwimona.edu.jm/chrl.html >> > > |