nu.xom.Element.removeChild()方法的使用及代码示例

x33g5p2x  于2022-01-19 转载在 其他  
字(3.7k)|赞(0)|评价(0)|浏览(258)

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

Element.removeChild介绍

暂无

代码示例

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

  1. public void removeChild(Element element) {
  2. xomElement.removeChild(element.xomElement);
  3. }

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

  1. public void removeChild(Element element) {
  2. xomElement.removeChild(element.xomElement);
  3. }

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

  1. head.removeChild(link);
  2. continue;
  3. if (source.isStyleSheet()) {
  4. if (href.contains("/" + source.getName().toLowerCase()) || href.equals(source.getName().toLowerCase())) {
  5. head.removeChild(link);
  6. break;

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

  1. head.removeChild(link);
  2. continue;
  3. if (source.isStyleSheet()) {
  4. if (href.contains("/" + source.getName().toLowerCase()) || href.equals(source.getName().toLowerCase())) {
  5. head.removeChild(link);
  6. break;

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

  1. private void removeExistingScripts(Element head) {
  2. Elements scripts = head.getChildElements("script");
  3. for (int i = scripts.size() - 1; i >= 0; i--) {
  4. Element script = scripts.get(i);
  5. String src = script.getAttributeValue("src");
  6. if (src == null || src.isEmpty()) {
  7. continue;
  8. }
  9. src = src.toLowerCase();
  10. // Remove any links to custom js created by developers
  11. for (ResourceToCopy source : sourceFiles) {
  12. if (source.isScript()) {
  13. if (src.contains("/" + source.getName().toLowerCase()) || src.equals(source.getName().toLowerCase())) {
  14. head.removeChild(script);
  15. break;
  16. }
  17. }
  18. }
  19. }
  20. }
  21. }

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

  1. private void removeExistingScripts(Element head) {
  2. Elements scripts = head.getChildElements("script");
  3. for (int i = scripts.size() - 1; i >= 0; i--) {
  4. Element script = scripts.get(i);
  5. String src = script.getAttributeValue("src");
  6. if (src == null || src.isEmpty()) {
  7. continue;
  8. }
  9. src = src.toLowerCase();
  10. // Remove any links to custom js created by developers
  11. for (ResourceToCopy source : sourceFiles) {
  12. if (source.isScript()) {
  13. if (src.contains("/" + source.getName().toLowerCase()) || src.equals(source.getName().toLowerCase())) {
  14. head.removeChild(script);
  15. break;
  16. }
  17. }
  18. }
  19. }
  20. }
  21. }

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

  1. private void removeIrrelevantStylesheet(Element rootElement) {
  2. Element head = rootElement.getFirstChildElement("head");
  3. Element style = head.getFirstChildElement("style");
  4. head.removeChild(style);
  5. }

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

  1. private void removeIrrelevantStylesheet(Element rootElement) {
  2. Element head = rootElement.getFirstChildElement("head");
  3. Element style = head.getFirstChildElement("style");
  4. head.removeChild(style);
  5. }

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

  1. private void removeIrrelevantMetadata(Element rootElement) {
  2. Element head = rootElement.getFirstChildElement("head");
  3. Element style = head.getFirstChildElement("meta");
  4. head.removeChild(style);
  5. }

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

  1. private void removeIrrelevantFooter(Element rootElement) {
  2. Element body = rootElement.getFirstChildElement("body");
  3. body.removeChild(rootElement.query("//div[@class='footer']").get(0));
  4. }
  5. }

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

  1. private void removeIrrelevantFooter(Element rootElement) {
  2. Element body = rootElement.getFirstChildElement("body");
  3. body.removeChild(rootElement.query("//div[@class='footer']").get(0));
  4. }
  5. }

代码示例来源:origin: org.openbase.bco/manager.device.binding.openhab

  1. nodeElement.removeChild(XMLProcessor.parseOneChildElement("name", nodeElement));
  2. } catch (Exception ex) {
  3. nodeElement.removeChild(XMLProcessor.parseOneChildElement("location", nodeElement));
  4. } catch (Exception ex) {

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

  1. current.removeChild(current.getChildCount()-1);
  2. break;

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

  1. current.removeChild(current.getChildCount()-1);
  2. break;

相关文章