473,406 Members | 2,404 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,406 software developers and data experts.

Java's DOMParser and .NET's XMLDocument

Hi there,

I'm a beginner on XML. At this moment I am working on a conversion to C# of
a (pretty large) program originally coded in Java. It's not much what the
JLCA does when converting XML classes from Java to C# for several reasons,
and basically leaves the programmer with the decision on how they will be
converted (Reference:
http://msdn.microsoft.com/asp.net/us...ig/phase1/xml/)

At this point I am about to convert manually a class that uses DOMParser.
As per the article referenced above: "translating your Java XML applications
into .NET will be fairly straightforward". However, I find it difficult
(more than somewhat) to convert these lines, as there are methods (which the
article says many of them are properties in .NET) that even don't exist in
..NET. Or at least I can't find them, or their counterparts in .NET. Methods
in Java's DOMParser class, such as setFeature() and getFeature(), and many
others.

My question is if anyone know which is the counterpart of Java's DOMParser
class in .NET?

I don't pretend that anyone would convert my program, but if it is helpful
for anyone to see the code for analizying and provide me with helpful hints,
I'll be happy to post it here.

Many thanks in advance.

--
Carlitos
Nov 19 '05 #1
1 2446
Carlitos wrote:
Hi there,

I'm a beginner on XML. At this moment I am working on a conversion
to C# of a (pretty large) program originally coded in Java. It's not
much what the JLCA does when converting XML classes from Java to C#
for several reasons, and basically leaves the programmer with the
decision on how they will be converted (Reference:
http://msdn.microsoft.com/asp.net/us...ig/phase1/xml/)

At this point I am about to convert manually a class that uses
DOMParser. As per the article referenced above: "translating your
Java XML applications into .NET will be fairly straightforward".
However, I find it difficult (more than somewhat) to convert these
lines, as there are methods (which the article says many of them are
properties in .NET) that even don't exist in .NET. Or at least I
can't find them, or their counterparts in .NET. Methods in Java's
DOMParser class, such as setFeature() and getFeature(), and many
others.

My question is if anyone know which is the counterpart of Java's
DOMParser class in .NET?


It's completely hidden by (or integrated with) XmlDocument. Also note
that DOMParser is *not* a standard Java API (i.e. not part of JAXP). I
guess many features which this parser implements can be used by setting
XmlDocument properties or by uisng other classes such as
XmlValidatingReader.

Cheers,
--
http://www.joergjooss.de
mailto:ne********@joergjooss.de
Nov 19 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: Michael | last post by:
Hello I am trying to write a Java-Program which converts a XML-file in a HTML. It should take the Transformation-file from the XML-file itself. Below find a possible XML-file: <?xml...
1
by: John | last post by:
I have been trying with no result, to force Xerces parsers to ignore whitespace in my XML file. I have tried several of the NG suggested setFeature() methods in DOMParser to no avail. I have now...
0
by: Pud | last post by:
Hiya, I was wondering if anyone could help me, I am trying to create an example program that uses the xerces XML parser in Java. Unfortunately I have come across a problem when using this...
0
by: Brian | last post by:
I am having alot of trouble getting a XML document validated with a schema. I got a sample document and schema off of w3schools.com, which passed an online xml validator:...
0
by: abwabe | last post by:
im using WSAD 5.0 when i try to execute this : public static void main(String args) { myHash = new Hashtable(); try { String strHtmlFile = "C:\\test.html";
2
by: Dale Gerdemann | last post by:
I'm having trouble with Unicode encoding in DOM. As a simple example, I read in a UTF-8 encoded xml file such as: <?xml version="1.0" encoding="UTF-8" standalone="no"?> <aText>letter 'a' with...
2
by: DKM | last post by:
I recently found out that the below code works in FireFox 1.0.4. str = "<b>Hello world!!!</b>"; var doc = new DOMParser().parseFromString(str, "text/xml");...
18
by: jacksu | last post by:
I have a simple program to run xpath with xerces 1_2_7 XPathFactory factory = XPathFactory.newInstance(); XPath xPath = factory.newXPath(); XPathExpression xp = xPath.compile(strXpr);...
5
by: vunet | last post by:
I used DOMParser to convert a response string to XML object: DOMParser.parseFromString() In browsers where DOMParser is not supported (Safari 1-2 for my case) I cannot use DOMParser. What...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.