Hi,

IBM XML toolkit supports xerces-c 2.6 as per david's previous maill
In continuation with my previous mail, I am following procedure in my
program.
                                                                          
 - Initialize platform                                                    
 utils                                                                    
 - parse and assign DOM                                                   
 document (fast)                                                          
 - creating TreeWalker                                                    
 object out of DOM                                                        
 document - Getting                                                       
 runtime exception in                                                     
 this part                                                                
 (Exception message                                                       
 is:The implementation                                                    
 does not support the                                                     
 requested type of                                                        
 object or operation)                                                     
                                                                          
 Can anybody please help                                                  
 me in providing the                                                      
 solution to this issue                                                   
 ?                                                                        
                                                                          
 Code snippet:                                                            
         XMLCh                                                            
 *tempStr=NULL;                                                           
         const char *xml                                                  
 = NULL ;                                                                 
         XercesDOMParser                                                  
 *cXMLParser;                                                             
         DOMTreeWalker*                                                   
 walker;                                                                  
         DOMDocument                                                      
 *doc;                                                                    
         DOMElement*                                                      
 root;                                                                    
         xml =                                                            
 "unbundle.xml";                                                          
                                                                          
         //                                                               
 Initialization                                                           
                                                                          
 XMLPlatformUtils::Initi                                                  
 alize();                                                                 
         cXMLParser =                                                     
 new XercesDOMParser();                                                   
                                                                          
 cXMLParser->setValidati                                                  
 onScheme(XercesDOMParse                                                  
 r::Val_Never);                                                           
                                                                          
 cXMLParser->setLoadExte                                                  
 rnalDTD(false);                                                          
                                                                          
         tempStr =                                                        
 XMLString::transcode(xm                                                  
 l);                                                                      
                                                                          
         //Parse                                                          
                                                                          
 cXMLParser->parse(tempS                                                  
 tr);                                                                     
         doc =                                                            
 cXMLParser->getDocument                                                  
 ();                                                                      
         root =                                                           
 doc->getDocumentElement                                                  
 ();                                                                      
                                                                          
         // Getting                                                       
 TreeWalker Object for                                                    
 traversing                                                               
         try {                                                            
         walker =                                                         
 doc->createTreeWalker(r                                                  
 oot,DOMNodeFilter::SHOW                                                  
 _ALL, NULL, true);                                                       
         }                                                                
                                                                          
                                                                          
         catch (const    -- Getting exception in                          
 DOMException& toCatch)  this line                                        
 {                                                                        
             char*                                                        
 message =                                                                
 XMLString::transcode(to                                                  
 Catch.msg);                                                              
             cout <<                                                      
 "Exception message is:                                                   
 \n"                                                                      
                  <<                                                      
 message << "\n";                                                         
                                                                          
 XMLString::release(&mes                                                  
 sage);                                                                   
         }                                                                
                                                                          
                                                                          




Makarand Mukund Kulkarni
Tata Consultancy Services Limited
Mailto: [EMAIL PROTECTED]
Website: http://www.tcs.com


                                                                           
             Makarand                                                      
             Kulkarni/PNE/TCS                                              
                                                                        To 
             04/05/2006 12:44          [email protected]             
             PM                                                         cc 
                                       [email protected]             
                                                                   Subject 
                                       Re: XML Toolkit on ZOS(Document     
                                       link: Makarand Kulkarni)            
                                                                           
                                                                           
                                                                           
                                                                           
                                                                           
                                                                           



Hi,

Can anyone please do give reply to my query posted yesterday asap ?

Waiting for reply

-Regards
Makarand Mukund Kulkarni
Tata Consultancy Services Limited
Mailto: [EMAIL PROTECTED]
Website: http://www.tcs.com


                                                                           
             Makarand                                                      
             Kulkarni/PNE/TCS                                              
                                                                        To 
             04/04/2006 03:01          [email protected]             
             PM                                                         cc 
                                       [email protected]             
                                                                   Subject 
                                       Re: XML Toolkit on ZOS(Document     
                                       link: Makarand Kulkarni)            
                                                                           
                                                                           
                                                                           
                                                                           
                                                                           
                                                                           



Hi,

With some help from User Guide and samples, I was able to build executable
of my cpp program and it runs.

In my cpp program , I am trying to use Method which is pure Virtual
Function
createTreeWalker( DOMNode* root,unsigned long whatToShow,DOMNodeFilter*
filter, bool entityReferenceExpansion)
                                                                            
                                                                            
                                                                            

I didnt find any implementation of this Method in classes derived from
this. I have gone through hpp files coming with XML Toolkit.

Can anybody please let me know how to use this method ?
                                                                            
                                                                            
 Basically if this is PURE Virtual function, somewhere in the derived       
 classes should be having implementation of this.                           
                                                                            
 I have tried following things in my cpp program but it gives me DOM        
 exception saying that "The implementation does not support the requested   
 type of object or operation"                                               
                                                                            
         xml= "LS";                                                         
         XMLPlatformUtils::Initialize();                                    
                                                                            
         tempStr = XMLString::transcode(xml);                               
                                                                            
         //DOMBuilder* pars = new DOMBuilderImpl();                         
         printf("before pars\n ");                                          
                                                                            
         DOMImplementation *impl =                                          
 DOMImplementationRegistry::getDOMImplementatio                             
 n(tempStr);                                                                
                                                                            
         DOMBuilder* pars;                                                  
         try {                                                              
         pars =                                                             
 ((DOMImplementationLS*)impl)->createDOMBuilder(DOMImplementationL          
 S::MODE_SYNCHRONOUS, 0);                                                   
         }                                                                  
         catch ( const XMLException& toCatch) {                             
             char* message = XMLString::transcode(toCatch.getMessage());    
             cout << "Exception message is: \n"                             
                  << message << "\n";                                       
             XMLString::release(&message);                                  
         }                                                                  
         catch (const DOMException& toCatch) {                              
             char* message = XMLString::transcode(toCatch.msg);             
             cout << "Exception message is: \n"                             
                  << message << "\n";                                       
             XMLString::release(&message);                                  
         }                                                                  
                                                                            
         DOMDocument* doc = 0;                                              
         printf("After pars\n ");                                           
                                                                            
         char *xmlFile="unbundle.xml";                                      
         DOMTreeWalker* walker;                                             
         //doc = pars->parseURI(tempStr) ;                                  
         doc = pars->parseURI(xmlFile) ;                                    
                                                                            
         printf("After parseURI\n");                                        
                                                                            
         // doc->normalize();                                               
         DOMElement* root = doc->getDocumentElement();                      
                                                                            
                                                                            
       try {                                                                
 walker = doc->createTreeWalker(root,DOMNodeFilter::SHOW_ALL, NULL, true);  
         }                                                                  
         catch (const DOMException& toCatch) {                              
             char* message = XMLString::transcode(toCatch.msg);             
             cout << "Exception message is: \n"                             
                  << message << "\n";                                       
             XMLString::release(&message);                                  
         } ---Giving me an exception                                        
                                                                            
                                                                            
                                                                            
                                                                            

-Regards

Makarand Mukund Kulkarni
Tata Consultancy Services Limited
Mailto: [EMAIL PROTECTED]
Website: http://www.tcs.com


                                                                           
             Vitaly Prapirny                                               
             <[EMAIL PROTECTED]>                                             
                                                                        To 
             03/31/2006 08:16          [email protected]             
             PM                                                         cc 
                                                                           
                                                                   Subject 
             Please respond to         Re: XML Toolkit on ZOS              
             [EMAIL PROTECTED]                                             
                  he.org                                                   
                                                                           
                                                                           
                                                                           
                                                                           




[EMAIL PROTECTED] wrote:
> As per your instructions, I was able to Build samples from Toolkit
> successfully after following instructions given.
>
> Similar way I was following steps for my program. But Program got
> crashed this time also.
I suppose that your program use xerces incorrectly. Look at samples
and change your program according to samples.

Good luck !
             Vitaly


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


ForwardSourceID:NT00015412

ForwardSourceID:NT000154AE

ForwardSourceID:NT000154F2


Notice: The information contained in this e-mail message and/or attachments to 
it may contain confidential or privileged information.   If you are not the 
intended recipient, any dissemination, use, review, distribution, printing or 
copying of the information contained in this e-mail message and/or attachments 
to it are strictly prohibited.   If you have received this communication in 
error, please notify us by reply e-mail or telephone and immediately and 
permanently delete the message and any attachments.  Thank you

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to