⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 mapschemanamerule.java

📁 一个完整的XACML工程,学习XACML技术的好例子!
💻 JAVA
字号:
/*
 * 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 + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -