Web Development

General discussion


Quick parsing of XML

By Mark W. Kaelin Editor ·
The Nov. 11 Java TechMail, "Quick parsing of XML," discussed parsing XML as a formatted string. Parsing XML can be a daunting task; do you think this tip on viewing the XML as a formatted string will make your parsing easier?

This conversation is currently closed to new comments.

Thread display: Collapse - | Expand +

All Comments

Collapse -

Did someone really have to write this?

by Moquin In reply to Quick parsing of XML

This is useful, for someone that has never thought about doing it. But this sort of simplicity should already be part of java or part of one of the XML APIs that you download. I personally am shocked about how difficult and much of a pain it is todeal with XML with Java. What about people who want really quick programmatic access to XML? JDOM helps but still could be simplified more. .NET makes XML very easy by providing several ways of parsing XML documents depending on the level of control you want. An XmlTextReader is very simple to use..... why did Microsoft build all this functionality in to .NET, but Sun and other API builders not care to build it in/for Java? People can talk smack about Microsoft all they want, but Microsoftdoes do some really good things sometimes. And BTW - I use Java AND .NET .. so don't cry at me about being for one or the other. I'm just disappointed with Java's XML support.

Collapse -

I like java's approach...

by d_b In reply to Did someone really have t ...

I use .Net and Java also.
Sun has given a lot of thought to incorporating Java and XML (http://java.sun.com/xml/), but they leave some issues loosely coupled that make sense.

I think MS's XML integration is a little too tight and fast for my taste.

On the Java side, I use JDOM - how easy is this:
import org.jdom.*;
SAXBuilder builder = new SAXBuilder();
Document doc = builder.build("C:\file.xml");
Couldn't imagine anything easier.

Collapse -

I happen to agree

by solrak29 In reply to I like java's approach...

This article shows several things. The flexability in Java itself, and a programatic example on how to use Java to parse some things in xml. It doesn't even have to be xml, a beginner would find this article valuable on how to parse such things inJava....

It true that you may need something quick and a little toolbox to get to data quickly without having to compile a bunch of code.

Loosely coupled is the key, as MS tends to tie your hands behind your back unless you know the abscure things that are happening underneath.

Collapse -

Java lagging behind .Net?

by bayard In reply to I happen to agree

This is becoming quite a common occurence it seems.
Someone pointing out how Java is missing something
.Net has. Often the person points asks why Sun can't
manage it when MS can?

Now. I'm no Sun fan, they're too controlling etc. Java
isn't Sun now, but it still is kinda.

The reason MS have got a lot of things right that Java
currently hasn't is because MS had the advantage of
looking at Java feedback and bug reports and fixing
them beforehand.

Anyone in that situation should be able to make a better
language, and C# does probably edge Java at the

What will be interesting is the process over time. MS
and Sun are not in new modes of work, Sun still are the
same company who smashed around in the early 80
unix wars. MS are still the company who released an
XSL processor in their browser based on a beta spec
that wasn't released fully for another year(?), and
changed heavily.

What will the .Net community be like? No one really
knows. Will it just be lots of freeware apps and
shareware, or will a real open-source community
happen. Will MS drive .Net solely, or will other
companies help to steer it. This is the real question for
.Net vs Java.

Related Discussions

Related Forums