Skip to Main Content

Java EE (Java Enterprise Edition) General Discussion

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

convert csv to XML as per DTD

843834Mar 24 2004 — edited Mar 25 2004
Hi,
I have a csv file custinfoInd.csv.. Sample Data is as follows:
Vivek,Puranik,Software Engineer,3000
John,Smith,Project Manager,5000
My DTD is like this :
<?xml version="1.0" encoding="UTF-8"?>
<!ELEMENT FileName #PCDATA>
<!ELEMENT CurrencyRates (CurrencyRate+)>
<!ATTLIST CurrencyRates Action (Add | AddUpdate | Update) #REQUIRED>
<!ELEMENT CurrencyRate (Currency, StartDate, Rate, FixedRate)>
<!ELEMENT Currency (#PCDATA)>
<!ELEMENT StartDate (#PCDATA)>
<!ELEMENT Rate (#PCDATA)>
<!ELEMENT FixedRate (#PCDATA)>
How can I use SAX to convert the CSV to the XML file, valid for this DTD??
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Apr 22 2004
Added on Mar 24 2004
3 comments
209 views