users@jaxb.java.net

Re: Who uses jaxb?

From: Aleksei Valikov <valikov_at_gmx.net>
Date: Wed, 17 Aug 2005 16:56:42 +0200

Hi.


> This is slightly off topic, but I’m sure that this is the right bunch of
> people to ask…
>
> What open source tool would easily grab data, not in tagged or XML
> format, from a text file and generate classes that would spit out XML.
>
> I.e. you don’t have a schema, but can break up the text string by
> setting the offsets and want to end up with Java classes.
>
>
>
> For example,
>
> 1234PeteDavids12081990jobless
>
> Should translate into a class like below
>
> Member (
>
> * ID = 1234
> * Name = Peter
> * Surname = Davids
> * Date of Birth = 12081990
> * Job Status = jobless

Any grammar-driven parser generator. Examples are JavaCC, ANTLR.
You'll need to define EBNF-style grammar and these tools will generate
parsers for you. Adding SAX on top of it is a piece of cake.

Bye.
/lexi