Hi,
I had generated an XML using Castor, but had errors.
Any ideas of correcting this ,pl let me know.
The output XML is enclosed.
The code for generation of XML is:
public
String createXML(Object object) throws IOException, MarshalException, ValidationException, MappingException {String xmlFileName = "Specification-Template.xml";
Mapping mapping =
new Mapping();mapping.loadMapping("mapping-castor.xml");
File f = new File(xmlFileName );FileWriter fileWriter =
new FileWriter(f);Marshaller m =
new Marshaller(fileWriter);m.setMapping(mapping);
m.setDebug(
true);m.setSuppressXSIType(
true);m.marshal((SpecificationVO) object);
fileWriter.close();
File xmlFile =
new File(xmlFileName); return xmlFile.getAbsolutePath();}
Any ideas ,pl let me know.
Thanks
Gopi
<?xml version="1.0" encoding="UTF-8"?>
<specification>
<product-class-name>BILLET</product-class-name>
<designation>Alloy Designation</designation>
<dubal-alloy-code>A113</dubal-alloy-code>
<elementList>
<element-description>Iron</element-description>
<element>I1</element>
<min>1.0</min>
<max>2.0</max>
</elementList>
<elementList>
<element-description>Magnesium</element-description>
<element>M1</element>
<min>1.0</min>
<max>12.0</max>
</elementList>
<remarks>REMARKS</remarks>
<clauses>
<clause-text>Customized alloy for the customer.</clause-text>
</clauses>
<clauses>
<clause-text>Each batch produced from non degassed metal.</clause-text>
</clauses>
<clauses>
<clause-text>Analysis sample of each cast(batch) to be provided </clause-text>
</clauses>
<clauses>
<clause-text>This document is classified. </clause-text>
</clauses>
<clauses>
<clause-text>Please confirm respecification prior to reorder.</clause-text>
</clauses>
</specification>------------------------------------------------- If you wish to unsubscribe from this list, please send an empty message to the following address: [EMAIL PROTECTED] -------------------------------------------------

