Permalink
Browse files

Added IS_COALESCING to the XMLInputFactory to prevent contents of tag…

…s from being broken up.
  • Loading branch information...
1 parent 2571382 commit c9fd2f4172cbf1bfacdb7b086323765be833a4c4 @senior senior committed Dec 21, 2011
Showing with 3 additions and 1 deletion.
  1. +3 −1 src/main/clojure/clojure/data/xml.clj
@@ -227,7 +227,9 @@
a lazy sequence of Event records. See clojure.data.xml/lazy-source-seq
for similar results but without requiring an external pull parser."
[^java.io.InputStream s]
- (let [sreader (.createXMLStreamReader (XMLInputFactory/newInstance) s)]
+ (let [fac (doto (javax.xml.stream.XMLInputFactory/newInstance)
+ (.setProperty javax.xml.stream.XMLInputFactory/IS_COALESCING true))
+ sreader (.createXMLStreamReader fac s)]
;(.setNamespaceAttributesReporting xpp true)
;(.setInput xpp s)
(pull-seq sreader)))

0 comments on commit c9fd2f4

Please sign in to comment.