Re: Passing xml documents between Java and a C library

  • From: Kerneels Roos <kerneels@xxxxxxxxx>
  • To: programmingblind@xxxxxxxxxxxxx
  • Date: Thu, 12 Aug 2010 18:00:30 +0200

John, I can appreciate the notion of keeping the two projects separate, but
that does not mean they can't influence each other's development. A strong
argument for XML is the ease with which it can be parsed and extended, and
that it can be inspected with a simple text editor or special XML editor.
Are these requirements still valid when it's an inter API exchange? Or put
another way, are these requirements so important that it merits the negative
aspects of XML -- mainly the size consideration?

Could there not be found some other common ground, like an in memory binary
representation fo the parsed XML for example that is more compact but still
lossless? Any other system that calls the liblouis API could also benefit
from this -- it would be a cool addition to liblouis, and I can't see them
objecting the addition of such a more economic, XML equivalent data
interchange, especially if the code for it is contributed to them.

Then again it's probably quite a complicated task fraughtwith caveats round
every corner the lower level you get, not to mention cross platform fun and
games. Java bytecode is standard, so that might be a place to start from.

Well that's just some ideas.

On Thu, Aug 12, 2010 at 5:27 PM, Jay Macarty <jay.macarty2009@xxxxxxxxx>wrote:

> Again, also from someone who has used both the basic DOM and SAX parsers
> and some of the higher level APIs like JDom XmlBeans and JAX-B, I think
> JAX-B is a very good xml binding API; however, if you want something a
> little more lightweight, you might consider something like jason instead of
> xml. Jason is still text based but generally has a smaller payload size than
> xml.
>
> ----- Original Message ----- From: "Homme, James" <
> james.homme@xxxxxxxxxxxx>
> To: <programmingblind@xxxxxxxxxxxxx>
> Sent: Monday, August 09, 2010 6:24 AM
>
> Subject: RE: Passing xml documents between Java and a C library
>
>
> Hi,
> What would be a good light weight solution for this?
>
> Thanks.
>
> Jim
>
> Jim Homme,
> Usability Services,
> Phone: 412-544-1810. Skype: jim.homme
> Internal recipients,  Read my accessibility blog. Discuss accessibility
> here. Accessibility Wiki: Breaking news and accessibility advice
>
>
> -----Original Message-----
> From: programmingblind-bounce@xxxxxxxxxxxxx [mailto:
> programmingblind-bounce@xxxxxxxxxxxxx] On Behalf Of Sina Bahram
> Sent: Saturday, August 07, 2010 10:25 PM
> To: programmingblind@xxxxxxxxxxxxx
> Subject: RE: Passing xml documents between Java and a C library
>
> Don't get too carried away with some of these frameworks. JMX and the rest
> might sound like awesome ideas, but heavy weight is not
> where you necessarily want to be.
>
> Just a word of advice from someone who has done both sides of the coin on
> java development.
>
> Take care,
> Sina
>
>
> -----Original Message-----
> From: programmingblind-bounce@xxxxxxxxxxxxx [mailto:
> programmingblind-bounce@xxxxxxxxxxxxx] On Behalf Of John J. Boyer
> Sent: Saturday, August 07, 2010 9:26 PM
> To: programmingblind@xxxxxxxxxxxxx
> Subject: Re: Passing xml documents between Java and a C library
>
> Thanks. This sounds helpful. We are still working out the architecture of
> BrailleBlaster and figuring out what Java libraries or
> packages we will need. We are definitely using Java 6.
>
> John
>
> On Sat, Aug 07, 2010 at 07:06:53PM -0500, Jay Macarty wrote:
>
>> If you are using java 6 as your platform, there is an XmL binding API
>> called JAX-B which you might find helpful for this. JAX-B allows you
>> to convert a java object into an XML string or to map an XML string to
>> a java object. We use this at work a lot because we are receiving text
>> based messages from queues and the message body is XML.
>>
>> In JAX-B you add java annotations to a java bean style data object to
>> tell it what the XML element and/or attribute names should be when the
>> object is converted to XML.
>>
>> ----- Original Message -----
>> From: "John J. Boyer" <john.boyer@xxxxxxxxxxxxxxxxx>
>> To: <programmingblind@xxxxxxxxxxxxx>
>> Sent: Saturday, August 07, 2010 6:52 PM
>> Subject: Passing xml documents between Java and a C library
>>
>>
>> >For the BrailleBlaster project, the editor and user interface are
>> >written in Java. The braille knowledge needed for translating annd
>> >formatting is in the C library liblouisutdml. The two communicate by
>> >method calls and xml documents. We would like to pass the documennts
>> >back and forth inn a memory buffer, if possible. However, some
>> >doccuments can be quite large, up to 6 megabytes. After UTDML
>> >(Unified Tactile Document Markup Language) has been added to them
>> >they can be 20 MB or more. Such large buffers seem impractical, so we
>> >will probably have to pass documents of that size as files. However,
>> >we would like to be able to pass smaller documents, say up to 100k,
>> >in memory. How can this best be done on the Java end? liblouisutdml
>> >expects xml documents in UTF-8 in an array of 8-bit charactors.
>> >
>> >Thanks,
>> >John
>> >
>> >--
>> >John J. Boyer; President, Chief Software Developer Abilitiessoft,
>> >Inc.
>> >http://www.abilitiessoft.com
>> >Madison, Wisconsin USA
>> >Developing software for people with disabilities
>> >
>> >__________
>> >View the list's information and change your settings at
>> >//www.freelists.org/list/programmingblind
>> >
>>
>> __________
>> View the list's information and change your settings at
>> //www.freelists.org/list/programmingblind
>>
>
> --
> John J. Boyer; President, Chief Software Developer Abilitiessoft, Inc.
> http://www.abilitiessoft.com
> Madison, Wisconsin USA
> Developing software for people with disabilities
>
> __________
> View the list's information and change your settings at
> //www.freelists.org/list/programmingblind
>
> __________
> View the list's information and change your settings at
> //www.freelists.org/list/programmingblind
>
>
> This e-mail and any attachments to it are confidential and are intended
> solely for use of the individual or entity to whom they are addressed.  If
> you have received this e-mail in error, please notify the sender immediately
> and then delete it.  If you are not the intended recipient, you must not
> keep, use, disclose, copy or distribute this e-mail without the author's
> prior permission.  The views expressed in this e-mail message do not
> necessarily represent the views of Highmark Inc., its subsidiaries, or
> affiliates.
> __________
> View the list's information and change your settings at
> //www.freelists.org/list/programmingblind
>
>
> __________
> View the list's information and change your settings at
> //www.freelists.org/list/programmingblind
>
>


-- 
Kerneels Roos
Cell/SMS: +27 (0)82 309 1998
Skype: cornelis.roos

The early bird may get the worm, but the second mouse gets the cheese!

Other related posts: