04-13-2007 01:33 PM
04-16-2007 05:13 PM
04-17-2007 08:27 AM
Hi ogre,
To set the encoding scheme for an XML document, you can use the createProcessingInstruction. Our CVIXML instrument driver (which
is basically and user-friendly wrapper made around the MSXML interface) uses
this method to specify the version of the XML document. So, what you could do
is simply modify our existing CVIXML instrument driver to include the encoding.
It's actually quite simple to do this.
First off, open up the cvixml.c file
located in the <CVI>\toolslib\toolbox directory in CVI. Then change the
value of the constant XML_PROC_INSTR_DATA
(located on line 42) from "version=\"1.0\"" to "version=\"1.0\"
encoding=\"UTF-8\"". The save your source file and
select Options >> Create Object file. This object file
(cvixml.obj) is attached to your cvixml.fp function panel.
To test this out, you could simply use some code like
CVIXMLNewDocument ("RootElement", &xmlDoc);
CVIXMLSaveDocument (xmlDoc, 0, "C:\\Test.xml");
Then the Test.xml document should say
<?xml version="1.0" encoding="UTF-8"?>
<RootElement/>
Hope this helps!
Best Regards,
03-06-2012 08:56 AM
I create XML Documents (testreports) using CVI 2009 and the CVIXML instrument driver.
I got almost the same problem... the only thing i need, is to add a schema (.xsl) into the XML document over the LabWindows CVIXML-Functions...
is this possible?
03-07-2012 12:31 PM