Package org.dom4j

Examples of org.dom4j.QName


     */
   
    protected Element unmarshalElement() throws JiBXException, IOException {
       
        // start by creating the actual element
        QName qname = QName.get(m_unmarshalContext.getName(),
            m_unmarshalContext.getPrefix(), m_unmarshalContext.getNamespace());
        Element element = s_factory.createElement(qname);
       
        // add all namespace declarations to element
        int ncount = m_unmarshalContext.getNamespaceCount();
View Full Code Here


    return (ProcessingInstruction) getDocumentFactory()
        .createProcessingInstruction(target, data);
  }

  public Attr createAttribute(String name) throws DOMException {
    QName qname = getDocumentFactory().createQName(name);

    return (Attr) getDocumentFactory().createAttribute(null, qname, "");
  }
View Full Code Here

    return null;
  }

  public org.w3c.dom.Element createElementNS(String namespaceURI,
                                             String qualifiedName) throws DOMException {
    QName qname = getDocumentFactory().createQName(qualifiedName,
        namespaceURI);

    return (org.w3c.dom.Element) getDocumentFactory().createElement(qname);
  }
View Full Code Here

    return (org.w3c.dom.Element) getDocumentFactory().createElement(qname);
  }

  public org.w3c.dom.Attr createAttributeNS(String namespaceURI,
                                            String qualifiedName) throws DOMException {
    QName qname = getDocumentFactory().createQName(qualifiedName,
        namespaceURI);

    return (org.w3c.dom.Attr) getDocumentFactory().createAttribute(null,
        qname, null);
  }
View Full Code Here

    Attribute attribute = attribute(namespaceURI, qualifiedName);

    if (attribute != null) {
      attribute.setValue(value);
    } else {
      QName qname = getQName(namespaceURI, qualifiedName);
      addAttribute(qname, value);
    }
  }
View Full Code Here

    return null;
  }

  protected Attribute createAttribute(org.w3c.dom.Attr newAttr) {
    QName qname = null;
    String name = newAttr.getLocalName();

    if (name != null) {
      String prefix = newAttr.getPrefix();
      String uri = newAttr.getNamespaceURI();
View Full Code Here

    if (qualifiedName == null) {
      qualifiedName = localName;
    }

    Map map = getNamespaceCache();
    QName answer = (QName) map.get(qualifiedName);

    if (answer != null) {
      return answer;
    }
View Full Code Here

   *
   * @param name DOCUMENT ME!
   * @return the QName for the given name and no namepsace
   */
  public QName get(String name) {
    QName answer = null;

    if (name != null) {
      answer = (QName) noNamespaceCache.get(name);
    } else {
      name = "";
    }

    if (answer == null) {
      answer = createQName(name);
      answer.setDocumentFactory(documentFactory);
      noNamespaceCache.put(name, answer);
    }

    return answer;
  }
View Full Code Here

   * @param namespace DOCUMENT ME!
   * @return the QName for the given local name and namepsace
   */
  public QName get(String name, Namespace namespace) {
    Map cache = getNamespaceCache(namespace);
    QName answer = null;

    if (name != null) {
      answer = (QName) cache.get(name);
    } else {
      name = "";
    }

    if (answer == null) {
      answer = createQName(name, namespace);
      answer.setDocumentFactory(documentFactory);
      cache.put(name, answer);
    }

    return answer;
  }
View Full Code Here

   * @param qName     DOCUMENT ME!
   * @return the QName for the given local name, qualified name and namepsace
   */
  public QName get(String localName, Namespace namespace, String qName) {
    Map cache = getNamespaceCache(namespace);
    QName answer = null;

    if (localName != null) {
      answer = (QName) cache.get(localName);
    } else {
      localName = "";
    }

    if (answer == null) {
      answer = createQName(localName, namespace, qName);
      answer.setDocumentFactory(documentFactory);
      cache.put(localName, answer);
    }

    return answer;
  }
View Full Code Here

TOP

Related Classes of org.dom4j.QName

Copyright © 2018 www.massapicom. 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.