I want to create a java swing application, from where I can generate an xml file that stores the same data, and the generated number of files will be determined by the user. My XML file stores an xml schema, and my struture XML file looks like this
<transaction> <xs:schema id="transaction" xmlns="" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata"> <xs:element name="transaction" msdata:IsDataSet="true" msdata:UseCurrentLocale="true"> <xs:complexType> <xs:choice minOccurs="0" maxOccurs="unbounded"> <xs:element name="id"> <xs:complexType> <xs:sequence> <xs:element name="name" type="xs:string" minOccurs="0" /> <xs:element name="sn" type="xs:string" minOccurs="0" /> </xs:sequence> </xs:complexType> </xs:element> <xs:element name="data"> <xs:complexType> <xs:sequence> <xs:element name="dateTime" type="xs:dateTime" minOccurs="0" /> <xs:element name="key" type="xs:string" minOccurs="0" /> </xs:sequence> </xs:complexType> </xs:element> <xs:element name="productData"> <xs:complexType> <xs:sequence> <xs:element name="dateTime" type="xs:dateTime" minOccurs="0" /> <xs:element name="key" type="xs:string" minOccurs="0" /> </xs:sequence> </xs:complexType> </xs:element> </xs:choice> </xs:complexType> </xs:element> </xs:schema> <id> <name>smith</tli> <sn>1234567</sn> </id> <data> <dateTime>2011-06-24T17:08:36.3727674+05:30</dateTime> <key>book</key> </data> <productData> <dateTime>2011-06-24T17:08:36.3727674+05:30</dateTime> <key>game</key> </productData> </transaction>
I am new to java, if someone gives some help in snipes help, this will be more useful for me.
I want to generate xml files that contain the XML schema specified in my xml example.
java xml
saba
source share