Creating XML with Rebol and rebelxml
- by Rebol Tutorial
The example in doc http://www.rebol.org/documentation.r?script=rebelxml.r to create XML works
>> clear-xml-data
== ""
>> set-xml-data/content 'test/test "test"
== "<test><test>test</test></test>"
>>
but when I want to create some variants it doesn't seem to work:
>> 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 [...
>>
this one doesn't work either:
>> clear-xml-data
== ""
>> set-xml-data/content/with-attribute 'test/test "test" 'id "500"
== ""
>>
Is there something wrong in my syntax ?