I've got a protocol which uses the Text Writer component (and many other preceding components...) to build the "NucleotidesProperties.xml" file that's used by the Biovia Bioreg application to define chemically modified bases used to build siRNA fragments. This XML file is read in by Bioreg, as well as some of my own protocols, by a pipeline pilot XML Reader component.
Today I discovered that a smart quote character, if present in an XML file, causes the pipeline pilot XML reader to crash. The custom protocol that builds this protocol pulls data from a database that ultimately allows the user free-text entry on a name field. Someone did enter a smart quote character for one of the records. That smart quote then found its way into my protocol-built XML file.
So my question is this - is there a function which can clean up text characters so that they are XML-friendly? Something analagous to the URLencode function? Otherwise, I suppose I can write.a component which checks every character and make sure it's legal. But if a function or a component already exists that would be so much nicer!
Today I discovered that a smart quote character, if present in an XML file, causes the pipeline pilot XML reader to crash. The custom protocol that builds this protocol pulls data from a database that ultimately allows the user free-text entry on a name field. Someone did enter a smart quote character for one of the records. That smart quote then found its way into my protocol-built XML file.
So my question is this - is there a function which can clean up text characters so that they are XML-friendly? Something analagous to the URLencode function? Otherwise, I suppose I can write.a component which checks every character and make sure it's legal. But if a function or a component already exists that would be so much nicer!