本文整理了Java中org.apache.xerces.util.XMLAttributesImpl.addAttribute()
方法的一些代码示例,展示了XMLAttributesImpl.addAttribute()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。XMLAttributesImpl.addAttribute()
方法的具体详情如下:
包路径:org.apache.xerces.util.XMLAttributesImpl
类名称:XMLAttributesImpl
方法名:addAttribute
[英]Adds an attribute. The attribute's non-normalized value of the attribute will have the same value as the attribute value until set using the setNonNormalizedValue
method. Also, the added attribute will be marked as specified in the XML instance document unless set otherwise using the setSpecified
method.
Note: If an attribute of the same name already exists, the old values for the attribute are replaced by the new values.
[中]添加一个属性。在使用setNonNormalizedValue
方法设置之前,属性的非规范化值将与属性值具有相同的值。此外,添加的属性将被标记为XML实例文档中指定的属性,除非使用setSpecified
方法另行设置。
注意:如果已经存在同名属性,则该属性的旧值将替换为新值。
代码示例来源:origin: org.seasar.teeda/teeda-extension
public int addAttribute(QName name, String type, String value) {
return attributes.addAttribute(name, type, value);
}
代码示例来源:origin: com.rackspace.apache/xerces2-xsd11
int oldLen = attributes.getLength();
attrIndex =
attributes.addAttribute(
fAttributeQName,
XMLSymbols.fCDATASymbol,
代码示例来源:origin: com.rackspace.apache/xerces2-xsd11
fAttributes.addAttribute(fAttributeQName, XMLSymbols.fCDATASymbol,
(nsURI != null) ? nsURI : XMLSymbols.EMPTY_STRING);
代码示例来源:origin: com.rackspace.apache/xerces2-xsd11
attrIndex = attributes.addAttribute(fAttributeQName, XMLSymbols.fCDATASymbol, null);
代码示例来源:origin: com.rackspace.apache/xerces2-xsd11
private void addNamespaceDeclarations(final int prefixCount) {
String prefix = null;
String localpart = null;
String rawname = null;
String nsPrefix = null;
String nsURI = null;
for (int i = 0; i < prefixCount; ++i) {
nsPrefix = fNamespaceContext.getDeclaredPrefixAt(i);
nsURI = fNamespaceContext.getURI(nsPrefix);
if (nsPrefix.length() > 0) {
prefix = XMLSymbols.PREFIX_XMLNS;
localpart = nsPrefix;
fStringBuffer.clear();
fStringBuffer.append(prefix);
fStringBuffer.append(':');
fStringBuffer.append(localpart);
rawname = fSymbolTable.addSymbol(fStringBuffer.ch, fStringBuffer.offset, fStringBuffer.length);
}
else {
prefix = XMLSymbols.EMPTY_STRING;
localpart = XMLSymbols.PREFIX_XMLNS;
rawname = XMLSymbols.PREFIX_XMLNS;
}
fAttributeQName.setValues(prefix, localpart, rawname, NamespaceContext.XMLNS_URI);
fAttributes.addAttribute(fAttributeQName, XMLSymbols.fCDATASymbol,
(nsURI != null) ? nsURI : XMLSymbols.EMPTY_STRING);
}
}
代码示例来源:origin: gwt-test-utils/gwt-test-utils
attributes.addAttribute(fQName, "CDATA", "");
attributes.setSpecified(attributes.getLength() - 1, true);
if (fAugmentations) {
attributes.addAttribute(fQName, "CDATA", "");
attributes.setSpecified(attributes.getLength() - 1, true);
if (fAugmentations) {
attributes.addAttribute(fQName, "CDATA", avalue);
attributes.addAttribute(fQName, "CDATA", avalue);
attributes.addAttribute(fQName, "CDATA", "");
attributes.setSpecified(attributes.getLength() - 1, true);
fCurrentEntity.rewind();
代码示例来源:origin: net.sourceforge.nekohtml/nekohtml
attributes.addAttribute(fQName, "CDATA", "");
attributes.setSpecified(attributes.getLength()-1, true);
if (fAugmentations) {
attributes.addAttribute(fQName, "CDATA", "");
attributes.setSpecified(attributes.getLength()-1, true);
if (fAugmentations) {
attributes.addAttribute(fQName, "CDATA", avalue);
attributes.addAttribute(fQName, "CDATA", avalue);
attributes.addAttribute(fQName, "CDATA", "");
attributes.setSpecified(attributes.getLength()-1, true);
fCurrentEntity.rewind();
代码示例来源:origin: net.sourceforge.htmlunit/neko-htmlunit
attributes.addAttribute(fQName, "CDATA", "");
attributes.setSpecified(attributes.getLength()-1, true);
if (fAugmentations) {
attributes.addAttribute(fQName, "CDATA", "");
attributes.setSpecified(attributes.getLength()-1, true);
if (fAugmentations) {
attributes.addAttribute(fQName, "CDATA", avalue);
attributes.addAttribute(fQName, "CDATA", avalue);
attributes.addAttribute(fQName, "CDATA", "");
attributes.setSpecified(attributes.getLength()-1, true);
fCurrentEntity.rewind();
代码示例来源:origin: net.sourceforge.nekohtml/com.springsource.org.cyberneko.html
attributes.addAttribute(fQName, "CDATA", "");
attributes.setSpecified(attributes.getLength()-1, true);
if (fAugmentations) {
attributes.addAttribute(fQName, "CDATA", "");
attributes.setSpecified(attributes.getLength()-1, true);
if (fAugmentations) {
attributes.addAttribute(fQName, "CDATA", avalue);
attributes.addAttribute(fQName, "CDATA", avalue);
attributes.addAttribute(fQName, "CDATA", "");
attributes.setSpecified(attributes.getLength()-1, true);
fCurrentEntity.offset--;
代码示例来源:origin: com.googlecode.gwt-test-utils/gwt-test-utils
attributes.addAttribute(fQName, "CDATA", "");
attributes.setSpecified(attributes.getLength() - 1, true);
if (fAugmentations) {
attributes.addAttribute(fQName, "CDATA", "");
attributes.setSpecified(attributes.getLength() - 1, true);
if (fAugmentations) {
attributes.addAttribute(fQName, "CDATA", avalue);
attributes.addAttribute(fQName, "CDATA", avalue);
attributes.addAttribute(fQName, "CDATA", "");
attributes.setSpecified(attributes.getLength() - 1, true);
fCurrentEntity.rewind();
内容来源于网络,如有侵权,请联系作者删除!