Examples of QDomNode


Examples of com.trolltech.qt.xml.QDomNode

    return;
  }
 
  private void parseNodes(QDomNodeList nodes) {
    for (int i=0; i<nodes.size(); i++) {
      QDomNode node = nodes.at(i);
      if (node.hasChildNodes()) {
        parseNodes(node.childNodes());
      }
      scanWords(node);
    }
}
View Full Code Here

Examples of com.trolltech.qt.xml.QDomNode

   
    // Scan again making sure we didn't miss any <a> tags.  Sometimes we do
    QDomNodeList anchorList = doc.elementsByTagName("a");
    int anchorCount = anchorList.length();
    for (int i=anchorCount-1; i>=0; i--) {
      QDomNode link = anchorList.at(i);
      link = fixLinkNode(link);
    }
   
    // Remove invalid elements & attributes
    // Modify en-media tags
View Full Code Here

Examples of com.trolltech.qt.xml.QDomNode

    return;
  }
 
  private void parseNodes(QDomNodeList nodes) {
    for (int i=0; i<nodes.size(); i++) {
      QDomNode node = nodes.at(i);
      if (node.hasChildNodes())
        parseNodes(node.childNodes());
      fixNode(node);
    }
  }
View Full Code Here

Examples of com.trolltech.qt.xml.QDomNode

      }

      // Check if we have a LaTeX image.  Remove the parent link tag
      if (enType.equalsIgnoreCase("en-latex")) {
        enType = "en-media";
        QDomNode parent = e.parentNode();
        parent.removeChild(e);
        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");
    }
   
    // Tags like <ul><ul><li>1</li></ul></ul> are technically valid, but Evernote
    // expects that a <ul> tag only has a <li>, so we will need to change them
    // to this:  <ul><li><ul><li>1</li></ul></li></ul>
    if (node.nodeName().equalsIgnoreCase("ul")) {
      QDomNode firstChild = node.firstChild();
      QDomElement childElement = firstChild.toElement();
      if (childElement.nodeName().equalsIgnoreCase("ul")) {
        QDomElement newElement = doc.createElement("li");
        node.insertBefore(newElement, firstChild);
        node.removeChild(firstChild);
        newElement.appendChild(firstChild);
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.