Example usage for org.jdom2.output XMLOutputter outputElementContentString

List of usage examples for org.jdom2.output XMLOutputter outputElementContentString

Introduction

In this page you can find the example usage for org.jdom2.output XMLOutputter outputElementContentString.

Prototype

public final String outputElementContentString(Element element) 

Source Link

Document

This will handle printing out an Element 's content only, not including its tag, and attributes.

Usage

From source file:de.smartics.maven.alias.domain.AliasesProcessor.java

License:Apache License

private String readComment(final Element root) {
    final Element commentElement = root.getChild("comment", nsAlias);
    if (commentElement != null) {
        final XMLOutputter xout = new XMLOutputter();
        final String comment = xout.outputElementContentString(commentElement);
        if (StringUtils.isNotBlank(comment)) {
            return comment;
        }//from   w w  w .ja va 2 s . com
    }
    return null;
}