Welcome to the SRP Forum! Please refer to the SRP Forum FAQ post if you have any questions regarding how the forum works.
SRP_Extract_XML and OSRead
Apologies in advance. I am a brand new OpenInsights / SRP user so I am still finding my feet on how everything works!
I am having an issue with SRP_Extract_XML which may turn out to be more of a OSRead byproduct.
SRP_Extract_XML was refusing to read XML (grabbed via OSRead from a valid well-formed XML file).
This is my method:
I quickly tracked my issue down to file encoding differences.
OSREAD on a valid UTF-8 XML file looks like this:
OSREAD on the same file saved as ANSI looks like this:
SRP_Extract_Xml is OK reading the latter. It can (understandably I guess) not read the former due to the preceding characters highlighted.
I guess my question then is related to my process. If OSRead is going to behave differently based on file encoding is that the best way to source my data for SRP_Extract_XML to do its' work?
I am having an issue with SRP_Extract_XML which may turn out to be more of a OSRead byproduct.
SRP_Extract_XML was refusing to read XML (grabbed via OSRead from a valid well-formed XML file).
This is my method:
OSOpen filename to inputFileHandle then
OsRead CSV from inputFileHandle then
xpath = '/PathToElement'
XmlSource = CSV
WorkPlace = SRP_Extract_Xml(XmlSource, XPath)
I quickly tracked my issue down to file encoding differences.
OSREAD on a valid UTF-8 XML file looks like this:
OSREAD on the same file saved as ANSI looks like this:
SRP_Extract_Xml is OK reading the latter. It can (understandably I guess) not read the former due to the preceding characters highlighted.
I guess my question then is related to my process. If OSRead is going to behave differently based on file encoding is that the best way to source my data for SRP_Extract_XML to do its' work?
Comments
Also, make sure to enable UTF8 character mode in OpenInsight's Application Properties (which you can find in OI's File menu).
What does the UTF8 property do here. My OI help file (9.3.2 and 9.4) refuses to load that particular link for some reason.