[gdome](no subject)



Can anyone _please_ tell me why the following piece of code causes a segv?

 TIA


#include "libgdome/gdome.h"

int main(void)
{
    GdomeDOMImplementation *di;
    GdomeDocument *doc;
    GdomeException exc;
    GdomeDOMString
*ga=gdome_str_mkref_dup("http://schemas.xmlsoap.org/soap/envelope/";);
    GdomeDOMString *gb=gdome_str_mkref_dup("SOAP-ENV:Envelope");
		
    // create a doc		
    di=gdome_di_mkref();
    doc=gdome_di_createDocument(di,
                                ga, 
                                gb,
	                        NULL,
		     	        &exc);

    printf("Created doc (%p) exception %d\n",doc,(int)exc);fflush(0);
    // get the root node
    GdomeElement *root=gdome_doc_documentElement(doc,&exc);

    printf("Got root (%p) exception %d\n",root,(int)exc);fflush(0);
    
    ga=gdome_str_mkref_dup("aaaa");	
    gb=gdome_str_mkref_dup("bbbb");	

    printf("Attempting to set %s to %s\n",ga->str,gb->str);fflush(0);
    
    gdome_el_setAttribute(root,ga,gb,&exc);  // CORE!!!
    
    printf("Set att exception %d\n",(int)exc);fflush(0);
    return(0);
}

-- 
Sent through GMX FreeMail - http://www.gmx.net





[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]