Examples of NamedNodeMap


Examples of com.gargoylesoftware.htmlunit.javascript.NamedNodeMap

    /**
     * Creates the JS object for the property attributes. This object will the be cached.
     * @return the JS object
     */
    protected NamedNodeMap createAttributesObject() {
        return new NamedNodeMap(getDomNodeOrDie());
    }
View Full Code Here

Examples of com.google.gwt.xml.client.NamedNodeMap

  return element.getAttribute(name);
    }

    public HashMap<String, String> getAttributes() {
  final HashMap<String, String> map = new HashMap<String, String>();
  final NamedNodeMap attributes = element.getAttributes();
  for (int index = 0; index < attributes.getLength(); index++) {
      final Node attrib = attributes.item(index);
      map.put(attrib.getNodeName(), attrib.getNodeValue());
  }
  return map;
    }
View Full Code Here

Examples of mf.org.w3c.dom.NamedNodeMap

            /** Copy internal subset. */
            if (internalSubset != null) {
                ((DocumentTypeImpl) docType).setInternalSubset(internalSubset);
            }
            /** Copy entities. */
            NamedNodeMap oldMap = node.getEntities();
            NamedNodeMap newMap = docType.getEntities();
            int length = oldMap.getLength();
            for (int i = 0; i < length; ++i) {
                Entity oldEntity = (Entity) oldMap.item(i);
                EntityImpl newEntity = (EntityImpl) fDocumentImpl.createEntity(oldEntity.getNodeName());
                newEntity.setPublicId(oldEntity.getPublicId());
                newEntity.setSystemId(oldEntity.getSystemId());
                newEntity.setNotationName(oldEntity.getNotationName());
                newMap.setNamedItem(newEntity);
            }
            /** Copy notations. */
            oldMap = node.getNotations();
            newMap = docType.getNotations();
            length = oldMap.getLength();
            for (int i = 0; i < length; ++i) {
                Notation oldNotation = (Notation) oldMap.item(i);
                NotationImpl newNotation = (NotationImpl) fDocumentImpl.createNotation(oldNotation.getNodeName());
                newNotation.setPublicId(oldNotation.getPublicId());
                newNotation.setSystemId(oldNotation.getSystemId());
                newMap.setNamedItem(newNotation);
            }
            append(docType);
        }
    }
View Full Code Here

Examples of org.apache.axiom.c14n.omwrapper.interfaces.NamedNodeMap

     */
    public static void checkForRelativeNamespace(Element ctxNode)
            throws CanonicalizationException {

        if (ctxNode != null) {
            NamedNodeMap attributes = ctxNode.getAttributes();

            for (int i = 0; i < attributes.getLength(); i++) {
                C14nHelper.assertNotRelativeNS((Attr) attributes.item(i));
            }
        } else {
            throw new CanonicalizationException(
                    "Called checkForRelativeNamespace() on null");
        }
View Full Code Here

Examples of org.w3c.dom.NamedNodeMap

   private static void infoNode(XMLNode n, String xpath){
        try {
          showExemple(xpath + "text()");

          //parcoure des ATTRIBUE
          NamedNodeMap nnm =  n.getAttributes();
          for (int i = 0; i < nnm.getLength(); i++) {
            XMLAttr att = (XMLAttr) nnm.item(i);
            showExemple(xpath + "@"+att.getExpandedName());
          }
         

          //parcoure des nodes
View Full Code Here

Examples of org.w3c.dom.NamedNodeMap

    String tagName = "";

    try
    {
      Document configForQBXML;
      NamedNodeMap attr;

      Class classCV[] = new Class[1];
      Class argumentType[] = new Class[1];

      Object arguments[] = new Object[1];

      String className = getValueOfNodeByTagName(configXML, TAG_VONAME);

      String typeArg = "";
      String value = "";

      NodeList listItem = configXML.getChildNodes();
      NodeList tmpNodeList = null;

      int length = listItem.getLength();

      classCV[0] = Class.forName(className);
      objectCV = classCV[0].newInstance();

      Method method = null;
      setType(objectCV, configXML, className);

      for (int i = 0; i < length; i++)
      {
        tagName = listItem.item(i).getNodeName();

        if (tagName.equals("#text") || !listItem.item(i).hasAttributes())
        {
          continue;
        }

        attr = listItem.item(i).getAttributes();

        if (attr.getNamedItem("aatocv") != null)
        {
          tmpNodeList = getDocumentFromString(xml.toString()).getElementsByTagName(tagName);

          if (tmpNodeList.getLength() != 0)
          {
            setAAtoCV(objectCV, attr, tmpNodeList, classCV, tagName);
          }
          continue;
        }

        if (attr.getNamedItem("xml") != null)
        {
          configForQBXML = getDocumentFromString(getDocumentFromString(attr.getNamedItem("xml").getNodeValue()).getElementsByTagName(attr.getNamedItem("tag").getNodeValue()).item(0).toString());
          tmpNodeList = getDocumentFromString(xml.toString()).getElementsByTagName(tagName);

          if (tmpNodeList.item(0) != null)
          {
            forward(objectCV, attr, tmpNodeList.item(0), classCV, className, configForQBXML);
          }
          continue;
        }

        value = getValueOfNodeByTagName(xml, tagName);

        if (value == null)
          continue;

        typeArg = attr.getNamedItem("type").getNodeValue();

        argumentType[0] = getArgType(typeArg);
        arguments[0] = getObjectByName(typeArg, value);

        method = classCV[0].getMethod(attr.getNamedItem("set").getNodeValue(), argumentType);
        method.invoke(objectCV, arguments);
      }
    } catch (Exception e)
    {
      logger.error("QBXMLTag = <" + tagName + "> ********* Error while loading up/down classes : ", e);
View Full Code Here

Examples of org.w3c.dom.NamedNodeMap

        tagName = listItem.item(i).getNodeName();

        if (tagName.equals("#text") || !listItem.item(i).hasAttributes())
          continue;

        NamedNodeMap attr = listItem.item(i).getAttributes();
        typeArg = attr.getNamedItem("type").getNodeValue();
        argumentType[0] = getArgType(typeArg);

        value = getValueOfNodeByTagName(qbXML, tagName);

        arguments[0] = getObjectByName(typeArg, value);

        method = classCV[0].getMethod(attr.getNamedItem("set").getNodeValue(), argumentType);
        method.invoke(objectCV, arguments);
      }
    } catch (Exception e)
    {
      logger.error("[next] Error while loading up/down classes", e);
View Full Code Here

Examples of org.w3c.dom.NamedNodeMap

        tagName = listItem.item(i).getNodeName();

        if (tagName.equals("#text") || !listItem.item(i).hasAttributes())
          continue;

        NamedNodeMap attr = listItem.item(i).getAttributes();

        if (attr.getNamedItem("cvtoaa") != null)
        {
          tmpXML = getAAfromCV(objectCV, attr, classCV, tagName);

          if (!tmpXML.trim().equals(""))
            xml += tmpXML;

          continue;
        }

        if (attr.getNamedItem("xml") != null)
        {
          configForQBXML = getDocumentFromString(getDocumentFromString(attr.getNamedItem("xml").getNodeValue()).getElementsByTagName(attr.getNamedItem("tag").getNodeValue()).item(0).toString());

          tmpXML = forwardXML(classCV, attr, objectCV, className, configForQBXML);

          if (!tmpXML.trim().equals(""))
            xml += "<" + tagName + ">" + tmpXML + "</" + tagName + "> \n";

          continue;
        }
        met = attr.getNamedItem("get");
        method = classCV[0].getMethod(met.getNodeValue(), null);
        ret = method.invoke(objectCV, null);

        if (ret != null)
        {
View Full Code Here

Examples of org.w3c.dom.NamedNodeMap

        tagName = listItem.item(i).getNodeName();

        if (tagName.equals("#text"))
          continue;

        NamedNodeMap attr = listItem.item(i).getAttributes();

        if (attr.getNamedItem("cvtoaa") != null)
        {
          tmpXML = getAAfromCV(objectCV, attr, classCV, tagName);

          if (!tmpXML.trim().equals(""))
            retxml += tmpXML;

          continue;
        }

        method = classCV[0].getMethod(attr.getNamedItem("get").getNodeValue(), null);

        if (method.invoke(objectCV, null) != null)
        {
          value = method.invoke(objectCV, null).toString();
        } else
View Full Code Here

Examples of org.w3c.dom.NamedNodeMap

    String name;
    try
    {
      if (node.hasAttributes())
      {
        NamedNodeMap atts;
        atts = node.getAttributes();

        if (atts.getNamedItem(ATTR_REQUEST_ID) != null)
        {

          return node.getNodeName();
        }
      }
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.