當前位置: 首頁>>代碼示例>>Java>>正文


Java Attributes.getType方法代碼示例

本文整理匯總了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;
        }
    }
}
 
開發者ID:SunburstApps,項目名稱:OpenJSharp,代碼行數:27,代碼來源:EncodingAlgorithmAttributesImpl.java

示例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);
        }
    }
}
 
開發者ID:SunburstApps,項目名稱:OpenJSharp,代碼行數:24,代碼來源:AttributesImpl.java

示例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);
}
}
 
開發者ID:SunburstApps,項目名稱:OpenJSharp,代碼行數:22,代碼來源:AttributesImpl.java

示例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);
    }
}
 
開發者ID:SunburstApps,項目名稱:OpenJSharp,代碼行數:11,代碼來源:SchemaContentHandler.java

示例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));
}
 
開發者ID:SunburstApps,項目名稱:OpenJSharp,代碼行數:7,代碼來源:ValidatorHandlerImpl.java


注:本文中的org.xml.sax.Attributes.getType方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。