We don't support getChildNodes(), we only support getFirstChild(),
getNextSibling(), etc. That's much more efficient, so just restructure
your code accordingly.
Dave
|---------+--------------------------->
| | "Avula, Raj" |
| | <RAvula@firstam.|
| | com> |
| | |
| | 04/23/2002 09:24|
| | AM |
| | Please respond |
| | to xalan-dev |
| | |
|---------+--------------------------->
>---------------------------------------------------------------------------------------------------------------------------|
|
|
| To: "'[EMAIL PROTECTED]'" <[EMAIL PROTECTED]>
|
| cc: (bcc: David N Bertoni/Cambridge/IBM)
|
| Subject: RE: XalanParsedSource - XalanDocument
|
>---------------------------------------------------------------------------------------------------------------------------|
I did that. But getChildNodes() method is returning NULL to me
XalanSourceTreeDocument::getChildNodes() const
{
throw XalanDOMException(XalanDOMException::NOT_SUPPORTED_ERR);
// Dummy return value...
return 0;
}.
Above method is throwing the exception.
Here is my code:
exception is being thrown at getChildNodes() method.
XalanNode* apRootNode = NULL;
if (a_pParsedInput != NULL)
{
const XalanDocument* apDocument =
a_pParsedInput->getDocument();
if (apDocument != NULL)
{
const XalanNodeList* apNodeList =
apDocument->getChildNodes ();
if (apNodeList != NULL)
{
if (apDocument->getDoctype
() == NULL)
apRootNode =
apNodeList->item(0);
else
apRootNode =
apNodeList->item(1);
}
}
}
Thanks
Raj.
> -----Original Message-----
> From: David N Bertoni/Cambridge/IBM
[SMTP:[EMAIL PROTECTED]]
> Sent: Tuesday, April 23, 2002 8:04 AM
> To: [EMAIL PROTECTED]
> Subject: Re: XalanParsedSource - XalanDocument
>
>
> Get the XalanDocument instance from the parsed source:
>
> /**
> * Get a pointer to the XalanDocument instance for the source
> * document
> *
> * @return A pointer to a XalanDocument instance.
> */
> virtual XalanDocument*
> getDocument() const = 0;
>
> Dave
>
>
>
> |---------+--------------------------->
> | | "Avula, Raj" |
> | | <RAvula@firstam.|
> | | com> |
> | | |
> | | 04/23/2002 12:04|
> | | AM |
> | | Please respond |
> | | to xalan-dev |
> | | |
> |---------+--------------------------->
>
> >
-------------------------------------------------------------------------
> --------------------------------------------------|
> |
> |
> | To: "'[EMAIL PROTECTED]'"
> <[EMAIL PROTECTED]>
> |
> | cc: (bcc: David N Bertoni/Cambridge/IBM)
> |
> | Subject: XalanParsedSource - XalanDocument
> |
>
> >
-------------------------------------------------------------------------
> --------------------------------------------------|
>
>
>
>
>
> Hi,
> I have to get some data from XalanParsedSource* before
> applying the
> stylesheet.
> Looks like methods like getChildNodes(), getPreviousSibling() etc.. are
> not
> implemented for XalanDocument.
> How can I get loop through XalanParsedSource* and get the data ?
>
> Thanks,
> Raj..
>
>
> "MMS <firstam.com>" made the following
> annotations on 04/23/02 00:06:30
>
--------------------------------------------------------------------------
> ----
>
> "THIS E-MAIL MESSAGE AND ANY FILES TRANSMITTED HEREWITH, ARE INTENDED
> SOLELY FOR THE USE OF THE INDIVIDUAL(S) ADDRESSED AND MAY CONTAIN
> CONFIDENTIAL, PROPRIETARY OR PRIVILEGED INFORMATION. IF YOU ARE NOT THE
> ADDRESSEE INDICATED IN THIS MESSAGE (OR RESPONSIBLE FOR DELIVERY OF THIS
> MESSAGE TO SUCH PERSON) YOU MAY NOT REVIEW, USE, DISCLOSE OR DISTRIBUTE
> THIS MESSAGE OR ANY FILES TRANSMITTED HEREWITH. IF YOU RECEIVE THIS
> MESSAGE IN ERROR, PLEASE CONTACT THE SENDER BY REPLY E-MAIL AND DELETE
> THIS
> MESSAGE AND ALL COPIES OF IT FROM YOUR SYSTEM."
>
>
==========================================================================
> ====
>
>
>
>
>
>
>
"MMS <firstam.com>" made the following
annotations on 04/23/02 09:26:40
------------------------------------------------------------------------------
"THIS E-MAIL MESSAGE AND ANY FILES TRANSMITTED HEREWITH, ARE INTENDED
SOLELY FOR THE USE OF THE INDIVIDUAL(S) ADDRESSED AND MAY CONTAIN
CONFIDENTIAL, PROPRIETARY OR PRIVILEGED INFORMATION. IF YOU ARE NOT THE
ADDRESSEE INDICATED IN THIS MESSAGE (OR RESPONSIBLE FOR DELIVERY OF THIS
MESSAGE TO SUCH PERSON) YOU MAY NOT REVIEW, USE, DISCLOSE OR DISTRIBUTE
THIS MESSAGE OR ANY FILES TRANSMITTED HEREWITH. IF YOU RECEIVE THIS
MESSAGE IN ERROR, PLEASE CONTACT THE SENDER BY REPLY E-MAIL AND DELETE THIS
MESSAGE AND ALL COPIES OF IT FROM YOUR SYSTEM."
==============================================================================