Using an XML File



Hello,

I'm trying to parse an XML File with enterprise Cobol for z/OS

The code is ok, I'm using this example to handle events :
http://publibz.boulder.ibm.com/cgi-bin/bookmgr_OS390/FRAMESET/igy3pg20/5.0

But I've got a problem :
if I have some new lines between roots tag and others tags, there is an
exception (code 2) at the execution

For example, exception with this :
<?xml version="1.0" encoding="ibm-1140" standalone="yes" ?>
<personnes>
<personne><nom>Hauchon</nom><prenom>Paul</prenom></personne>
</personnes>

OK with this :
<?xml version="1.0" encoding="ibm-1140" standalone="yes" ?>
<personne><nom>Hauchon</nom><prenom>Paul</prenom></personne>

Does anybody know what's the problem ?

Is there a special File Definition to define an XML file ?

I have read a lot of documentation and a lot of messages in this group,
but I'm a newbie in Cobol, and I haven't found any answers

I would be great if someone could explain me how define an XML file :)
Thank you

.



Relevant Pages

  • Re: Using an XML File
    ... if I have some new lines between roots tag and others tags, ... For example, exception with this: ... Is there a special File Definition to define an XML file? ...
    (comp.lang.cobol)
  • Re: default namespace / Xmlvalidatingreader
    ... You dont get an exception in the case of the second file, ... validation warning should be thrown. ... XmlReader readerToUse = validatingReader; ...
    (microsoft.public.dotnet.xml)
  • Re: XmlValidatingReader / Default Namespace
    ... You dont get an exception in the case of the second file, ... validation warning should be thrown. ... XmlReader readerToUse = validatingReader; ...
    (microsoft.public.dotnet.xml)
  • Re: Xml validation exception only occurs outside debugger - VS 200
    ... I'm able to reproduce the problem on any Xml file (even ones produced by ... Could you attach the entire stack trace and message for the exception? ... outside the debugger I receive the following error: ...
    (microsoft.public.dotnet.xml)
  • Re: Try...Catch... Resume??
    ... What is the method you are using to read the XML file? ... Using the preceding exception handling you cannot return to the loop to ... possibility of it throwing ArgumentException, ArgumentNullException, ... If you have checked for permissions or used code access security to ...
    (microsoft.public.dotnet.general)