本文整理了Java中org.xml.sax.AttributeList.getValue()
方法的一些代码示例,展示了AttributeList.getValue()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。AttributeList.getValue()
方法的具体详情如下:
包路径:org.xml.sax.AttributeList
类名称:AttributeList
方法名:getValue
[英]Return the value of an attribute in the list (by position).
If the attribute value is a list of tokens (IDREFS, ENTITIES, or NMTOKENS), the tokens will be concatenated into a single string separated by whitespace.
[中]返回列表中属性的值(按位置)。
如果属性值是令牌(IDREF、实体或NMTOKEN)的列表,则这些令牌将连接成一个由空格分隔的字符串。
代码示例来源:origin: robovm/robovm
/**
* Return the value of the specified attribute.
*
* @param The attribute's index.
* @return The attribute's value.
*/
public String getValue (int i)
{
return qAtts.getValue(i);
}
代码示例来源:origin: robovm/robovm
/**
* Look up the value of an attribute by qualified (prefixed) name.
*
* @param qName The qualified name.
* @return The attribute's value.
*/
public String getValue (String qName)
{
return qAtts.getValue(qName);
}
代码示例来源:origin: org.apache.ant/ant
/**
* Scans an attribute list for the <code>id</code> attribute and
* stores a reference to the target object in the project if an
* id is found.
* <p>
* This method was moved out of the configure method to allow
* it to be executed at parse time.
*
* @see #configure(Object,AttributeList,Project)
*/
private void configureId(Object target, AttributeList attr) {
String id = attr.getValue("id");
if (id != null) {
project.addReference(id, target);
}
}
}
代码示例来源:origin: org.apache.ant/ant
/**
* Sets the attributes for the wrapped element.
*
* @param attributes List of attributes defined in the XML for this
* element. May be <code>null</code>.
* @deprecated since 1.6.x.
*/
@Deprecated
public synchronized void setAttributes(AttributeList attributes) {
this.attributes = new AttributeListImpl(attributes);
for (int i = 0; i < attributes.getLength(); i++) {
setAttribute(attributes.getName(i), attributes.getValue(i));
}
}
代码示例来源:origin: robovm/robovm
prefix = attQName.substring(n+1);
String value = qAtts.getValue(i);
if (!nsSupport.declarePrefix(prefix, value)) {
reportError("Illegal Namespace prefix: " + prefix);
String attQName = qAtts.getName(i);
String type = qAtts.getType(i);
String value = qAtts.getValue(i);
代码示例来源:origin: org.apache.ant/ant
String value = replaceProperties(project, attrs.getValue(i), project.getProperties());
try {
ih.setAttribute(project, target, attrs.getName(i).toLowerCase(Locale.ENGLISH), value);
代码示例来源: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: org.apache.ant/ant
String value = attrs.getValue(i);
switch (key) {
case "name":
代码示例来源:origin: org.apache.ant/ant
String value = attrs.getValue(i);
switch (key) {
case "default":
代码示例来源:origin: MobiVM/robovm
/**
* Return the value of the specified attribute.
*
* @param The attribute's index.
* @return The attribute's value.
*/
public String getValue (int i)
{
return qAtts.getValue(i);
}
代码示例来源:origin: MobiVM/robovm
/**
* Look up the value of an attribute by qualified (prefixed) name.
*
* @param qName The qualified name.
* @return The attribute's value.
*/
public String getValue (String qName)
{
return qAtts.getValue(qName);
}
代码示例来源:origin: com.bugvm/bugvm-rt
/**
* Return the value of the specified attribute.
*
* @param The attribute's index.
* @return The attribute's value.
*/
public String getValue (int i)
{
return qAtts.getValue(i);
}
代码示例来源:origin: ibinti/bugvm
/**
* Look up the value of an attribute by qualified (prefixed) name.
*
* @param qName The qualified name.
* @return The attribute's value.
*/
public String getValue (String qName)
{
return qAtts.getValue(qName);
}
代码示例来源:origin: ibinti/bugvm
/**
* Return the value of the specified attribute.
*
* @param The attribute's index.
* @return The attribute's value.
*/
public String getValue (int i)
{
return qAtts.getValue(i);
}
代码示例来源:origin: FlexoVM/flexovm
/**
* Return the value of the specified attribute.
*
* @param The attribute's index.
* @return The attribute's value.
*/
public String getValue (int i)
{
return qAtts.getValue(i);
}
代码示例来源:origin: com.mobidevelop.robovm/robovm-rt
/**
* Return the value of the specified attribute.
*
* @param The attribute's index.
* @return The attribute's value.
*/
public String getValue (int i)
{
return qAtts.getValue(i);
}
代码示例来源:origin: com.mobidevelop.robovm/robovm-rt
/**
* Look up the value of an attribute by qualified (prefixed) name.
*
* @param qName The qualified name.
* @return The attribute's value.
*/
public String getValue (String qName)
{
return qAtts.getValue(qName);
}
代码示例来源:origin: org.netbeans.api/org-netbeans-swing-plaf
private final int intFromAttr (final org.xml.sax.AttributeList atts, final String key) throws SAXException {
try {
return Integer.valueOf (atts.getValue (key)).intValue();
} catch (NumberFormatException nfe) {
throw new SAXException (atts.getValue(key) + " is not an integer");
}
}
代码示例来源:origin: larsga/Duke
public void startElement(String name, AttributeList atts) {
if (level > 0)
indent();
// Write start tag
write(writer, '<');
write(writer, name);
if (atts != null) {
for (int i = 0; i < atts.getLength(); i++) {
write(writer, ' ');
write(writer, atts.getName(i));
write(writer, "=\"");
escapeAttrValue(atts.getValue(i), writer);
write(writer, "\"");
}
}
write(writer, '>');
level++;
// check arrays are still of right size
if (offset + level*2 > startline.length)
makeStartLineBuffer((offset + level*2) * 2);
if (level >= subelements.length)
makeSubelements(level * 2);
// Set sub element flag on parent element to true
if (level > 0)
subelements[level - 1] = true;
// Set sub element flag on this element to false
subelements[level] = false;
}
代码示例来源:origin: org.netbeans.api/org-netbeans-swing-plaf
private final void handleBevelBorder (org.xml.sax.AttributeList atts) {
String key = atts.getValue (KEY_ATTR);
int i = BevelBorder.LOWERED;
String type = atts.getValue (TYPE_ATTR);
if (type != null)
i = type.equals (TYPE_LOWERED) ? BevelBorder.LOWERED : BevelBorder.RAISED;
BorderUIResource.BevelBorderUIResource resource = new BorderUIResource.BevelBorderUIResource (i);
defaults.put (key, resource);
}
内容来源于网络,如有侵权,请联系作者删除!