Package org.apache.xerces.xni

Examples of org.apache.xerces.xni.XMLAttributes


        break;

      case Node.ELEMENT_NODE:
        QName name = new QName("", node.getNodeName(), node.getNodeName(), getNamespace());
        XMLAttributes attrs = new XMLAttributesImpl();
       
        NamedNodeMap attributes = node.getAttributes();
        if (attributes != null) {
          int l = attributes.getLength();
 
          for (int i = 0; i < l; i++) {
            Node attributeNode = attributes.item(i);
            attrs.addAttribute(new QName(prefix, attributeNode.getNodeName(),
                attributeNode.getNodeName(), uri), "CDATA",
                attributeNode.getNodeValue());
          }
         
        }
View Full Code Here


      return false;
    }

    void insertStartElement(String name,Augmentations augs) {
      QName element = new QName("", name, name, getNamespace());
      XMLAttributes attrs = new XMLAttributesImpl();
      super.startElement(element, attrs, augs);
    }
View Full Code Here

      // re-open inline elements
      if (depth > 1) {
         int size = fInlineStack.top;
         for (int i = 0; i < size; i++) {
            Info info = fInlineStack.pop();
            XMLAttributes attributes = info.attributes;
            if (fReportErrors) {
               String iname = info.qname.rawname;
               fErrorReporter.reportWarning("HTML2008", new Object[]{iname});
            }
            forceStartElement(info.qname, attributes, synthesizedAugs());
View Full Code Here

         this.qname = new QName(qname);
         if (attributes != null) {
            int length = attributes.getLength();
            if (length > 0) {
               QName aqname = new QName();
               XMLAttributes newattrs = new XMLAttributesImpl();
               for (int i = 0; i < length; i++) {
                  attributes.getName(i, aqname);
                  String type = attributes.getType(i);
                  String value = attributes.getValue(i);
                  String nonNormalizedValue = attributes.getNonNormalizedValue(i);
                  boolean specified = attributes.isSpecified(i);
                  newattrs.addAttribute(aqname, type, value);
                  newattrs.setNonNormalizedValue(i, nonNormalizedValue);
                  newattrs.setSpecified(i, specified);
               }
               this.attributes = newattrs;
            }
         }
      } // <init>(HTMLElements.Element,QName,XMLAttributes)
View Full Code Here

        // re-open inline elements
        if (depth > 1) {
            int size = fInlineStack.top;
            for (int i = 0; i < size; i++) {
                Info info = (Info)fInlineStack.pop();
                XMLAttributes attributes = info.attributes;
                if (fReportErrors) {
                    String iname = info.qname.rawname;
                    fErrorReporter.reportWarning("HTML2008", new Object[]{iname});
                }
                startElement(info.qname, attributes, synthesizedAugs());
View Full Code Here

            this.qname = new QName(qname);
            if (attributes != null) {
                int length = attributes.getLength();
                if (length > 0) {
                    QName aqname = new QName();
                    XMLAttributes newattrs = new XMLAttributesImpl();
                    for (int i = 0; i < length; i++) {
                        attributes.getName(i, aqname);
                        String type = attributes.getType(i);
                        String value = attributes.getValue(i);
                        String nonNormalizedValue = attributes.getNonNormalizedValue(i);
                        boolean specified = attributes.isSpecified(i);
                        newattrs.addAttribute(aqname, type, value);
                        newattrs.setNonNormalizedValue(i, nonNormalizedValue);
                        newattrs.setSpecified(i, specified);
                    }
                    this.attributes = newattrs;
                }
            }
        } // <init>(HTMLElements.Element,QName,XMLAttributes)
View Full Code Here

TOP

Related Classes of org.apache.xerces.xni.XMLAttributes

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.