06-28-2013 02:39 PM
07-01-2013 01:12 PM - edited 07-01-2013 01:19 PM
Hi Zou,
Could you be a little more specific. What exaclty do you want to accomplish. You can find a lot of information on BOM in XML and that is not something necessarily specific to any of our products.
07-01-2013 06:41 PM
I want detect BOM, and process the xml string accordingly.
> You can find a lot of information on BOM in XML and that is not something necessarily specific to any of our products.
Is that means CVI XML functions can't not handle BOM?
07-02-2013 05:00 PM
Hi Zou,
I don't know that LabWindows/CVI has any native functions that detect this. However, if it's saved as ASCII then it will show the encoding type at the very top. BOM is more for transferring XML text between XML parsers, not for a particular C editor.
07-02-2013 06:15 PM
I'm building a dll, which takes an xml input.
The caller is in unicode.
The xml string might have the BOM.
The xml string is parsered in CVI with XML function.
I have to handle the BOM in CVI.
07-03-2013 12:15 PM
Hi Zou,
You can write your own code to detect and parse accordingly. There are a lot of examples of this online http://www.xponentsoftware.com/Articles/Byte_order_mark.aspx
We also have a set of functions in the Programmers Toolbox under Libraries that might be of use to you. From what I've seen none of them is explicitly a function that tells you what kind of encoding an XML file has but nonetheless they are probably still useful. Go to Libraries>>Programmers Toolbox>>Endianess
Hope this helps,