commonj.sdo.DataObject

Discussion in 'Java' started by John, Oct 23, 2008.

  1. John

    John Guest

    I have a data object that I need to update, but can't figure out how
    this works. I have a data object that contains XML and I need to just
    update the XML data and return the Data object. Can someone please
    provide me a snippet of code on how this is done.
     
    John, Oct 23, 2008
    #1
    1. Advertising

  2. John

    GArlington Guest

    On Oct 23, 9:41 pm, John <> wrote:
    > I have a data object that I need to update, but can't figure out how
    > this works. I have a data object that contains XML and I need to just
    > update the XML data and return the Data object. Can someone please
    > provide me a snippet of code on how this is done.


    Is it a Java (data) object?
    Then you should know what methods it has, something like setXML()? Use
    that method to set/update XML and return your data object...

    Is it XML string?
    Just change it...
     
    GArlington, Oct 24, 2008
    #2
    1. Advertising

  3. John

    John Guest

    On Oct 24, 9:51 am, GArlington <> wrote:
    > On Oct 23, 9:41 pm, John <> wrote:
    >
    > > I have a data object that I need to update, but can't figure out how
    > > this works. I have a data object that contains XML and I need to just
    > > update the XML data and return the Data object. Can someone please
    > > provide me a snippet of code on how this is done.

    >
    > Is it a Java (data) object?
    > Then you should know what methods it has, something like setXML()? Use
    > that method to set/update XML and return your data object...
    >
    > Is it XML string?
    > Just change it...


    What I need to do is manipulate that DataObject and return it. I’m
    having trouble understanding how to remove entries from the object so
    I can add new ones. So as an example:

    <company:company name="ACME" employeeOfTheMonth="E0002">
    <departments name="Advanced Technologies" location="NY"
    number="123">
    <employees name="John Jones" SN="E0001"/>
    <employees name="Mary Smith" SN="E0002" manager="true"/>
    <employees name="Jane Doe" SN="E0003"/>
    </departments>
    </company:company>

    I want to remove all the employees and add new ones. This will be done
    in java. I'm new to java so please bare with me.

    Thanks,
    John
     
    John, Oct 24, 2008
    #3
    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. Manoj Nair
    Replies:
    0
    Views:
    628
    Manoj Nair
    Feb 25, 2004
  2. Crazy Cat
    Replies:
    1
    Views:
    1,185
    Crazy Cat
    Aug 26, 2009
Loading...

Share This Page