Hi Folks, Scenario: You electronically receive book data from a supplier. The data is in binary. You want to convert the data to XML so that you can leverage the large suite of XML tools that the
marketplace provides. Here is an excerpt of an input that you receive, displayed in a hex editor: You could implement your own custom parser to process the input data. But that’s not the declarative way. You want to simply describe the input and then feed that description into a tool that
will parse the data based on your description – Hey tool, here’s my description of the input’s format, now you figure out how to parse it.
So, you need a language for declaratively describing the format of the input data. In other words, you need a data format description language. Such a language exists! It’s called DFDL (Data
Format Description Language). DFDL is a language for describing data formats, both text and binary. Interestingly, DFDL is an XML language! A DFDL processor takes two inputs: the input data and a document that describes the format of the input data. That document
is called a DFDL schema. I created a DFDL schema that describes the format of the binary book data. I handed my DFDL schema and the input data to a DFDL processor which then parsed the data based on my description. The
output is XML. The binary is converted to XML! Pretty neat, don’t you think? Want to learn more about DFDL? Here is my updated DFDL tutorial: http://www.xfront.com/DFDL/index.html /Roger |