Monday, 2 December 2013

Creating a HTML Parser Service for Adobe Experience Manager

You can create a custom Adobe Experience Manager (AEM) HTML parser service that accepts HTML and parses it. By parsing HTML, you can retrieve HTML tag values. For example, consider the following HTML.

<div><p>Hello JSoup - this is now a CQ service.</p></div>

Once you pass this HTML to the custom AEM HTML parser service, you can get the value of the <p> tag, as shown in the following illustration.

An AEM web page that parses HTML by calling the custom HTML parser service
To create a custom AEM HTML parser service, you can use the JSOUP library. That is, the application logic required to parse HTML is developed by using the JSOUP API. For information about this API, see:

http://jsoup.org/

The Java logic that parses HTML is implemented as an OSGi bundle that is built using Declarative Services (DS) and Maven. The OSGi bundle is a managed component, which means that the OSGi service container creates the OSGi instance. To read this development article, click: http://helpx.adobe.com/experience-manager/using/html-parser-service.html.

Join the Adobe Experience Cloud Community 

Join the Adobe Experience Cloud Community by clicking this banner




I (Scott Macdonald) am a Senior Digital Marketing Community Manager at Adobe Systems with 20 years in the high tech industry. I am also a programmer with knowledge in Java, JavaScript, C#,C++, HTML, XML and ActionScript. If  you would like to see more CQ or other Adobe Digital Marketing end to end articles like this, then leave a comment and let me know what content you would like to see.


TwitterFollow the Digital Marketing Customer Care team on Twitter @AdobeExpCare.

YouTube: Subscribe to the AEM Community Channel