XML transcode - CString to XMLCh

Discussion in 'XML' started by eagle_speaks@yahoo.co.uk, Aug 16, 2005.

  1. Guest

    I am posting this for reference so that some may find it usefull

    ---------------------------------------
    XML transcode - XMLCh to char

    void CADCXMLEventHandler::startElement(
    const XMLCh* const uri,
    const XMLCh* const localname_parameter,
    const XMLCh* const qname,
    const Attributes& attrs)
    {

    std::auto_ptr<char> localname
    (XMLString::transcode(localname_parameter))

    ----------------------------------------
    XML transcode - CString to XMLCh

    CString csFilePath(_T("Test Path"));
    char szDest[MAX_PATH+1];
    WideCharToMultiByte( CP_ACP, 0, (LPCTSTR)csFilePath, -1,
    szPathdest, MAX_PATH, NULL, NULL );

    std::auto_ptr<XMLCh> xchFilePath (XMLString::transcode(szDest));

    m_source =new LocalFileInputSource(xchFilePath .get());


    ----------------------------------------
     
    , Aug 16, 2005
    #1
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Prajakta

    Leaks in XMLString::transcode

    Prajakta, Apr 22, 2004, in forum: XML
    Replies:
    0
    Views:
    2,393
    Prajakta
    Apr 22, 2004
  2. C_Vieri
    Replies:
    0
    Views:
    842
    C_Vieri
    Jan 7, 2005
  3. Robert M. Gary

    Transcode Japanese??

    Robert M. Gary, Apr 19, 2005, in forum: XML
    Replies:
    2
    Views:
    530
    Andreas Prilop
    Apr 19, 2005
  4. Replies:
    0
    Views:
    2,384
  5. harijay
    Replies:
    0
    Views:
    315
    harijay
    Jan 25, 2011
Loading...

Share This Page