Skip to Content.
Sympa Menu

xom-interest - [XOM-interest] org.w3c.dom.Document to nu.xom.Document

xom-interest AT lists.ibiblio.org

Subject: XOM API for Processing XML with Java

List archive

Chronological Thread  
  • From: Ryan Mills <ryanmills AT mac.com>
  • To: xom-interest AT lists.ibiblio.org
  • Subject: [XOM-interest] org.w3c.dom.Document to nu.xom.Document
  • Date: Wed, 18 Jan 2006 15:17:05 +0900

Hi all,

Thanks for everyone for making XOM what it is. I used it recently to give me
the exact line and column number for a malformed xml file. It was 2mb large,
and I could not find anything to tell me where the problem was! [until
firefox 1.5 came along that is] ;)

I have a quick question regarding using XOM or using an existing
org.w3c.dom.Document. I maintain a relatively popular application for
converting vCards to LDIF (http://mills.zapto.org/projects/vcf2ldif/), but
lately, a lot of the additions to make it support...well, practically all the
vCard 3.0 and 2.1 formats have made me wonder if there was a better way to
parse. Looking at vCard4j for a while, and it might help with some parsing.

The vCard4j creates a org.w3c.dom.Document. I would like to later use some of
the functionality in XOM, such as better attributes searching, XPath support
etc...Is there a way to convert this to a nu.xom.Document without saving to
an XML file using some kind of serializer first and then reading it back in?
Looking at the JavaDocs and Tutorials for XOM, it does not appear possible.

Any direction would be appreciated,
Ryan Mills






Archive powered by MHonArc 2.6.24.

Top of Page