director可能与XML合作吗?
时间:2003-11-18
来源:互联网
如题!
作者: pennygenie 发布时间: 2003-11-18
为什么没有人回答呀??
作者: pennygenie 发布时间: 2003-11-20
可以使用director中的XMLParser xtra进行解析。
比如:
on mouseup me
gParserObj=new(xtra "XMLParser")
errCode=gParserObj.parseString(member("xmlDate").text)
put gParserObj.child[1].child[1].attributeValue[4]
end
xmlDate演员中的内容就是个Xml文档,比如:
<?xml version="1.0" encoding="ISO-8859-1"?>
<datalist>
<book id="1" years="1993" type="sanwen" txtName="苍天为什么不让他再多活十年——悼朱丹" fileName="苍天为什么不让他再多活十年" target="82" />
<book id="2" years="1993" type="sanwen" txtName="长泪难书送别情——悼吴强" fileName="长泪难书送别情" target="82" />
<book id="3" years="1993" type="sanwen" txtName="遥寄吾师报天知——悼康濯" fileName="遥寄吾师报天知" target="82" />
<book id="4" years="1993" type="sanwen" txtName="悼愷公" fileName="悼愷公" target="82" />
<book id="5" years="1993" type="sanwen" txtName="含笑而去——悼于寄愚" fileName="含笑而去" target="82" />
<book id="6" years="1993" type="sanwen" txtName="忆冯牧" fileName="忆冯牧" target="82" />
<book id="7" years="1993" type="sanwen" txtName="生活与实践——我最宝贵的老师" fileName="生活与实践" target="82" />
<book id="8" years="1993" type="xiaoshuo" txtName="从《十五贯》引起的" fileName="从十五贯引起的" target="83" />
<book id="9" years="1993" type="xiaoshuo" txtName="在中国作家协会第三次会员代表大会上的发言" fileName="大会上的发言" target="83" />
<book id="10" years="1993" type="xiaoshuo" txtName="谈谈我对当前文艺的看法" fileName="谈谈我对当前文艺的看法" target="83" />
<book id="11" years="1993" type="xiaoshuo" txtName="人——黄山笔会集(代前言)" fileName="人" target="83" />
</datalist>
其中的encoding="ISO-8859-1"?很重要,不写的话就不能解析中文。
MM的网站上有详尽的文档http://www.macromedia.com/support/director/internet/using_xml_parser_xtra/index.html
比如:
on mouseup me
gParserObj=new(xtra "XMLParser")
errCode=gParserObj.parseString(member("xmlDate").text)
put gParserObj.child[1].child[1].attributeValue[4]
end
xmlDate演员中的内容就是个Xml文档,比如:
<?xml version="1.0" encoding="ISO-8859-1"?>
<datalist>
<book id="1" years="1993" type="sanwen" txtName="苍天为什么不让他再多活十年——悼朱丹" fileName="苍天为什么不让他再多活十年" target="82" />
<book id="2" years="1993" type="sanwen" txtName="长泪难书送别情——悼吴强" fileName="长泪难书送别情" target="82" />
<book id="3" years="1993" type="sanwen" txtName="遥寄吾师报天知——悼康濯" fileName="遥寄吾师报天知" target="82" />
<book id="4" years="1993" type="sanwen" txtName="悼愷公" fileName="悼愷公" target="82" />
<book id="5" years="1993" type="sanwen" txtName="含笑而去——悼于寄愚" fileName="含笑而去" target="82" />
<book id="6" years="1993" type="sanwen" txtName="忆冯牧" fileName="忆冯牧" target="82" />
<book id="7" years="1993" type="sanwen" txtName="生活与实践——我最宝贵的老师" fileName="生活与实践" target="82" />
<book id="8" years="1993" type="xiaoshuo" txtName="从《十五贯》引起的" fileName="从十五贯引起的" target="83" />
<book id="9" years="1993" type="xiaoshuo" txtName="在中国作家协会第三次会员代表大会上的发言" fileName="大会上的发言" target="83" />
<book id="10" years="1993" type="xiaoshuo" txtName="谈谈我对当前文艺的看法" fileName="谈谈我对当前文艺的看法" target="83" />
<book id="11" years="1993" type="xiaoshuo" txtName="人——黄山笔会集(代前言)" fileName="人" target="83" />
</datalist>
其中的encoding="ISO-8859-1"?很重要,不写的话就不能解析中文。
MM的网站上有详尽的文档http://www.macromedia.com/support/director/internet/using_xml_parser_xtra/index.html
作者: temade 发布时间: 2003-11-26
原来如此:)
作者: pennygenie 发布时间: 2003-11-26
相关阅读 更多
热门阅读
-
office 2019专业增强版最新2021版激活秘钥/序列号/激活码推荐 附激活工具
阅读:74
-
如何安装mysql8.0
阅读:31
-
Word快速设置标题样式步骤详解
阅读:28
-
20+道必知必会的Vue面试题(附答案解析)
阅读:37
-
HTML如何制作表单
阅读:22
-
百词斩可以改天数吗?当然可以,4个步骤轻松修改天数!
阅读:31
-
ET文件格式和XLS格式文件之间如何转化?
阅读:24
-
react和vue的区别及优缺点是什么
阅读:121
-
支付宝人脸识别如何关闭?
阅读:21
-
腾讯微云怎么修改照片或视频备份路径?
阅读:28