You are viewing a plain text version of this content. The canonical link for it is here.
Posted to c-users@xalan.apache.org by Sami Islam <sa...@discon.de> on 2004/04/26 13:20:29 UTC

Using Xerces DOMDocument with Xalan Xpath.

Hello,
I parsed an XML Document in Xerces DOMDocument. I would like to use
Xalan XPath to obtain particular information and values from my XML
document. How can I use the DOMDocument from Xerces in Xalan?


Regards,

Sami Islam
Software Entwickler
DeTeWe Informationssysteme + Consulting GmbH
Abteilung Healthcare
--
Lilienthalstrasse 5
D-30916 Isernhagen
Telefon: +49 (0)511/368499-843
Telefax: +49 (0)511/368499-88
E-mail:  sami.islam@detewe.de


AW: Using Xerces DOMDocument with Xalan Xpath.

Posted by Sami Islam <sa...@discon.de>.
Hello,
Thanks for the quick response.
In the last line:
Transformer->transform(wrapper, stylesheetName,target);

What would I pass in as the stylesheetName when I am not using any
stylesheet?
Why do I need to use Transformer? Does this transform my Xerces DOM
Document to a Xalan DOM which I can use to parse and look for a specific
node value?

Thanks,
Sami

-----Ursprüngliche Nachricht-----
Von: Peter Guyatt [mailto:pguyatt@telesoft-technologies.com] 
Gesendet: Montag, 26. April 2004 13:49
An: xalan-dev@xml.apache.org; Sami.Islam@discon.de
Betreff: RE: Using Xerces DOMDocument with Xalan Xpath.


Hi There,

    You use the XercesDOMWrapperParsedSource so that you can use the
Xalan transformer.

It looks somthing like this:

parser->parse(src);
//get the document
doc = parser->getDocument();
//used to help convert a Xerces COM tree into a Xalan DOM tree
XercesDOMSupport supporter; XercesParserLiaison liaison; //let the
wrapper know the it does not have a id XalanDOMString uri("");
XercesDOMParser *parser; //create a new wrapper used to 'wrap' the
Xerces DOM into a Xalan DOM XercesDOMWrapperParsedSource wrapper(doc,
liaison, supporter, uri); //transform file
transformer->transform(wrapper,stylesheetName,target);


Thanks

Pete


-----Original Message-----
From: Sami Islam [mailto:sami.islam@discon.de]
Sent: 26 April 2004 12:20
To: Xalan User List; Xalan Dev List
Subject: Using Xerces DOMDocument with Xalan Xpath.


Hello,
I parsed an XML Document in Xerces DOMDocument. I would like to use
Xalan XPath to obtain particular information and values from my XML
document. How can I use the DOMDocument from Xerces in Xalan?


Regards,
Sami Islam
Software Entwickler
DeTeWe Informationssysteme + Consulting GmbH
Abteilung Healthcare
--
Lilienthalstrasse 5
D-30916 Isernhagen
Telefon: +49 (0)511/368499-843
Telefax: +49 (0)511/368499-88
E-mail:  sami.islam@detewe.de



---------------------------------------------------------------------
To unsubscribe, e-mail: xalan-dev-unsubscribe@xml.apache.org
For additional commands, e-mail: xalan-dev-help@xml.apache.org


RE: Using Xerces DOMDocument with Xalan Xpath.

Posted by Peter Guyatt <pg...@telesoft-technologies.com>.
Hi There,

    You use the XercesDOMWrapperParsedSource so that you can use the Xalan
transformer.

It looks somthing like this:

parser->parse(src);
//get the document
doc = parser->getDocument();
//used to help convert a Xerces COM tree into a Xalan DOM tree
XercesDOMSupport supporter;
XercesParserLiaison liaison;
//let the wrapper know the it does not have a id
XalanDOMString uri("");
XercesDOMParser *parser;
//create a new wrapper used to 'wrap' the Xerces DOM into a Xalan DOM
XercesDOMWrapperParsedSource wrapper(doc, liaison, supporter, uri);
//transform file
transformer->transform(wrapper,stylesheetName,target);


Thanks

Pete


-----Original Message-----
From: Sami Islam [mailto:sami.islam@discon.de]
Sent: 26 April 2004 12:20
To: Xalan User List; Xalan Dev List
Subject: Using Xerces DOMDocument with Xalan Xpath.


Hello,
I parsed an XML Document in Xerces DOMDocument. I would like to use Xalan
XPath to obtain particular information and values from my XML document. How
can I use the DOMDocument from Xerces in Xalan?


Regards,
Sami Islam
Software Entwickler
DeTeWe Informationssysteme + Consulting GmbH
Abteilung Healthcare
--
Lilienthalstrasse 5
D-30916 Isernhagen
Telefon: +49 (0)511/368499-843
Telefax: +49 (0)511/368499-88
E-mail:  sami.islam@detewe.de


---------------------------------------------------------------------
To unsubscribe, e-mail: xalan-dev-unsubscribe@xml.apache.org
For additional commands, e-mail: xalan-dev-help@xml.apache.org