?? xmlattribute.java
字號:
package XML;
import java.util.*;
import Utilities.*;
/**
* <p>Title: Moto EMS Tool</p>
* <p>Description: 摩托羅拉 EMS 工具</p>
* <p>Copyright: Copyright (c) 2002</p>
* <p>Company: 北京映翰通網絡技術有限公司</p>
* @author 韓傳俊 shock2000@21cn.com
* @version 1.0
*/
public class XMLAttribute extends Attribute{
public XMLAttribute(){
this.name="";
this.value="";
}
public XMLAttribute(XMLAttribute attr){
this.name=attr.name;
this.value=attr.value;
}
public XMLAttribute(String name,String value) {
this.name=name;
this.value=value;
}
public XMLAttribute(String name,int value) {
this.name=name;
this.value=""+value;
}
//屬性值是FLOAT型(如 "version='1.0'")的處理
public XMLAttribute(String name,double value){
this.name=name;
this.value=""+value;
}
public XMLAttribute(Attribute attribute){
this.name=attribute.name;
this.value=attribute.value;
}
public static XMLAttribute getXMLAttribute(String attr){
XMLAttribute att=new XMLAttribute(Attribute.getAttribute(attr));
return att;
}
//已做解析
public static XMLAttribute[] getXMLAttributes(String eleStr){
String[] str=Attribute.getXMLAttributeStr(eleStr);
XMLAttribute[] attrs=new XMLAttribute[str.length];
for (int i=0;i<str.length;i++){
attrs[i]=XMLAttribute.getXMLAttribute(str[i]);
}
return attrs;
}
}
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -