Parses the content of the given File into a eu.cdevreeze.yaidom.simple.Document.
Parses the content of the given URI into a eu.cdevreeze.yaidom.simple.Document.
Parses the input stream into a eu.cdevreeze.yaidom.simple.Document.
Parses the input stream into a eu.cdevreeze.yaidom.simple.Document. This method should close the input stream afterwards.
eu.cdevreeze.yaidom.simple.Document parser. This trait is purely abstract.
Implementing classes deal with the details of parsing XML strings/streams into yaidom
Document
s. The eu.cdevreeze.yaidom.simple package itself is agnostic of those details.Typical implementations use DOM, StAX or SAX, but make them easier to use in the tradition of the "template" classes of the Spring framework. That is, resource management is done as much as possible by the DocumentParser, typical usage is easy, and complex scenarios are still possible. The idea is that the parser is configured once, and that it should be re-usable multiple times.
One of the
parse
methods takes anInputStream
instead ofSource
object, because that works better with a DOM implementation.Although
DocumentParser
instances should be re-usable multiple times, implementing classes are encouraged to indicate to what extent re-use of a parser instance is indeed supported (single-threaded, or even multi-threaded).