Package javax.xml.transform.sax

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


                    "ganttproject-options", attrs);
            //
            attrs.addAttribute("", "selection", "selection", "CDATA", language
                    .getText("shortLanguage"));
            handler.startElement("", "language", "language", attrs);
            handler.endElement("", "language", "language");
            attrs.clear();
            // write the task Color
            /*
             * Color color = getUIConfiguration().getTaskColor();
             * attrs.addAttribute("", "red", "red", "CDATA", ""+color.getRed());
View Full Code Here


            Color daysOffColor = myUIConfig.getDayOffColor();
            if (daysOffColor != null)
                attrs.addAttribute("", "daysOff", "daysOff", "CDATA", ""
                        + ColorConvertion.getColor(daysOffColor));
            handler.startElement("", "colors", "colors", attrs);
            handler.endElement("", "colors", "colors");
            attrs.clear();

            // Geometry of the window
            addAttribute("x", "" + x, attrs);
            addAttribute("y", "" + y, attrs);
View Full Code Here

                    LOG.error("While releasing connection", e);
                }
            }
        }

        handler.endElement("", "", ROOT_ELEMENT);
        handler.endDocument();
    }
}
View Full Code Here

                    String tagValue = (String) value;
                    AttributesImpl attributes = new AttributesImpl();
                    attributes.addAttribute("", ATT_PROPERTY_NAME, ATT_PROPERTY_NAME, null, tagName);
                    handler.startElement("", TAG_PROPERTY, TAG_PROPERTY, attributes);
                    handler.characters(tagValue.toCharArray(), 0, tagValue.length());
                    handler.endElement("", TAG_PROPERTY, TAG_PROPERTY);
                } else {
                    // TODO multi-valued properties, other primitives
                    System.err.println("Can't yet handle property " + property.getKey() + " of type "
                            + value.getClass());
                }
View Full Code Here

        // Output a single element
        handler.startDocument();
        handler.startPrefixMapping(prefix, uri);
        handler.startElement(uri, "element", "element", new AttributesImpl());
        handler.endElement(uri, "element", "element");
        handler.endPrefixMapping(prefix);
        handler.endDocument();

        final String text = writer.toString();
View Full Code Here

      response.startElement("", "msg", "msg", new AttributesImpl());
      String msg = (e.getMessage() == null ? "unknown error" : e
          .getMessage());
      response.characters(msg.toCharArray(), 0, msg.length());
      response.endElement("", "msg", "msg");

      response.startElement("", "stacktrace", "stacktrace",
          new AttributesImpl());
      StringWriter sw = new StringWriter();
      PrintWriter pw = new PrintWriter(sw, true);
View Full Code Here

      e.printStackTrace(pw);
      pw.flush();
      sw.flush();
      String trace = sw.toString();
      response.characters(trace.toCharArray(), 0, trace.length());
      response.endElement("", "stacktrace", "stacktrace");

      response.endElement("", "exception", "exception");
      response.endDocument();

      http.sendResponseHeaders(status, responseBody.size());
View Full Code Here

      sw.flush();
      String trace = sw.toString();
      response.characters(trace.toCharArray(), 0, trace.length());
      response.endElement("", "stacktrace", "stacktrace");

      response.endElement("", "exception", "exception");
      response.endDocument();

      http.sendResponseHeaders(status, responseBody.size());
      responseBody.writeTo(http.getResponseBody());
      http.getResponseBody().close();
View Full Code Here

                            for (Iterator iterator = artifactDestPaths.iterator(); iterator
                                    .hasNext();) {
                                String artifactDestPath = (String) iterator.next();
                                writeRetrieveLocation(saxHandler, artifactDestPath);
                            }
                            saxHandler.endElement(null, "artifact", "artifact");
                        }
                    }
                    saxHandler.endElement(null, "module", "module");
                }
                saxHandler.endElement(null, "modules", "modules");
View Full Code Here

                                writeRetrieveLocation(saxHandler, artifactDestPath);
                            }
                            saxHandler.endElement(null, "artifact", "artifact");
                        }
                    }
                    saxHandler.endElement(null, "module", "module");
                }
                saxHandler.endElement(null, "modules", "modules");
                saxHandler.endDocument();
            } finally {
                fileOuputStream.close();
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.