我要做一个网页上show出一个word,word的内容由一个xml文件决定(格式固定)示例xml文件内容如下:
<Survey title="中国人,你有百分百的安全感吗?">
<Questions>
<Question text="1、你在日常生活中有安全感吗,你的安全感指数是多少?" type="single">
<Options>
<Option text="很有安全感" type="select"/>
<Option text="觉得基本安全" type="select"/>
<Option text="不太安全" type="select"/>
<Option text="几乎没有安全感" type="select"/>
</Options>
</Question>
<Question text="2、你认为对你的安全感影响最大的因素有哪些?(多选)" type="multi">
<Options>
<Option text="婚姻" type="select"/>
<Option text="治安" type="select"/>
<Option text="工作" type="select"/>
<Option text="经济" type="select"/>
<Option text="政治" type="select"/>
<Option text="家庭" type="select"/>
<Option text="人际关系" type="select"/>
<Option text="职业发展" type="select"/>
<Option text="交通" type="select"/>
</Options>
</Question>
<Question text="3、在谁的身边,让你最放心,最有安全感?" type="single">
<Options>
<Option text="爱人" type="select"/>
<Option text="父母" type="select"/>
<Option text="孩子" type="select"/>
<Option text="朋友" type="select"/>
<Option text="同事" type="select"/>
<Option text="亲戚" type="select"/>
<Option text="其他" type="text"/>
</Options>
</Question>
<Question text="4、发表一下你的看法" type="text"/>
</Questions>
</Survey>我们现在要求把xml文件的内容拼到一个字符串S里,用VB做一个.OCX文件处理这个字符串,并且写入到一个word文件里。
我想请问各位大虾在VB里怎么读取各个子节点,并且读出各个子节点的属性,输出到一个word文件里。还有把这个xml文件拼成怎么样格式的字符串,在VB里处理起来比较方便!