Re: Java and XML "templates"
From: Justin Fowler (j.fowler_at_mizzisoft.com)
Date: 02/10/04
- Previous message: hiwa: "Re: program to copy files - problems - unix ksh to java"
- In reply to: Michael Ransburg: "Java and XML "templates""
- Next in thread: Michael Ransburg: "Re: Java and XML "templates""
- Reply: Michael Ransburg: "Re: Java and XML "templates""
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Tue, 10 Feb 2004 12:50:51 +1100
Why not not use schema's to define what you XML document looks like.
"Michael Ransburg" <mike@unfolded.com> wrote in message
news:7562d656.0402091432.11daabfd@posting.google.com...
> Hello!
>
> I've got the following XML "template" (for example).
>
> <personalData>
> <address>
> <name>$var1</name>
> <zip>$var2</name>
> </address>
> <telephone type=$var3>$var4</telephone>
> </personalData>
>
>
> Is there an efficient way to replace the $var* variables by values
> using Java? If not, what is an efficient way to work with such
> templates?
>
> I'd imagine something like the following:
> Template t = new Template("template.xml");
> t.var1 = "Michael";
> t.var2 = 81825;
> t.var3 = "Mobile Phone";
> t.var4 = 12345678;
> Document d = t.serialize();
>
>
> Any help would be greatly appreciated!
>
>
> Best regards
> Michael
>
> ps: Sorry if this message appears twice.
- Previous message: hiwa: "Re: program to copy files - problems - unix ksh to java"
- In reply to: Michael Ransburg: "Java and XML "templates""
- Next in thread: Michael Ransburg: "Re: Java and XML "templates""
- Reply: Michael Ransburg: "Re: Java and XML "templates""
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|