/xmlbench/trunk

To get this branch, use:
bzr branch http://darksoft.org/webbzr/xmlbench/trunk

« back to all changes in this revision

Viewing changes to parse/lisp/libxml.cl

  • Committer: Suren A. Chilingaryan
  • Date: 2009-10-08 03:17:59 UTC
  • Revision ID: csa@dside.dyndns.org-20091008031759-u5ys779huye7feni
LibXML Pull Parser, FAXPP Parser, Mono security benchmark, multiple fixes

Show diffs side-by-side

added added

removed removed

Lines of Context:
34
34
 
35
35
(defmacro read_text_value (node) 
36
36
    "Unconditional read from text node"
37
 
    `(read-from-string (xtree:text-content (xtree:first-child ,node))))
 
37
    `(let ((mystr (xtree:text-content (xtree:first-child ,node))))
 
38
        (if (string= mystr #\Newline) nil (read-from-string mystr))
 
39
    ))
38
40
    
39
41
(defmacro get_text_value (node)
40
42
    `(if (and (xtree:first-child ,node) (eq :XML-TEXT-NODE (xtree:node-type (xtree:first-child ,node))))
69
71
                (loop for i from 0 to (- (xpath:node-set-length nodeset) 1) do 
70
72
                    (setf *sum* (+ *sum* (get_value (xpath:node-set-at nodeset i))))
71
73
                )
72
 
                (print *sum*)
 
74
;               (print *sum*)
73
75
            ))
74
76
    ))
75
77
;       (xtree:serialize doc *standard-output*)