NAT8311 Error during parsing a valid XML-File.

Hi,

I have a valid XML-File. During parsing this file I get NAT8311 Error. :frowning:

At least I found the errors, but I can’t explain the errors. Maybe someone else here can.

XML-File

    
<?xml version="1.0" encoding="UTF-8"?>    
...    
   <rb:numerischesBasisdatum ao:Name="STENDEM">34</rb:numerischesBasisdatum>    
   <rb:numerischesBasisdatum ao:Name="STENDEW">34</rb:numerischesBasisdatum>    
...    
    
 <rb:TabellenEintrag>    
     <rb:Tabelle xsi:type="ao:Sterbetafel" ao:Kommutationswert="alpha" ao:Geschlecht="m" ao:Startalter="0" ao:Name="PK001426" />    
   </rb:TabellenEintrag>    
   <rb:TabellenEintrag>    
     <rb:Tabelle xsi:type="ao:Sterbetafel" ao:Kommutationswert="alpha" ao:Geschlecht="w" ao:Startalter="0" ao:Name="PK001771" />    
   </rb:TabellenEintrag>    
...    
  1. First Error occurs while Parsing
   
   <rb:numerischesBasisdatum ao:Name="STENDEM">34</rb:numerischesBasisdatum>    

After Changing this to

   
   <rb:numerischesBasisdatum ao:Name="STENDEM" >34</rb:numerischesBasisdatum>    

everything works find (Hint: I put a space after “STENDEM”).

  1. Second Error is the other way around:
    After changing XML-File from

to

everything works find (Hint: I deleted the space after “PK001426”).

This is really strange, but maybe someone can explain it.

Hi nweejoh,
can you please provide some information about the platform, the Natural version used?
Regards,
Michael

Hi,

here the informations from SYPROD:

Cmd Product Name V/R SM Date
__ Natural 6.2 6 2008-05-23
__ Natural IDL Generator 6.1 1 2008-05-23

I’m working on OpenSystem.

Regrards,

Markus Wessjohann

Hi,

at least I found the Bug.
I read the XML-File piece by piece and compress the strings to a big one.

I used the “leaving no space”-option, because otherwise the compress-Statement inserts an extra space. Very bad in XML-Tags :-(.

The problem begins when the secound string starts with an space. This space from the file is leaving out by the compress statement. So i got
xsi:type="ao:Sterbetafel"ao:Kommutationswert=“alpha”
instead of
xsi:type=“ao:Sterbetafel” ao:Kommutationswert=“alpha”
.
Conclusion: Read the whole XML-File into one dynamic variable.

Regrards,

Markus Wessjohann