Generate XML on fly in Java dataobject.

Discussion in 'XML' started by Manoj Nair, Feb 25, 2004.

  1. Manoj Nair

    Manoj Nair Guest

    I am a newbie so forgive any stupid Q's.

    Reqt : I have a java data object and I need to have a getter method in
    it which will return me a XML file for that instance.

    Eg: I have a class Customer

    Public class Customer
    {
    private long customerid;
    private String first;
    private String last;

    public Customer(){}

    public long getID() { return customerid; }
    public String getFirst() { return first; }
    public String getLast() { return last; }

    public void setID(long aID) { customerid = aID; }
    public void setFirst(String afirst) { first = afirst; }
    public void setLast(String alast) { last = alast; }

    /** THE NEW METHOD I NEED **/
    public String generateXML(long custid)
    {
    return XML_FILE ; // NEW REQUIREMENT
    }
    }

    The generate method should return an XML file ( I dont know whether it
    should be a file reference to a temporary file stored on server or a
    stream of bytes).
    This dataobject resides on the WEBLOGIC 7.0 server.


    Thanks
     
    Manoj Nair, Feb 25, 2004
    #1
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Espen Evje
    Replies:
    1
    Views:
    396
    Espen Evje
    Jul 11, 2003
  2. Benjamin Bittner

    Generate macromedia swf files on the fly

    Benjamin Bittner, Aug 31, 2004, in forum: ASP .Net
    Replies:
    0
    Views:
    538
    Benjamin Bittner
    Aug 31, 2004
  3. John

    commonj.sdo.DataObject

    John, Oct 23, 2008, in forum: Java
    Replies:
    2
    Views:
    973
  4. Crazy Cat
    Replies:
    1
    Views:
    1,202
    Crazy Cat
    Aug 26, 2009
  5. Brian

    Fly outmenu on the fly

    Brian, Apr 8, 2005, in forum: Javascript
    Replies:
    0
    Views:
    118
    Brian
    Apr 8, 2005
Loading...

Share This Page