locked
Creating XmlReader in C++

    Question

  •  

    Hi,

    I want to read an xml file from C++ but I don't what which header to include here. Is there any XmlReader Class for C++ and if there is how do I include it in the project ?

     

    Thanks

    Thursday, February 02, 2012 2:07 AM

Answers

  • Hi,

    As far as I know, there is no XmlReader class in Windows Runtime reference,
    But, I think you can use XmlDocument class and some classes in Windows.Data.Xml.Dom namespace to instead some functions in XmlReader class.

    Best regards,
    Jesse


    Jesse Jiang [MSFT]
    MSDN Community Support | Feedback to us

    • Edited by Jesse Jiang Monday, February 06, 2012 9:23 AM
    • Marked as answer by Bob_Bao Wednesday, March 07, 2012 7:59 AM
    Monday, February 06, 2012 9:23 AM
  • @ Jesse Jiang

    You are correct that the XmlReader class is not available in the WinRT reference ... However, some COM based APIs are available:

    http://msdn.microsoft.com/en-us/library/windows/apps/br205753.aspx

     

    @Sam Here is a sample of how to use the API: http://msdn.microsoft.com/en-us/library/windows/apps/ms753116.aspx

     

    - Paul

    • Marked as answer by Bob_Bao Wednesday, March 07, 2012 7:59 AM
    Monday, February 06, 2012 12:14 PM

All replies

  • Hi,

    You have several options - both included in the Windows SDK and 3rd party libs. I would suggest to start here: http://msdn.microsoft.com/en-us/library/windows/apps/ms752838.aspx

    There you will find the XmlLite which has IXmlReader (I guess, exactly what you are looking for): http://msdn.microsoft.com/en-us/library/windows/apps/ms752743.aspx

     

    Hope this helps :)

    • Proposed as answer by Paul_X Thursday, February 02, 2012 10:51 AM
    Thursday, February 02, 2012 10:51 AM
  • Hi,

    As far as I know, there is no XmlReader class in Windows Runtime reference,
    But, I think you can use XmlDocument class and some classes in Windows.Data.Xml.Dom namespace to instead some functions in XmlReader class.

    Best regards,
    Jesse


    Jesse Jiang [MSFT]
    MSDN Community Support | Feedback to us

    • Edited by Jesse Jiang Monday, February 06, 2012 9:23 AM
    • Marked as answer by Bob_Bao Wednesday, March 07, 2012 7:59 AM
    Monday, February 06, 2012 9:23 AM
  • @ Jesse Jiang

    You are correct that the XmlReader class is not available in the WinRT reference ... However, some COM based APIs are available:

    http://msdn.microsoft.com/en-us/library/windows/apps/br205753.aspx

     

    @Sam Here is a sample of how to use the API: http://msdn.microsoft.com/en-us/library/windows/apps/ms753116.aspx

     

    - Paul

    • Marked as answer by Bob_Bao Wednesday, March 07, 2012 7:59 AM
    Monday, February 06, 2012 12:14 PM