Re: problems for reading XML files using the class TXMLEngine

From: Rene Brun <Rene.Brun_at_cern.ch>
Date: Fri, 5 Nov 2010 14:10:06 +0100


Thanks Augusto for reporting and Sergei for fixing the problem. Now in SVN trunk)

Rene

On 05/11/2010 13:59, Sergey Linev wrote:
> Dear Augusto,
>
> We found a reason why file with several empty lines at the end do not
> parsed with newer ROOT.
> This problem will be fixed soon in ROOT repository.
>
> Regards,
> Sergey
>
>
> Antonio Augusto Alves Junior wrote:
>> Ok Rene, I followed your suggestion and was ok. Thanks.
>>
>> Do you know why the same xml file can be parsed without problems in
>> the version 5.24 and in the version 5.26x we get this problems with
>> the funny characters ?
>>
>> Best regards
>> Augusto
>>
>> On 05-11-2010 12:58, Rene Brun wrote:
>>> The last line of your file starts with a funny character.
>>> Delete this line and you will be able to read your file.
>>>
>>> Sergei, could you add a protection in this particular case?
>>>
>>> Rene
>>>
>>> Antonio Augusto Alves Junior wrote:
>>>> Hi,
>>>>
>>>> Okay, attached up there is a xml file. I got again the
>>>>
>>>> "Error in<TXMLEngine::ParseFile>: Unexpected end of xml file "
>>>>
>>>> error message when I tried read this file using the xmlreadfile.C in
>>>> the "$ROOTSYS/tutorials/xml" folder.
>>>>
>>>> Thanks
>>>> Augusto
>>>>
>>>> On 05-11-2010 12:40, Rene Brun wrote:
>>>>> Fine, but you did not answer my question.
>>>>> If something does not work, please post the exact script
>>>>> reproducing your problem, together with the input xml file.
>>>>>
>>>>> Rene
>>>>>
>>>>> Antonio Augusto Alves Junior wrote:
>>>>>> Hi guys,
>>>>>>
>>>>>> I just saved a new xml file with the name "example.xml" and called
>>>>>> again the xmlreadfile.C to observe if i would get some error.
>>>>>> Actually, I am seeing that some times I got the "Unexpected end of
>>>>>> xml file "
>>>>>> error and sometimes no.
>>>>>>
>>>>>> I am using the latest stable version of ROOT (v5.26b).
>>>>>>
>>>>>> Do I need load some library before use TXMLEngine ? Its very
>>>>>> strange, because in the v5.24 installed in the same computer, the
>>>>>> TXMLEngine works in very stable way.
>>>>>>
>>>>>> I will investigate a bit more to characterize better the problem
>>>>>> and give a more precise output.
>>>>>>
>>>>>> Thanks
>>>>>> A.A.
>>>>>>
>>>>>> Em 05-11-2010 11:14, Rene Brun escreveu:
>>>>>>> Hi Antonio,
>>>>>>>
>>>>>>> Just like Sergei, I have no problems in reading your file.
>>>>>>> Could you indicate how you call the xmlreadfile.C script?
>>>>>>> directory where you execute? and the argument to the script?
>>>>>>>
>>>>>>> Rene
>>>>>>>
>>>>>>>
>>>>>>> Antonio Augusto Alves Junior wrote:
>>>>>>>> Hello, thanks Rene, but in fact I followed your instructions
>>>>>>>> without problems.
>>>>>>>>
>>>>>>>> Any way, I am still getting the same error with different xml
>>>>>>>> files, for example:
>>>>>>>>
>>>>>>>> <?xml version="1.0"?>
>>>>>>>> <config>
>>>>>>>> <L0>2</L0>
>>>>>>>> </config>
>>>>>>>>
>>>>>>>> If one try read this file using the xmlreadfile.C script,
>>>>>>>> obtains this error message
>>>>>>>>
>>>>>>>> Error in<TXMLEngine::ParseFile>: Unexpected end of xml file
>>>>>>>>
>>>>>>>> Please, could you have a look?
>>>>>>>>
>>>>>>>> A. Augusto.
>>>>>>>>
>>>>>>>> P.S: I saved the xml file in the directory
>>>>>>>> $ROOTSYS/tutorials/xml with the name example.xml.
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>> On 05-11-2010 08:01, Rene Brun wrote:
>>>>>>>>> Read the comments in this script on how to use it.
>>>>>>>>> You have to run the script xmlnewfile.C first ::)
>>>>>>>>>
>>>>>>>>> Rene Brun
>>>>>>>>>
>>>>>>>>> On 05/11/2010 02:27, Antonio Augusto Alves Junior wrote:
>>>>>>>>>> dear Rooters ,
>>>>>>>>>>
>>>>>>>>>> I am having difficulties to use the TXMLEngine class for read
>>>>>>>>>> xml files in the ROOT 5.26/xxx. The problem can be seen
>>>>>>>>>> quicklly just running the tutorial example
>>>>>>>>>>
>>>>>>>>>> xmlreadfile.C
>>>>>>>>>>
>>>>>>>>>> in the directory $ROOTSYS/tutorials/xml :
>>>>>>>>>>
>>>>>>>>>> root [4] .x xmlreadfile.C Error in<TXMLEngine::ParseFile>:
>>>>>>>>>> Unexpected end of xml file
>>>>>>>>>> root [5]
>>>>>>>>>>
>>>>>>>>>> In the ROOT 5.24/xxx the class TXMLEngine was running nice.
>>>>>>>>>> Please, can someone check this issue?
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>> Thanks in advance
>>>>>>>>>> A.A.
>>>>>>>>>> --
>>>>>>>>>> "O mais corrente neste mundo, nestes tempos em que às cegas
>>>>>>>>>> vamos tropeçando, é esbarrarmos, ao virar a esquina mais
>>>>>>>>>> próxima, com homens e mulheres na maturidade da existência e
>>>>>>>>>> da prosperidade, que, tendo sido aos dezoito anos briosos
>>>>>>>>>> revolucionários decididos a arrasar o sistema dos pais e pôr
>>>>>>>>>> no seu lugar o paraíso, enfim, da fraternidade, se encontram
>>>>>>>>>> agora, com firmeza pelo menos igual, repoltreados em
>>>>>>>>>> convicções e práticas que, depois de haverem passado por
>>>>>>>>>> qualquer das muitas versões do conservadorismo moderado,
>>>>>>>>>> acabaram por desembocar no mais desbocado e reaccionário
>>>>>>>>>> egoísmo. Em palavras não tão cerimoniosas, estes homens e
>>>>>>>>>> estas mulheres, diante do espelho da sua vida, cospem todos os
>>>>>>>>>> dias na cara do que foram o escarro do que são."
>>>>>>>>>>
>>>>>>>>>> José Saramago, em Ensaio sobre a lucidez
>>>>>>>>>>
>>>>>>>>>> =============================================
>>>>>>>>>>
>>>>>>>>>> A. Augusto Alves Jr.
>>>>>>>>>>
>>>>>>>>>> Istituto Nazionale di Fisica Nucleare - Sezione di Roma
>>>>>>>>>> c/o Dipartimento di Fisica - Università degli Studi di Roma
>>>>>>>>>> "La Sapienza"
>>>>>>>>>>
>>>>>>>>>> P.le Aldo Moro, 2 - 00185 Roma - Italy
>>>>>>>>>> tel.: 00 39 06 49914229
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>> --
>>>>>>>> "O mais corrente neste mundo, nestes tempos em que às cegas
>>>>>>>> vamos tropeçando, é esbarrarmos, ao virar a esquina mais
>>>>>>>> próxima, com homens e mulheres na maturidade da existência e da
>>>>>>>> prosperidade, que, tendo sido aos dezoito anos briosos
>>>>>>>> revolucionários decididos a arrasar o sistema dos pais e pôr no
>>>>>>>> seu lugar o paraíso, enfim, da fraternidade, se encontram agora,
>>>>>>>> com firmeza pelo menos igual, repoltreados em convicções e
>>>>>>>> práticas que, depois de haverem passado por qualquer das muitas
>>>>>>>> versões do conservadorismo moderado, acabaram por desembocar no
>>>>>>>> mais desbocado e reaccionário egoísmo. Em palavras não tão
>>>>>>>> cerimoniosas, estes homens e estas mulheres, diante do espelho
>>>>>>>> da sua vida, cospem todos os dias na cara do que foram o escarro
>>>>>>>> do que são."
>>>>>>>>
>>>>>>>> José Saramago, em Ensaio sobre a lucidez
>>>>>>>>
>>>>>>>> =============================================
>>>>>>>>
>>>>>>>> A. Augusto Alves Jr.
>>>>>>>>
>>>>>>>> Istituto Nazionale di Fisica Nucleare - Sezione di Roma
>>>>>>>> c/o Dipartimento di Fisica - Università degli Studi di Roma "La
>>>>>>>> Sapienza"
>>>>>>>>
>>>>>>>> P.le Aldo Moro, 2 - 00185 Roma - Italy
>>>>>>>> tel.: 00 39 06 49914229
>>>>>>>>
>>>>>>>>
>>>>>>>>
>
Received on Fri Nov 05 2010 - 14:10:12 CET

This archive was generated by hypermail 2.2.0 : Mon Nov 08 2010 - 23:50:01 CET