Package org.apache.tika.sax

Examples of org.apache.tika.sax.XHTMLContentHandler.endElement()


            }
        }
        if (audioAndTags.lyrics != null && audioAndTags.lyrics.hasLyrics()) {
           xhtml.startElement("p", "class", "lyrics");
           xhtml.characters(audioAndTags.lyrics.lyricsText);
           xhtml.endElement("p");
        }

        xhtml.endDocument();
    }
View Full Code Here


            SyndContent description = entry.getDescription();

            String title = stripTags(entry.getTitleEx());
            xhtml.startElement("a", "href", link);
            xhtml.characters(title);
            xhtml.endElement("a");
            xhtml.startElement("p");
            if (description != null)
                xhtml.characters(description.getValue());
            xhtml.endElement("p");
        }
View Full Code Here

            xhtml.characters(title);
            xhtml.endElement("a");
            xhtml.startElement("p");
            if (description != null)
                xhtml.characters(description.getValue());
            xhtml.endElement("p");
        }

        xhtml.endDocument();
    }
View Full Code Here

        context.getSAXParser().parse(
                new CloseShieldInputStream(stream),
                new OfflineContentHandler(new EmbeddedContentHandler(
                        getContentHandler(handler, metadata))));

        xhtml.endElement("p");
        xhtml.endDocument();
    }

    /**
     * @deprecated This method will be removed in Apache Tika 1.0.
View Full Code Here

      xhtml.startElement("p");
      char[] buffer = new char[1024];
      for (int n = reader.read(buffer); n != -1; n = reader.read(buffer)) {
        xhtml.characters(buffer, 0, n);
      }
      xhtml.endElement("p");

    } finally {
      reader.close();
      xhtml.endDocument();
    }
View Full Code Here

          xhtml.element( "h1", "Comments" );
          xhtml.startElement("div", "class", "comments");
          for (String comment : comments) {
              xhtml.element( "p", comment );
          }
          xhtml.endElement("div");
       }

       xhtml.endDocument();
    }
View Full Code Here

                            getContentHandler(tagged, metadata, context))));
        } catch (SAXException e) {
            tagged.throwIfCauseOf(e);
            throw new TikaException("XML parse error", e);
        } finally {
            xhtml.endElement("p");
            xhtml.endDocument();
        }
    }

    protected ContentHandler getContentHandler(
View Full Code Here

                        // If there is an embedded structure, extract variable info.
                        if (element.isStruct()){
                            xhtml.startElement("ul");
                            // Should this actually be a recursive call?
                            xhtml.element("li", element.contentToString());
                            xhtml.endElement("ul");
                        }

                        xhtml.endElement("li");
                    }
                    xhtml.endElement("ul");
View Full Code Here

                            // Should this actually be a recursive call?
                            xhtml.element("li", element.contentToString());
                            xhtml.endElement("ul");
                        }

                        xhtml.endElement("li");
                    }
                    xhtml.endElement("ul");
                }
            }
            xhtml.endDocument();
View Full Code Here

                            xhtml.endElement("ul");
                        }

                        xhtml.endElement("li");
                    }
                    xhtml.endElement("ul");
                }
            }
            xhtml.endDocument();
        } catch (IOException e) {
            throw new TikaException("Error parsing Matlab file with MatParser", e);
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.