gpt4 book ai didi

org.xembly.Xembler.apply()方法的使用及代码示例

转载 作者:知者 更新时间:2024-03-21 11:07:05 25 4
gpt4 key购买 nike

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

Xembler.apply介绍

[英]Apply all changes to the document/node.
[中]将所有更改应用于文档/节点。

代码示例

代码示例来源:origin: yegor256/xembly

/**
 * Apply all changes to the document/node, without any checked exceptions.
 * @param dom DOM document/node
 * @return The same document/node
 * @since 0.18
 */
public Node applyQuietly(final Node dom) {
  try {
    return this.apply(dom);
  } catch (final ImpossibleModificationException ex) {
    throw new IllegalArgumentException(
      String.format(
        "failed to apply to DOM quietly: %s",
        this.directives
      ),
      ex
    );
  }
}

代码示例来源:origin: com.jcabi.incubator/xembly

/**
 * Apply all changes to the document/node, without any checked exceptions.
 * @param dom DOM document/node
 * @return The same document/node
 * @since 0.18
 */
public Node applyQuietly(final Node dom) {
  try {
    return this.apply(dom);
  } catch (final ImpossibleModificationException ex) {
    throw new IllegalArgumentException(
      String.format(
        "failed to apply to DOM quietly: %s",
        this.directives
      ),
      ex
    );
  }
}

代码示例来源:origin: com.jcabi.incubator/xembly

/**
 * Apply all changes to an empty DOM.
 * @return DOM created
 * @throws ImpossibleModificationException If can't modify
 * @since 0.9
 */
public Document dom() throws ImpossibleModificationException {
  final Document dom;
  try {
    dom = Xembler.BFACTORY.newDocumentBuilder().newDocument();
  } catch (final ParserConfigurationException ex) {
    throw new IllegalStateException(
      String.format(
        "failed to obtain a new DOM document from %s",
        Xembler.BFACTORY.getClass().getCanonicalName()
      ),
      ex
    );
  }
  this.apply(dom);
  return dom;
}

代码示例来源:origin: yegor256/xembly

/**
 * Apply all changes to an empty DOM.
 * @return DOM created
 * @throws ImpossibleModificationException If can't modify
 * @since 0.9
 */
public Document dom() throws ImpossibleModificationException {
  final Document dom;
  try {
    dom = Xembler.BFACTORY.newDocumentBuilder().newDocument();
  } catch (final ParserConfigurationException ex) {
    throw new IllegalStateException(
      String.format(
        "failed to obtain a new DOM document from %s",
        Xembler.BFACTORY.getClass().getCanonicalName()
      ),
      ex
    );
  }
  this.apply(dom);
  return dom;
}

代码示例来源:origin: etsy/arbiter

new Xembler(directives).apply(xmlDoc);
} catch (ImpossibleModificationException e) {
  throw new RuntimeException(e);

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com