Example usage for org.apache.commons.digester3 SetPropertiesRule setIgnoreMissingProperty

List of usage examples for org.apache.commons.digester3 SetPropertiesRule setIgnoreMissingProperty

Introduction

In this page you can find the example usage for org.apache.commons.digester3 SetPropertiesRule setIgnoreMissingProperty.

Prototype

public void setIgnoreMissingProperty(boolean ignoreMissingProperty) 

Source Link

Document

Sets whether attributes found in the xml without matching properties should be ignored.

Usage

From source file:net.sf.mcf2pdf.mcfelements.util.DigesterUtil.java

public static void addSetProperties(Digester digester, String pattern, List<String[]> specialAttributes) {
    String[] attrNames = new String[specialAttributes.size()];
    String[] propNames = new String[specialAttributes.size()];

    for (int i = 0; i < specialAttributes.size(); i++) {
        attrNames[i] = specialAttributes.get(i)[0];
        propNames[i] = specialAttributes.get(i)[1];
    }//from w  ww . j av a  2 s. c  o m

    SetPropertiesRule rule = new SetPropertiesRule(attrNames, propNames);
    rule.setIgnoreMissingProperty(true);
    digester.addRule(pattern, rule);
}