Re: Expat-discuss Digest, Vol 77, Issue 10

"sdavid" <[email protected]>
Newsgroups gmane.text.xml.expat.general
Message-ID <[email protected]>
For Norman's problem:
	Expat is a pure C xml parser and it build well with all known pop C
compiler. There's a lot of xml libs write by c++, so you don't have to wrap
it to c++ class, of course there's problem use a member of a object in
static method. 

-----Original Message-----
From: [email protected]
[mailto:[email protected]] On Behalf Of
[email protected]
Sent: Monday, August 28, 2006 6:00 PM
To: [email protected]
Subject: Expat-discuss Digest, Vol 77, Issue 10

Send Expat-discuss mailing list submissions to
	[email protected]

To subscribe or unsubscribe via the World Wide Web, visit
	http://mail.libexpat.org/mailman/listinfo/expat-discuss
or, via email, send a message with subject or body 'help' to
	[email protected]

You can reach the person managing the list at
	[email protected]

When replying, please edit your Subject line so it is more specific
than "Re: Contents of Expat-discuss digest..."


Today's Topics:

   1. New questions arised ;) (Norman Rosner)


----------------------------------------------------------------------

Message: 1
Date: Sun, 27 Aug 2006 19:42:14 +0200
From: Norman Rosner <[email protected]>
Subject: [Expat-discuss] New questions arised ;)
To: [email protected]
Message-ID: <[email protected]>
Content-Type: text/plain; charset=US-ASCII; delsp=yes; format=flowed

Hi Guys it's me again the newbie in expat :)

Now that i have figure out that i can't access member data elemts  
from static function i hope that you guys can help me with answering  
the question:

Is there any way how i can access them?

Heres the code:


struct Wrapper {

public:

     bool LHS_is_on, RHS_is_on, rule_is_on;

   static void  XMLCALL startElement(void *userData, const XML_Char  
*name, const XML_Char **atts)
   {

     if(strcmp(name, "LHS") == 0) {
       LHS_is_on = true;
       RHS_is_on, rule_is_on = false;
       cout << "left" <<"\n";
     }
     //    cout << name << "\n";

   }
...
};

g++ says:

grammar.h:22: error: invalid use of member 'Wrapper::LHS_is_on' in  
static member function
grammar.h:34: error: from this location

So please help me ;)

So i don't have a lot of knowledge about c++ it would be great if  
your answers (hopefully there are any :)) would be as simple as  
possible so i can understand it :)

Thanks a lot

norman


------------------------------

_______________________________________________
Expat-discuss mailing list
[email protected]
http://mail.libexpat.org/mailman/listinfo/expat-discuss


End of Expat-discuss Digest, Vol 77, Issue 10
*********************************************
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.