[Java] Class XmlGroovyMethods

  • org.codehaus.groovy.runtime.XmlGroovyMethods
@Deprecated
public class XmlGroovyMethods
extends Object

This class defines all the new XML-related groovy methods which enhance the normal JDK XML classes when inside the Groovy environment. Static methods are used with the first parameter the destination class.

Methods Summary

Methods
Type Params Return Type Name and description
public boolean hasNext()
public static Iterator<Node> iterator(NodeList nodeList)
Makes NodeList iterable by returning a read-only Iterator which traverses over each Node.
public Node next()
public void remove()
public static String serialize(Element element)
Transforms the element to its text equivalent.

Inherited Methods Summary

Inherited Methods
Methods inherited from class Name
class Object wait, wait, wait, equals, toString, hashCode, getClass, notify, notifyAll

Method Detail

public boolean hasNext()

@Deprecated public static Iterator<Node> iterator(NodeList nodeList)

Makes NodeList iterable by returning a read-only Iterator which traverses over each Node.

Parameters:
nodeList - a NodeList
Returns:
an Iterator for a NodeList
Since:
1.0

public Node next()

public void remove()

@Deprecated public static String serialize(Element element)

Transforms the element to its text equivalent. (The resulting string does not contain a xml declaration. Use XmlUtil.serialize(element) if you need the declaration.)

Parameters:
element - the element to serialize
Returns:
the string representation of the element
Since:
2.1

© 2003-2020 The Apache Software Foundation
Licensed under the Apache license.
https://docs.groovy-lang.org/3.0.7/html/gapi/org/codehaus/groovy/runtime/XmlGroovyMethods.html