Trouble Validating Flatfile Schema

Home Page Forums BizTalk 2004 – BizTalk 2010 Trouble Validating Flatfile Schema

Viewing 1 reply thread
  • Author
    Posts
    • #14828

      I am building a schema for a Flat File.

      A portion of the Flat File looks like this:

      Value A,,Value B
      Value A,,Value C

      When I set the source of this schema and Validate Instance, I get an XML output that looks like this:
      <MySchema>
      <Detail>
      <A>Value A</A>
      <C>Value C</C>
      </Detail>
      </MySchema>

      I want <B></B> in the XML, missing data or not.

      I also get an error message:
      C:\\Documents and Settings\\nk\\Local Settings\\Temp\\_SchemaData\\Test_Native_output.xml: error BEC2004: The element ‘Detail’ has invalid child element ‘C’. List of possible elements expected: ‘B’.

    • #14827

      Your schema does not seem to match your input data.
      A flat file schema must match the structure of the input flat file. You can change this structure using a map at a later stage.

      The flat file:

      ValueA,,ValueB
      ValueA,,ValueC

      will have a schema
      root
      record
      field1
      field2
      field3

      You should end up with something like this:
      <root>
      <record>
      <field1>ValueA</field1>
      <field2/>
      <field3>ValueB</field3>
      </record>
      <record>
      <field1>ValueA</field1>
      <field2/>
      <field3>ValueC</field3>
      </record>
      </root>

      Can you explain a bit more about what you are trying to achieve.

Viewing 1 reply thread
  • The forum ‘BizTalk 2004 – BizTalk 2010’ is closed to new topics and replies.