Array in javabean

Discussion in 'Java' started by Myriam Abramson, Sep 22, 2005.

  1. What's the best way to handle arrays in javabeans especially for
    XMLencoding and decoding?
    --
    myriam
    Myriam Abramson, Sep 22, 2005
    #1
    1. Advertising

  2. Myriam Abramson

    Roedy Green Guest

    On 22 Sep 2005 13:33:01 -0400, Myriam Abramson <>
    wrote or quoted :

    >What's the best way to handle arrays in javabeans especially for
    >XMLencoding and decoding?


    Is there anything different from plain old Java? See
    http://mindprod.com/xml.html
    --
    Canadian Mind Products, Roedy Green.
    http://mindprod.com Again taking new Java programming contracts.
    Roedy Green, Sep 22, 2005
    #2
    1. Advertising

  3. Myriam Abramson

    Dag Sunde Guest

    "Roedy Green" <> wrote in message
    news:...
    > On 22 Sep 2005 13:33:01 -0400, Myriam Abramson <>
    > wrote or quoted :
    >
    >>What's the best way to handle arrays in javabeans especially for
    >>XMLencoding and decoding?

    >
    > Is there anything different from plain old Java? See
    > http://mindprod.com/xml.html


    You have been particularly sloppy in posting your URLs lately, Roedy...
    ;-)

    try http://mindprod.com/JGloss/xml.html

    --
    Dag.
    Dag Sunde, Sep 23, 2005
    #3
  4. Myriam Abramson

    Dag Sunde Guest

    "Dag Sunde" <> wrote in message
    news:1OMYe.5985$...
    > "Roedy Green" <> wrote in message
    > news:...
    >> On 22 Sep 2005 13:33:01 -0400, Myriam Abramson <>
    >> wrote or quoted :
    >>
    >>>What's the best way to handle arrays in javabeans especially for
    >>>XMLencoding and decoding?

    >>
    >> Is there anything different from plain old Java? See
    >> http://mindprod.com/xml.html

    >
    > You have been particularly sloppy in posting your URLs lately, Roedy...
    > ;-)
    >
    > try http://mindprod.com/JGloss/xml.html
    >


    And btw...

    I disagree wholeheartedly with you concerning xml.
    I think its the best thing since sliced bread within
    its domain. Used without thinking, any dataformat can
    be misused.

    Using it to store your record-collection database, etc
    is sheer idiocy, but to send the information on a particular
    record to another app, its perfect.
    (The Records.xds is of cource published publicly, so
    anyone who wants to build a record-collection app.
    can use it to validate the data-exchange).

    And *do* revisit Xml Schema and read it thoroughly.
    http://www.w3.org/TR/xmlschema-2/

    And forget about the (old) DTD, XSD have taken over.
    Xsd can define datatypes, ranges, enumerator, dates,
    complex datatypes, et.c.

    --
    Dag.
    Dag Sunde, Sep 23, 2005
    #4
  5. Myriam Abramson

    Roedy Green Guest

    On Fri, 23 Sep 2005 05:56:13 GMT, "Dag Sunde" <> wrote
    or quoted :

    >You have been particularly sloppy in posting your URLs lately, Roedy...
    >;-)


    I am quite ill and my eyesight has not been working well. I can see
    snatches of things but not the whole. Partner says I have all the
    symptoms of the "dog flu". I am not sure if this is a joke. I go in
    tomorrow to get checked out.

    Hopefully this senility will be temporary.

    --
    Canadian Mind Products, Roedy Green.
    http://mindprod.com Again taking new Java programming contracts.
    Roedy Green, Sep 23, 2005
    #5
  6. Myriam Abramson

    Roedy Green Guest

    On Fri, 23 Sep 2005 06:32:48 GMT, "Dag Sunde" <> wrote
    or quoted :

    >And forget about the (old) DTD, XSD have taken over.
    >Xsd can define datatypes, ranges, enumerator, dates,
    >complex datatypes, et.c.


    good. Now if they can get rid of the fat. I hope fluffy XML is just a
    stage in the evolution and eventually what we now call XML will become
    a debug dump format, and the real format will be something nobody ever
    looks at. You just interact with through APIs.

    Then after that is the lack of generality. Not everything in the
    dataprocessing universe is a tree.

    But must give it credit for some strange appeal that is making
    intoperatibility a reality.
    --
    Canadian Mind Products, Roedy Green.
    http://mindprod.com Again taking new Java programming contracts.
    Roedy Green, Sep 23, 2005
    #6
  7. Myriam Abramson

    Roedy Green Guest

    On Fri, 23 Sep 2005 06:32:48 GMT, "Dag Sunde" <> wrote
    or quoted :

    >And forget about the (old) DTD, XSD have taken over.
    >Xsd can define datatypes, ranges, enumerator, dates,
    >complex datatypes, et.c.


    I have added a section on Schemas. You might want to check if I got it
    right.

    I did a quick scan over the docs. It was not clear if you can create
    an enum of the US states or if that is now considered a primitive,
    which is what I have been pushing for since 1979.
    --
    Canadian Mind Products, Roedy Green.
    http://mindprod.com Again taking new Java programming contracts.
    Roedy Green, Sep 23, 2005
    #7
  8. Myriam Abramson

    Dag Sunde Guest

    "Roedy Green" <> wrote in message
    news:...
    > On Fri, 23 Sep 2005 06:32:48 GMT, "Dag Sunde" <> wrote
    > or quoted :
    >
    >>And forget about the (old) DTD, XSD have taken over.
    >>Xsd can define datatypes, ranges, enumerator, dates,
    >>complex datatypes, et.c.

    >
    > I have added a section on Schemas. You might want to check if I got it
    > right.
    >
    > I did a quick scan over the docs. It was not clear if you can create
    > an enum of the US states or if that is now considered a primitive,
    > which is what I have been pushing for since 1979.


    <xs:element name="abbrev">
    <xs:simpleType>
    <xs:restriction base="xs:string">
    <xs:enumeration value="CA"/>
    <xs:enumeration value="OR"/>
    <xs:enumeration value="TX"/>
    <xs:enumeration value="UT"/>
    <xs:enumeration value="WI"/>
    </xs:restriction>
    </xs:simpleType>
    </xs:element>

    --
    Dag.
    Dag Sunde, Sep 23, 2005
    #8
  9. Thanks guys! But I was wondering how I can use sun java's wonderfule
    xmlencode and xmldecode with a slightly more complicated data
    structures.

    BTW, I think what should replace XML is just plain English! I cringe
    to see how much effort is expanded on XML instead of learning to just
    parse English better. Like the French, we should stand up against
    alien languages :)

    --
    myriam
    Myriam Abramson, Oct 3, 2005
    #9
  10. Myriam Abramson wrote:

    > ..But I was wondering how I can use sun java's wonderfule
    > xmlencode and xmldecode


    I don't recognise those methods, but you might use
    the XMLEncoder and XMLDecoder classes also.

    >...with a slightly more complicated data
    > structures.


    Make it an attribute of a class, with a public getter/setter.
    ...Was there some trick to that question?
    Andrew Thompson, Oct 3, 2005
    #10
    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. Andrew Thompson

    Missing JavaBean..

    Andrew Thompson, Jul 7, 2003, in forum: Java
    Replies:
    4
    Views:
    422
    Wendy S
    Jul 7, 2003
  2. A Bag Of Memes

    Re: Use one javabean for each table?

    A Bag Of Memes, Jul 24, 2003, in forum: Java
    Replies:
    0
    Views:
    438
    A Bag Of Memes
    Jul 24, 2003
  3. tom
    Replies:
    0
    Views:
    367
  4. Andy
    Replies:
    0
    Views:
    299
  5. Quick Function

    array in javabean and access from jsp

    Quick Function, Jul 22, 2004, in forum: Java
    Replies:
    3
    Views:
    8,705
    Hal Rosser
    Jul 22, 2004
Loading...

Share This Page