文档http://www.rebol.org/documentation.r?script=rebelxml.r中用于创建XML的示例工作正常。
>> clear-xml-data
== ""
>> set-xml-data/content 'test/test "test"
== "<test><test>test</test></test>"
>>但当我想创建一些变体时,它似乎不起作用:
>> clear-xml-data
== ""
>> set-xml-data/content 'test "test"
** Script Error: foreach expected data argument of type: series
** Where: set-xml-data
** Near: foreach tag path [
sub-rule: copy []
append sub-rule reduce [
'thru to-open-tag tag
]
if all [...
>>这个也不起作用:
>> clear-xml-data
== ""
>> set-xml-data/content/with-attribute 'test/test "test" 'id "500"
== ""
>>我的语法有什么问题吗?
发布于 2009-11-01 03:52:12
这个脚本有错误...不要用它。
如果您想使用XML,那么创建REBOL对象,然后使用Gavin McKenzie的库将其转换为XML。他们在rebol.org上
https://stackoverflow.com/questions/1547413
复制相似问题