M
Michael Ransburg
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
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