11-07-2019 03:16 AM
Hi guys
here is my code, I'm learning about XML
I can create a xml file now I'm wondering is there a way to convert testxmldocument into char array(or string) directly?
================================================================
char buffer[256];
char path[256] = "C:\\test.xml";
CVIXMLDocument testxmldocument;
CVIXMLStatus status;
status = CVIXMLNewDocument("Test1", &testxmldocument);
status = CVIXMLSaveDocument(testxmldocument, 1, path);
CVIXMLGetErrorString(status, buffer, sizeof(buffer));
CVIXMLDiscardDocument(testxmldocument);
================================================================
Thanks!
Jacky Liao
11-07-2019 03:23 AM
I must admit that I don't get the point...
An XML file actually is a text file: you could open and read it with normal file I/O functions like fopen (), fread ()...: is this what you want to do?
If on the contrary you want to get the active content of the document leaving away all open and close tags (<item> and </item>) you can do that with cvi xml instrument, which it appears you are already using. So: what is your goal?
It seems to me you should explain better your question.
11-07-2019 03:23 AM