Package com.trolltech.qt.xml

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


      QDomNodeList children = element.childNodes()// all children ("t" nodes).
     
      // Go through the children ("t" nodes)
      for (int j=0; j<children.length(); j++) {
          QDomElement child = children.at(j).toElement();
          if (child.nodeName().equalsIgnoreCase("t")) {
            String text = child.text();   // recognition text
            int weight = new Integer(child.attribute("w"))// recognition weight
            if (weight >= Global.getRecognitionWeight()) {   // Are we above the maximum?
             
              // Check to see if this word matches something we were searching for.
View Full Code Here


    for (String key : Global.invalidAttributes.keySet()) {
      anchors = doc.elementsByTagName(key);
      int enMediaCount = anchors.length();
      for (int i=enMediaCount-1; i>=0; i--) {
        QDomElement element = anchors.at(i).toElement();
        ArrayList<String> names = Global.invalidAttributes.get(element.nodeName().toLowerCase());
        if (names != null) { 
          for (int j=0; j<names.size(); j++) {
            element.removeAttribute(names.get(j));
          }
        }
View Full Code Here

    // 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.