mapschemanamerule.java
来自「一个完整的XACML工程,学习XACML技术的好例子!」· Java 代码 · 共 36 行
JAVA
36 行
/*
* MapSchemaNameRule.java
*
* Created on 11 December 2002, 11:33
*/
package ke.defaultimpl.utils.xml.parsing;
import java.util.*;
/**
*
* @author James Cunningham
*/
public class MapSchemaNameRule extends org.apache.commons.digester.Rule
{
/** Creates a new instance of MapSchemaNameRule */
public MapSchemaNameRule() {}
public void begin(String namespace, String name, org.xml.sax.Attributes attributes)
{
for(int i = 0; i < attributes.getLength(); i++)
{
if(attributes.getQName(i).equals("name"))
{
((HashMap)digester.peek()).put("Schema_Name", attributes.getValue(i));
System.out.println("Set schema name to " + attributes.getValue(i));
}
else
{
System.out.println("Ignoring attribute " + attributes.getValue(i));
}
}
}
}
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?