Try using the DOMParser to read the schema into a DOM. You'll have to turn
off validation first. Then traverse the DOM to generate your text file
description. I'm developing something like this to generate a COBOL
copybook and its associated flat file from an XML instance document.
Richard Rowell
<[EMAIL PROTECTED] To: [EMAIL PROTECTED]
stems.com> cc:
Subject: Accessing the
internal schema representation
03/05/02 05:59 PM
Please respond to
xerces-j-user
I have developed and XML schema for use in importing/exporting data from my
companies flagship product. However there is some reluctance in certain
(customer) camps to learning XML and our XML schema for one-time imports.
I'm hoping to use the schema to auto-generate a specification for a
delimited
text file and the scripts to turn the delimited files into the
corresponding
XML.
What I'm looking for is an tree based class/interface structure that
represents the XML Schema. I assume that Xerces uses some similar
mechanism
internally for storing the schema in memory while parsing/validating.
So I guess my question is if anyone knows of a Java class library that can
model an XML schema in memory, hopefully in some type of tree structure.
TIA
--
Richard Rowell
Bowman Internet Systems
[EMAIL PROTECTED]
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]