xanadu - xml-tree

This commit is contained in:
erana 2012-01-21 18:52:19 +09:00
parent ccdefea188
commit 7000a923b2
1 changed files with 5 additions and 4 deletions

View File

@ -31,8 +31,9 @@
(contents "")) (contents ""))
(define (tagify! c tagged) (define (tagify! c tagged)
(cond ((= tagged 0) (string c)) (cond ((> tagged 0) "")
((> tagged 0) "") ;; FIXME make node, descend one level ((= tagged 0) (if (eq? c #\>) "" (string c)))
;; FIXME make node, descend one level
(else ""))) (else "")))
(define (xml-read-in-file contents) (define (xml-read-in-file contents)
@ -43,8 +44,8 @@
(set! tagged (+ tagged 1))) (set! tagged (+ tagged 1)))
((and (> tagged 0)(eq? c #\<)) ((and (> tagged 0)(eq? c #\<))
(set! tagged (+ tagged 1))) (set! tagged (+ tagged 1)))
((and (= tagged 0)(eq? c #\>)) ;;((and (= tagged 0)(eq? c #\>))
(set! tagged (- tagged 1))) ;; (set! tagged (- tagged 1)))
((and (> tagged 0)(eq? c #\>)) ((and (> tagged 0)(eq? c #\>))
(set! tagged (- tagged 1))) (set! tagged (- tagged 1)))
((< tagged 0) ((< tagged 0)