Click to See Complete Forum and Search --> : Parsing Flatfile to XML


geniusidler
August 28th, 2001, 10:30 PM
Hi,

I'm new to XML and couldn't figure out how can I parse a flatfile (positional/character delimited) into XML.

I have seen tons of examples in parsing and validating a XML document with a schema but not flatfile with a schema. Does anybody know how to go about doing this?

Any help is greatly appreciated!

Rgs
Wei Tien

rohinibt
December 13th, 2001, 02:36 AM
Hi
Need help on converting a flatfile into an XML file. Presuming I store the columns of the flatfile as tags and/or attributes in an XML template. As I understand , Java/VB code will need to be written to read from the flatfile and create an XML file matching the template.
Must mention here that I am only a day old in XML..
Any help would be appreciated.
Thanx.

NMTop40
December 13th, 2001, 12:31 PM
The head element should have the name of the table (maybe in plural form).

It should contain a number of sub-elements that relate to each row (could be same name as above in singular form).

The "record id" (assuming there is one) should always be an attribute. (Not essential but preferred).

Other members you can choose to have as child elements or attributes. If using child elements with values be certain to convert string values where appropriate (< & ' > characters )