|
[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] RE: Transforming XML to fixed format file
> I have a requirement to transform an incoming XML file > containing Purchase > Orders into a fixed format file (specifically an SAP IDOC). This will > involve things such as, placing the text value of the node > <accountnumber>, > into positions 10-19 of the output file. Is this something I > can do easily > with XSLT or is this an instance of the situation where I'd > be better off > writing my own parser by extending XMLReader. While I am sure you can do it in XSLT, this sounds like it might be easier to do with SAX (or maybe even Perl). I certainly wouldn't write my own parser, I would just respond to SAX events and build up the IDOC that way. I am assuming that the XML PO stream is nested much like the SAP IDOC format. Also, if you need to do any ancillary database queries, you can easily make JDBC calls in your Java program. You can use SAX to go the opposite direction too. You can create SAX events for segments in the IDOC and create XML from there. Cheers, Mark Wonsil XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|

Cart








