Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
s-xml
s-xml
Commits
4ccdc76b
Commit
4ccdc76b
authored
Jan 24, 2005
by
Sven Van Caekenberghe
Browse files
added :start and :end keywords to print-string-xml
parent
96e5d471
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/xml.lisp
View file @
4ccdc76b
;;;; -*- mode: lisp -*-
;;;;
;;;; $Id: xml.lisp,v 1.
4
2004/
08/19 14:55:20 bmastenbrook
Exp $
;;;; $Id: xml.lisp,v 1.
5
2004/
10/22 10:36:58 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
))
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment