This module is part of the Apache Sling project.
The Apache Sling Content Parser API provides support for parsing various files capable of abstracting a Sling resource tree. This API is a continuation of the one provided by the Apache Sling JCR Content Parser bundle. Although very similar, there are some notable changes:
- the API is now available in the
org.apache.sling.contentparser.api
package; - there is no replacement for the
org.apache.sling.jcr.contentparser.ContentParserFactory
; to obtain aContentParser
, given that they are exposed as OSGi services, one has to filter on theContentParser.SERVICE_PROPERTY_CONTENT_TYPE
service registration property, to select the appropriate file format; - as a consequence of 2., the
ParserOptions
are now passed directly to theContentParser#parse
method.
Implementations of the API are made available from separate bundles:
- JSON -
org.apache.sling.contentparser.json
- XML -
org.apache.sling.contentparser.xml
- Jackrabbit Filevault XML (Enhanced JCR 2.0 Document View) -
org.apache.sling.contentparser.xml-jcr
(the only module depending on the JCR / Jackrabbit APIs)