Package org.xml.sax.helpers

Examples of org.xml.sax.helpers.AttributesImpl.clear()


        AttributesImpl atts = new AttributesImpl();
        handler.startElement(XMPConstants.RDF_NAMESPACE,
                type.getName(), "rdf:" + type.getName(), atts);
        for (int i = 0, c = values.size(); i < c; i++) {
            String lang = (String)xmllang.get(i);
            atts.clear();
            Object v = values.get(i);
            if (lang != null) {
                atts.addAttribute(XMPConstants.XML_NS, "lang", "xml:lang", "CDATA", lang);
            }
            if (v instanceof URI) {
View Full Code Here


                    this.treeBuilder.processingInstruction(currentNode.getNodeName(),
                                                           currentNode.getNodeValue());
                    break;
                case Node.ELEMENT_NODE:
                    NamedNodeMap map = currentNode.getAttributes();
                    currentAtts.clear();
                    for (int i = map.getLength() - 1; i >= 0; i--) {
                        Attr att = (Attr)map.item(i);
                        currentAtts.addAttribute("", att.getName(), "",
                                                 "CDATA", att.getValue());
                    }
View Full Code Here

                    _contentHandler.processingInstruction(currentNode.getNodeName(),
                                                          currentNode.getNodeValue());
                    break;
                case Node.ELEMENT_NODE:
                    NamedNodeMap map = currentNode.getAttributes();
                    currentAtts.clear();
                    for (int i = map.getLength() - 1; i >= 0; i--) {
                        Attr att = (Attr)map.item(i);
                        currentAtts.addAttribute(att.getNamespaceURI(),
                                                 att.getLocalName(),
                                                 att.getName(), "CDATA",
View Full Code Here

                        Web3.STRUCTURE_NAME_ATTR, "CDATA",
                        pList.getName(i).toUpperCase());
                    contentHandler.startElement(Web3.URI, Web3.STRUCTURE_ELEM,
                        Web3.STRUCTURE_ELEM, attributes);               
                    for (int j = 0; j < sapStructure.getFieldCount(); j++) {
                        attributes.clear();
                        attributes.addAttribute(Web3.URI, Web3.FIELD_NAME_ATTR,
                            Web3.FIELD_NAME_ATTR, "CDATA",
                            sapStructure.getName(j).toUpperCase());
                        contentHandler.startElement(Web3.URI, Web3.FIELD_ELEM,
                            Web3.FIELD_ELEM, attributes);
View Full Code Here

                    }
                    contentHandler.endElement(Web3.URI, Web3.STRUCTURE_ELEM,
                        Web3.STRUCTURE_ELEM);
                }
                else {
                    attributes.clear();
                    attributes.addAttribute(Web3.URI, Web3.FIELD_NAME_ATTR,
                        Web3.FIELD_NAME_ATTR, "CDATA",
                        pList.getName(i).toUpperCase());
                    contentHandler.startElement(Web3.URI, Web3.FIELD_ELEM,
                        Web3.FIELD_ELEM, attributes);
View Full Code Here

        atts.addAttribute("", "processingTime", "processingTime", "CDATA",
                          Long.toString(totalTimeSum));
        atts.addAttribute("", "key", "key", "CDATA", key.toString());
        this.contentHandler.startElement(PROFILER_NS, RESULTS_ELEMENT,
                                         RESULTS_ELEMENT, atts);
        atts.clear();

        // Generate average result
        if ((count>0) && (this.resultIndex==-1)) {
            atts.addAttribute("", "time", "time", "CDATA",
                              Long.toString(totalTimeSum/count));
View Full Code Here

            atts.addAttribute("", "time", "time", "CDATA",
                              Long.toString(totalTimeSum/count));
            this.contentHandler.startElement(PROFILER_NS,
                                             AVERAGERESULT_ELEMENT,
                                             AVERAGERESULT_ELEMENT, atts);
            atts.clear();

            // Total time of each component for all requests
            long[] totalTimeOfComponents = new long[roles.length];

            for (int i = 0; i<roles.length; i++) {
View Full Code Here

                                                count));

                this.contentHandler.startElement(PROFILER_NS,
                                                 COMPONENT_ELEMENT,
                                                 COMPONENT_ELEMENT, atts);
                atts.clear();
                this.contentHandler.endElement(PROFILER_NS,
                                               COMPONENT_ELEMENT,
                                               COMPONENT_ELEMENT);
            }
            this.contentHandler.endElement(PROFILER_NS,
View Full Code Here

                          Long.toString(totalTime));
        atts.addAttribute("", "index", "index", "CDATA",
                          String.valueOf(resultIndex));
        this.contentHandler.startElement(PROFILER_NS, RESULT_ELEMENT,
                                         RESULT_ELEMENT, atts);
        atts.clear();

        if (this.resultIndex!=-1) {
            generateEnvironmentInfo(environmentInfo);
        }
View Full Code Here

        atts.addAttribute("", "time", "time", "CDATA",
                          Long.toString(setupTime+processingTime));

        this.contentHandler.startElement(PROFILER_NS, COMPONENT_ELEMENT,
                                         COMPONENT_ELEMENT, atts);
        atts.clear();

        if (this.componentIndex==componentIndex) {
            this.contentHandler.startElement(PROFILER_NS, FRAGMENT_ELEMENT,
                                             FRAGMENT_ELEMENT,
                                             new AttributesImpl());
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.