You are viewing a plain text version of this content. The canonical link for it is here.
Posted to c-dev@xerces.apache.org by Bob Kersten <qb...@oce.nl> on 2000/09/20 10:56:18 UTC

MalformedURLException with Borland

Hello,

    I've got the XercesLib.dll working under Borland C++ Builder (all
the example projects work perfectly, so the .dll is working), but when
I try to parse an .xml document in another project of my own, using
identical code, I get a MalformedURLException. The strange thing is,
that when I'm starting the created .exe file from the Microsoft
Explorer, it works just as it's supposed to. So the exception only
occurs when I'm starting the program in the IDE.

    Here's a copy of the code:

    DOM_Document _doc;
    DOMParser *_parser = new DOMParser;

    _parser->setDoValidation(false);

    try
    {
        _parser->parse("c:\\layout5.xml");
        _doc = _parser->getDocument();
        DOM_Element _el = _doc.getDocumentElement ();
        ShowMessage(_el.getTagName().transcode ());

        // This piece of code does not work when in the IDE, but works
        // when I'm starting the .exe from the Microsoft Explorer.
    }

    catch (const XMLException& e)
    {
        ShowMessage(DOMString(e.getMessage()).transcode ());
        ShowMessage("jaaa... dikke lul");
        errorsOccured = true;
    }

Byebye,
  Bop.

Re: MalformedURLException with Borland

Posted by Dean Roddey <dr...@charmedquark.com>.
URL support is not built in in previuos versions. You have to have XMLPlatformUtils::fpNetAccessor (or something like that) pointing at some derivative of the net accessor virtual base class, which provides the parser with socket access services. In the new code base there are some implementations.

--------------------------
Dean Roddey
The CIDLib C++ Frameworks
Charmed Quark Software
droddey@charmedquark.com
http://www.charmedquark.com

"It takes two buttocks to make friction"
    - African Proverb


  ----- Original Message ----- 
  From: Bob Kersten 
  To: xerces-c-dev@xml.apache.org 
  Sent: Wednesday, September 20, 2000 1:56 AM
  Subject: MalformedURLException with Borland


  Hello,
   
      I've got the XercesLib.dll working under Borland C++ Builder (all the example projects work perfectly, so the .dll is working), but when I try to parse an .xml document in another project of my own, using identical code, I get a MalformedURLException. The strange thing is, that when I'm starting the created .exe file from the Microsoft Explorer, it works just as it's supposed to. So the exception only occurs when I'm starting the program in the IDE.
   
      Here's a copy of the code:
   
      DOM_Document _doc;
      DOMParser *_parser = new DOMParser;
   
      _parser->setDoValidation(false);

      try
      {
          _parser->parse("c:\\layout5.xml");
          _doc = _parser->getDocument();
          DOM_Element _el = _doc.getDocumentElement ();
          ShowMessage(_el.getTagName().transcode ());

          // This piece of code does not work when in the IDE, but works
          // when I'm starting the .exe from the Microsoft Explorer.
      }

      catch (const XMLException& e)
      {
          ShowMessage(DOMString(e.getMessage()).transcode ());
          ShowMessage("jaaa... dikke lul");
          errorsOccured = true;
      }

  Byebye,
    Bop.