我们的其中一个系统以下列格式向我们提供 XML。
你能帮我如何解析这个 XML 并使用 excel 2010 vba 将它存储到数组中吗?
我想阅读标签中的内容。
提前感谢您的帮助。
<report_output>
<xml xmlns:s='uuid:BDC6E3F0-6DA3-11d1-A2A3-'
xmlns:dt='uuid:C2F41010-65B3-11d1-A29F-'
xmlns:rs='urn:schemas-microsoft-com:rowset'
xmlns:z='#RowsetSchema'
content="Report"
title="CURVE REPORT"
resultHeading="DUMPCURVE"
resultName="CURVE REPORT"
runat="04/22/13"
user="xxx"
database="xxx"
version="xxx"
applicationdate="04/22/13"
>
<s:Schema id='RowsetSchema'>
<s:ElementType name='row' content='eltOnly'>
<s:attribute type='GeneratedPK' /> <s:attribute type='Ccy'/>
<s:attribute type='dmIndex'/>
<s:attribute type='CurveID'/>
<s:attribute type='CurveDate'/>
<s:attribute type='Days'/>
<s:attribute type='Rate'/>
<s:extends type='rs:rowbase'/>
</s:ElementType>
<s:AttributeType name='GeneratedPK' rs:number='1' rs:maybenull='false'
rs:keycolumn='true' rs:autoincrement='true' rs:writeunknown='true'>
<s:datatype dt:type='int' />
</s:AttributeType>
<s:AttributeType name='Ccy' rs:number='2' rs:maybenull='true' rs:writeunknown='true'>
<s:datatype dt:type='string' dt:maxLength='4' origDataType='STRING'/>
</s:AttributeType>
<s:AttributeType name='dmIndex' rs:number='3' rs:maybenull='true' rs:writeunknown='true'>
<s:datatype dt:type='string' dt:maxLength='6' origDataType='STRING'/>
</s:AttributeType>
<s:AttributeType name='CurveID' rs:number='4' rs:maybenull='true' rs:writeunknown='true'>
<s:datatype dt:type='string' dt:maxLength='9' origDataType='STRING'/>
</s:AttributeType>
<s:AttributeType name='CurveDate' rs:number='5' rs:maybenull='true' rs:writeunknown='true'>
<s:datatype dt:type='string' dt:maxLength='10' origDataType='DATE '/>
</s:AttributeType>
<s:AttributeType name='Days' rs:number='6' rs:maybenull='true' rs:writeunknown='true'>
<s:datatype dt:type='string' dt:maxLength='35' origDataType='STRING'/>
</s:AttributeType>
<s:AttributeType name='Rate' rs:number='7' rs:maybenull='true' rs:writeunknown='true'>
<s:datatype dt:type='number' dt:maxLength='50' origDataType='RATES '/>
</s:AttributeType>
</s:Schema>
<rs:data>
<z:row
GeneratedPK='1'
Ccy='xxx'
dmIndex='xxx'
CurveID='xxxx'
CurveDate='2013-04-23T00:00:00'
Days='1'
Rate='0000'
/>
<z:row
GeneratedPK='2'
Ccy='xxx'
dmIndex='xxxxx'
CurveID='xxxxx'
CurveDate='2013-05-24T00:00:00'
Days='32'
Rate='00000000'
/>
<z:row
GeneratedPK='3'
Ccy='xxx'
dmIndex='xxx'
CurveID='xxxx'
CurveDate='2013-04-23T00:00:00'
Days='1'
Rate='0000'
/>
<z:row
GeneratedPK='4'
Ccy='xxx'
dmIndex='xxxxx'
CurveID='xxxxx'
CurveDate='2013-05-24T00:00:00'
Days='32'
Rate='00000000'
/>
<z:row
GeneratedPK='5'
Ccy='xxx'
dmIndex='xxx'
CurveID='xxxx'
CurveDate='2013-04-23T00:00:00'
Days='1'
Rate='0000'
/>
<z:row
GeneratedPK='6'
Ccy='xxx'
dmIndex='xxxxx'
CurveID='xxxxx'
CurveDate='2013-05-24T00:00:00'
Days='32'
Rate='00000000'
/>
</rs:data>
</xml>
</report_output>
到目前为止,在 excel vba 中,我尝试了以下代码,但无法继续
Dim xmldoc As New MSXML2.DOMDocument
xmldoc.Load ("C:\DOCUME~1\xyz\LOCALS~1\Temp\zr_aud_bbsw_130422.xml")