Skip to Main Content

Integration

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

XSD for quoted string

3060084Jan 8 2018 — edited Jan 12 2018

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>

Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Feb 9 2018
Added on Jan 8 2018
5 comments
977 views