Thread View: borland.public.jbuilder.java.api
6 messages
6 total messages
Started by Peter Th�nell
Tue, 23 Mar 2004 03:05
Raw data in XML
Author: Peter Th�nell
Date: Tue, 23 Mar 2004 03:05
Date: Tue, 23 Mar 2004 03:05
3 lines
1001 bytes
1001 bytes
I would like to store and retrieve byte arrays (byte[]) in attributes in XML files. How do I convert the data to be XML friendly, and then back again?
Re: Raw data in XML
Author: Tor Iver Wilhelmsen (TeamB)
Date: Tue, 23 Mar 2004 08:08
Date: Tue, 23 Mar 2004 08:08
7 lines
1193 bytes
1193 bytes
"Peter Th�nell" <thonellp@optusnet.com.au> writes: > I would like to store and retrieve byte arrays (byte[]) in attributes in XML > files. How do I convert the data to be XML friendly, and then back again? Using Base 64 encoding seems to be most common. There shold be some classes for that type of work in some of the standard packages.
Re: Raw data in XML
Author: Kevin Dean
Date: Tue, 23 Mar 2004 10:35
Date: Tue, 23 Mar 2004 10:35
27 lines
2089 bytes
2089 bytes
Strangely enough, there's no standard base 64 encoding package. You can use sun.misc.BASE64Encoder and sun.misc.BASE64Decoder or, if you're using the Apache Xerces XML parser there's org.apache.xerces.util.Base64. The latter is the preferred option as anything in the sun.* packages is by definition not guaranteed portable across multiple JVM's. -- Check out our latest white papers at http://www.datadevelopment.com/papers/index.html BladeNET Scores With Borland Enterprise Tools Team Development with JBuilder and Borland Enterprise Server Dolphin Data Development Ltd. http://www.datadevelopment.com/ "Tor Iver Wilhelmsen (TeamB)" <tor.wilhelmsen@ergo.no> wrote in message news:uptb4f0jx.fsf@ergo.no... > "Peter Th�nell" <thonellp@optusnet.com.au> writes: > > > I would like to store and retrieve byte arrays (byte[]) in attributes in XML > > files. How do I convert the data to be XML friendly, and then back again? > > Using Base 64 encoding seems to be most common. There shold be some > classes for that type of work in some of the standard packages.
Re: Raw data in XML
Author: Lori M Olson (TeamB)
Date: Thu, 25 Mar 2004 04:36
Date: Thu, 25 Mar 2004 04:36
31 lines
2142 bytes
2142 bytes
Kevin Dean wrote:
> Strangely enough, there's no standard base 64 encoding package. You can use
> sun.misc.BASE64Encoder and sun.misc.BASE64Decoder or, if you're using the
> Apache Xerces XML parser there's org.apache.xerces.util.Base64. The latter
> is the preferred option as anything in the sun.* packages is by definition
> not guaranteed portable across multiple JVM's.
>
Ya know, I've heard that "not guaranteed portable" argument about
sun.misc version for a while now. But as far as I can remember, it's
been there, working, since JDK 1.1.something.
--
Regards,
Lori Olson (TeamB)
------------
Save yourself, and everyone else, some time and search the
newsgroups and the FAQ-O-Matic before posting your next
question.
Google Advanced Newsgroup Search
http://www.google.ca/advanced_group_search
Other Newsgroup Searches:
http://www.borland.com/newsgroups/ngsearch.html
Joi Ellis's FAQ-O-Matic:
http://www.visi.com/~gyles19/fom-serve/cache/1.html
Re: Raw data in XML
Author: Kevin Dean
Date: Thu, 25 Mar 2004 13:58
Date: Thu, 25 Mar 2004 13:58
53 lines
2806 bytes
2806 bytes
I know, and it will likely be there in perpetuity. However, I don't think that package is present in the IBM JRE so there are some (albeit limited) portability issues. Personally, I'm happy to use anything that's available, portable or not, if it gets the job done in a simple and elegant way. -- Check out our latest white papers at http://www.datadevelopment.com/papers/index.html BladeNET Scores With Borland Enterprise Tools Team Development with JBuilder and Borland Enterprise Server Dolphin Data Development Ltd. http://www.datadevelopment.com/ "Lori M Olson (TeamB)" <javadragon@techie.com> wrote in message news:406261cc$1@newsgroups.borland.com... > Kevin Dean wrote: > > > Strangely enough, there's no standard base 64 encoding package. You can use > > sun.misc.BASE64Encoder and sun.misc.BASE64Decoder or, if you're using the > > Apache Xerces XML parser there's org.apache.xerces.util.Base64. The latter > > is the preferred option as anything in the sun.* packages is by definition > > not guaranteed portable across multiple JVM's. > > > > Ya know, I've heard that "not guaranteed portable" argument about > sun.misc version for a while now. But as far as I can remember, it's > been there, working, since JDK 1.1.something. > > -- > > Regards, > > Lori Olson (TeamB) > > ------------ > > Save yourself, and everyone else, some time and search the > newsgroups and the FAQ-O-Matic before posting your next > question. > > Google Advanced Newsgroup Search > http://www.google.ca/advanced_group_search > Other Newsgroup Searches: > http://www.borland.com/newsgroups/ngsearch.html > Joi Ellis's FAQ-O-Matic: > http://www.visi.com/~gyles19/fom-serve/cache/1.html >
Re: Raw data in XML
Author: Peter Th�nell
Date: Fri, 26 Mar 2004 04:04
Date: Fri, 26 Mar 2004 04:04
2 lines
1091 bytes
1091 bytes
Thanks! :)
Thread Navigation
This is a paginated view of messages in the thread with full content displayed inline.
Messages are displayed in chronological order, with the original post highlighted in green.
Use pagination controls to navigate through all messages in large threads.
Back to All Threads