remove-markup.lisp
 1 ;;;; -*- mode: lisp -*-
2 ;;;;
3 ;;;; $Id: remove-markup.lisp,v 1.1 2004/06/11 11:14:43 scaekenberghe Exp $
4 ;;;;
5 ;;;; Remove markup from an XML document using the SSAX interface
6 ;;;;
7 ;;;; Copyright (C) 2004 Sven Van Caekenberghe, Beta Nine BVBA.
8 ;;;;
9 ;;;; You are granted the rights to distribute and use this software
10 ;;;; as governed by the terms of the Lisp Lesser General Public License
11 ;;;; (http://opensource.franz.com/preamble.html), also known as the LLGPL.
12
13 (in-package :s-xml)
14
15 (defun remove-xml-markup (in)
16 (let* ((state (make-instance 'xml-parser-state
17 :text-hook #'(lambda (string seed) (cons string seed))))
18 (result (start-parse-xml in state)))
19 (apply #'concatenate 'string (nreverse result))))
20
21 ;;;; eof