请教诸位大侠一个有关xml的问题,老美限我二十四小时内解决,请大伙多多帮忙提供一个思路啦

zhanguan 2004-11-06 10:23:14
今天中午收到老美的题目,限定在二十四小时内解决,请大伙帮忙啦
题目是
Attached please find two *.txt files. The TestLog.txt is something pulled

from our test tool, and now I want to generate an output file like what you see in

TestResults.txt

Give me brief description on how you attack this problem and possible solutions.


TestLog.txt文件如下:
<?xml version="1.0" encoding="UTF-8" ?>
- <TestLog>
- <LogEvent ID="Computer Start">
- <LogEventProperty Name="Event Type" ID="Event Type">
- <![CDATA[ Computer Start
]]>
</LogEventProperty>
- <LogEventProperty Name="Start Date" ID="Start Date">
- <![CDATA[ 01/08/2003
]]>
</LogEventProperty>
- <LogEventProperty Name="Start Time" ID="Start Time">
- <![CDATA[ 10:23:25
]]>
</LogEventProperty>
+ <LogEventProperty Name="End Date" ID="End Date">
- <![CDATA[ 01/08/2003
]]>
</LogEventProperty>
- <LogEventProperty Name="End Time" ID="End Time">
- <![CDATA[ 10:23:25
]]>
</LogEventProperty>
- <LogEventProperty Name="Result" ID="Result">
- <![CDATA[ Fail
]]>
</LogEventProperty>
- <LogEventProperty Name="Failure Reason" ID="Failure Reason">
- <![CDATA[
]]>
</LogEventProperty>
<LogEventProperty Name="Failure Description" ID="Failure Description" />
- <LogEventProperty Name="Error File" ID="Error File">
- <![CDATA[ e000
]]>
</LogEventProperty>
- <LogEventProperty Name="Output File" ID="Output File">
- <![CDATA[ o000
]]>
</LogEventProperty>
- <LogEventProperty Name="Operating System" ID="Operating System">
- <![CDATA[ Windows
]]>
</LogEventProperty>
- <LogEventProperty Name="OS Version" ID="OS Version">
- <![CDATA[ XP
]]>
</LogEventProperty>
- <LogEventProperty Name="Processor" ID="Processor">
- <![CDATA[ Pentium
]]>
</LogEventProperty>
- <LogEventProperty Name="Display Resolution" ID="Display Resolution">
- <![CDATA[ 1024x768
]]>
。。。。。。
后面还有一长串



TestResults.txt文件如下:


Event Type Result Date & Time Computer Name
===================================================================================================
Computer Start Fail 1/8/2003 10:23:25 AM PHYLLISC11147
Script Start Fail 1/8/2003 10:23:25 AM PHYLLISC11147
Verification Point (Object Data) Pass 1/8/2003 10:23:28 AM PHYLLISC11147
Verification Point (Region Image) Fail 1/08/2003 10:24:00 AM PHYLLISC11147
Script End Fail 1/08/2003 10:24:00 AM PHYLLISC11147
Computer End Fail 1/08/2003 10:24:00 AM PHYLLISC11147

...全文
89 2 打赏 收藏 转发到动态 举报
写回复
用AI写文章
2 条回复
切换为时间正序
请发表友善的回复…
发表回复
zhanguan 2004-11-07
  • 打赏
  • 举报
回复
有哪位大侠可以帮帮忙吗
孟子E章 2004-11-06
  • 打赏
  • 举报
回复
Dim xmlDoc
Dim root
Dim CDATASection
Set xmlDoc = Server.CreateObject("Msxml2.DOMDocument")
xmlDoc.async = False
xmlDoc.resolveExternals = False
xmlDoc.load ("books.xml")
Set root = xmlDoc.documentElement
Set CDATASection = xmlDoc.createCDATASection("1/8/2003 ")
root.appendChild CDATASection

2,100

社区成员

发帖
与我相关
我的任务
社区描述
Web 开发 非技术区
社区管理员
  • 非技术区社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧