XML.orgXML.org
FOCUS AREAS |XML-DEV |XML.org DAILY NEWSLINK |REGISTRY |RESOURCES |ABOUT
OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.

 


Help: OASIS Mailing Lists Help | MarkMail Help

[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index]
Converting binary data to XML

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



[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index]


News | XML in Industry | Calendar | XML Registry
Marketplace | Resources | MyXML.org | Sponsors | Privacy Statement

Copyright 1993-2007 XML.org. This site is hosted by OASIS