This usage pattern provides some information:
http://xml.apache.org/xalan-c/usagepatterns.html#dom
These lines of code wrap a Xerces DOM an instance of Xalan's source tree:
// Set up a XercesParserLiaison and use it to wrap the DOM_Document
// in a XalanDocument.
XercesDOMSupport theDOMSupport;
XercesParserLiaison theParserLiaison(theDOMSupport);
XalanDocument* theDoc = theParserLiaison.createDocument(theDOM);
You can use XercesDocumentBridge::mapNode() to map nodes back and forth.
Use XercesParserLiaison::mapDocument() to get theDoc as a
XercesDocumentBridge, or just do a cast, if you're brave.
Dave
jason_franco@peop
lesoft.com To:
cc: (bcc: David N Bertoni/CAM/Lotus)
06/22/2001 03:15 Subject: conversion question.
PM
Please respond to
xalan-dev
Hi there! Currently, I am trying to implement searching functionality into
a object of mine that uses XPath. Currently the rest of our software uses
Xerces to reference DOM objects. In order to run DOM document through
Xalan's transform methods, I need our objects to be in the XalanDocument
object. And for doing XPath queries, I need to convert our already existed
Xerces DOM_Node object into a XalanNode object. How is this done? I found
this class in your release but there is not documentation on it
(XercesToXalanNodeMap)? Is there a way, in runtime, to convert a Xerces
DOM_Node into a XalanNode or XalanElement? Any help here would be greatly
appreciated. Thanks!
-Jason Franco