[REBOL] Re: Rebol & XML
From: nitsch-lists:netcologne at: 5-Aug-2003 16:59
Hi Andrew and all,
how about
XML/Workbook@/Document@/Author@
change find XML/Workbook@ Author@ "Andrew Martin"
Idea is to name tag as email, attributes as issue.
then one could write XML/Workbook@/#myAtribute too.
[Workbook@ [
#xmlns ".."
DocumentProperties@ [ #xmlns ".." Autor@ "Andrew John Martin" ]
OfficeDocumentSetting@ [#xmlns LocationOfComponents@ [#HRef="file:///\\"] ]
]]
the following snippet changes parse-xml to return attributes as issues.
now i can write XML/3/1/2/#from.
but tags should not be indexed, but named too IMHO.
; use issues for attribute-names, better path-syntax
xml-language: make xml-language [
;verbose: true
add-attr: func [name value] [
if none? second parent [parent/2: make block! 2]
insert insert tail second parent to-issue name value
]
]
-Volker
Am Dienstag, 5. August 2003 12:04 schrieb A J Martin: