Example usage for org.jdom2 Text getParent

List of usage examples for org.jdom2 Text getParent

Introduction

In this page you can find the example usage for org.jdom2 Text getParent.

Prototype

@Override
    public Element getParent() 

Source Link

Usage

From source file:xml.JDOMConverter.java

License:Apache License

/**.
 * Handles the case where the object in filter is a text
 * @param a the filtered text//from  w ww  . j  ava  2  s. c o m
 * @throws JSONException
 */
private void handleText(final Text t) throws JSONException {
    String str = t.getTextNormalize();
    if (!str.isEmpty()) {
        String parent = t.getParent().getName();
        tree.get(current - 1).put(parent, str);
        skipp = true;
    }
}