Re: Java and XML "templates"

From: Justin Fowler (j.fowler_at_mizzisoft.com)
Date: 02/10/04

  • Next message: Wolfgang: "Is graphics2d.drawImage(image, 0, 0, w, h, null) an asynchronous operation?"
    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.


  • Next message: Wolfgang: "Is graphics2d.drawImage(image, 0, 0, w, h, null) an asynchronous operation?"

    Relevant Pages

    • Re: creating a class
      ... I can use twice at the same time ... var opacity; //starting point ... Create a constructor function and a prototype for the instance method. ...
      (comp.lang.javascript)
    • creating a class
      ... I can use twice at the same time ... var opacity; //starting point ...
      (comp.lang.javascript)
    • Re: SW Model Request: Att: MBiasotti
      ... I guess it didn't take so I apologize if you see this response twice.) ... then you obtain it from your VAR. ...
      (comp.cad.solidworks)
    • Re: Reading width and height of dynamically loaded image
      ... Thomas 'PointedEars' Lahn said the following on 12/12/2007 6:11 PM: ... var img = new Image; ... there is no need to put an img element into the document and hide it to preload images. ... are you sure it will download the "image data" twice? ...
      (comp.lang.javascript)
    • Re: Would be nice if Delphi could do this
      ... Michael C. wrote: ... TRec = record ... I agree with what your saying but ...
      (borland.public.delphi.non-technical)