Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Java to C# (and DOM/SAX equivalents)

Status
Not open for further replies.

sedj

Programmer
Aug 6, 2002
5,610
Hi,
Has anyone gone from Java to C#, and if so how easy is it ?

We are Java programmers, but have a client that uses MicroSoft, won't use Java, and needs some XML parsing ... are there equivalent C# libraries to Java's DOM and SAX parsers ?

Cheers
 
.NET has a DOM object, and you use it pretty much like you would any other DOM. See XmlDocument in the System.Xml namespace. There are probably only minor differences -- like you'd expect to see between any two implementations of a standard.

.NET does *not* have a SAX parser, though. You can use one of the classes that inherit from XmlReader (XmlTextReader, XmlValidatingReader, XmlNodeReader) to implement something that works like SAX. I haven't done this myself, but I've heard it's possible.... try a Google search.

Chip H.
 
cheers for the reply.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top