org.xml.sax.AttributeList.getType()方法的使用及代码示例

x33g5p2x  于2022-01-16 转载在 其他  
字(5.7k)|赞(0)|评价(0)|浏览(120)

本文整理了Java中org.xml.sax.AttributeList.getType()方法的一些代码示例,展示了AttributeList.getType()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。AttributeList.getType()方法的具体详情如下:
包路径:org.xml.sax.AttributeList
类名称:AttributeList
方法名:getType

AttributeList.getType介绍

[英]Return the type of an attribute in the list (by position).

The attribute type is one of the strings "CDATA", "ID", "IDREF", "IDREFS", "NMTOKEN", "NMTOKENS", "ENTITY", "ENTITIES", or "NOTATION" (always in upper case).

If the parser has not read a declaration for the attribute, or if the parser does not report attribute types, then it must return the value "CDATA" as stated in the XML 1.0 Recommentation (clause 3.3.3, "Attribute-Value Normalization").

For an enumerated attribute that is not a notation, the parser will report the type as "NMTOKEN".
[中]返回列表中属性的类型(按位置)。
属性类型是字符串“CDATA”、“ID”、“IDREF”、“IDREFS”、“NMTOKEN”、“NMTOKEN”、“ENTITY”、“ENTITIES”或“NOTATION”(始终为大写)之一。
如果解析器没有读取属性的声明,或者解析器没有报告属性类型,那么它必须返回XML 1.0建议中所述的值“CDATA”(第3.3.3条,“属性值规范化”)。
对于不是符号的枚举属性,解析器将把类型报告为“NMTOKEN”。

代码示例

代码示例来源:origin: robovm/robovm

/**
 * Look up the type of an attribute by qualified (prefixed) name.
 *
 * @param qName The qualified name.
 * @return The attribute's type as an internalized string.
 */
public String getType (String qName)
{
  return qAtts.getType(qName).intern();
}

代码示例来源:origin: robovm/robovm

/**
 * Return the type of the specified attribute.
 *
 * @param The attribute's index.
 * @return The attribute's type as an internalized string.
 */
public String getType (int i)
{
  return qAtts.getType(i).intern();
}

代码示例来源:origin: robovm/robovm

for (int i = 0; i < length; i++) {
  String attQName = qAtts.getName(i);
  String type = qAtts.getType(i);
  String value = qAtts.getValue(i);

代码示例来源:origin: robovm/robovm

/**
 * Set the attribute list, discarding previous contents.
 *
 * <p>This method allows an application writer to reuse an
 * attribute list easily.</p>
 *
 * @param atts The attribute list to copy.
 */
public void setAttributeList (AttributeList atts)
{
int count = atts.getLength();
clear();
for (int i = 0; i < count; i++) {
  addAttribute(atts.getName(i), atts.getType(i), atts.getValue(i));
}
}

代码示例来源:origin: com.mobidevelop.robovm/robovm-rt

/**
 * Look up the type of an attribute by qualified (prefixed) name.
 *
 * @param qName The qualified name.
 * @return The attribute's type as an internalized string.
 */
public String getType (String qName)
{
  return qAtts.getType(qName).intern();
}

代码示例来源:origin: com.bugvm/bugvm-rt

/**
 * Return the type of the specified attribute.
 *
 * @param The attribute's index.
 * @return The attribute's type as an internalized string.
 */
public String getType (int i)
{
  return qAtts.getType(i).intern();
}

代码示例来源:origin: com.sun.xml.bind/jaxb1-impl

/**
 * Look up the type of an attribute by qualified (prefixed) name.
 *
 * @param qName The qualified name.
 * @return The attribute's type as an internalized string.
 */
public String getType (String qName)
{
  return qAtts.getType(qName).intern();
}

代码示例来源:origin: MobiVM/robovm

/**
 * Return the type of the specified attribute.
 *
 * @param The attribute's index.
 * @return The attribute's type as an internalized string.
 */
public String getType (int i)
{
  return qAtts.getType(i).intern();
}

代码示例来源:origin: MobiVM/robovm

/**
 * Look up the type of an attribute by qualified (prefixed) name.
 *
 * @param qName The qualified name.
 * @return The attribute's type as an internalized string.
 */
public String getType (String qName)
{
  return qAtts.getType(qName).intern();
}

代码示例来源:origin: com.bugvm/bugvm-rt

/**
 * Look up the type of an attribute by qualified (prefixed) name.
 *
 * @param qName The qualified name.
 * @return The attribute's type as an internalized string.
 */
public String getType (String qName)
{
  return qAtts.getType(qName).intern();
}

代码示例来源:origin: com.gluonhq/robovm-rt

/**
 * Look up the type of an attribute by qualified (prefixed) name.
 *
 * @param qName The qualified name.
 * @return The attribute's type as an internalized string.
 */
public String getType (String qName)
{
  return qAtts.getType(qName).intern();
}

代码示例来源:origin: ibinti/bugvm

/**
 * Look up the type of an attribute by qualified (prefixed) name.
 *
 * @param qName The qualified name.
 * @return The attribute's type as an internalized string.
 */
public String getType (String qName)
{
  return qAtts.getType(qName).intern();
}

代码示例来源:origin: ibinti/bugvm

/**
 * Return the type of the specified attribute.
 *
 * @param The attribute's index.
 * @return The attribute's type as an internalized string.
 */
public String getType (int i)
{
  return qAtts.getType(i).intern();
}

代码示例来源:origin: com.mobidevelop.robovm/robovm-rt

/**
 * Return the type of the specified attribute.
 *
 * @param The attribute's index.
 * @return The attribute's type as an internalized string.
 */
public String getType (int i)
{
  return qAtts.getType(i).intern();
}

代码示例来源:origin: javax.xml.parsers/jaxp-api

/**
 * Return the type of the specified attribute.
 *
 * @param The attribute's index.
 * @return The attribute's type as an internalized string.
 */
public String getType (int i)
{
  return qAtts.getType(i).intern();
}

代码示例来源:origin: javax.xml.parsers/jaxp-api

/**
 * Look up the type of an attribute by qualified (prefixed) name.
 *
 * @param qName The qualified name.
 * @return The attribute's type as an internalized string.
 */
public String getType (String qName)
{
  return qAtts.getType(qName).intern();
}

代码示例来源:origin: com.sun.xml.bind/jaxb1-impl

/**
 * Return the type of the specified attribute.
 *
 * @param The attribute's index.
 * @return The attribute's type as an internalized string.
 */
public String getType (int i)
{
  return qAtts.getType(i).intern();
}

代码示例来源:origin: com.gluonhq/robovm-rt

/**
 * Return the type of the specified attribute.
 *
 * @param The attribute's index.
 * @return The attribute's type as an internalized string.
 */
public String getType (int i)
{
  return qAtts.getType(i).intern();
}

代码示例来源:origin: com.sun.xml.bind/jaxb-extra-osgi

/**
 * Look up the type of an attribute by qualified (prefixed) name.
 *
 * @param qName The qualified name.
 * @return The attribute's type as an internalized string.
 */
public String getType (String qName)
{
  return qAtts.getType(qName).intern();
}

代码示例来源:origin: uk.org.ponder.rsf/rsf-core-ponderutilcore

SAXAttributeHash(AttributeList attrs) {
 for (int i = 0; i < attrs.getLength(); ++ i) {
  put(attrs.getName(i), attrs.getType(i), attrs.getValue(i));
  }
 }
public SAXAttributeHash() {}

相关文章

微信公众号

最新文章

更多