Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsWhite Papers
Discussion GroupsFirst AidDatabasesJavaBeansGUIJava 3DVirtual MachineCORBASecurityToolsGeneral
Java DirectoryOpen Source ProjectsSample Book ChaptersUser GroupsWeb Resources
Related Topics
Databases.NETMore Topics ...

Java Forum / General / October 2005

Tip: Looking for answers? Try searching our database.

Array in javabean

Thread view: 
Myriam Abramson - 22 Sep 2005 18:33 GMT
What's the best way to handle arrays in javabeans especially for
XMLencoding and decoding?
Signature

                                  myriam

Roedy Green - 22 Sep 2005 21:49 GMT
>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
Signature

Canadian Mind Products, Roedy Green.
http://mindprod.com Again taking new Java programming contracts.

Dag Sunde - 23 Sep 2005 06:56 GMT
>>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

Signature

Dag.

Dag Sunde - 23 Sep 2005 07:32 GMT
>>>What's the best way to handle arrays in javabeans especially for
>>>XMLencoding and decoding?
[quoted text clipped - 6 lines]
>
> 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.

Signature

Dag.

Roedy Green - 23 Sep 2005 09:34 GMT
>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.
Signature

Canadian Mind Products, Roedy Green.
http://mindprod.com Again taking new Java programming contracts.

Roedy Green - 23 Sep 2005 10:07 GMT
>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.
Signature

Canadian Mind Products, Roedy Green.
http://mindprod.com Again taking new Java programming contracts.

Dag Sunde - 23 Sep 2005 13:27 GMT
>>And forget about the (old) DTD, XSD have taken over.
>>Xsd can define datatypes, ranges, enumerator, dates,
[quoted text clipped - 6 lines]
> 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>

Signature

Dag.

Myriam Abramson - 03 Oct 2005 14:04 GMT
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 :-)

Signature

                                  myriam

Andrew Thompson - 03 Oct 2005 14:56 GMT
> ..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?
Roedy Green - 23 Sep 2005 09:29 GMT
>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.

Signature

Canadian Mind Products, Roedy Green.
http://mindprod.com Again taking new Java programming contracts.



Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.