Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 4 of 4
  1. #1
    New to the CF scene
    Join Date
    Feb 2008
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Question Template Frameworks

    Hey,

    I'm searching for a template framework where it's possible to transform a POJO into an XML-file. The creation of the templates has to be as easy as possible (GUI-based would be perfect, so non-programmers can also create the templates).

    For the xml-file, it has to be possible to define your own tags within the template. So for example you can say the xml has to look like:

    <root>
    <someInfo>Info</someInfo>
    </root>

    With the Info being a value of a variable from my POJO.
    I already tried JasperReports because this should have this possibility. But JasperReports will automatically generate the tags itself. (As far as I understand the program)

    Can somebody advise me on wich platform would be able to do these things?
    Or maybe it's possible to do it with JasperReports but I looked over it?

    If my question isn't clear enough, just say so and I'll try to clarify it some more

    Thx, Sven

  • #2
    Senior Coder shyam's Avatar
    Join Date
    Jul 2005
    Posts
    1,563
    Thanks
    2
    Thanked 163 Times in 160 Posts
    take a look at xstream pretty nifty and easy enough to setup
    You never have to change anything you got up in the middle of the night to write. -- Saul Bellow

  • #3
    New to the CF scene
    Join Date
    Feb 2008
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Thx, this looks very promising.

  • #4
    New to the CF scene
    Join Date
    Feb 2008
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Just took another look at XStream, but it isn't what I'm looking for because it hasn't got the template functionalities.

    It will print an object to xml and give the tags the name of the class or the variable name. Instead I want to be able to define those names in the template, and only set the element nodes to a value of my POJO.

    So the final .xml should for example contain the following:

    <root>
    <Line>
    <col1 justify="right" width="4">Aant</col1>
    <col2 allowoverflow="true" truncate="true" justify="left" width="22">Omschrijving</col2>
    <col3 allownewline="true" justify="right" width="7">Prijs</col3>
    <col4 justify="right" width="10">Waarde</col4>
    <col5 justify="right" width="3" />
    </Line>
    </root>

    All the attributes names en tag names should be defined in the template (because these aren't variables of the POJO), the element node values and attribute node values are static text within the template or come from a POJO.
    Last edited by Skull; 02-21-2008 at 09:49 AM.


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •