org.apache.xerces.util.XMLAttributesImpl.removeAllAttributes()方法的使用及代码示例

x33g5p2x  于2022-02-03 转载在 其他  
字(6.8k)|赞(0)|评价(0)|浏览(107)

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

XMLAttributesImpl.removeAllAttributes介绍

[英]Removes all of the attributes. This method will also remove all entities associated to the attributes.
[中]删除所有属性。此方法还将删除与属性关联的所有实体。

代码示例

代码示例来源:origin: org.seasar.teeda/teeda-extension

public void removeAllAttributes() {
  attributes.removeAllAttributes();
}

代码示例来源:origin: com.rackspace.apache/xerces2-xsd11

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);
  }
}

代码示例来源:origin: com.rackspace.apache/xerces2-xsd11

/** Fills in the XMLAttributes object. */
private void fillXMLAttributes(Attributes att) {
  fAttributes.removeAllAttributes();
  final int len = att.getLength();
  for (int i = 0; i < len; ++i) {
    fillXMLAttribute(att, i);
    fAttributes.setSpecified(i, true);
  }
}

代码示例来源:origin: com.rackspace.apache/xerces2-xsd11

private void fillXMLAttributes(StartElement event) {
  fAttributes.removeAllAttributes();
  final Iterator attrs = event.getAttributes();
  while (attrs.hasNext()) {
    Attribute attr = (Attribute) attrs.next();
    fillQName(fAttributeQName, attr.getName());
    String type = attr.getDTDType();
    int idx = fAttributes.getLength();
    fAttributes.addAttributeNS(fAttributeQName, 
        (type != null) ? type : XMLSymbols.fCDATASymbol, attr.getValue());
    fAttributes.setSpecified(idx, attr.isSpecified());
  }
}

代码示例来源:origin: com.rackspace.apache/xerces2-xsd11

private void fillXMLAttributes(XMLStreamReader input) {
  fAttributes.removeAllAttributes();
  final int len = input.getAttributeCount();
  for (int i = 0; i < len; ++i) {
    fillQName(fAttributeQName, input.getAttributeNamespace(i), 
      input.getAttributeLocalName(i), input.getAttributePrefix(i));
    String type = input.getAttributeType(i);
    fAttributes.addAttributeNS(fAttributeQName, 
        (type != null) ? type : XMLSymbols.fCDATASymbol, input.getAttributeValue(i));
    fAttributes.setSpecified(i, input.isAttributeSpecified(i));
  }
}

代码示例来源:origin: com.rackspace.apache/xerces2-xsd11

/** Fills in the XMLAttributes object. */
private void fillXMLAttributes(StartElement event) {
  fAttributes.removeAllAttributes();
  final Iterator attrs = event.getAttributes();
  while (attrs.hasNext()) {
    Attribute attr = (Attribute) attrs.next();
    fillQName(fAttributeQName, attr.getName());
    String type = attr.getDTDType();
    int idx = fAttributes.getLength();
    fAttributes.addAttributeNS(fAttributeQName, 
        (type != null) ? type : XMLSymbols.fCDATASymbol, attr.getValue());
    fAttributes.setSpecified(idx, attr.isSpecified());
  }
}

代码示例来源:origin: com.rackspace.apache/xerces2-xsd11

/** Fills in the XMLAttributes object. */
private void fillXMLAttributes(XMLStreamReader reader) {
  fAttributes.removeAllAttributes();
  final int len = reader.getAttributeCount();
  for (int i = 0; i < len; ++i) {
    fillQName(fAttributeQName, reader.getAttributeNamespace(i), 
        reader.getAttributeLocalName(i), reader.getAttributePrefix(i));
    String type = reader.getAttributeType(i);
    fAttributes.addAttributeNS(fAttributeQName, 
        (type != null) ? type : XMLSymbols.fCDATASymbol, reader.getAttributeValue(i));
    fAttributes.setSpecified(i, reader.isAttributeSpecified(i));
  }
}

代码示例来源:origin: com.rackspace.apache/xerces2-xsd11

private void processAttributes(NamedNodeMap attrMap) {
  final int attrCount = attrMap.getLength();
  fAttributes.removeAllAttributes();
  for (int i = 0; i < attrCount; ++i) {
    Attr attr = (Attr) attrMap.item(i);
    String value = attr.getValue();
    if (value == null) {
      value = XMLSymbols.EMPTY_STRING;
    }
    fillQName(fAttributeQName, attr);
    // REVISIT: Assuming all attributes are of type CDATA. The actual type may not matter. -- mrglavas
    fAttributes.addAttributeNS(fAttributeQName, XMLSymbols.fCDATASymbol, value);
    fAttributes.setSpecified(i, attr.getSpecified());
    // REVISIT: Should we be looking at non-namespace attributes
    // for additional mappings? Should we detect illegal namespace
    // declarations and exclude them from the context? -- mrglavas
    if (fAttributeQName.uri == NamespaceContext.XMLNS_URI) {
      // process namespace attribute
      if (fAttributeQName.prefix == XMLSymbols.PREFIX_XMLNS) {
        fNamespaceContext.declarePrefix(fAttributeQName.localpart, value.length() != 0 ? fSymbolTable.addSymbol(value) : null);
      }
      else {
        fNamespaceContext.declarePrefix(XMLSymbols.EMPTY_STRING, value.length() != 0 ? fSymbolTable.addSymbol(value) : null);
      }
    }
  }
}

代码示例来源:origin: com.rackspace.apache/xerces2-xsd11

/** Fills in the XMLAttributes object. */
private void fillXMLAttributes2(Attributes2 att) {
  fAttributes.removeAllAttributes();
  final int len = att.getLength();
  for (int i = 0; i < len; ++i) {
    fillXMLAttribute(att, i);
    fAttributes.setSpecified(i, att.isSpecified(i));
    if (att.isDeclared(i)) {
      fAttributes.getAugmentations(i).putItem(Constants.ATTRIBUTE_DECLARED, Boolean.TRUE);
    }
  }
}

代码示例来源:origin: net.sourceforge.nekohtml/com.springsource.org.cyberneko.html

fAttributes.removeAllAttributes();
int beginLineNumber = fBeginLineNumber;
int beginColumnNumber = fBeginColumnNumber;

代码示例来源:origin: com.googlecode.gwt-test-utils/gwt-test-utils

fAttributes.removeAllAttributes();
int beginLineNumber = fBeginLineNumber;
int beginColumnNumber = fBeginColumnNumber;

代码示例来源:origin: gwt-test-utils/gwt-test-utils

fAttributes.removeAllAttributes();
int beginLineNumber = fBeginLineNumber;
int beginColumnNumber = fBeginColumnNumber;

代码示例来源:origin: net.sourceforge.htmlunit/neko-htmlunit

fAttributes.removeAllAttributes();
final int beginLineNumber = fBeginLineNumber;
final int beginColumnNumber = fBeginColumnNumber;

代码示例来源:origin: net.sourceforge.nekohtml/nekohtml

fAttributes.removeAllAttributes();
int beginLineNumber = fBeginLineNumber;
int beginColumnNumber = fBeginColumnNumber;

代码示例来源:origin: net.sourceforge.nekohtml/nekohtml

int beginColumnNumber = fBeginColumnNumber;
int beginCharacterOffset = fBeginCharacterOffset;
fAttributes.removeAllAttributes();
int aindex = 0;
while (scanPseudoAttribute(fAttributes)) {

代码示例来源:origin: com.googlecode.gwt-test-utils/gwt-test-utils

int beginColumnNumber = fBeginColumnNumber;
int beginCharacterOffset = fBeginCharacterOffset;
fAttributes.removeAllAttributes();
int aindex = 0;
while (scanPseudoAttribute(fAttributes)) {

代码示例来源:origin: gwt-test-utils/gwt-test-utils

int beginColumnNumber = fBeginColumnNumber;
int beginCharacterOffset = fBeginCharacterOffset;
fAttributes.removeAllAttributes();
int aindex = 0;
while (scanPseudoAttribute(fAttributes)) {

代码示例来源:origin: net.sourceforge.htmlunit/neko-htmlunit

final int beginColumnNumber = fBeginColumnNumber;
final int beginCharacterOffset = fBeginCharacterOffset;
fAttributes.removeAllAttributes();
int aindex = 0;
while (scanPseudoAttribute(fAttributes)) {

代码示例来源:origin: com.rackspace.apache/xerces2-xsd11

fAttributes.removeAllAttributes();
do {

代码示例来源:origin: com.rackspace.apache/xerces2-xsd11

fAttributes.removeAllAttributes();
do {

相关文章