Package com.trolltech.qt.xml

Examples of com.trolltech.qt.xml.QDomElement.attribute()


  // Fix the contents of the node back to ENML.
  private void fixNode(QDomNode node) {
    QDomElement scanChecked = node.toElement();
    if (scanChecked.hasAttribute("checked")) {
      System.out.println(scanChecked.attribute("checked"));
      if (!scanChecked.attribute("checked").equalsIgnoreCase("true"))
        scanChecked.setAttribute("checked", "false");
    }
    if (node.nodeName().equalsIgnoreCase("#comment") || node.nodeName().equalsIgnoreCase("script")) {
      node.parentNode().removeChild(node);
View Full Code Here


  // Fix the contents of the node back to ENML.
  private void fixNode(QDomNode node) {
    QDomElement scanChecked = node.toElement();
    if (scanChecked.hasAttribute("checked")) {
      System.out.println(scanChecked.attribute("checked"));
      if (!scanChecked.attribute("checked").equalsIgnoreCase("true"))
        scanChecked.setAttribute("checked", "false");
    }
    if (node.nodeName().equalsIgnoreCase("#comment") || node.nodeName().equalsIgnoreCase("script")) {
      node.parentNode().removeChild(node);
    }
View Full Code Here

      node.parentNode().removeChild(node);
    }
    if (node.nodeName().equalsIgnoreCase("input")) {
      QDomElement e = node.toElement();
      e.setTagName("en-todo");
      String value = e.attribute("value");
      if (value.trim().equals(""))
        value = "false";
      e.removeAttribute("value");
      e.removeAttribute("unchecked");
      e.setAttribute("checked", value);
View Full Code Here

      node = fixLinkNode(node);
    }
    // Restore image resources
    if (node.nodeName().equalsIgnoreCase("img")) {
      QDomElement e = node.toElement();
      String enType = e.attribute("en-tag");
     
      // Check if we have an en-crypt tag.  Change it from an img to en-crypt
      if (enType.equalsIgnoreCase("en-crypt")) {
       
        String encrypted = e.attribute("alt");
View Full Code Here

      String enType = e.attribute("en-tag");
     
      // Check if we have an en-crypt tag.  Change it from an img to en-crypt
      if (enType.equalsIgnoreCase("en-crypt")) {
       
        String encrypted = e.attribute("alt");
       
        QDomText crypt = doc.createTextNode(encrypted);
        e.appendChild(crypt);
       
        e.removeAttribute("v:shapes");
View Full Code Here

        parent.parentNode().replaceChild(e, parent);
      }
     
      // If we've gotten this far, we have an en-media tag
      e.setTagName(enType);
      resources.add(e.attribute("guid"));
      e.removeAttribute("guid");
      e.removeAttribute("src");
      e.removeAttribute("en-new");
      e.removeAttribute("en-tag");
    }
View Full Code Here

      QDomText newText = doc.createTextNode(e.text());
      e.parentNode().replaceChild(newText,e);
    }
    if (node.nodeName().equalsIgnoreCase("span")) {
      QDomElement e = node.toElement();
      if (e.attribute("class").equalsIgnoreCase("en-hilight") || e.attribute("class").equalsIgnoreCase("en-spell")) {
        QDomText newText = doc.createTextNode(e.text());
        e.parentNode().replaceChild(newText,e);
      }
      if (e.attribute("pdfnavigationtable").equalsIgnoreCase("true")) {
        node.parentNode().removeChild(node);
View Full Code Here

      QDomText newText = doc.createTextNode(e.text());
      e.parentNode().replaceChild(newText,e);
    }
    if (node.nodeName().equalsIgnoreCase("span")) {
      QDomElement e = node.toElement();
      if (e.attribute("class").equalsIgnoreCase("en-hilight") || e.attribute("class").equalsIgnoreCase("en-spell")) {
        QDomText newText = doc.createTextNode(e.text());
        e.parentNode().replaceChild(newText,e);
      }
      if (e.attribute("pdfnavigationtable").equalsIgnoreCase("true")) {
        node.parentNode().removeChild(node);
View Full Code Here

      QDomElement e = node.toElement();
      if (e.attribute("class").equalsIgnoreCase("en-hilight") || e.attribute("class").equalsIgnoreCase("en-spell")) {
        QDomText newText = doc.createTextNode(e.text());
        e.parentNode().replaceChild(newText,e);
      }
      if (e.attribute("pdfnavigationtable").equalsIgnoreCase("true")) {
        node.parentNode().removeChild(node);
      }
    }
   
    // Fix up encryption tag
View Full Code Here

   
    // Fix up encryption tag
    if (node.nodeName().equalsIgnoreCase("en-crypt-temp")) {
      QDomElement e = node.toElement();
      e.setTagName("en-crypt");
      String crypt = e.attribute("value");
      e.removeAttribute("value");
      QDomText cryptValue = doc.createTextNode(crypt);
      e.appendChild(cryptValue);
    }
  }
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.