title: NULL Appearing in FLAT File, unable to Parse using XSD
body: <p>We are trying to covert position based FLAT file (<a href="http://i.stack.imgur.com/EryDU.jpg" rel="nofollow">http://i.stack.imgur.com/EryDU.jpg</a>) to valid XML. The file contain Header, Detail Line, Trailer. </p>
  
  <p>Detail Line has  data character, whilespace Character and ALSO some other special character like NULL. </p>
  
  <p>NULL character filling one position length. Space also filling one position length.</p>
  
  <p>we have used following XSD to parse this FLAT FILE</p>
  
  <pre><code>                &lt;?xml version="1.0" encoding="UTF-8" ?&gt;
  
              &lt;xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema"
                          xmlns:nxsd="http://xmlns.oracle.com/pcbpel/nxsd"
                          xmlns:tns="http://xmlns.oracle.com/pcbpel/nxsdABO"
                          targetNamespace="http://xmlns.oracle.com/pcbpel/nxsdABO"
                          elementFormDefault="qualified"
                          attributeFormDefault="unqualified"
  
                          nxsd:version="NXSD"
                          nxsd:stream="chars"
                          nxsd:encoding="ISO-8859-1"
              &gt;
  
  
                &lt;xsd:element name="ROOT"&gt;
                  &lt;xsd:complexType&gt;
                  &lt;xsd:sequence minOccurs="1"&gt;
                      &lt;xsd:element name="Header" nxsd:startsWith="H" minOccurs="1" maxOccurs="1"&gt;
                        &lt;xsd:complexType&gt;
                          &lt;xsd:sequence&gt;
                            &lt;xsd:element name="InterfaceID" type="xsd:string" nxsd:style="fixedLength" nxsd:length="3" /&gt;
                            &lt;xsd:element name="FileSeqNo" type="xsd:int" nxsd:style="fixedLength" nxsd:length="5" /&gt;
                            &lt;xsd:element name="TimeStamp" type="xsd:int" nxsd:style="fixedLength" nxsd:length="14" /&gt;
                            &lt;xsd:element name="FromSystem" type="xsd:string" nxsd:style="fixedLength" nxsd:length="10" /&gt;
                            &lt;xsd:element name="ToSystem" type="xsd:string" nxsd:style="fixedLength" nxsd:length="10" minOccurs="0"/&gt;
                            &lt;xsd:element name="FromSAPSys" type="xsd:string" nxsd:style="fixedLength" nxsd:length="8" minOccurs="0"/&gt;
                            &lt;xsd:element name="FromSAPclt" type="xsd:string" nxsd:style="fixedLength" nxsd:length="3" minOccurs="0"/&gt;
                            &lt;xsd:element name="ToSAPSys" type="xsd:string" nxsd:style="fixedLength" nxsd:length="8" minOccurs="0"/&gt;
                            &lt;xsd:element name="ToSAPclt" type="xsd:string" nxsd:style="fixedLength" nxsd:length="4" minOccurs="0"/&gt;
                            &lt;xsd:element name="UserID" type="xsd:string" nxsd:style="terminated" nxsd:terminatedBy="${eol}" minOccurs="0"/&gt;
                          &lt;/xsd:sequence&gt;
                        &lt;/xsd:complexType&gt;
                      &lt;/xsd:element&gt;      
  
                      &lt;xsd:element name="DataLine2" nxsd:startsWith="D012" maxOccurs="unbounded" minOccurs="1"&gt;
                        &lt;xsd:complexType&gt;
                          &lt;xsd:sequence&gt;
                            &lt;xsd:element name="TransactionType" type="xsd:string" nxsd:style="fixedLength" nxsd:length="2" minOccurs="0"/&gt;
                            &lt;xsd:element name="Name" type="xsd:string" nxsd:style="fixedLength" nxsd:length="30" /&gt;
                            &lt;xsd:element name="PostingKey" type="xsd:string" nxsd:style="fixedLength" nxsd:length="11" /&gt;
                            &lt;xsd:element name="AdderssKey" type="xsd:string" nxsd:style="fixedLength" nxsd:length="26" /&gt;
                            &lt;xsd:element name="TransactionKey" type="xsd:byte" nxsd:style="terminated" nxsd:terminatedBy="${eol}" minOccurs="0"/&gt;
                          &lt;/xsd:sequence&gt;
                        &lt;/xsd:complexType&gt;
                      &lt;/xsd:element&gt;
  
  
                      &lt;xsd:element name="Trailer" nxsd:startsWith="T" minOccurs="1" maxOccurs="1"&gt;
                        &lt;xsd:complexType&gt;
                          &lt;xsd:sequence&gt;
                            &lt;xsd:element name="FRecords" type="xsd:string" nxsd:style="fixedLength" nxsd:length="9" minOccurs="0"/&gt;
                            &lt;xsd:element name="DRecords" type="xsd:string" nxsd:style="terminated"  nxsd:terminatedBy="${eol}" minOccurs="0"/&gt;
                          &lt;/xsd:sequence&gt;
                        &lt;/xsd:complexType&gt;
                      &lt;/xsd:element&gt;
                  &lt;/xsd:sequence&gt;
                  &lt;/xsd:complexType&gt;
                &lt;/xsd:element&gt;
  
              &lt;/xsd:schema&gt;
  </code></pre>
  
  <p>SOA Suite 11g File adapter is unable to parse the FLAT file, it is returning empty XML document when file has NULL character </p>
  
  <p>But things are working fine when we replace those NULL with whi.</p>
  
  <p>Are we missing anything in the XSD for parsing the NULL ? </p>
  
  <p>Is there any other approach to deal with NULL?</p>
  
  <p>Need guidance from someone out there</p>