Hey guys,
Im really new to XML and actually also new to VB6...But i do need to solve the following problem. I need to read the following xml file using either VBA or VB6.0 and save the information into txt as:
Date1 Date2 Response R_ID ID1 Des1 ID2 Des3
0109 0108 This 12345 10001 HH 10002 BB
0109 0107 That 67890 2001 HH 3003 BB
My XML File:
<?xml version="1.0" encoding="iso-8859-1"?>
<ExportCR Date1="0109">
<CR Date2="0108">
<Response R_ID="12345"><![CDATA[This]]></Response>
<ID Destination="HH">10001</ID>
<ID Destination="BB">10002</ID>
</CR>
<CR Date2="0107">
<Response R_ID="67890"><![CDATA[That]]></Response>
<ID Destination="HH">2001</ID>
<ID Destination="BB">3003</ID>
</CR>
</ExportCR>
I tried like this way:
..........
SET XN=XMLDoc.selectSingleNode("ExportCR")
but how can i get the information of date1?
a=XN.*** ???
and i searched online, seems like it should be like: getAttribute, but it doesnt work in my VBA or VB6....do i need to add more reference or what should i do?
I greatly appreciate ur help!!
?????
Im really new to XML and actually also new to VB6...But i do need to solve the following problem. I need to read the following xml file using either VBA or VB6.0 and save the information into txt as:
Date1 Date2 Response R_ID ID1 Des1 ID2 Des3
0109 0108 This 12345 10001 HH 10002 BB
0109 0107 That 67890 2001 HH 3003 BB
My XML File:
<?xml version="1.0" encoding="iso-8859-1"?>
<ExportCR Date1="0109">
<CR Date2="0108">
<Response R_ID="12345"><![CDATA[This]]></Response>
<ID Destination="HH">10001</ID>
<ID Destination="BB">10002</ID>
</CR>
<CR Date2="0107">
<Response R_ID="67890"><![CDATA[That]]></Response>
<ID Destination="HH">2001</ID>
<ID Destination="BB">3003</ID>
</CR>
</ExportCR>
I tried like this way:
..........
SET XN=XMLDoc.selectSingleNode("ExportCR")
but how can i get the information of date1?
a=XN.*** ???
and i searched online, seems like it should be like: getAttribute, but it doesnt work in my VBA or VB6....do i need to add more reference or what should i do?
I greatly appreciate ur help!!
?????