[XML-DEV Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

MSXML + Xerces DOM compatibility


xerces msxml
I have some existing code that uses the Xerces C++ parser. I want to add
the MSXML parser support to the code. However I do not want to implement
the parsing again, and would like to add a check at the higher level (if
MSXML, use MSXML parser , else use Xerces).  Now since MSXML says it is DOM
compliant, I would guess that I should be easily able to get the DOM_Node
class (and other classes) from the MSXML parser.

But this is not the case, since MSXML is implemented as a COM server, all I
can get at is IXMLDOMNode.  The problem is that now I will have to
implement all the parsing logic again ( I basically parse XML file, create
objects , based on the type of object e.g. if DOM_Node is of type Element,
create XYZ class , else  create abc class etc., put the whole hierarchy in
memory , if I use MSXML , I will have to check node type IXMLDOMNode etc.).

The problem I run into here is that MSXML returns IXMLDOMNode, while Xerxes
returns DOM_Node, so I cannot use the same logic with the two parsers. I
will have to have a lot of if/else blocks OR have different classes for
each parser i.e MyApplicationXercesHeirarchyCreator,
MyApplicationMSXMLHeirarcyCreator......

 It would be nice if I could just get the DOM_Node directly from MSXML
(instead of IXMLDOMNode), so that I can keep using the common parsing code.
Is there a way I can do this?

All suggestions appreciated!!!

Kundan.




PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
 

Stylus Studio has published XML-DEV in RSS and ATOM formats, enabling users to easily subcribe to the list from their preferred news reader application.


Stylus Studio Sponsored Links are added links designed to provide related and additional information to the visitors of this website. they were not included by the author in the initial post. To view the content without the Sponsor Links please click here.

Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.