doc 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"
== ""
>>
我的语法有问题吗?