Thanks Nick,
I eventually remembered what to do. Basically the lines are delimited
records (0xD, 0xA) and the content of the lines is positional. So you
have
to nest the records. The lines that are delimited have to be marked as
unbounded so they can repeat.
Also - the fact that my do***ent has tags at the beginning makes things
easier (I think). As part of the delimited record I include the tag.
The XML I have now is -
Header (delimited)
---HeaderInfo (positional record)
------Headerfields (positional fields)
Customer (delimited, unbounded)
---CustomerInfo (positional)
------CustomerInfoFields (positional fields)
---Bill (delimited, unbounded)
------BillInfo (positional)
---------BillInfoFields(positional fields)
------BillLine(delimited unbounded)
---------BillInfo(positional)
------------BillInfoFields(positional fields)
---more bills
more cusotmers
Trailer (delimited)
---TrailerInfo (positional)
------TrailerInfoFiellds(positional fields)
Anyway, I ended up spending about two hours flipping the flat file
properties around until it worked and validated. Too bad the
do***entation
is not clearer and good samples are so hard to find.
--
Jake Watkins
JakeW guerillaprogrammer com
EAI Architect - MCSD - C#, Web-Services, WSE, BizTalk 2004, SharePoint
2003,
InfoPath
"NickH" wrote:
>
> Hi Jake,
> I've posted a simple example of a working schema to the downloads area
> of my blog at http://www.modhul.com/downloads/
- see the 'Example
> Flat-File Schema (Nested Elements)' link.
>
> The schema is built against BizTalk 2004 but should work without much
> effort in 2006.
>
> Nick.
>
> On Jan 23, 5:32 pm, Jake Watkins
> <JakeWatk...@[EMAIL PROTECTED]
> wrote:
> > I have a flat file with the following format:
> > 000ABCD123456
> > 100XYZ6789
> > 200TTTzzzz
> > 200TTTzzzz
> > 100XYZ6789
> > 200TTTzzzz
> > 200TTTzzzz
> > 999XYZ
> >
> > All of the fields on each line are positional and fixed width. The
records
> > have a parent child relation****p. The 200 records are children of
100. a
> > 100 record can have many 200 records and there can be many 100 records
in a
> > file. The 000 is a header and the 999 is a trailer.
> >
> > I'm using BizTalk's flatfile wizard and it generates a schema that
will
> > validate but it doesn't preserve the relation****ps. I've tried moving
the
> > element around but that doesnt seem to work. Is there some other
technique I
> > should use?
> >
> > TIA
> >
> > --
> > Jake Watkins
> > JakeW guerillaprogrammer com
> > EAI Architect - MCSD - C#, Web-Services, WSE, BizTalk 2004, SharePoint
2003,
> > InfoPath
>
>


|