XML from flat file

Questions about XML that are not covered by the other forums should go here.
wnichols
Posts: 2
Joined: Thu Apr 26, 2012 5:16 pm

XML from flat file

Post by wnichols »

I need to be able to transform a flat file (or csv file) into a XML file. I have XML schema from the Saas but do not understand how to move the individual elements from the flat file to the correct schema places in the XML Schema. Basically I'm reverse engineering to build the XML to load data back into the SaaS after cleansing it. Already have built the xslt to pull the data out. Any have any suggestions or can point me in the right direction?
adrian
Posts: 2855
Joined: Tue May 17, 2005 4:01 pm

Re: XML from flat file

Post by adrian »

Hello,

I'm not sure if you're looking for a generic XML solution or an Oxygen specific one.

For Oxygen this kind of import can be done in two steps:
1. First import the text file into an XML file. For the text (CSV) file use File -> Import -> Text File. The "Import criteria" dialog allows you to choose the field delimiter (use Comma for CSV) and customize the form of the destination XML file("Change labels").

2. Process the imported XML file either manually or by transforming it with an XML stylesheet into the form required by the XML Schema.

Regards,
Adrian
Adrian Buza
<oXygen/> XML Editor, Schema Editor and XSLT Editor/Debugger
http://www.oxygenxml.com
wnichols
Posts: 2
Joined: Thu Apr 26, 2012 5:16 pm

Re: XML from flat file

Post by wnichols »

using Oxygen..

Thanks for the directions. Appears to be working.
Post Reply