Package com.colorfulsoftware.atom

Examples of com.colorfulsoftware.atom.FeedDoc$ProcessingInstruction


   * @throws Exception
   *             if there is an error creating the test data.
   */
  @Before
  public void setUp() throws Exception {
    feedDoc = new FeedDoc();
    feedWriter = new FeedWriter();
    writer = XMLOutputFactory.newInstance().createXMLStreamWriter(
        new FileOutputStream("target/out.xml"));

  }
View Full Code Here


   *             if there is an error creating the test data.
   */
  @Before
  public void setUp() throws Exception {
    try {
      feedDoc = new FeedDoc();
      Id id = feedDoc.buildId(null,
          "http://www.colorfulsoftware.com/atom.xml");

      Updated updated = feedDoc.buildUpdated(null, Calendar.getInstance()
          .getTime().toString());
View Full Code Here

   * test the feed doc constructors.
   */
  @Test
  public void testFeedDocTest() {
    try {
      FeedDoc feedDoc2 = null;
      List<FeedDoc.ProcessingInstruction> insts = new LinkedList<FeedDoc.ProcessingInstruction>();
      insts
          .add(new FeedDoc().new ProcessingInstruction(
              "xml-stylesheet",
              "href=\"http://www.blogger.com/styles/atom.css\" type=\"text/css\""));
      feedDoc2 = new FeedDoc(insts);
      assertNotNull(feedDoc2);
      String output = feedDoc2.readFeedToString(feedDoc2
          .readFeedToBean(new java.net.URL(
              "http://earthbeats.net/drops.xml")), null);
      assertTrue(output
          .indexOf("<?xml-stylesheet href=\"http://www.blogger.com/styles/atom.css\" type=\"text/css\"?>") != -1);
    } catch (Exception e) {
View Full Code Here

   * @throws Exception
   *             if there is an error creating the test data.
   */
  @Before
  public void setUp() throws Exception {
    feedDoc = new FeedDoc();
    feedWriter = new FeedWriter();
    writer = XMLOutputFactory.newInstance().createXMLStreamWriter(
        new FileOutputStream("target/out.xml"));

  }
View Full Code Here

   *             if there is an error creating the test data.
   */
  @Before
  public void setUp() throws Exception {
    try {
      feedDoc = new FeedDoc();
      Id id = feedDoc.buildId(null,
          "http://www.colorfulsoftware.com/atom.xml");

      Updated updated = feedDoc.buildUpdated(null, Calendar.getInstance()
          .getTime().toString());
View Full Code Here

   * test the feed doc constructors.
   */
  @Test
  public void testFeedDocTest() {
    try {
      FeedDoc feedDoc2 = null;
      List<FeedDoc.ProcessingInstruction> insts = new LinkedList<FeedDoc.ProcessingInstruction>();
      insts
          .add(new FeedDoc().new ProcessingInstruction(
              "xml-stylesheet",
              "href=\"http://www.blogger.com/styles/atom.css\" type=\"text/css\""));
      feedDoc2 = new FeedDoc(insts);
      assertNotNull(feedDoc2);
      String output = feedDoc2.readFeedToString(feedDoc2
          .readFeedToBean(new java.net.URL(
              "http://deals.ebay.com/feeds/rss")), null);
      assertTrue(output
          .indexOf("<?xml-stylesheet href=\"http://www.blogger.com/styles/atom.css\" type=\"text/css\"?>") != -1);
    } catch (Exception e) {
View Full Code Here

     *  very useful if you want to emit HTML directly into the stream.
     *
     */
    private void disableOutputEscaping()
    {
        addElement( new ProcessingInstruction(Result.PI_DISABLE_OUTPUT_ESCAPING, "") );
    }
View Full Code Here

        outputString(ftfw,     content));
  }
 
  @Test
  public void testProcessingInstructionTargetOnly() {
    ProcessingInstruction content = new ProcessingInstruction("target");
    assertEquals(expect("<?target?>"),
        outputString(fraw,     content));
    assertEquals(expect("<?target?>"),
        outputString(fcompact, content));
    assertEquals(expect("<?target?>"),
View Full Code Here

        outputString(ftfw,     content));
  }
 
  @Test
  public void testProcessingInstructionTargetWithData() {
    ProcessingInstruction content =
        new ProcessingInstruction("target", "data");
    assertEquals("<?target data?>",
        outputString(fraw,     content));
    assertEquals("<?target data?>",
        outputString(fcompact, content));
    assertEquals("<?target data?>",
View Full Code Here

    checkOutput(new Comment(incomment), outcomment, outcomment, outcomment, outcomment, outcomment);
  }

  @Test
  public void testOutputProcessingInstructionSimple() {
    ProcessingInstruction inpi = new ProcessingInstruction("jdomtest", "");
    String outpi = "<?jdomtest?>";
    checkOutput(inpi, outpi, outpi, outpi, outpi, outpi);
  }
View Full Code Here

TOP

Related Classes of com.colorfulsoftware.atom.FeedDoc$ProcessingInstruction

Copyright © 2018 www.massapicom. 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.