SAXParser equivalent in C#

后端 未结 2 1024
鱼传尺愫
鱼传尺愫 2020-12-20 19:22

I have below java code , I need to convert these in C#, Kindly help me ..

public class Configuration {

  private ConfigContentHandler confHandler;

  public         


        
相关标签:
2条回答
  • 2020-12-20 19:38

    C# native XML parser XmlReader doesn't support SAX and is forward-only. You may take a look at this article presenting some specific points about it. You could simulate a SAX parser using XmlReader. If it doesn't suit your needs you could also use XDocument which is a different API for working with XML files in .NET. So to conclude there's no push XML parser built into .NET framework so you might need to use a third party library or COM Interop to MSXML to achieve this if you really need an event driven parser.

    0 讨论(0)
  • 2020-12-20 19:42

    I used SAX for .NET in two projects successfully in the past. http://saxdotnet.sourceforge.net/

    0 讨论(0)
提交回复
热议问题