class XmlSlurperFactory
extends Object
Factory method targeting dynamic contexts which allows a new XmlSlurper to be created.
It is intended to assist with migration from Groovy 2.5.x to Groovy 3+.
Code using this factory will not need to change moving from 2.x to 3+.
In Groovy 2.5.x, a groovy.util.XmlSlurper will be returned.
For Groovy 3+, a groovy.xml.XmlSlurper will be returned.
For contexts requiring additional static type checking, it is recommended simply to use the
normal constructor and change the package to groovy.xml prior to reaching Groovy 4.
| Constructor and description |
|---|
XmlSlurperFactory() |
| Type Params | Return Type | Name and description |
|---|---|---|
|
static Object |
newSlurper(Object[] args)Creates a new XmlSlurper for XML parsing and lazy GPath-style traversal. |
Creates a new XmlSlurper for XML parsing and lazy GPath-style traversal.
args - constructor arguments forwarded to XmlSlurperCopyright © 2003-2026 The Apache Software Foundation. All rights reserved.