Mailing List Archive: 49091 messages
  • Home
  • Script library
  • AltME Archive
  • Mailing list
  • Articles Index
  • Site search
 

[REBOL] Re: Navigation in output produced by parse-xml

From: james:calaba at: 1-Jun-2001 11:15

Joel First, thank you for the warm welcome to the group.
> print-path: func [estack [block!] /local str] [ > str: copy "" > foreach item estack [ > insert str rejoin ["/" first item] > ] > print str > ]
I used your code samples but got an error with the print-path function. My xml looked like '<a><b>1</b><b>2</b></a>'. I went through you code as thoroughly as my knowledge of Rebol would allow, and I think the problem is that the _walk function is passing a block instead of a block of blocks to the print-path function, so the 'rejoin ["/" first item]' section fails because the second item processed is 'none'. The first time that print-path is called, the block passed is '["a" none [["b" none ["1"]] ["b" none ["2"]]]]'. The only problem with asking for help is that you have be clever enough to understand the answers :-) James