Package javax.xml.transform.sax

Examples of javax.xml.transform.sax.TransformerHandler.endElement()


                        // event type
                        String evname = EventUtil.getEventName(e.getType());
                        th.startElement(EVNS, E_EVENTTYPE, E_EVENTTYPE, NOATTRS);
                        th.startElement(EVNS, evname, evname, NOATTRS);
                        th.endElement(EVNS, evname, evname);
                        th.endElement(EVNS, E_EVENTTYPE, E_EVENTTYPE);

                        // date
                        writeObsElement(th, E_EVENTDATE, Long.toString(e.getDate()));
View Full Code Here


                        // event type
                        String evname = EventUtil.getEventName(e.getType());
                        th.startElement(EVNS, E_EVENTTYPE, E_EVENTTYPE, NOATTRS);
                        th.startElement(EVNS, evname, evname, NOATTRS);
                        th.endElement(EVNS, evname, evname);
                        th.endElement(EVNS, E_EVENTTYPE, E_EVENTTYPE);

                        // date
                        writeObsElement(th, E_EVENTDATE, Long.toString(e.getDate()));

                        // user data
View Full Code Here

                                String key = entry.getKey().toString();
                                Object value = entry.getValue();
                                String t = value != null ? value.toString() : null;
                                writeElement(th, null, key, NOATTRS, t);
                            }
                            th.endElement(EVNS, E_EVENTINFO, E_EVENTINFO);
                        }

                        th.endElement(EVNS, E_EVENT, E_EVENT);

                        lastTimeStamp = e.getDate();
View Full Code Here

                                writeElement(th, null, key, NOATTRS, t);
                            }
                            th.endElement(EVNS, E_EVENTINFO, E_EVENTINFO);
                        }

                        th.endElement(EVNS, E_EVENT, E_EVENT);

                        lastTimeStamp = e.getDate();
                        lastDateString = entryupd;
                    }
View Full Code Here

                        lastTimeStamp = e.getDate();
                        lastDateString = entryupd;
                    }

                    th.endElement(ATOMNS, CONTENT, CONTENT);
                    th.endElement(ATOMNS, ENTRY, ENTRY);
                }

                th.endElement(ATOMNS, FEED, FEED);
View Full Code Here

                        lastTimeStamp = e.getDate();
                        lastDateString = entryupd;
                    }

                    th.endElement(ATOMNS, CONTENT, CONTENT);
                    th.endElement(ATOMNS, ENTRY, ENTRY);
                }

                th.endElement(ATOMNS, FEED, FEED);

                th.endDocument();
View Full Code Here

                    th.endElement(ATOMNS, CONTENT, CONTENT);
                    th.endElement(ATOMNS, ENTRY, ENTRY);
                }

                th.endElement(ATOMNS, FEED, FEED);

                th.endDocument();

                os.flush();
            }
View Full Code Here

            TransformerHandler probe = FACTORY.newTransformerHandler();
            probe.setResult(new StreamResult(writer));
            probe.startDocument();
            probe.startPrefixMapping("p", "uri");
            probe.startElement("uri", "e", "p:e", new AttributesImpl());
            probe.endElement("uri", "e", "p:e");
            probe.endPrefixMapping("p");
            probe.endDocument();
            return writer.toString().indexOf("xmlns") == -1;
        } catch (Exception e) {
            throw new UnsupportedOperationException("XML serialization fails");
View Full Code Here

            transformer.startElement(LOG4J_NS, "message", "message", attrs);
            String msg = event.getRenderedMessage();
            if (msg != null && msg.length() > 0) {
                transformer.characters(msg.toCharArray(), 0, msg.length());
            }
            transformer.endElement(LOG4J_NS, "message", "message");

            //
            //    NDC element
            //
            String ndc = event.getNDC();
View Full Code Here

            String ndc = event.getNDC();
            if (ndc != null) {
                transformer.startElement(LOG4J_NS, "NDC", "NDC", attrs);
                char[] ndcChars = ndc.toCharArray();
                transformer.characters(ndcChars, 0, ndcChars.length);
                transformer.endElement(LOG4J_NS, "NDC", "NDC");
            }

            //
            //    throwable element unless suppressed
            //
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.