1

XML を作成するためのドキュメントhttp://www.rebol.org/documentation.r?script=rebelxml.rの例は機能します

>> 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"
== ""
>>

私の構文に何か問題がありますか?

4

1 に答える 1

2

このスクリプトにはバグがあります...使用しないでください。

XML を使用する場合は、REBOL オブジェクトを作成し、Gavin McKenzie のライブラリを使用してそれらを XML に変換します。彼らはrebol.orgにいます

于 2009-10-31T19:52:12.137 に答える