You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@groovy.apache.org by "Pascal Schumacher (JIRA)" <ji...@apache.org> on 2015/10/15 22:13:05 UTC

[jira] [Comment Edited] (GROOVY-7633) Add constructor with Map for SAXOptions to XmlSlurper

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

Pascal Schumacher edited comment on GROOVY-7633 at 10/15/15 8:12 PM:
---------------------------------------------------------------------

No, org.apache.commons.beanutils.PropertyUtils is part of Apache Commons BeanUtils, which is independent of groovy. 

I guess you could use [InvokerHelper.html#setProperty|http://docs.groovy-lang.org/latest/html/api/org/codehaus/groovy/runtime/InvokerHelper.html#setProperty%28java.lang.Object,%20java.lang.String,%20java.lang.Object%29], but I do not know if it is good style to do this.


was (Author: pascalschumacher):
No, org.apache.commons.beanutils.PropertyUtils is part of Apache Commons BeanUtils, which is independent of groovy. I guess you could use [http://docs.groovy-lang.org/latest/html/api/org/codehaus/groovy/runtime/InvokerHelper.html#setProperty%28java.lang.Object,%20java.lang.String,%20java.lang.Object%29].

> 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
>
> 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
(v6.3.4#6332)