Skip to content


Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Added a case for SPACE stream constants. Doesn't look like those even…

…ts are emitted from the JDK parser. Adding it to be more complete.
  • Loading branch information...
commit 262550f7d3f438993acffc343594804987aadd6d 1 parent 1b4d287
@senior senior authored
Showing with 8 additions and 4 deletions.
  1. +8 −4 src/main/clojure/clojure/data/xml.clj
12 src/main/clojure/clojure/data/xml.clj
@@ -199,7 +199,10 @@
; Note, sreader is mutable and mutated here in pull-seq, but it's
; protected by a lazy-seq so it's thread-safe.
-(defn- pull-seq [^XMLStreamReader sreader]
+(defn- pull-seq
+ "Creates a seq of events. The XMLStreamConstants/SPACE clause below doesn't seem to
+ be triggered by the JDK StAX parser, but is by others. Leaving in to be more complete."
+ [^XMLStreamReader sreader]
(loop []
(condp == (.next sreader)
@@ -217,10 +220,11 @@
(.getText sreader))]
(cons (event :characters nil nil text)
(pull-seq sreader))
- (pull-seq sreader))
+ (recur))
- (pull-seq sreader)
+ (recur)
+ XMLStreamConstants/SPACE
+ (recur)
Please sign in to comment.
Something went wrong with that request. Please try again.