Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file distributed with this work for additional information regarding copyright ownership. The ASF licenses this file to you under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
Type | Name and description |
---|---|
static Element |
appendNode(Element self, Object name) |
static Element |
appendNode(Element self, Object name, Map attributes) |
static Element |
appendNode(Element self, Object name, String value) |
static Element |
appendNode(Element self, Object name, Map attributes, String value) |
static NamedNodeMap |
attributes(Element element) |
static NodeList |
breadthFirst(Element self) |
static NodeList |
children(Element self) |
static NodeList |
depthFirst(Element self) |
static Object |
get(Element element, String elementName) |
static Object |
get(NodeList nodeList, String elementName) |
static Object |
get(NamedNodeMap nodeMap, String elementName) |
static Node |
getAt(Node o, int i) |
static Node |
getAt(DOMCategory.NodeListsHolder o, int i) |
static Node |
getAt(DOMCategory.NodesHolder o, int i) |
static NodeList |
getAt(Node o, IntRange r) |
static NodeList |
getAt(DOMCategory.NodeListsHolder o, IntRange r) |
static NodeList |
getAt(DOMCategory.NodesHolder o, IntRange r) |
static boolean |
isEmpty(NodeList self) |
static boolean |
isGlobalKeepIgnorableWhitespace() @return true if ignorable whitespace (e.g. whitespace between elements) is kept; default false |
static boolean |
isGlobalTrimWhitespace() @return true if text elements are trimmed before returning; default false |
static List<Node> |
list(NodeList self) |
static List<String> |
localText(Element self) Returns the list of any direct String nodes of this node. |
static String |
name(Node node) |
static Node |
parent(Node node) |
static void |
plus(Element self, Closure c) |
static void |
plus(NodeList self, Closure c) |
static void |
putAt(Element self, String property, Object value) |
static Node |
replaceNode(DOMCategory.NodesHolder self, Closure c) |
static Node |
replaceNode(Node self, Closure c) |
static void |
setGlobalKeepIgnorableWhitespace(boolean keepIgnorableWhitespace) Whether ignorable whitespace (e.g. whitespace between elements) is kept (default false). |
static void |
setGlobalTrimWhitespace(boolean trimWhitespace) Whether text content is trimmed (removing leading and trailing whitespace); default false. |
static void |
setValue(Element self, String value) |
static int |
size(NamedNodeMap namedNodeMap) |
static int |
size(NodeList self) |
static String |
text(Node node) |
static String |
text(NodeList nodeList) |
static String |
toString(Object o) |
static Object |
xpath(Node self, String expression, QName returnType) |
static String |
xpath(Node self, String expression) |
Returns the list of any direct String nodes of this node.
Whether ignorable whitespace (e.g. whitespace between elements) is kept (default false). WARNING: this is a global setting. Altering it will affect all DOMCategory usage within the current Java process.
keepIgnorableWhitespace
- the new valueWhether text content is trimmed (removing leading and trailing whitespace); default false. WARNING: this is a global setting. Altering it will affect all DOMCategory usage within the current Java process. It is not recommended that this is altered; instead call the trim() method on the returned text, but the flag is available to support legacy Groovy behavior.
trimWhitespace
- the new value