p2p.wrox.com Forums

Need to download code?

View our list of code downloads.


  Return to Index  

vb_xml thread: group records from a xml file--another q


Message #1 by "yeong" <hkyeong1@y...> on Fri, 7 Feb 2003 08:34:11
hi all:

I have the following xml file:
(rm1.xml)

<sample>
<ponoparent>
<companycode>MAIC</companycode>
<section>AC</section>
<pono>AK90371-3</pono>
<c4>AK90371-3</c4>
<invoiceno>8300012518</invoiceno>
<address2>1 CARRIBEAN DRIVE SCORESBY</address2>
<address3>VICTORIA 3179</address3>
<address4>AUSTRALIA</address4>
<itemno>000001</itemno>
<modelno>CU-A24BBP5-2</modelno>
<quantity>6</quantity>
<etd1>20020824</etd1>
<FILLER></FILLER>
<unitprice>1,750.76</unitprice>
<filler2></filler2>
<destination>Australia</destination>
<portofdischarge>MELBOURNE</portofdischarge>
<Marking1>NO MARK</Marking1>
<origin></origin>
<vessel>MOL GOLDEN WATTLE V.0017</vessel>
<creationdate>20020819</creationdate>
<creationtime>175401</creationtime>
<c26>000001</c26>
<c27>CU-A24BBP5-2</c27>
<modelname>AIR CONDITIONERS</modelname>
<c29>AK90371-3</c29>
</ponoparent>
<ponoparent>
<companycode>MAIC</companycode>
<section>AC</section>
<pono>AK90371-3</pono>
<c4>AK90371-3</c4>
<invoiceno>8300012518</invoiceno>
<address2>1 CARRIBEAN DRIVE SCORESBY</address2>
<address3>VICTORIA 3179</address3>
<address4>AUSTRALIA</address4>
<itemno>000002</itemno>
<modelno>CU-A28BBP5-2</modelno>
<quantity>13</quantity>
<etd1>20020824</etd1>
<FILLER></FILLER>
<unitprice>1,872.55</unitprice>
<filler2></filler2>
<destination>Australia</destination>
<portofdischarge>MELBOURNE</portofdischarge>
<Marking1>NO MARK</Marking1>
<origin></origin>
<vessel>MOL GOLDEN WATTLE V.0017</vessel>
<creationdate>20020819</creationdate>
<creationtime>175401</creationtime>
<c26>000002</c26>
<c27>CU-A28BBP5-2</c27>
<modelname>AIR CONDITIONERS</modelname>
<c29>AK90371-3</c29>
</ponoparent>
<ponoparent>
<companycode>MAIC</companycode>
<section>AC</section>
<pono>AK90371-3</pono>
<c4>AK90371-3</c4>
<invoiceno>8300012518</invoiceno>
<address2>1 CARRIBEAN DRIVE SCORESBY</address2>
<address3>VICTORIA 3179</address3>
<address4>AUSTRALIA</address4>
<itemno>000003</itemno>
<modelno>CU-A28BBP8-2</modelno>
<quantity>5</quantity>
<etd1>20020824</etd1>
<FILLER></FILLER>
<unitprice>1,872.55</unitprice>
<filler2></filler2>
<destination>Australia</destination>
<portofdischarge>MELBOURNE</portofdischarge>
<Marking1>NO MARK</Marking1>
<origin></origin>
<vessel>MOL GOLDEN WATTLE V.0017</vessel>
<creationdate>20020819</creationdate>
<creationtime>175401</creationtime>
<c26>000003</c26>
<c27>CU-A28BBP8-2</c27>
<modelname>AIR CONDITIONERS</modelname>
<c29>AK90371-3</c29>
</ponoparent>
<ponoparent>
<companycode>MAIC</companycode>
<section>AC</section>
<pono>AK90372-3</pono>
<c4>AK90372-3</c4>
<invoiceno>8300012519</invoiceno>
<address2>1 CARRIBEAN DRIVE SCORESBY</address2>
<address3>VICTORIA 3179</address3>
<address4>AUSTRALIA</address4>
<itemno>000001</itemno>
<modelno>CS-A28BB4P-2</modelno>
<quantity>3</quantity>
<etd1>20020824</etd1>
<FILLER></FILLER>
<unitprice>923.83</unitprice>
<filler2></filler2>
<destination>Australia</destination>
<portofdischarge>MELBOURNE</portofdischarge>
<Marking1>NO MARK</Marking1>
<origin></origin>
<vessel>MOL GOLDEN WATTLE V.0017</vessel>
<creationdate>20020819</creationdate>
<creationtime>175820</creationtime>
<c26>000001</c26>
<c27>CS-A28BB4P-2</c27>
<modelname>INDOOR UNIT H</modelname>
<c29>AK90372-3</c29>
</ponoparent>
<ponoparent>
<companycode>MAIC</companycode>
<section>AC</section>
<pono>AK90372-3</pono>
<c4>AK90372-3</c4>
<invoiceno>8300012519</invoiceno>
<address2>1 CARRIBEAN DRIVE SCORESBY</address2>
<address3>VICTORIA 3179</address3>
<address4>AUSTRALIA</address4>
<itemno>000002</itemno>
<modelno>CS-A50BTP-2</modelno>
<quantity>1</quantity>
<etd1>20020824</etd1>
<FILLER></FILLER>
<unitprice>1,907.49</unitprice>
<filler2></filler2>
<destination>Australia</destination>
<portofdischarge>MELBOURNE</portofdischarge>
<Marking1>NO MARK</Marking1>
<origin></origin>
<vessel>MOL GOLDEN WATTLE V.0017</vessel>
<creationdate>20020819</creationdate>
<creationtime>175820</creationtime>
<c26>000002</c26>
<c27>CS-A50BTP-2</c27>
<modelname>INDOOR UNIT H</modelname>
<c29>AK90372-3</c29>
</ponoparent>
<ponoparent>
<companycode>MAIC</companycode>
<section>AC</section>
<pono>AK90373-2</pono>
<c4>AK90373-2</c4>
<invoiceno>8300012514</invoiceno>
<address2>1 CARRIBEAN DRIVE SCORESBY</address2>
<address3>VICTORIA 3179</address3>
<address4>AUSTRALIA</address4>
<itemno>000001</itemno>
<modelno>CZ-BT01P</modelno>
<quantity>20</quantity>
<etd1>20020824</etd1>
<FILLER></FILLER>
<unitprice>278.98</unitprice>
<filler2></filler2>
<destination>Australia</destination>
<portofdischarge>MELBOURNE</portofdischarge>
<Marking1>NO MARK</Marking1>
<origin></origin>
<vessel>MOL GOLDEN WATTLE V.0017</vessel>
<creationdate>20020819</creationdate>
<creationtime>172757</creationtime>
<c26>000001</c26>
<c27>CZ-BT01P</c27>
<modelname>OPTIONAL ACCESSORY CS</modelname>
<c29>AK90373-2</c29>
</ponoparent>
<ponoparent>
<companycode>MAIC</companycode>
<section>AC</section>
<pono>AK90374-4</pono>
<c4>AK90374-4</c4>
<invoiceno>8300012513</invoiceno>
<address2>1 CARRIBEAN DRIVE SCORESBY</address2>
<address3>VICTORIA 3179</address3>
<address4>AUSTRALIA</address4>
<itemno>000003</itemno>
<modelno>CS-C7BKP-2</modelno>
<quantity>10</quantity>
<etd1>20020824</etd1>
<FILLER></FILLER>
<unitprice>350.19</unitprice>
<filler2></filler2>
<destination>Australia</destination>
<portofdischarge>MELBOURNE</portofdischarge>
<Marking1>NO MARK</Marking1>
<origin></origin>
<vessel>MOL GOLDEN WATTLE V.0017</vessel>
<creationdate>20020819</creationdate>
<creationtime>171825</creationtime>
<c26>000003</c26>
<c27>CS-C7BKP-2</c27>
<modelname>AIR CONDITIONERS</modelname>
<c29>AK90374-4</c29>
</ponoparent>
<ponoparent>
<companycode>MAIC</companycode>
<section>AC</section>
<pono>AK90374-4</pono>
<c4>AK90374-4</c4>
<invoiceno>8300012513</invoiceno>
<address2>1 CARRIBEAN DRIVE SCORESBY</address2>
<address3>VICTORIA 3179</address3>
<address4>AUSTRALIA</address4>
<itemno>000004</itemno>
<modelno>CS-C9BKP-2</modelno>
<quantity>20</quantity>
<etd1>20020824</etd1>
<FILLER></FILLER>
<unitprice>371.47</unitprice>
<filler2></filler2>
<destination>Australia</destination>
<portofdischarge>MELBOURNE</portofdischarge>
<Marking1>NO MARK</Marking1>
<origin></origin>
<vessel>MOL GOLDEN WATTLE V.0017</vessel>
<creationdate>20020819</creationdate>
<creationtime>171825</creationtime>
<c26>000004</c26>
<c27>CS-C9BKP-2</c27>
<modelname>AIR CONDITIONERS</modelname>
<c29>AK90374-4</c29>
</ponoparent>
<ponoparent>
<companycode>MAIC</companycode>
<section>AC</section>
<pono>AK90374-4</pono>
<c4>AK90374-4</c4>
<invoiceno>8300012513</invoiceno>
<address2>1 CARRIBEAN DRIVE SCORESBY</address2>
<address3>VICTORIA 3179</address3>
<address4>AUSTRALIA</address4>
<itemno>000005</itemno>
<modelno>CS-E12BKP-2</modelno>
<quantity>20</quantity>
<etd1>20020824</etd1>
<FILLER></FILLER>
<unitprice>637.81</unitprice>
<filler2></filler2>
<destination>Australia</destination>
<portofdischarge>MELBOURNE</portofdischarge>
<Marking1>NO MARK</Marking1>
<origin></origin>
<vessel>MOL GOLDEN WATTLE V.0017</vessel>
<creationdate>20020819</creationdate>
<creationtime>171825</creationtime>
<c26>000005</c26>
<c27>CS-E12BKP-2</c27>
<modelname>AIR CONDITIONERS</modelname>
<c29>AK90374-4</c29>
</ponoparent>
<ponoparent>
<companycode>MAIC</companycode>
<section>AC</section>
<pono>AK90374-4</pono>
<c4>AK90374-4</c4>
<invoiceno>8300012513</invoiceno>
<address2>1 CARRIBEAN DRIVE SCORESBY</address2>
<address3>VICTORIA 3179</address3>
<address4>AUSTRALIA</address4>
<itemno>000007</itemno>
<modelno>CS-MA125KE-2</modelno>
<quantity>2</quantity>
<etd1>20020824</etd1>
<FILLER></FILLER>
<unitprice>502.39</unitprice>
<filler2></filler2>
<destination>Australia</destination>
<portofdischarge>MELBOURNE</portofdischarge>
<Marking1>NO MARK</Marking1>
<origin></origin>
<vessel>MOL GOLDEN WATTLE V.0017</vessel>
<creationdate>20020819</creationdate>
<creationtime>171825</creationtime>
<c26>000007</c26>
<c27>CS-MA125KE-2</c27>
<modelname>AIR CONDITIONER</modelname>
<c29>AK90374-4</c29>
</ponoparent>
<ponoparent>
<companycode>MAIC</companycode>
<section>AC</section>
<pono>AK90374-4</pono>
<c4>AK90374-4</c4>
<invoiceno>8300012513</invoiceno>
<address2>1 CARRIBEAN DRIVE SCORESBY</address2>
<address3>VICTORIA 3179</address3>
<address4>AUSTRALIA</address4>
<itemno>000008</itemno>
<modelno>CS-MA95KE-2</modelno>
<quantity>2</quantity>
<etd1>20020824</etd1>
<FILLER></FILLER>
<unitprice>385.13</unitprice>
<filler2></filler2>
<destination>Australia</destination>
<portofdischarge>MELBOURNE</portofdischarge>
<Marking1>NO MARK</Marking1>
<origin></origin>
<vessel>MOL GOLDEN WATTLE V.0017</vessel>
<creationdate>20020819</creationdate>
<creationtime>171825</creationtime>
<c26>000008</c26>
<c27>CS-MA95KE-2</c27>
<modelname>AIR CONDITIONER</modelname>
<c29>AK90374-4</c29>
</ponoparent>
<ponoparent>
<companycode>MAIC</companycode>
<section>AC</section>
<pono>AK90374-4</pono>
<c4>AK90374-4</c4>
<invoiceno>8300012513</invoiceno>
<address2>1 CARRIBEAN DRIVE SCORESBY</address2>
<address3>VICTORIA 3179</address3>
<address4>AUSTRALIA</address4>
<itemno>000009</itemno>
<modelno>CS-1873KR</modelno>
<quantity>20</quantity>
<etd1>20020824</etd1>
<FILLER></FILLER>
<unitprice>600.97</unitprice>
<filler2></filler2>
<destination>Australia</destination>
<portofdischarge>MELBOURNE</portofdischarge>
<Marking1>NO MARK</Marking1>
<origin></origin>
<vessel>MOL GOLDEN WATTLE V.0017</vessel>
<creationdate>20020819</creationdate>
<creationtime>171825</creationtime>
<c26>000009</c26>
<c27>CS-1873KR</c27>
<modelname>AIR CONDITIONERS</modelname>
<c29>AK90374-4</c29>
</ponoparent>
<ponoparent>
<companycode>MAIC</companycode>
<section>AC</section>
<pono>AK90374-4</pono>
<c4>AK90374-4</c4>
<invoiceno>8300012513</invoiceno>
<address2>1 CARRIBEAN DRIVE SCORESBY</address2>
<address3>VICTORIA 3179</address3>
<address4>AUSTRALIA</address4>
<itemno>000012</itemno>
<modelno>CU-C7BKP5-2</modelno>
<quantity>10</quantity>
<etd1>20020824</etd1>
<FILLER></FILLER>
<unitprice>525.23</unitprice>
<filler2></filler2>
<destination>Australia</destination>
<portofdischarge>MELBOURNE</portofdischarge>
<Marking1>NO MARK</Marking1>
<origin></origin>
<vessel>MOL GOLDEN WATTLE V.0017</vessel>
<creationdate>20020819</creationdate>
<creationtime>171825</creationtime>
<c26>000012</c26>
<c27>CU-C7BKP5-2</c27>
<modelname>AIR CONDITIONERS</modelname>
<c29>AK90374-4</c29>
</ponoparent>
<ponoparent>
<companycode>MAIC</companycode>
<section>AC</section>
<pono>AK90374-4</pono>
<c4>AK90374-4</c4>
<invoiceno>8300012513</invoiceno>
<address2>1 CARRIBEAN DRIVE SCORESBY</address2>
<address3>VICTORIA 3179</address3>
<address4>AUSTRALIA</address4>
<itemno>000013</itemno>
<modelno>CU-C9BKP5-2</modelno>
<quantity>20</quantity>
<etd1>20020824</etd1>
<FILLER></FILLER>
<unitprice>557.20</unitprice>
<filler2></filler2>
<destination>Australia</destination>
<portofdischarge>MELBOURNE</portofdischarge>
<Marking1>NO MARK</Marking1>
<origin></origin>
<vessel>MOL GOLDEN WATTLE V.0017</vessel>
<creationdate>20020819</creationdate>
<creationtime>171825</creationtime>
<c26>000013</c26>
<c27>CU-C9BKP5-2</c27>
<modelname>AIR CONDITIONERS</modelname>
<c29>AK90374-4</c29>
</ponoparent>
<ponoparent>
<companycode>MAIC</companycode>
<section>AC</section>
<pono>AK90374-4</pono>
<c4>AK90374-4</c4>
<invoiceno>8300012513</invoiceno>
<address2>1 CARRIBEAN DRIVE SCORESBY</address2>
<address3>VICTORIA 3179</address3>
<address4>AUSTRALIA</address4>
<itemno>000014</itemno>
<modelno>CU-E12BKP5-2</modelno>
<quantity>20</quantity>
<etd1>20020824</etd1>
<FILLER></FILLER>
<unitprice>956.71</unitprice>
<filler2></filler2>
<destination>Australia</destination>
<portofdischarge>MELBOURNE</portofdischarge>
<Marking1>NO MARK</Marking1>
<origin></origin>
<vessel>MOL GOLDEN WATTLE V.0017</vessel>
<creationdate>20020819</creationdate>
<creationtime>171825</creationtime>
<c26>000014</c26>
<c27>CU-E12BKP5-2</c27>
<modelname>AIR CONDITIONERS</modelname>
<c29>AK90374-4</c29>
</ponoparent>
<ponoparent>
<companycode>MAIC</companycode>
<section>AC</section>
<pono>AK90374-4</pono>
<c4>AK90374-4</c4>
<invoiceno>8300012520</invoiceno>
<address2>1 CARRIBEAN DRIVE SCORESBY</address2>
<address3>VICTORIA 3179</address3>
<address4>AUSTRALIA</address4>
<itemno>000001</itemno>
<modelno>CS-A7BKP-2</modelno>
<quantity>30</quantity>
<etd1>20020824</etd1>
<FILLER></FILLER>
<unitprice>380.60</unitprice>
<filler2></filler2>
<destination>Australia</destination>
<portofdischarge>MELBOURNE</portofdischarge>
<Marking1>NO MARK</Marking1>
<origin></origin>
<vessel>MOL GOLDEN WATTLE V.0017</vessel>
<creationdate>20020819</creationdate>
<creationtime>183318</creationtime>
<c26>000001</c26>
<c27>CS-A7BKP-2</c27>
<modelname>AIR CONDITIONERS</modelname>
<c29>AK90374-4</c29>
</ponoparent>
<ponoparent>
<companycode>MAIC</companycode>
<section>AC</section>
<pono>AK90374-4</pono>
<c4>AK90374-4</c4>
<invoiceno>8300012520</invoiceno>
<address2>1 CARRIBEAN DRIVE SCORESBY</address2>
<address3>VICTORIA 3179</address3>
<address4>AUSTRALIA</address4>
<itemno>000002</itemno>
<modelno>CS-A9BKP-2</modelno>
<quantity>100</quantity>
<etd1>20020824</etd1>
<FILLER></FILLER>
<unitprice>404.96</unitprice>
<filler2></filler2>
<destination>Australia</destination>
<portofdischarge>MELBOURNE</portofdischarge>
<Marking1>NO MARK</Marking1>
<origin></origin>
<vessel>MOL GOLDEN WATTLE V.0017</vessel>
<creationdate>20020819</creationdate>
<creationtime>183318</creationtime>
<c26>000002</c26>
<c27>CS-A9BKP-2</c27>
<modelname>AIR CONDITIONERS</modelname>
<c29>AK90374-4</c29>
</ponoparent>
<ponoparent>
<companycode>MAIC</companycode>
<section>AC</section>
<pono>AK90374-4</pono>
<c4>AK90374-4</c4>
<invoiceno>8300012520</invoiceno>
<address2>1 CARRIBEAN DRIVE SCORESBY</address2>
<address3>VICTORIA 3179</address3>
<address4>AUSTRALIA</address4>
<itemno>000010</itemno>
<modelno>CU-A7BKP5-2</modelno>
<quantity>30</quantity>
<etd1>20020824</etd1>
<FILLER></FILLER>
<unitprice>570.90</unitprice>
<filler2></filler2>
<destination>Australia</destination>
<portofdischarge>MELBOURNE</portofdischarge>
<Marking1>NO MARK</Marking1>
<origin></origin>
<vessel>MOL GOLDEN WATTLE V.0017</vessel>
<creationdate>20020819</creationdate>
<creationtime>183318</creationtime>
<c26>000010</c26>
<c27>CU-A7BKP5-2</c27>
<modelname>AIR CONDITIONERS</modelname>
<c29>AK90374-4</c29>
</ponoparent>
<ponoparent>
<companycode>MAIC</companycode>
<section>AC</section>
<pono>AK90374-4</pono>
<c4>AK90374-4</c4>
<invoiceno>8300012520</invoiceno>
<address2>1 CARRIBEAN DRIVE SCORESBY</address2>
<address3>VICTORIA 3179</address3>
<address4>AUSTRALIA</address4>
<itemno>000011</itemno>
<modelno>CU-A9BKP5-2</modelno>
<quantity>100</quantity>
<etd1>20020824</etd1>
<FILLER></FILLER>
<unitprice>607.44</unitprice>
<filler2></filler2>
<destination>Australia</destination>
<portofdischarge>MELBOURNE</portofdischarge>
<Marking1>NO MARK</Marking1>
<origin></origin>
<vessel>MOL GOLDEN WATTLE V.0017</vessel>
<creationdate>20020819</creationdate>
<creationtime>183318</creationtime>
<c26>000011</c26>
<c27>CU-A9BKP5-2</c27>
<modelname>AIR CONDITIONERS</modelname>
<c29>AK90374-4</c29>
</ponoparent>
<ponoparent>
<companycode>MAIC</companycode>
<section>AC</section>
<pono>AK90524-3</pono>
<c4>AK90524-3</c4>
<invoiceno>8300012515</invoiceno>
<address2>1 CARRIBEAN DRIVE SCORESBY</address2>
<address3>VICTORIA 3179</address3>
<address4>AUSTRALIA</address4>
<itemno>000001</itemno>
<modelno>CU-A28BBP8-2</modelno>
<quantity>5</quantity>
<etd1>20020824</etd1>
<FILLER></FILLER>
<unitprice>1,872.55</unitprice>
<filler2></filler2>
<destination>Australia</destination>
<portofdischarge>MELBOURNE</portofdischarge>
<Marking1>NO MARK</Marking1>
<origin></origin>
<vessel>MOL GOLDEN WATTLE V.0017</vessel>
<creationdate>20020819</creationdate>
<creationtime>173315</creationtime>
<c26>000001</c26>
<c27>CU-A28BBP8-2</c27>
<modelname>AIR CONDITIONERS</modelname>
<c29>AK90524-3</c29>
</ponoparent>
<ponoparent>
<companycode>MAIC</companycode>
<section>AC</section>
<pono>AK90527-2</pono>
<c4>AK90527-2</c4>
<invoiceno>8300012516</invoiceno>
<address2>1 CARRIBEAN DRIVE SCORESBY</address2>
<address3>VICTORIA 3179</address3>
<address4>AUSTRALIA</address4>
<itemno>000001</itemno>
<modelno>CS-A34BB4P-2</modelno>
<quantity>5</quantity>
<etd1>20020824</etd1>
<FILLER></FILLER>
<unitprice>1,196.72</unitprice>
<filler2></filler2>
<destination>Australia</destination>
<portofdischarge>MELBOURNE</portofdischarge>
<Marking1>NO MARK</Marking1>
<origin></origin>
<vessel>MOL GOLDEN WATTLE V.0017</vessel>
<creationdate>20020819</creationdate>
<creationtime>174818</creationtime>
<c26>000001</c26>
<c27>CS-A34BB4P-2</c27>
<modelname>INDOOR UNIT H</modelname>
<c29>AK90527-2</c29>
</ponoparent>
<ponoparent>
<companycode>MAIC</companycode>
<section>AC</section>
<pono>AK90527-2</pono>
<c4>AK90527-2</c4>
<invoiceno>8300012516</invoiceno>
<address2>1 CARRIBEAN DRIVE SCORESBY</address2>
<address3>VICTORIA 3179</address3>
<address4>AUSTRALIA</address4>
<itemno>000002</itemno>
<modelno>CS-A50BB4P-2</modelno>
<quantity>5</quantity>
<etd1>20020824</etd1>
<FILLER></FILLER>
<unitprice>1,869.20</unitprice>
<filler2></filler2>
<destination>Australia</destination>
<portofdischarge>MELBOURNE</portofdischarge>
<Marking1>NO MARK</Marking1>
<origin></origin>
<vessel>MOL GOLDEN WATTLE V.0017</vessel>
<creationdate>20020819</creationdate>
<creationtime>174818</creationtime>
<c26>000002</c26>
<c27>CS-A50BB4P-2</c27>
<modelname>INDOOR UNIT H</modelname>
<c29>AK90527-2</c29>
</ponoparent>
<ponoparent>
<companycode>MAIC</companycode>
<section>AC</section>
<pono>AK90532-3</pono>
<c4>AK90532-3</c4>
<invoiceno>8300012517</invoiceno>
<address2>1 CARRIBEAN DRIVE SCORESBY</address2>
<address3>VICTORIA 3179</address3>
<address4>AUSTRALIA</address4>
<itemno>000001</itemno>
<modelno>CS-A28BB4P-2</modelno>
<quantity>5</quantity>
<etd1>20020824</etd1>
<FILLER></FILLER>
<unitprice>923.83</unitprice>
<filler2></filler2>
<destination>Australia</destination>
<portofdischarge>MELBOURNE</portofdischarge>
<Marking1>NO MARK</Marking1>
<origin></origin>
<vessel>MOL GOLDEN WATTLE V.0017</vessel>
<creationdate>20020819</creationdate>
<creationtime>175129</creationtime>
<c26>000001</c26>
<c27>CS-A28BB4P-2</c27>
<modelname>INDOOR UNIT H</modelname>
<c29>AK90532-3</c29>
</ponoparent>
<ponoparent>
<companycode>MAIC</companycode>
<section>AC</section>
<pono>AK90532-3</pono>
<c4>AK90532-3</c4>
<invoiceno>8300012517</invoiceno>
<address2>1 CARRIBEAN DRIVE SCORESBY</address2>
<address3>VICTORIA 3179</address3>
<address4>AUSTRALIA</address4>
<itemno>000002</itemno>
<modelno>CS-A50BB4P-2</modelno>
<quantity>2</quantity>
<etd1>20020824</etd1>
<FILLER></FILLER>
<unitprice>1,869.20</unitprice>
<filler2></filler2>
<destination>Australia</destination>
<portofdischarge>MELBOURNE</portofdischarge>
<Marking1>NO MARK</Marking1>
<origin></origin>
<vessel>MOL GOLDEN WATTLE V.0017</vessel>
<creationdate>20020819</creationdate>
<creationtime>175129</creationtime>
<c26>000002</c26>
<c27>CS-A50BB4P-2</c27>
<modelname>INDOOR UNIT H</modelname>
<c29>AK90532-3</c29>
</ponoparent>
</sample>


I have the following xsl file:
(t.xsl)
<xsl:stylesheet  xmlns:xsl='http://www.w3.org/1999/XSL/Transform' 
version='1.0'>
<xsl:key name="ponoparent-by-pono" match="ponoparent" use="pono" />
<xsl:template match="sample">
	<xsl:for-each select="ponoparent[count(. | key('ponoparent-by-
pono', pono)[1]) = 1]">
		<xsl:sort select="pono" />
		<xsl:value-of select="pono" />,<br/>
		<xsl:for-each select="key('ponoparent-by-pono', pono)">
			<xsl:sort select="itemno" />
			<xsl:value-of select="itemno" /> <br/>
		</xsl:for-each>
	</xsl:for-each>
</xsl:template>
</xsl:stylesheet>


in vb code

Private Sub Command7_Click()

Set source1 = CreateObject("microsoft.xmldom")
source1.async = False
source1.Load (App.Path & "\rm1.xml")

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

q = source1.transformNode(dynstyle)

szfile = App.Path & "\krm1.xml"
Set ofso = CreateObject("Scripting.FileSystemObject")
Set ofile = ofso.OpenTextFile(szfile, 2)
ofile.write (q)
ofile.Close


End Sub


my question 

1)why the krm1.xml file
is alway come out same as t.xsl

2)cannot get the format in krm1.xml 
group by pono ???

please help.


thank for advance

regard,
yeong


  Return to Index