Quoting Michael Hauck <[EMAIL PROTECTED]>:

> Hi everyone!
> 
> I have an XML file with the following tag:
> 
> <object name="test" type="String"/>
> 
> What I want to do is to print the values of the attributes to the PDF 
> file. How can I do this? Do I need to add something to the tagmap?

The way class TagMap works, it is not possible to use
attributes for content.

You can change your XML like this:
<object>test</object>
and map 'object' to 'chunk'.

Or you can write your own tagmap-parser that adds
XmlPeer objects to a HashMap.

Or you can work without a tagmap and construct XmlPeer
objects directly (I prefer this in my own projects):
XmlPeer peer = new XmlPeer(ElementTags.CHUNK, "object");
peer.setContent("test");
HashMap tagmap = new HashMap();
tagmap.put(peer.getAlias(), peer);


-------------------------------------------------------
This SF.Net email sponsored by: Free pre-built ASP.NET sites including
Data Reports, E-commerce, Portals, and Forums are available now.
Download today and enter to win an XBOX or Visual Studio .NET.
http://aspnet.click-url.com/go/psa00100006ave/direct;at.asp_061203_01/01
_______________________________________________
iText-questions mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/itext-questions

Reply via email to