dbertoni    2002/10/02 22:53:52

  Modified:    c/src/XercesParserLiaison XercesDocumentWrapper.cpp
  Log:
  Implemented getElementById().
  
  Revision  Changes    Path
  1.2       +14 -5     
xml-xalan/c/src/XercesParserLiaison/XercesDocumentWrapper.cpp
  
  Index: XercesDocumentWrapper.cpp
  ===================================================================
  RCS file: 
/home/cvs/xml-xalan/c/src/XercesParserLiaison/XercesDocumentWrapper.cpp,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- XercesDocumentWrapper.cpp 3 Oct 2002 01:32:42 -0000       1.1
  +++ XercesDocumentWrapper.cpp 3 Oct 2002 05:53:52 -0000       1.2
  @@ -1293,13 +1293,22 @@
   
   
   XalanElement*
  -XercesDocumentWrapper::getElementById(const XalanDOMString&          /* 
elementId */) const
  +XercesDocumentWrapper::getElementById(const XalanDOMString&          
elementId) const
   {
  -     // Not supported...
  -     throw 
XercesDOMWrapperException(XercesDOMWrapperException::NOT_SUPPORTED_ERR);
  +     const DOMNode* const    theXercesNode = 
m_xercesDocument->getElementById(c_wstr(elementId));
   
  -     // Dummy return value...
  -     return 0;
  +     if (theXercesNode == 0)
  +     {
  +             return 0;
  +     }
  +     else
  +     {
  +#if defined(XALAN_OLD_STYLE_CASTS)
  +             return (XalanElement*)mapNode(theXercesNode);
  +#else
  +             return static_cast<XalanElement*>(mapNode(theXercesNode));
  +#endif
  +     }
   }
   
   
  
  
  

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

Reply via email to