On Sun, Nov 24, 2013 at 08:09:40PM +0000, Jang-Ho Hwang wrote:
> Hi guys,

  Heya,

> I noticed that there aren't any java bindings in 'Related links' section on
> xmlsoft.org.
> so I've started to make a Java binding for libxml2 few weeks ago for fun.
> 
>   https://github.com/rath/libxml2-java
> 
> In addition to making simple JNI binding, I also made interface for JSR
> 206(JAXP) compatible.
> It can be drop in replacement for jdk bundled apache xerces, so java
> developers who doesn't know libxml2 api can utilise it with minimal effort.
> 
> Any feedbacks would be appreciated.

  hard to get time for me to look at it, and I honnestly never do java
myself, but good idea. I'm sure there was another binding at some point
but never became popular I'm afraid.

> Thanks.

  Something i found out recently in a similar binding project for one
of my libs is that using JNA instead of JNI simplifies things a lot,
basically you don't need C glue code just use the com.sun.jna
classes to describe your structures. Way simpler, might be a bit slower
though !
  The main problem on those bindings is proper handling of memory
over long term, explicit document destruction in C v.s. garbage
collected set of linked references, and that i doubt JNA really helps
over JNI.

Daniel

-- 
Daniel Veillard      | Open Source and Standards, Red Hat
veill...@redhat.com  | libxml Gnome XML XSLT toolkit  http://xmlsoft.org/
http://veillard.com/ | virtualization library  http://libvirt.org/
_______________________________________________
xml mailing list, project page  http://xmlsoft.org/
xml@gnome.org
https://mail.gnome.org/mailman/listinfo/xml

Reply via email to