Apache Sling Content Parser API

Clone this repo:
  1. 89298d6 Updating badges for org-apache-sling-contentparser-api by Radu Cotescu · 4 months ago master
  2. 1520ab3 [maven-release-plugin] prepare for next development iteration by Radu Cotescu · 4 months ago
  3. c2c7acd [maven-release-plugin] prepare release org.apache.sling.contentparser.api-2.0.0 by Radu Cotescu · 4 months ago org.apache.sling.contentparser.api-2.0.0
  4. ab74a18 SLING-8570 - Extract a generic Content Parser API from org.apache.sling.jcr.contentparser with pluggable implementations by Radu Cotescu · 4 months ago
  5. 45d17a0 SLING-8570 - Extract a generic Content Parser API from org.apache.sling.jcr.contentparser with pluggable implementations by Radu Cotescu · 4 months ago

Build Status Test Status Maven Central JavaDocs License contentparser

Apache Sling Content Parser API

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:

  1. the API is now available in the org.apache.sling.contentparser.api package;
  2. there is no replacement for the org.apache.sling.jcr.contentparser.ContentParserFactory; to obtain a ContentParser, given that they are exposed as OSGi services, one has to filter on the ContentParser.SERVICE_PROPERTY_CONTENT_TYPE service registration property, to select the appropriate file format;
  3. as a consequence of 2., the ParserOptions are now passed directly to the ContentParser#parse method.

Implementations of the API are made available from separate bundles:

  1. JSON - org.apache.sling.contentparser.json
  2. XML - org.apache.sling.contentparser.xml
  3. Jackrabbit Filevault XML (Enhanced JCR 2.0 Document View) - org.apache.sling.contentparser.xml-jcr (the only module depending on the JCR / Jackrabbit APIs)