Package org.apache.abdera.model

Examples of org.apache.abdera.model.Element.writeTo()


        String html = "<html><body><p>this is <i>html</i></body></html>";
        Abdera abdera = Abdera.getInstance();
        Parser parser = abdera.getParserFactory().getParser("html");
        Document<Element> doc = parser.parse(new StringReader(html));
        Element root = doc.getRoot();
        root.writeTo(System.out);
        System.out.println();

        XPath xpath = abdera.getXPath();
        List<Element> list = xpath.selectNodes("//i", doc.getRoot());
        for (Element element : list)
View Full Code Here


    Parser parser = abdera.getParserFactory().getParser("html");
    Document<Element> doc =
      parser.parse(
        new StringReader(html));
    Element root = doc.getRoot();
    root.writeTo(System.out);
    System.out.println();
   
    XPath xpath = abdera.getXPath();
    List<Element> list = xpath.selectNodes("//i",doc.getRoot());
    for (Element element : list)
View Full Code Here

            throw new IllegalArgumentException("Entry does not contain a valid content element");
        }
        Element element = entry.getContentElement().getValueElement();
        ByteArrayOutputStream baos = new ByteArrayOutputStream();
        try {
            element.writeTo(baos);
        } catch (IOException e) {
            // Can not happen
        }

        // Transform the byte stream into an appropriate Java object
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.