Hi, I am not able to map Newline element tag with my own tag. I am giving the following code which I tried. Can anyone help me...
Java Class:iTextTest.java ********** import java.io.FileOutputStream; import com.lowagie.text.Document; import com.lowagie.text.PageSize; import com.lowagie.text.pdf.PdfWriter; import com.lowagie.text.xml.TagMap; import com.lowagie.text.xml.XmlParser; public class iTextTest { public static void main(String[] args) { System.out.println("Chapter 7 example 5: simple database example"); int i = 0; try { TagMap tagmap = new TagMap("tagmap.xml"); // step 1: creation of a document-object Document document = new Document(PageSize.A4, 80, 50, 30, 65); // step 2: // we create a writer that listens to the document PdfWriter.getInstance(document, new FileOutputStream("Chap0705.pdf")); // step 3: we parse the document XmlParser.parse(document, "iTextTest.XML", tagmap); //} } catch(Exception e) { e.printStackTrace(); System.err.println(e.getMessage()); } } } My XML:iTextTest.XML ************ <?xml version="1.0" encoding="UTF-8" ?> <!DOCTYPE ITEXT SYSTEM "http://itext.sourceforge.net/itext.dtd <http://itext.sourceforge.net/itext.dtd> "> <itext creationdate="Thu Oct 02 14:56:45 CEST 2003" producer="iTextXML by lowagie.com"> <name leading="18.0" font="unknown" align="Default"></name> </itext> MyTagMap :tagmap.xml ************ <tagmap> <tag name="newline" alias="name"/> </tagmap> Regards R Mallika This message is confidential and may also be legally privileged. If you are not the intended recipient, please notify [EMAIL PROTECTED] immediately. You should not copy it or use it for any purpose, nor disclose its contents to any other person. The views and opinions expressed in this e-mail message are the author's own and may not reflect the views and opinions of ADP Wilco. ------------------------------------------------------- This SF.net email is sponsored by: SF.net Giveback Program. Does SourceForge.net help you be more productive? Does it help you create better code? SHARE THE LOVE, and help us help YOU! Click Here: http://sourceforge.net/donate/ _______________________________________________ iText-questions mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/itext-questions