Hi , when i want parse xml string in my application
will coredump in getElementByTagName

xmlString sample :
In this xml string exist chinese word
<?xml version="1.0" encoding="UTF-16" standalone="no"?><Transaction><Car
ObjType="Obj_ID" Value="car1"/><memo ObjType="claimMemo">@DIF||編號
</memo></Transaction>

sample code :

try
{
      DOMNodeList * nodelist  =
root->getElementsByTagName(XMLString::transcode("Car")) ;   --->> this will
coredump
in my application can't get any exception !!!
}
 catch( const DOMException& exception)
 {
         char * message = XMLString::transcode(exception.getMessage());
          cout << message << endl;
          XMLString::release(&message);
          return 1 ;
        }
        catch( const XMLException& exception)
        {
            char * message = XMLString::transcode(exception.getMessage());
               cout << message << endl;
            XMLString::release(&message);
            return 1 ;
        }
        catch( const SAXException& exception)
        {
            char * message = XMLString::transcode(exception.getMessage());
               cout << message << endl;
            XMLString::release(&message);
            return 1 ;
        }
        catch (...)
        {
            cout << " catch ... " << endl ;
            return 1 ;
        }





 --------------------------------------------------------------------------- 
                                                         TSMC PROPERTY       
 This email communication (and any attachments) is proprietary information   
 for the sole use of its                                                     
 intended recipient. Any unauthorized review, use or distribution by anyone  
 other than the intended                                                     
 recipient is strictly prohibited.  If you are not the intended recipient,   
 please notify the sender by                                                 
 replying to this email, and then delete this email and any copies of it     
 immediately. Thank you.                                                     
 --------------------------------------------------------------------------- 

Reply via email to