I want to evaluate the parameters of an xml file (xmlNodeValue.....)
I tried to read the structure in two ways:
string fileName = "C:/work/xmlsso_test.xml";
Id = xmlDocumentFromFile(fileName, errMsg, errLine, errColumn);
or
string res;
xmlDocumentFromString(res, errMsg, errLine, errColumn);
string res ist the content of the xml-file read with netGet
I'm using netget because later I get the xml-file with http from an other process on an oother server.
in both cases i get the error message: unexpected end of file
I take any randomly selected XML file from the PC I have the same problem
I have the content of the string res on the screen and the content of the xml file is read correctly
whats wrong ?
open xml: unexpected end of file
- marcel.gay@wimag.ch
- Posts:62
- Joined: Thu May 07, 2015 6:55 pm
open xml: unexpected end of file
- Attachments
-
- xml.jpg (15.68 KiB) Viewed 3455 times
- adaneau
- Posts:310
- Joined: Tue Feb 21, 2012 9:49 am
Re: open xml: unexpected end of file
Hi,
Cannot reproduce this. I used same xml as you (as a string and as a .xml file) :
But it works fine (3,17). No error and parsing is good.
Are you sure nothing is adding extra char to your string making it not readable? Check with np++ if it is standard xml.
Regards
Alexandre
Cannot reproduce this. I used same xml as you (as a string and as a .xml file) :
Code: Select all
<?xml version="1.0" encoding="UTF-8"?>
<sessioninfo valid="true">
<username>wimag</username>
<grouptype name="String">
<scope>wimaggroup</scope>
</grouptype>
<expiredAt>0</expiredAt>
</sessioninfo>Are you sure nothing is adding extra char to your string making it not readable? Check with np++ if it is standard xml.
Regards
Alexandre
- marcel.gay@wimag.ch
- Posts:62
- Joined: Thu May 07, 2015 6:55 pm
Re: open xml: unexpected end of file
i don't know what the problem was, in the meantime i got a simulation software from the customer where i send the netget and it works here