[ 
https://issues.apache.org/jira/browse/GROOVY-7633?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=18073050#comment-18073050
 ] 

Paul King edited comment on GROOVY-7633 at 4/13/26 5:00 AM:
------------------------------------------------------------

The automatic named parameters in constructors almost gave you this for free. 
It has been tweaked so now it does.
{code:groovy}
def slurper = new XmlSlurper(namespaceAware: false, keepIgnorableWhitespace: 
true)
{code}


was (Author: paulk):
def slurper = new XmlSlurper(namespaceAware: false, keepIgnorableWhitespace: 
true)

> Add constructor with Map for SAXOptions to XmlSlurper
> -----------------------------------------------------
>
>                 Key: GROOVY-7633
>                 URL: https://issues.apache.org/jira/browse/GROOVY-7633
>             Project: Groovy
>          Issue Type: Improvement
>          Components: XML Processing
>            Reporter: Pascal Schumacher
>            Assignee: Paul King
>            Priority: Major
>             Fix For: 6.0.0-alpha-1
>
>
> It would be good if an extra contructor would be added to XmlSlurper being
> {code:java}XmlSlurper(Map saxOptions = [:]){code}
> That can lead to something more expressive than the current way of 
> constructing options on XmlSlurper. It would also be more flexible should 
> SAXParserFactory obtain additional setters in future releases of the JDK. 
> As an example:
> {code:java}new XmlSlurper(namespaceAware: true, xIncludeAware: true) {code}
> source: 
> [http://groovy.329449.n5.nabble.com/XmlSlurper-and-XML-includes-tp5728340.html;cid=1444931370777-216]



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to