[Home] [By Thread] [By Date] [Recent Entries]

  • To: <xml-dev@l...>
  • Subject: CSV to XML
  • From: "Taco Fleur" <taco@s...>
  • Date: Wed, 10 Aug 2005 16:46:04 +1000
  • Thread-index: AcWddy38jU0OCBAVRUaNtB2hurcxvA==
  • Thread-topic: CSV to XML

I have sort of given up to get a Word Table into XML, OK I can get XML
from a Word Table, but it's not the format I want it in, I can't be
bothered to write some complicated transformation either.

Is there no way that anyone can think of to get the following CSV into
the following XML structure?

Message Header,M,,, ,,,,,,
,,Header Data,ZHD,Uniquely identifies the message type,M,,,,,
,,,,Must be = 'ASC201',,0018,M,V172,,HDa
,,,,,,,,V337,,
,,,,,,,,V338,,
,,,,Message version ,,0019,M,,,HDb
,,,,Message trace number ,,0016,M,,P027,HDc
,,Company id,ZCO,"Company details - name, type, class, etc",M,,,,,
,,,,Company name (including legal elements),,0006,C,V276,N003,01a
,,,,,,,,V280,N120,
,,,,Not used for Form 201,,0007,U,,,01b
,,,,Company type,,0022,M,V025,,01c
,,,,Company class,,0022,M,V027,N005,01d
,,,,,,,,V327,N073,

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<root>
	<message name="201">
		<group 
			name="messageHeader" 
			required="true">
			<segment 
				name="ZHD" 
				display="Header Data" 
				description="Uniquely identifies the
message type" 
				required="true">
				<element 
					name="0018" 
					required="true" 
					item="HDa">
					ASC201
					<edit>V172</edit>
					<edit>V337</edit>
					<edit>V338</edit>
				</element>
				<element 
					name="0019" 
					display="Message version" 
					required="true" 
					item="HDb" />
				<element 
					name="0016" 
					display="Message trace number" 
					required="true" 
					item="HDc">
					<note>P027</note>
				</element>
			</segment>
			<segment 
				name="ZCO" 
				display="Company id" 
				description="Company details - name,
type, class, etc" 
				required="true">
				<element 
					name="0006" 
					display="Company name (including
legal elements)" 
					required="false" 
					item="01a">
					<edit>V276</edit>
					<edit>V280</edit>
					<note>N003</note>
					<note>N120</note>
				</element>
 
________________________________
Taco Fleur - E-commerce Development Manager
Shelco Searches & Services
An Authorised ASIC Information Broker
www.shelco.com.au <blocked::http://www.shelco.com.au> 
Ph: + 61 7 3236 2605


Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member