You are viewing a plain text version of this content. The canonical link for it is here.
Posted to c-users@xerces.apache.org by Ben Meijering <be...@boxwares.nl> on 2006/08/15 15:36:29 UTC

Accessing Xerces Perl object's from C++.

Hi,
 
I have compiled the perl interpeter into my executable. I want to invoke
a perl method from C++, this method returns a Xerces perl object. Now
what I want to know is if there is any way I could obtain the C++ object
pointer from this Xerces object. Using wxPerl for example, this can be
done using the "wxPli_sv_2_object" method. 

I hope someone can help me. Thanks in advance.

Ben Meijering

Re: Accessing Xerces Perl object's from C++.

Posted by Jason Stewart <ja...@gmail.com>.
Hi Ben,

Not sure if this is best discussed on the p-dev list - most of the
Perl-related stuff goes on there. I'll cross-post for now...

On 8/15/06, Ben Meijering <be...@boxwares.nl> wrote:

> I have compiled the perl interpeter into my executable. I want to invoke
> a perl method from C++, this method returns a Xerces perl object. Now
> what I want to know is if there is any way I could obtain the C++ object
> pointer from this Xerces object. Using wxPerl for example, this can be
> done using the "wxPli_sv_2_object" method.

The short answer is 'no'.

To give you a better answer, I'll need to understand what you are
doing, and why - so please bear with me.

Why do you need to embed perl in your C++ program? Is using
XML::Xerces directly from Perl not adequate?

If you already have a C++ program, why not using Xerces-C directly and
not use Perl at all?

My recommendation is to use either an all-Perl solution or an all-C++
solution and not mix the two - it will hurt your brain (it hurts mine
;-)

Cheers, jas.

Re: Accessing Xerces Perl object's from C++.

Posted by Jason Stewart <ja...@gmail.com>.
Hi Ben,

Not sure if this is best discussed on the p-dev list - most of the
Perl-related stuff goes on there. I'll cross-post for now...

On 8/15/06, Ben Meijering <be...@boxwares.nl> wrote:

> I have compiled the perl interpeter into my executable. I want to invoke
> a perl method from C++, this method returns a Xerces perl object. Now
> what I want to know is if there is any way I could obtain the C++ object
> pointer from this Xerces object. Using wxPerl for example, this can be
> done using the "wxPli_sv_2_object" method.

The short answer is 'no'.

To give you a better answer, I'll need to understand what you are
doing, and why - so please bear with me.

Why do you need to embed perl in your C++ program? Is using
XML::Xerces directly from Perl not adequate?

If you already have a C++ program, why not using Xerces-C directly and
not use Perl at all?

My recommendation is to use either an all-Perl solution or an all-C++
solution and not mix the two - it will hurt your brain (it hurts mine
;-)

Cheers, jas.

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