Sunday, January 14, 2007


I was trying to help someone in the BizTalk newsgroups, creating a flat file schema, and I ran into this very annoying error message: "Unable to match the data in the input stream.". I got the error message after having created the schema and trying to validate an instance, using VS.NET 2005.

I searched and searched...

  • Someone needed to set the "parser_optimization" to "complexity" - I had allready done that.
  • Someone else needed to set the "lookahead_depth to 0 - I had also tried that.
  • Someone needed to set the input type to "Native" instead of XML. Had that been my problem, I wouldn't have blogged about it - I'd be too embarassed :-)

No, the problem was that I had created parts of the schema using the flat file wizard. It had set one of my records to have "minOccurs" = 18 and "maxOccurs" = 18 as well. Since my test instance didn't have that many records in it, I got this error message. Changing the two 18's to the default 1 solved my problem.

I hope Microsoft considers this and perhaps in future releases find a better error description :-)

In order to test it, you can just download the working schema: Exolit_FlatFileSchema.xsd (91.59 KB) and the test instance: Instance.txt (.72 KB) - it will validate. But try to change the minOccurs and maxOccures of the "Invoices"-record to "18" - and revalidate.

Anyway... Hope this helps someone in the future.


Sunday, January 14, 2007 1:41:33 PM (Romance Standard Time, UTC+01:00)  #    Comments [3]  | 
Wednesday, March 26, 2008 5:27:58 PM (Romance Standard Time, UTC+01:00)
Even I also faced such a problem with a sap idoc schema.. got resolved by setting look ahead depth to 0.. Your artical was helpful to find out the possible causes.. :)

MS article on this..
Friday, June 4, 2010 6:33:45 AM (Romance Daylight Time, UTC+02:00)
Sure as heck helped me! Mine put in minOccurs=6 and maxOccurs=6 for whatever reason. odd balls!
Friday, June 4, 2010 8:25:54 AM (Romance Daylight Time, UTC+02:00)

Glad I could help. Yes, very strange... but hey, many things are strange... :-)

All comments require the approval of the site owner before being displayed.
Please login with either your OpenID above, or your details below.
Home page

Comment (Some html is allowed: a@href@title, b, blockquote@cite, em, i, strike, strong, sub, sup, u) where the @ means "attribute." For example, you can use <a href="" title=""> or <blockquote cite="Scott">.  

Enter the code shown (prevents robots):

Live Comment Preview

Theme design by Jelle Druyts