nu.xom.Attribute.setValue()方法的使用及代码示例

x33g5p2x  于2022-01-16 转载在 其他  
字(3.0k)|赞(0)|评价(0)|浏览(98)

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

Attribute.setValue介绍

[英]Sets the attribute's value to the specified string, replacing any previous value. The value is not normalized automatically.
[中]将属性的值设置为指定的字符串,替换以前的任何值。该值不会自动标准化。

代码示例

代码示例来源:origin: org.xml-cml/cmlxom

public void setUnitType(String value) {
  Attribute attribute = this.getAttribute(UnitTypeAttribute.NAME);
  if (attribute == null) {
    UnitTypeAttribute unitType = new UnitTypeAttribute(value);
    super.addAttribute(unitType);
  } else {
    attribute.setValue(value);
  }
}
public String getUnitType(){

代码示例来源:origin: concordion/concordion

public void beforeProcessingSpecification(SpecificationProcessingEvent event) {
  Resource resource = event.getResource();
  //work around with setValue() necessary for Concordion.NET
  Attribute hrefAttribute = new Attribute("href", "");
  hrefAttribute.setValue(resource.getRelativePath(stylesheetResource));
  link.addAttribute(hrefAttribute);
}

代码示例来源:origin: org.concordion/concordion

public void beforeProcessingSpecification(SpecificationProcessingEvent event) {
  Resource resource = event.getResource();
  //work around with setValue() necessary for Concordion.NET
  Attribute hrefAttribute = new Attribute("href", "");
  hrefAttribute.setValue(resource.getRelativePath(stylesheetResource));
  link.addAttribute(hrefAttribute);
}

代码示例来源:origin: org.concordion/concordion

public void beforeProcessingSpecification(SpecificationProcessingEvent event) {
  Resource resource = event.getResource();
  //work around with setValue() necessary for Concordion.NET
  Attribute srcAttribute = new Attribute("src", "");
  srcAttribute.setValue(resource.getRelativePath(javaScriptResource));
  script.addAttribute(srcAttribute);
}

代码示例来源:origin: concordion/concordion

public void beforeProcessingSpecification(SpecificationProcessingEvent event) {
  Resource resource = event.getResource();
  //work around with setValue() necessary for Concordion.NET
  Attribute srcAttribute = new Attribute("src", "");
  srcAttribute.setValue(resource.getRelativePath(javaScriptResource));
  script.addAttribute(srcAttribute);
}

代码示例来源:origin: org.xml-cml/cmlxom

void substituteNameByValue(Attribute att) {
  // do not substitute refs
  if (att instanceof RefAttribute) {
  } else {
    String value = att.getValue();
    String value1 = value;
    String newValue = this.getValue().trim();
    if (!newValue.equals(S_EMPTY)) {
      value1 = value1.replaceAll(S_UNDER+this.getName()+S_UNDER, newValue);
      if (!value.equals(value1)) {
        Element parent = (Element) att.getParent();
        // remove attribute so as not to triffer reset error
        parent.removeAttribute(parent.getAttribute(att.getLocalName()));
        att.setValue(value1);
        parent.addAttribute(att);
      } else {
      }
    }
  }
}

代码示例来源:origin: org.xml-cml/cmlxom

val = val.replace(orig, value);
if (node instanceof Attribute) {
  ((Attribute)node).setValue(val);
} else if (node instanceof Text) {
  ((Text)node).setValue(val);

代码示例来源:origin: teiid/teiid

attr.setValue(value);
return attr;

代码示例来源:origin: org.teiid/saxon-xom

attr.setValue(value);
return attr;

相关文章