[s-xml-cvs] CVS update: s-xml/src/xml.lisp
Sven Van Caekenberghe
scaekenberghe at common-lisp.net
Mon Jan 24 10:03:10 UTC 2005
Update of /project/s-xml/cvsroot/s-xml/src
In directory common-lisp.net:/tmp/cvs-serv27989/src
Modified Files:
xml.lisp
Log Message:
added :start and :end keywords to print-string-xml
Date: Mon Jan 24 02:03:09 2005
Author: scaekenberghe
Index: s-xml/src/xml.lisp
diff -u s-xml/src/xml.lisp:1.5 s-xml/src/xml.lisp:1.6
--- s-xml/src/xml.lisp:1.5 Fri Oct 22 03:36:58 2004
+++ s-xml/src/xml.lisp Mon Jan 24 02:03:09 2005
@@ -1,6 +1,6 @@
;;;; -*- mode: lisp -*-
;;;;
-;;;; $Id: xml.lisp,v 1.5 2004/10/22 10:36:58 scaekenberghe Exp $
+;;;; $Id: xml.lisp,v 1.6 2005/01/24 10:03:09 scaekenberghe Exp $
;;;;
;;;; This is a Common Lisp implementation of a very basic XML parser.
;;;; The parser is non-validating and not at all complete (no CDATA).
@@ -80,9 +80,10 @@
:adjustable t
:fill-pointer 0))
-(defun print-string-xml (string stream)
+(defun print-string-xml (string stream &key (start 0) end)
"Write the characters of string to stream using basic XML conventions"
- (loop for char across string
+ (loop for offset upfrom start below (or end (length string))
+ for char = (char string offset)
do (case char
(#\& (write-string "&" stream))
(#\< (write-string "<" stream))
More information about the S-xml-cvs
mailing list