p2p.wrox.com Forums

Need to download code?

View our list of code downloads.


  Return to Index  

vb_xml thread: convert xml sql data to another xml file


Message #1 by "yeong" <hkyeong1@y...> on Wed, 5 Feb 2003 05:50:34
hi all

i has one xml file call m1.xml

<xml xmlns:s='uuid:BDC6E3F0-6DA3-11d1-A2A3-00AA00C14882'
	xmlns:dt='uuid:C2F41010-65B3-11d1-A29F-00AA00C14882'
	xmlns:rs='urn:schemas-microsoft-com:rowset'
	xmlns:z='#RowsetSchema'>
<s:Schema id='RowsetSchema'>
	<s:ElementType name='row' content='eltOnly' rs:CommandTimeout='30'>
		<s:AttributeType name='companycode' rs:number='1' 
rs:nullable='true' rs:writeunknown='true'>
			<s:datatype dt:type='string' dt:maxLength='50'/>
		</s:AttributeType>
		<s:AttributeType name='section' rs:number='2' 
rs:nullable='true' rs:writeunknown='true'>
			<s:datatype dt:type='string' dt:maxLength='50'/>
		</s:AttributeType>
		<s:AttributeType name='pono' rs:number='3' 
rs:nullable='true' rs:writeunknown='true'>
			<s:datatype dt:type='string' dt:maxLength='50'/>
		</s:AttributeType>
		<s:AttributeType name='consineecode' rs:number='4' 
rs:nullable='true' rs:writeunknown='true'>
			<s:datatype dt:type='string' dt:maxLength='50'/>
		</s:AttributeType>
		<s:AttributeType name='c4' rs:name='pono' rs:number='5' 
rs:nullable='true' rs:writeunknown='true'>
			<s:datatype dt:type='string' dt:maxLength='50'/>
		</s:AttributeType>
		<s:AttributeType name='invoiceno' rs:number='6' 
rs:nullable='true' rs:writeunknown='true'>
			<s:datatype dt:type='string' dt:maxLength='50'/>
		</s:AttributeType>
		<s:AttributeType name='congsineecode' rs:number='7' 
rs:nullable='true' rs:writeunknown='true'>
			<s:datatype dt:type='string' dt:maxLength='50'/>
		</s:AttributeType>
		<s:AttributeType name='address2' rs:number='8' 
rs:nullable='true' rs:writeunknown='true'>
			<s:datatype dt:type='string' dt:maxLength='50'/>
		</s:AttributeType>
		<s:AttributeType name='address3' rs:number='9' 
rs:nullable='true' rs:writeunknown='true'>
			<s:datatype dt:type='string' dt:maxLength='50'/>
		</s:AttributeType>
		<s:AttributeType name='address4' rs:number='10' 
rs:nullable='true' rs:writeunknown='true'>
			<s:datatype dt:type='string' dt:maxLength='50'/>
		</s:AttributeType>
		<s:AttributeType name='itemno' rs:number='11' 
rs:nullable='true' rs:writeunknown='true'>
			<s:datatype dt:type='string' dt:maxLength='50'/>
		</s:AttributeType>
		<s:AttributeType name='modelno' rs:number='12' 
rs:nullable='true' rs:writeunknown='true'>
			<s:datatype dt:type='string' dt:maxLength='50'/>
		</s:AttributeType>
		<s:AttributeType name='quantity' rs:number='13' 
rs:nullable='true' rs:writeunknown='true'>
			<s:datatype dt:type='string' dt:maxLength='50'/>
		</s:AttributeType>
		<s:AttributeType name='etd1' rs:number='14' 
rs:nullable='true' rs:writeunknown='true'>
			<s:datatype dt:type='string' dt:maxLength='50'/>
		</s:AttributeType>
		<s:AttributeType name='FILLER' rs:number='15' 
rs:nullable='true' rs:writeunknown='true'>
			<s:datatype dt:type='string' dt:maxLength='50'/>
		</s:AttributeType>
		<s:AttributeType name='unitprice' rs:number='16' 
rs:nullable='true' rs:writeunknown='true'>
			<s:datatype dt:type='string' dt:maxLength='50'/>
		</s:AttributeType>
		<s:AttributeType name='filler2' rs:number='17' 
rs:nullable='true' rs:writeunknown='true'>
			<s:datatype dt:type='string' dt:maxLength='50'/>
		</s:AttributeType>
		<s:AttributeType name='tarriffcode' rs:number='18' 
rs:nullable='true' rs:writeunknown='true'>
			<s:datatype dt:type='string' dt:maxLength='50'/>
		</s:AttributeType>
		<s:AttributeType name='destination' rs:number='19' 
rs:nullable='true' rs:writeunknown='true'>
			<s:datatype dt:type='string' dt:maxLength='50'/>
		</s:AttributeType>
		<s:AttributeType name='portofdischarge' rs:number='20' 
rs:nullable='true' rs:writeunknown='true'>
			<s:datatype dt:type='string' dt:maxLength='50'/>
		</s:AttributeType>
		<s:AttributeType name='Marking1' rs:number='21' 
rs:nullable='true' rs:writeunknown='true'>
			<s:datatype dt:type='string' dt:maxLength='50'/>
		</s:AttributeType>
		<s:AttributeType name='origin' rs:number='22' 
rs:nullable='true' rs:writeunknown='true'>
			<s:datatype dt:type='string' dt:maxLength='50'/>
		</s:AttributeType>
		<s:AttributeType name='tariffcode' rs:number='23' 
rs:nullable='true' rs:writeunknown='true'>
			<s:datatype dt:type='string' dt:maxLength='50'/>
		</s:AttributeType>
		<s:AttributeType name='vessel' rs:number='24' 
rs:nullable='true' rs:writeunknown='true'>
			<s:datatype dt:type='string' dt:maxLength='50'/>
		</s:AttributeType>
		<s:AttributeType name='creationdate' rs:number='25' 
rs:nullable='true' rs:writeunknown='true'>
			<s:datatype dt:type='string' dt:maxLength='50'/>
		</s:AttributeType>
		<s:AttributeType name='creationtime' rs:number='26' 
rs:nullable='true' rs:writeunknown='true'>
			<s:datatype dt:type='string' dt:maxLength='50'/>
		</s:AttributeType>
		<s:AttributeType name='c26' rs:name='itemno' 
rs:number='27' rs:nullable='true' rs:writeunknown='true'>
			<s:datatype dt:type='string' dt:maxLength='50'/>
		</s:AttributeType>
		<s:AttributeType name='c27' rs:name='modelno' 
rs:number='28' rs:nullable='true' rs:writeunknown='true'>
			<s:datatype dt:type='string' dt:maxLength='50'/>
		</s:AttributeType>
		<s:AttributeType name='modelname' rs:number='29' 
rs:nullable='true' rs:writeunknown='true'>
			<s:datatype dt:type='string' dt:maxLength='50'/>
		</s:AttributeType>
		<s:AttributeType name='c29' rs:name='pono' rs:number='30' 
rs:nullable='true' rs:writeunknown='true'>
			<s:datatype dt:type='string' dt:maxLength='50'/>
		</s:AttributeType>
		<s:extends type='rs:rowbase'/>
	</s:ElementType>
</s:Schema>
<rs:data>
	<z:row companycode='MAIC' section='AC' pono='AK90371-3           ' 
c4='AK90371-3           ' invoiceno='8300012518'
		 address2='1 CARRIBEAN DRIVE SCORESBY              ' 
address3='VICTORIA 3179                           ' 
address4='AUSTRALIA                               '
		 itemno='000001' modelno='CU-A24BBP5-2      ' 
quantity='           6' etd1='20020824' FILLER=' ' unitprice='      
1,750.76'
		 filler2=' ' destination='Australia           ' 
portofdischarge='MELBOURNE                     ' Marking1='NO 
MARK                       '
		 origin='               ' vessel='MOL GOLDEN WATTLE 
V.0017      ' creationdate='20020819' creationtime='175401'
		 c26='000001' c27='CU-A24BBP5-2      ' modelname='AIR 
CONDITIONERS              ' c29='AK90371-3           '/>
	<z:row companycode='MAIC' section='AC' pono='AK90371-3           ' 
c4='AK90371-3           ' invoiceno='8300012518'
		 address2='1 CARRIBEAN DRIVE SCORESBY              ' 
address3='VICTORIA 3179                           ' 
address4='AUSTRALIA                               '
		 itemno='000002' modelno='CU-A28BBP5-2      ' 
quantity='          13' etd1='20020824' FILLER=' ' unitprice='      
1,872.55'
		 filler2=' ' destination='Australia           ' 
portofdischarge='MELBOURNE                     ' Marking1='NO 
MARK                       '
		 origin='               ' vessel='MOL GOLDEN WATTLE 
V.0017      ' creationdate='20020819' creationtime='175401'
		 c26='000002' c27='CU-A28BBP5-2      ' modelname='AIR 
CONDITIONERS              ' c29='AK90371-3           '/>
	<z:row companycode='MAIC' section='AC' pono='AK90371-3           ' 
c4='AK90371-3           ' invoiceno='8300012518'
		 address2='1 CARRIBEAN DRIVE SCORESBY              ' 
address3='VICTORIA 3179                           ' 
address4='AUSTRALIA                               '
		 itemno='000003' modelno='CU-A28BBP8-2      ' 
quantity='           5' etd1='20020824' FILLER=' ' unitprice='      
1,872.55'
		 filler2=' ' destination='Australia           ' 
portofdischarge='MELBOURNE                     ' Marking1='NO 
MARK                       '
		 origin='               ' vessel='MOL GOLDEN WATTLE 
V.0017      ' creationdate='20020819' creationtime='175401'
		 c26='000003' c27='CU-A28BBP8-2      ' modelname='AIR 
CONDITIONERS              ' c29='AK90371-3           '/>
	<z:row companycode='MAIC' section='AC' pono='AK90372-3           ' 
c4='AK90372-3           ' invoiceno='8300012519'
		 address2='1 CARRIBEAN DRIVE SCORESBY              ' 
address3='VICTORIA 3179                           ' 
address4='AUSTRALIA                               '
		 itemno='000001' modelno='CS-A28BB4P-2      ' 
quantity='           3' etd1='20020824' FILLER=' ' unitprice='        
923.83'
		 filler2=' ' destination='Australia           ' 
portofdischarge='MELBOURNE                     ' Marking1='NO 
MARK                       '
		 origin='               ' vessel='MOL GOLDEN WATTLE 
V.0017      ' creationdate='20020819' creationtime='175820'
		 c26='000001' c27='CS-A28BB4P-2      ' modelname='INDOOR 
UNIT H                 ' c29='AK90372-3           '/>
	<z:row companycode='MAIC' section='AC' pono='AK90372-3           ' 
c4='AK90372-3           ' invoiceno='8300012519'
		 address2='1 CARRIBEAN DRIVE SCORESBY              ' 
address3='VICTORIA 3179                           ' 
address4='AUSTRALIA                               '
		 itemno='000002' modelno='CS-A50BTP-2       ' 
quantity='           1' etd1='20020824' FILLER=' ' unitprice='      
1,907.49'
		 filler2=' ' destination='Australia           ' 
portofdischarge='MELBOURNE                     ' Marking1='NO 
MARK                       '
		 origin='               ' vessel='MOL GOLDEN WATTLE 
V.0017      ' creationdate='20020819' creationtime='175820'
		 c26='000002' c27='CS-A50BTP-2       ' modelname='INDOOR 
UNIT H                 ' c29='AK90372-3           '/>
	<z:row companycode='MAIC' section='AC' pono='AK90373-2           ' 
c4='AK90373-2           ' invoiceno='8300012514'
		 address2='1 CARRIBEAN DRIVE SCORESBY              ' 
address3='VICTORIA 3179                           ' 
address4='AUSTRALIA                               '
		 itemno='000001' modelno='CZ-BT01P          ' 
quantity='          20' etd1='20020824' FILLER=' ' unitprice='        
278.98'
		 filler2=' ' destination='Australia           ' 
portofdischarge='MELBOURNE                     ' Marking1='NO 
MARK                       '
		 origin='               ' vessel='MOL GOLDEN WATTLE 
V.0017      ' creationdate='20020819' creationtime='172757'
		 c26='000001' c27='CZ-BT01P          ' modelname='OPTIONAL 
ACCESSORY CS         ' c29='AK90373-2           '/>
	<z:row companycode='MAIC' section='AC' pono='AK90374-4           ' 
c4='AK90374-4           ' invoiceno='8300012513'
		 address2='1 CARRIBEAN DRIVE SCORESBY              ' 
address3='VICTORIA 3179                           ' 
address4='AUSTRALIA                               '
		 itemno='000003' modelno='CS-C7BKP-2        ' 
quantity='          10' etd1='20020824' FILLER=' ' unitprice='        
350.19'
		 filler2=' ' destination='Australia           ' 
portofdischarge='MELBOURNE                     ' Marking1='NO 
MARK                       '
		 origin='               ' vessel='MOL GOLDEN WATTLE 
V.0017      ' creationdate='20020819' creationtime='171825'
		 c26='000003' c27='CS-C7BKP-2        ' modelname='AIR 
CONDITIONERS              ' c29='AK90374-4           '/>
	<z:row companycode='MAIC' section='AC' pono='AK90374-4           ' 
c4='AK90374-4           ' invoiceno='8300012513'
		 address2='1 CARRIBEAN DRIVE SCORESBY              ' 
address3='VICTORIA 3179                           ' 
address4='AUSTRALIA                               '
		 itemno='000004' modelno='CS-C9BKP-2        ' 
quantity='          20' etd1='20020824' FILLER=' ' unitprice='        
371.47'
		 filler2=' ' destination='Australia           ' 
portofdischarge='MELBOURNE                     ' Marking1='NO 
MARK                       '
		 origin='               ' vessel='MOL GOLDEN WATTLE 
V.0017      ' creationdate='20020819' creationtime='171825'
		 c26='000004' c27='CS-C9BKP-2        ' modelname='AIR 
CONDITIONERS              ' c29='AK90374-4           '/>
	<z:row companycode='MAIC' section='AC' pono='AK90374-4           ' 
c4='AK90374-4           ' invoiceno='8300012513'
		 address2='1 CARRIBEAN DRIVE SCORESBY              ' 
address3='VICTORIA 3179                           ' 
address4='AUSTRALIA                               '
		 itemno='000005' modelno='CS-E12BKP-2       ' 
quantity='          20' etd1='20020824' FILLER=' ' unitprice='        
637.81'
		 filler2=' ' destination='Australia           ' 
portofdischarge='MELBOURNE                     ' Marking1='NO 
MARK                       '
		 origin='               ' vessel='MOL GOLDEN WATTLE 
V.0017      ' creationdate='20020819' creationtime='171825'
		 c26='000005' c27='CS-E12BKP-2       ' modelname='AIR 
CONDITIONERS              ' c29='AK90374-4           '/>
	<z:row companycode='MAIC' section='AC' pono='AK90374-4           ' 
c4='AK90374-4           ' invoiceno='8300012513'
		 address2='1 CARRIBEAN DRIVE SCORESBY              ' 
address3='VICTORIA 3179                           ' 
address4='AUSTRALIA                               '
		 itemno='000007' modelno='CS-MA125KE-2      ' 
quantity='           2' etd1='20020824' FILLER=' ' unitprice='        
502.39'
		 filler2=' ' destination='Australia           ' 
portofdischarge='MELBOURNE                     ' Marking1='NO 
MARK                       '
		 origin='               ' vessel='MOL GOLDEN WATTLE 
V.0017      ' creationdate='20020819' creationtime='171825'
		 c26='000007' c27='CS-MA125KE-2      ' modelname='AIR 
CONDITIONER               ' c29='AK90374-4           '/>
	<z:row companycode='MAIC' section='AC' pono='AK90374-4           ' 
c4='AK90374-4           ' invoiceno='8300012513'
		 address2='1 CARRIBEAN DRIVE SCORESBY              ' 
address3='VICTORIA 3179                           ' 
address4='AUSTRALIA                               '
		 itemno='000008' modelno='CS-MA95KE-2       ' 
quantity='           2' etd1='20020824' FILLER=' ' unitprice='        
385.13'
		 filler2=' ' destination='Australia           ' 
portofdischarge='MELBOURNE                     ' Marking1='NO 
MARK                       '
		 origin='               ' vessel='MOL GOLDEN WATTLE 
V.0017      ' creationdate='20020819' creationtime='171825'
		 c26='000008' c27='CS-MA95KE-2       ' modelname='AIR 
CONDITIONER               ' c29='AK90374-4           '/>
	<z:row companycode='MAIC' section='AC' pono='AK90374-4           ' 
c4='AK90374-4           ' invoiceno='8300012513'
		 address2='1 CARRIBEAN DRIVE SCORESBY              ' 
address3='VICTORIA 3179                           ' 
address4='AUSTRALIA                               '
		 itemno='000009' modelno='CS-1873KR         ' 
quantity='          20' etd1='20020824' FILLER=' ' unitprice='        
600.97'
		 filler2=' ' destination='Australia           ' 
portofdischarge='MELBOURNE                     ' Marking1='NO 
MARK                       '
		 origin='               ' vessel='MOL GOLDEN WATTLE 
V.0017      ' creationdate='20020819' creationtime='171825'
		 c26='000009' c27='CS-1873KR         ' modelname='AIR 
CONDITIONERS              ' c29='AK90374-4           '/>
	<z:row companycode='MAIC' section='AC' pono='AK90374-4           ' 
c4='AK90374-4           ' invoiceno='8300012513'
		 address2='1 CARRIBEAN DRIVE SCORESBY              ' 
address3='VICTORIA 3179                           ' 
address4='AUSTRALIA                               '
		 itemno='000012' modelno='CU-C7BKP5-2       ' 
quantity='          10' etd1='20020824' FILLER=' ' unitprice='        
525.23'
		 filler2=' ' destination='Australia           ' 
portofdischarge='MELBOURNE                     ' Marking1='NO 
MARK                       '
		 origin='               ' vessel='MOL GOLDEN WATTLE 
V.0017      ' creationdate='20020819' creationtime='171825'
		 c26='000012' c27='CU-C7BKP5-2       ' modelname='AIR 
CONDITIONERS              ' c29='AK90374-4           '/>
	<z:row companycode='MAIC' section='AC' pono='AK90374-4           ' 
c4='AK90374-4           ' invoiceno='8300012513'
		 address2='1 CARRIBEAN DRIVE SCORESBY              ' 
address3='VICTORIA 3179                           ' 
address4='AUSTRALIA                               '
		 itemno='000013' modelno='CU-C9BKP5-2       ' 
quantity='          20' etd1='20020824' FILLER=' ' unitprice='        
557.20'
		 filler2=' ' destination='Australia           ' 
portofdischarge='MELBOURNE                     ' Marking1='NO 
MARK                       '
		 origin='               ' vessel='MOL GOLDEN WATTLE 
V.0017      ' creationdate='20020819' creationtime='171825'
		 c26='000013' c27='CU-C9BKP5-2       ' modelname='AIR 
CONDITIONERS              ' c29='AK90374-4           '/>
	<z:row companycode='MAIC' section='AC' pono='AK90374-4           ' 
c4='AK90374-4           ' invoiceno='8300012513'
		 address2='1 CARRIBEAN DRIVE SCORESBY              ' 
address3='VICTORIA 3179                           ' 
address4='AUSTRALIA                               '
		 itemno='000014' modelno='CU-E12BKP5-2      ' 
quantity='          20' etd1='20020824' FILLER=' ' unitprice='        
956.71'
		 filler2=' ' destination='Australia           ' 
portofdischarge='MELBOURNE                     ' Marking1='NO 
MARK                       '
		 origin='               ' vessel='MOL GOLDEN WATTLE 
V.0017      ' creationdate='20020819' creationtime='171825'
		 c26='000014' c27='CU-E12BKP5-2      ' modelname='AIR 
CONDITIONERS              ' c29='AK90374-4           '/>
	<z:row companycode='MAIC' section='AC' pono='AK90374-4           ' 
c4='AK90374-4           ' invoiceno='8300012520'
		 address2='1 CARRIBEAN DRIVE SCORESBY              ' 
address3='VICTORIA 3179                           ' 
address4='AUSTRALIA                               '
		 itemno='000001' modelno='CS-A7BKP-2        ' 
quantity='          30' etd1='20020824' FILLER=' ' unitprice='        
380.60'
		 filler2=' ' destination='Australia           ' 
portofdischarge='MELBOURNE                     ' Marking1='NO 
MARK                       '
		 origin='               ' vessel='MOL GOLDEN WATTLE 
V.0017      ' creationdate='20020819' creationtime='183318'
		 c26='000001' c27='CS-A7BKP-2        ' modelname='AIR 
CONDITIONERS              ' c29='AK90374-4           '/>
	<z:row companycode='MAIC' section='AC' pono='AK90374-4           ' 
c4='AK90374-4           ' invoiceno='8300012520'
		 address2='1 CARRIBEAN DRIVE SCORESBY              ' 
address3='VICTORIA 3179                           ' 
address4='AUSTRALIA                               '
		 itemno='000002' modelno='CS-A9BKP-2        ' 
quantity='         100' etd1='20020824' FILLER=' ' unitprice='        
404.96'
		 filler2=' ' destination='Australia           ' 
portofdischarge='MELBOURNE                     ' Marking1='NO 
MARK                       '
		 origin='               ' vessel='MOL GOLDEN WATTLE 
V.0017      ' creationdate='20020819' creationtime='183318'
		 c26='000002' c27='CS-A9BKP-2        ' modelname='AIR 
CONDITIONERS              ' c29='AK90374-4           '/>
	<z:row companycode='MAIC' section='AC' pono='AK90374-4           ' 
c4='AK90374-4           ' invoiceno='8300012520'
		 address2='1 CARRIBEAN DRIVE SCORESBY              ' 
address3='VICTORIA 3179                           ' 
address4='AUSTRALIA                               '
		 itemno='000010' modelno='CU-A7BKP5-2       ' 
quantity='          30' etd1='20020824' FILLER=' ' unitprice='        
570.90'
		 filler2=' ' destination='Australia           ' 
portofdischarge='MELBOURNE                     ' Marking1='NO 
MARK                       '
		 origin='               ' vessel='MOL GOLDEN WATTLE 
V.0017      ' creationdate='20020819' creationtime='183318'
		 c26='000010' c27='CU-A7BKP5-2       ' modelname='AIR 
CONDITIONERS              ' c29='AK90374-4           '/>
	<z:row companycode='MAIC' section='AC' pono='AK90374-4           ' 
c4='AK90374-4           ' invoiceno='8300012520'
		 address2='1 CARRIBEAN DRIVE SCORESBY              ' 
address3='VICTORIA 3179                           ' 
address4='AUSTRALIA                               '
		 itemno='000011' modelno='CU-A9BKP5-2       ' 
quantity='         100' etd1='20020824' FILLER=' ' unitprice='        
607.44'
		 filler2=' ' destination='Australia           ' 
portofdischarge='MELBOURNE                     ' Marking1='NO 
MARK                       '
		 origin='               ' vessel='MOL GOLDEN WATTLE 
V.0017      ' creationdate='20020819' creationtime='183318'
		 c26='000011' c27='CU-A9BKP5-2       ' modelname='AIR 
CONDITIONERS              ' c29='AK90374-4           '/>
	<z:row companycode='MAIC' section='AC' pono='AK90524-3           ' 
c4='AK90524-3           ' invoiceno='8300012515'
		 address2='1 CARRIBEAN DRIVE SCORESBY              ' 
address3='VICTORIA 3179                           ' 
address4='AUSTRALIA                               '
		 itemno='000001' modelno='CU-A28BBP8-2      ' 
quantity='           5' etd1='20020824' FILLER=' ' unitprice='      
1,872.55'
		 filler2=' ' destination='Australia           ' 
portofdischarge='MELBOURNE                     ' Marking1='NO 
MARK                       '
		 origin='               ' vessel='MOL GOLDEN WATTLE 
V.0017      ' creationdate='20020819' creationtime='173315'
		 c26='000001' c27='CU-A28BBP8-2      ' modelname='AIR 
CONDITIONERS              ' c29='AK90524-3           '/>
	<z:row companycode='MAIC' section='AC' pono='AK90527-2           ' 
c4='AK90527-2           ' invoiceno='8300012516'
		 address2='1 CARRIBEAN DRIVE SCORESBY              ' 
address3='VICTORIA 3179                           ' 
address4='AUSTRALIA                               '
		 itemno='000001' modelno='CS-A34BB4P-2      ' 
quantity='           5' etd1='20020824' FILLER=' ' unitprice='      
1,196.72'
		 filler2=' ' destination='Australia           ' 
portofdischarge='MELBOURNE                     ' Marking1='NO 
MARK                       '
		 origin='               ' vessel='MOL GOLDEN WATTLE 
V.0017      ' creationdate='20020819' creationtime='174818'
		 c26='000001' c27='CS-A34BB4P-2      ' modelname='INDOOR 
UNIT H                 ' c29='AK90527-2           '/>
	<z:row companycode='MAIC' section='AC' pono='AK90527-2           ' 
c4='AK90527-2           ' invoiceno='8300012516'
		 address2='1 CARRIBEAN DRIVE SCORESBY              ' 
address3='VICTORIA 3179                           ' 
address4='AUSTRALIA                               '
		 itemno='000002' modelno='CS-A50BB4P-2      ' 
quantity='           5' etd1='20020824' FILLER=' ' unitprice='      
1,869.20'
		 filler2=' ' destination='Australia           ' 
portofdischarge='MELBOURNE                     ' Marking1='NO 
MARK                       '
		 origin='               ' vessel='MOL GOLDEN WATTLE 
V.0017      ' creationdate='20020819' creationtime='174818'
		 c26='000002' c27='CS-A50BB4P-2      ' modelname='INDOOR 
UNIT H                 ' c29='AK90527-2           '/>
	<z:row companycode='MAIC' section='AC' pono='AK90532-3           ' 
c4='AK90532-3           ' invoiceno='8300012517'
		 address2='1 CARRIBEAN DRIVE SCORESBY              ' 
address3='VICTORIA 3179                           ' 
address4='AUSTRALIA                               '
		 itemno='000001' modelno='CS-A28BB4P-2      ' 
quantity='           5' etd1='20020824' FILLER=' ' unitprice='        
923.83'
		 filler2=' ' destination='Australia           ' 
portofdischarge='MELBOURNE                     ' Marking1='NO 
MARK                       '
		 origin='               ' vessel='MOL GOLDEN WATTLE 
V.0017      ' creationdate='20020819' creationtime='175129'
		 c26='000001' c27='CS-A28BB4P-2      ' modelname='INDOOR 
UNIT H                 ' c29='AK90532-3           '/>
	<z:row companycode='MAIC' section='AC' pono='AK90532-3           ' 
c4='AK90532-3           ' invoiceno='8300012517'
		 address2='1 CARRIBEAN DRIVE SCORESBY              ' 
address3='VICTORIA 3179                           ' 
address4='AUSTRALIA                               '
		 itemno='000002' modelno='CS-A50BB4P-2      ' 
quantity='           2' etd1='20020824' FILLER=' ' unitprice='      
1,869.20'
		 filler2=' ' destination='Australia           ' 
portofdischarge='MELBOURNE                     ' Marking1='NO 
MARK                       '
		 origin='               ' vessel='MOL GOLDEN WATTLE 
V.0017      ' creationdate='20020819' creationtime='175129'
		 c26='000002' c27='CS-A50BB4P-2      ' modelname='INDOOR 
UNIT H                 ' c29='AK90532-3           '/>
</rs:data>
</xml>



i also has another y.xsl file

<?xml version='1.0'?>
<xsl:stylesheet version="1.0"
               xmlns:xsl='http://www.w3.org/TR/WD-xsl' 
xmlns:xsl1="http://www.w3.org/1999/XSL/Transform">

<xsl1:template match='/'>
<rootParent>
    
 <xsl1:for-each select='xml/rs:data/z:row'>
  
<xsl1:key name="pono1" match="rootChild" use="pono" />
   <xsl1:for-each select="contact[count(. | key('pono1', pono)[1]) = 1]">
   <rootChild>
		<xsl1:sort select="pono" />
		<xsl1:value-of select="pono" />,<br />
		<xsl1:for-each select="key('pono1', pono)">
			<xsl1:sort select="itemno" />
			<xsl1:value-of select="itemno" /> (<xsl1:value-of 
select="modelno" />)<br />
		</xsl1:for-each>
   </rootChild> 
   </xsl1:for-each>
   
  
</xsl1:for-each>

 
 </rootParent>
</xsl1:template>
</xsl:stylesheet>


my vb code is 

Dim source
Dim dynstyle
Dim p
Set source = CreateObject("microsoft.xmldom")
source.async = False
source.Load (App.Path & "\m1.xml")


MsgBox source.parseError.errorCode
Set dynstyle = CreateObject("microsoft.xmldom")
dynstyle.async = False
dynstyle.Load (App.Path & "\Y.xsl")
MsgBox dynstyle.parseError.errorCode

p = source.transformNode(dynstyle)
MsgBox p
Dim szfile
Dim ofso
Dim ofile
szfile = App.Path & "\dm1.xml"
Set ofso = CreateObject("Scripting.FileSystemObject")
Set ofile = ofso.OpenTextFile(szfile, 2)
ofile.write (p)
ofile.Close

MsgBox "done"


i want the dm1.xml has feature of group by pono and sort by pono

from database

how to do that?

**can i using two version of xml namespace in same xsl file? 
               xmlns:xsl='http://www.w3.org/TR/WD-xsl' 
xmlns:xsl1="http://www.w3.org/1999/XSL/Transform">

**i face some problem on it,if i using only
xmlns:xsl1="http://www.w3.org/1999/XSL/Transform">

it said xsl donot understand what is 
'xml/rs:data/z:row'

how can i do for convert m1.xml

to dm1.xml

look like

<pono>
  <itemno>
  </itemno>
</pono>


**if i has more than 500 field column in database
(with normalization in different table already)

**where is the best way to show the data in xml file format

**it is convert to sql -xml then using xslt to tranform 
to another xml file format?

pls advice 
thank

regards,
yeong


  Return to Index