# NAT8311 Error during parsing a valid XML-File.

**URL:** <https://techcommunity.softwareag.com/t/nat8311-error-during-parsing-a-valid-xml-file/93194>\
**Category:** Forum\
**Tags:** Adabas-Natural, Natural, Natural-Web-and-XML-Technology\
**Created:** [March 30, 2010, 7:40pm UTC](https://techcommunity.softwareag.com/t/nat8311-error-during-parsing-a-valid-xml-file/93194 "2010-03-30T19:40:28Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![mwessjoh](https://avatars.discourse-cdn.com/v4/letter/m/8797f3/32.png) [@mwessjoh](https://techcommunity.softwareag.com/u/mwessjoh)\
**Post date:** [March 30, 2010, 7:40pm UTC](https://techcommunity.softwareag.com/t/nat8311-error-during-parsing-a-valid-xml-file/93194/1 "2010-03-30T19:40:28Z")

</div>

Hi,

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

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

XML-File

```auto
    
<?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

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

After Changing this to

```auto
   
   <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

> [@](#):
>
> rb:TabellenEintrag  
> \<rb:Tabelle xsi:type=“ao:Sterbetafel” ao:Kommutationswert=“alpha” ao:Geschlecht=“m” ao:Startalter=“0” ao:Name=“PK001426” /\>  
> \</rb:TabellenEintrag\>

to

> [@](#):
>
> rb:TabellenEintrag  
> \<rb:Tabelle xsi:type=“ao:Sterbetafel” ao:Kommutationswert=“alpha” ao:Geschlecht=“m” ao:Startalter=“0” ao:Name=“PK001426”/\>  
> \</rb:TabellenEintrag\>

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

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

---

<div class="post-metadata">

**Author:** ![anon29934956](https://avatars.discourse-cdn.com/v4/letter/a/ee7513/32.png) [@anon29934956](https://techcommunity.softwareag.com/u/anon29934956)\
**Post date:** [March 31, 2010, 12:25pm UTC](https://techcommunity.softwareag.com/t/nat8311-error-during-parsing-a-valid-xml-file/93194/2 "2010-03-31T12:25:28Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![mwessjoh](https://avatars.discourse-cdn.com/v4/letter/m/8797f3/32.png) [@mwessjoh](https://techcommunity.softwareag.com/u/mwessjoh)\
**Post date:** [March 31, 2010, 2:52pm UTC](https://techcommunity.softwareag.com/t/nat8311-error-during-parsing-a-valid-xml-file/93194/3 "2010-03-31T14:52:28Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![mwessjoh](https://avatars.discourse-cdn.com/v4/letter/m/8797f3/32.png) [@mwessjoh](https://techcommunity.softwareag.com/u/mwessjoh)\
**Post date:** [April 1, 2010, 7:46pm UTC](https://techcommunity.softwareag.com/t/nat8311-error-during-parsing-a-valid-xml-file/93194/4 "2010-04-01T19:46:47Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![system](https://global.discourse-cdn.com/techcommunity/original/3X/c/d/cd19967bb605d28a72d77eb83a1cae22f3df2eb8.svg) [@system](https://techcommunity.softwareag.com/u/system)\
**Post date:** [April 2, 2021, 2:58pm UTC](https://techcommunity.softwareag.com/t/nat8311-error-during-parsing-a-valid-xml-file/93194/5 "2021-04-02T14:58:17Z")

</div>


