2009-10-10 58 views
1

的例子在文檔http://www.rebol.org/documentation.r?script=rebelxml.r創建XML工作創建具有雷博爾XML和rebelxml

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

在我的語法中有什麼問題嗎?

回答

2

這個腳本是越野車...不要使用它。

如果你想使用XML,然後創建REBOL對象,然後使用加文·麥肯齊的圖書館它們隱蔽到XML。他們在rebol.org

+0

OOPS直到今天才看到你的答案:) 好的,謝謝你會看看加文的http://www.rebol.org/view-script.r?script=xml-object .R – 2010-03-17 23:45:35