Example usage for com.liferay.portal.kernel.xml Element nodeCount

List of usage examples for com.liferay.portal.kernel.xml Element nodeCount

Introduction

In this page you can find the example usage for com.liferay.portal.kernel.xml Element nodeCount.

Prototype

public int nodeCount();

Source Link

Usage

From source file:com.liferay.journal.util.impl.JournalUtil.java

License:Open Source License

private static void _removeOldContent(Stack<String> path, Element contentElement, Document xsdDocument) {

    String elementPath = "";

    for (int i = 0; i < path.size(); i++) {
        elementPath += "/" + path.elementAt(i);
    }//ww w.j  a va 2  s . com

    for (int i = 0; i < contentElement.nodeCount(); i++) {
        Node contentNode = contentElement.node(i);

        if (contentNode instanceof Element) {
            _removeOldContent(path, (Element) contentNode, xsdDocument, elementPath);
        }
    }
}

From source file:com.liferay.portlet.journal.util.JournalUtil.java

License:Open Source License

private static void _removeOldContent(Stack<String> path, Element contentElement, Document xsdDocument)
        throws SystemException {

    String elementPath = "";

    for (int i = 0; i < path.size(); i++) {
        elementPath += "/" + path.elementAt(i);
    }//from  ww w  . j  ava2  s . c  o  m

    for (int i = 0; i < contentElement.nodeCount(); i++) {
        Node contentNode = contentElement.node(i);

        if (contentNode instanceof Element) {
            _removeOldContent(path, (Element) contentNode, xsdDocument, elementPath);
        }
    }
}