本文整理汇总了Java中org.xml.sax.Attributes.getType方法的典型用法代码示例。如果您正苦于以下问题:Java Attributes.getType方法的具体用法?Java Attributes.getType怎么用?Java Attributes.getType使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.xml.sax.Attributes
的用法示例。
在下文中一共展示了Attributes.getType方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: setAttributes
import org.xml.sax.Attributes; //导入方法依赖的package包/类
/**
* Copy an entire Attributes object.
*
* @param atts The attributes to copy.
*/
public void setAttributes(Attributes atts) {
_length = atts.getLength();
if (_length > 0) {
if (_length >= _algorithmData.length) {
resizeNoCopy();
}
int index = 0;
for (int i = 0; i < _length; i++) {
_data[index++] = atts.getURI(i);
_data[index++] = atts.getLocalName(i);
_data[index++] = atts.getQName(i);
_data[index++] = atts.getType(i);
_data[index++] = atts.getValue(i);
index++;
_toIndex[i] = false;
_alphabets[i] = null;
}
}
}
示例2: setAttributes
import org.xml.sax.Attributes; //导入方法依赖的package包/类
/**
* Copy an entire Attributes object.
*
* <p>It may be more efficient to reuse an existing object
* rather than constantly allocating new ones.</p>
*
* @param atts The attributes to copy.
*/
public void setAttributes (Attributes atts)
{
clear();
length = atts.getLength();
if (length > 0) {
data = new String[length*5];
for (int i = 0; i < length; i++) {
data[i*5] = atts.getURI(i);
data[i*5+1] = atts.getLocalName(i);
data[i*5+2] = atts.getQName(i);
data[i*5+3] = atts.getType(i);
data[i*5+4] = atts.getValue(i);
}
}
}
示例3: setAttributes
import org.xml.sax.Attributes; //导入方法依赖的package包/类
/**
* Copy an entire Attributes object.
*
* <p>It may be more efficient to reuse an existing object
* rather than constantly allocating new ones.</p>
*
* @param atts The attributes to copy.
*/
public void setAttributes (Attributes atts)
{
clear();
length = atts.getLength();
data = new String[length*5];
for (int i = 0; i < length; i++) {
data[i*5] = atts.getURI(i);
data[i*5+1] = atts.getLocalName(i);
data[i*5+2] = atts.getQName(i);
data[i*5+3] = atts.getType(i);
data[i*5+4] = atts.getValue(i);
}
}
示例4: fillXMLAttributes
import org.xml.sax.Attributes; //导入方法依赖的package包/类
private void fillXMLAttributes(Attributes atts) {
fAttributes.removeAllAttributes();
final int attrCount = atts.getLength();
for (int i = 0; i < attrCount; ++i) {
fillQName(fAttributeQName, atts.getURI(i), atts.getLocalName(i), atts.getQName(i));
String type = atts.getType(i);
fAttributes.addAttributeNS(fAttributeQName, (type != null) ? type : XMLSymbols.fCDATASymbol, atts.getValue(i));
fAttributes.setSpecified(i, true);
}
}
示例5: fillXMLAttribute
import org.xml.sax.Attributes; //导入方法依赖的package包/类
/** Adds an attribute to the XMLAttributes object. */
private void fillXMLAttribute(Attributes att, int index) {
fillQName(fAttributeQName, att.getURI(index), att.getLocalName(index), att.getQName(index));
String type = att.getType(index);
fAttributes.addAttributeNS(fAttributeQName, (type != null) ? type : XMLSymbols.fCDATASymbol, att.getValue(index));
}