Object obj = children.next(); nd = getNodeFor(obj); } while (nd.getReference() != null && children.hasNext()); if (nd.getReference() == null) if (nd.getReference() == null) Node sibling2 = (nd.getReference() == null) ? null : nd; for (Node insertNode : newNodes) if (insertNode.getReference() == null)
Object obj = children.next(); nd = getNodeFor(obj); } while (nd.getReference() != null && children.hasNext()); if (nd.getReference() == null) if (nd.getReference() == null) Node sibling2 = (nd.getReference() == null) ? null : nd; for (Node insertNode : newNodes) if (insertNode.getReference() == null)
/** * Helper method for accessing the element of the specified node. * * @param node the node * @return the element of this node */ private Element getElement(Node node) { // special treatment for root node of the hierarchy return (node.getName() != null && node.getReference() != null) ? (Element) node .getReference() : document.getDocumentElement(); } }
/** * Updates the value of the specified attribute of the given node. * Because there can be multiple child nodes representing this attribute * the new value is determined by iterating over all those child nodes. * * @param node the affected node * @param name the name of the attribute * @param listDelimiter the delimiter for attributes with multiple values * @param isAttributeSplittingDisabled true if attributes splitting is disabled. */ static void updateAttribute(Node node, String name, char listDelimiter, boolean isAttributeSplittingDisabled) { if (node != null) { updateAttribute(node, (Element) node.getReference(), name, listDelimiter, isAttributeSplittingDisabled); } }
/** * Updates the value of the specified attribute of the given node. * Because there can be multiple child nodes representing this attribute * the new value is determined by iterating over all those child nodes. * * @param node the affected node * @param name the name of the attribute * @param listDelimiter the delimiter for attributes with multiple values * @param isAttributeSplittingDisabled true if attributes splitting is disabled. */ static void updateAttribute(Node node, String name, char listDelimiter, boolean isAttributeSplittingDisabled) { if (node != null) { updateAttribute(node, (Element) node.getReference(), name, listDelimiter, isAttributeSplittingDisabled); } }
/** * Helper method for accessing the element of the specified node. * * @param node the node * @return the element of this node */ private Element getElement(Node node) { // special treatment for root node of the hierarchy return (node.getName() != null && node.getReference() != null) ? (Element) node .getReference() : document.getDocumentElement(); } }