List of usage examples for org.apache.commons.digester3 SetPropertiesRule SetPropertiesRule
public SetPropertiesRule(String[] attributeNames, String[] propertyNames)
Constructor allows attribute->property mapping to be overriden.
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 w w .j av a 2 s. com SetPropertiesRule rule = new SetPropertiesRule(attrNames, propNames); rule.setIgnoreMissingProperty(true); digester.addRule(pattern, rule); }