Jump to content
  • Advertisement
Sign in to follow this  
rsegal

Setting the lexical handler for an MSXML parser

This topic is 5401 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

So I've got a block of code like so
if ( SUCCEEDED(m_pParser.CreateInstance(__uuidof(SAXXMLReader40))) ) 
    {
      m_pSAXLexicalHandler = new SAXLexicalHandlerMSXML();
      HRESULT hr = m_pParser->putProperty(L"http://xml.org/sax/properties/lexical-handler", (_variant_t)m_pSAXLexicalHandler);
}

The call to CreateInstance works however the call to putProperty returns E_FAIL which from what I can tell in MSDN means that the parser is in the process of parsing. But I just created it and I haven't told it to process anything yet. Things just aren't making any sense? Anyone have any thoughts.

Share this post


Link to post
Share on other sites
Advertisement
Success, I found the solution to my problem searching through google groups. You need to implement QueryInterface for your custom lexical handler that you override from ISAXLexicalHandler.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!