5 Replies Latest reply on Jan 12, 2018 9:32 AM by DurgadasHaldar

    XSD  for quoted string

    3060084

      Hi,

       

      I have a file which is quoted and comma separated file i am trying to create the xsd

       

      file looks like this.

      "ABC,123,99"

      "122,122,1,1,1,1"

      "q"

       

      All these records are of different data types.

       

      Below is my xsd but my file contails quotes in string and the beginning of the file how to read the file?? Below is my sample xsd which i have created

       

      <xsd:element name="Root-Element">

          <xsd:complexType>

            <xsd:choice minOccurs="1" maxOccurs="unbounded" nxsd:choiceCondition="terminated" nxsd:terminatedBy=",">

              <xsd:element name="RECORD1" nxsd:conditionValue="ABC">

                <xsd:complexType>

                  <xsd:sequence>

                    <xsd:element name="c2" type="xsd:string" nxsd:style="terminated" nxsd:terminatedBy="," nxsd:quotedBy="&quot;"/>

                    <xsd:element name="c3" type="xsd:string" nxsd:style="terminated" nxsd:terminatedBy="," nxsd:quotedBy="&quot;"/>

                    <xsd:element name="c4" type="xsd:string" nxsd:style="terminated" nxsd:terminatedBy="${eol}" nxsd:quotedBy="&quot;"/>

                  </xsd:sequence>

                </xsd:complexType>

              </xsd:element>

              <xsd:element name="RECORD2">

                <xsd:complexType>

                  <xsd:sequence>

                    <xsd:element name="C2" type="xsd:int" nxsd:style="terminated" nxsd:terminatedBy="," nxsd:quotedBy="&quot;"/>

                    <xsd:element name="C3" type="xsd:string" nxsd:style="terminated" nxsd:terminatedBy="," nxsd:quotedBy="&quot;"/>

                    <xsd:element name="C4" type="xsd:string" nxsd:style="terminated" nxsd:terminatedBy="," nxsd:quotedBy="&quot;"/>

                    <xsd:element name="C5" type="xsd:string" nxsd:style="terminated" nxsd:terminatedBy="," nxsd:quotedBy="&quot;"/>

                    <xsd:element name="C6" type="xsd:string" nxsd:style="terminated" nxsd:terminatedBy="," nxsd:quotedBy="&quot;"/>         

                    <xsd:element name="C20" type="xsd:int" nxsd:style="terminated" nxsd:terminatedBy="${eol}" nxsd:quotedBy="&quot;"/>

                  </xsd:sequence>

                </xsd:complexType>

              </xsd:element>

              <xsd:element name="RECORD3" nxsd:conditionValue="q">

                <xsd:complexType>

                  <xsd:sequence>

                    <xsd:element name="C2" type="xsd:int" nxsd:style="terminated" nxsd:terminatedBy="${eol}" nxsd:quotedBy="&quot;"/>

                  </xsd:sequence>

                </xsd:complexType>

              </xsd:element>

            </xsd:choice>

          </xsd:complexType>

        </xsd:element>