List of usage examples for com.liferay.portal.kernel.xml Element node
public Node node(int index);
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); }//from ww w. j a va 2 s . c om 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.journal.verify.JournalServiceVerifyProcess.java
License:Open Source License
protected void updateLinkToLayoutElements(long groupId, Element element) { Element dynamicContentElement = element.element("dynamic-content"); Node node = dynamicContentElement.node(0); String text = node.getText(); if (!text.isEmpty() && !text.endsWith(StringPool.AT + groupId)) { node.setText(dynamicContentElement.getStringValue() + StringPool.AT + groupId); }/*from w w w. j av a2s . c o m*/ }
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 www. j a va2s.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); } } }