Examples of NamedNodeMap


Examples of org.w3c.dom.NamedNodeMap

    private void getGenerators(Document doc, LogConfiguration lc) {
        String currentGenerator = "default";
        NodeList nl = doc.getElementsByTagName("generator");
        for (int i = 0; i < nl.getLength(); i++) {
            Node n = nl.item(i);
            NamedNodeMap curAtt = n.getAttributes();
            Node curNode = curAtt.getNamedItem("name");
            if (curNode != null) {
                currentGenerator = curNode.getNodeValue();
            }
            Hashtable params = new Hashtable();
            Map fParams = new HashMap();
View Full Code Here

Examples of org.w3c.dom.NamedNodeMap

            lc.addLogGenerator(generator);
        }
    }

    private Handler getHandler(Node n,String configName) {
        NamedNodeMap myAtt = n.getAttributes();
        Node myNode = myAtt.getNamedItem("class");
        if ( myNode != null ) {
            String handlerName = myNode.getNodeValue();
            if (handlerName != null) {
                // next we set the formatter
                Handler handler = HandlerFactory.getHandler(handlerName,configName);
View Full Code Here

Examples of org.w3c.dom.NamedNodeMap

        }
        return null;
    }

    private Formatter getFormatter(Node n,String configName) {
        NamedNodeMap myAtt = n.getAttributes();
        Node myNode = myAtt.getNamedItem("class");
        if ( myNode != null ) {
            String formatterName = myNode.getNodeValue();
            Formatter formatter = null;
            if (formatterName != null) {
                // next we set the formatter
View Full Code Here

Examples of org.w3c.dom.NamedNodeMap

        Map params = new HashMap();
        for (Node child = n.getFirstChild();child != null;child = child.getNextSibling()) {
            if (child.getNodeName().equals("parameter")) {
                String pnName = null;
                String pvName = null;
                NamedNodeMap childAtt = child.getAttributes();
                Node pnNode = childAtt.getNamedItem("name");
                if ( pnNode != null) {
                    pnName = pnNode.getNodeValue();
                }
                Node pvNode = childAtt.getNamedItem("value");
                if ( pvNode != null) {
                    pvName = pvNode.getNodeValue();
                }
                if ( pnName != null && pvName != null ) {
                    params.put(pnName,pvName);
View Full Code Here

Examples of org.w3c.dom.NamedNodeMap

        NodeList parentNodeList = doc.getElementsByTagNameNS(wsdlParentNode.getNamespaceURI(), wsdlParentNode
            .getLocalPart());

        for (int i = 0; i < parentNodeList.getLength(); i++) {
            Node parentNode = parentNodeList.item(i);
            NamedNodeMap parentNodeMap = parentNode.getAttributes();
            Node parentAttrNode = parentNodeMap.getNamedItem(WSDLConstants.ATTR_NAME);
            if (parentAttrNode != null && parentNameValue != null
                && parentAttrNode.getNodeValue().equals(parentNameValue) || parentAttrNode == null
                || parentNameValue == null) {

                for (Node n = parentNode.getFirstChild(); n != null; n = n.getNextSibling()) {
                    if (n.getNodeType() == Node.ELEMENT_NODE) {
                        NamedNodeMap map = n.getAttributes();
                        Node attrChildNode = map.getNamedItem(WSDLConstants.ATTR_NAME);
                        if (attrChildNode != null && attrChildNode.getNodeValue().equals(childNameValue)) {
                            return n;
                        }
                    }
                }
View Full Code Here

Examples of org.w3c.dom.NamedNodeMap

            Node schemaNode = nodes.item(x);
            Element schemaEl = (Element)schemaNode;
            String tns = schemaEl.getAttribute("targetNamespace");

            boolean clone = true;
            NamedNodeMap defAttrs = doc.getDocumentElement().getAttributes();
            for (int i = 0; i < defAttrs.getLength(); ++i) {
                Node attr = defAttrs.item(i);
                if (attr.getNodeName().startsWith("xmlns:")) {
                    if (!schemaEl.hasAttribute(attr.getNodeName()) && clone) {
                        schemaEl = (Element)(schemaNode.cloneNode(true));
                        clone = false;
                        schemaEl.setAttribute(attr.getNodeName(), attr.getNodeValue());
View Full Code Here

Examples of org.w3c.dom.NamedNodeMap

      out.print("<![CDATA[" + text + "]]>");
    } else {
      // This is a normal tag
      out.print(prefix + "<" + name);
      if (node.hasAttributes()) {
        NamedNodeMap attributes = node.getAttributes();
        for (int i = 0; i < attributes.getLength(); i++) {
          Node attrib = attributes.item(i);
          out.print(" " + attrib.getNodeName() + "=\"" + attrib.getNodeValue() + "\"");
        }
      }
 
      if (! node.hasChildNodes()) {
View Full Code Here

Examples of org.w3c.dom.NamedNodeMap

    }
  }

  private String getContext(Node node)
  {
    NamedNodeMap attributes = node.getAttributes();
    for (int j = 0; j < attributes.getLength(); j++)
    {
      if (attributes.item(j).getNodeName().equals(CONTEXT))
      { // searched attribute found
        return attributes.item(j).getNodeValue();
      }
    }

    return "";
View Full Code Here

Examples of org.w3c.dom.NamedNodeMap

          Constants.LAYER_PROTOCOL,
          Constants.PACKAGE_PROTOCOL_BYTEARRAYLIST, "10");
    }

    Node identifierTag = lines.item(0);
    NamedNodeMap attributes = identifierTag.getAttributes();
    int identifierPos = getIdentifierPos(attributes);
    int identifierLength = getIdentifierLength(attributes);

    Hashtable identifiers = getIdentifiers(interfaceDescription);
View Full Code Here

Examples of org.w3c.dom.NamedNodeMap

    ByteArrayConverter conv = ByteArrayConverterFactory
        .getConverter(mEncodingSystem);

    NodeList records = doc.getElementsByTagName(TAG_RECORD);
    Node recordNode;
    NamedNodeMap recordAttributes;
    Attr recordLengthAttr;
    int recordLength;
    byte[] recordArray;

    NodeList fields;
    Node fieldNode;
    NamedNodeMap fieldAttributes;
    Attr fieldLengthAttr;
    int fieldLength;
    Node fieldTextNode;
    String fieldValue;
    byte[] fieldBytes;
    int pos;

    for (int i = 0; i < records.getLength(); i++)
    {
      recordNode = records.item(i);
      recordAttributes = recordNode.getAttributes();
      recordLengthAttr = (Attr) recordAttributes.getNamedItem(TAG_LENGTH);
      recordLength = Integer.parseInt(recordLengthAttr.getNodeValue());
      recordArray = new byte[recordLength];

      pos = 0;

      fields = recordNode.getChildNodes();
      for (int k = 0; k < fields.getLength(); k++)
      {
        fieldNode = fields.item(k);

        if (fieldNode.getNodeType() == Node.ELEMENT_NODE)
        {
          fieldAttributes = fieldNode.getAttributes();
          fieldLengthAttr = (Attr) fieldAttributes
              .getNamedItem(TAG_LENGTH);
          fieldLength = Integer.parseInt(fieldLengthAttr
              .getNodeValue());
          fieldTextNode = fieldNode.getFirstChild();
          fieldValue = fieldTextNode.getNodeValue();
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.