This week's book giveaway is in the Design forum.
We're giving away four copies of Design for the Mind and have Victor S. Yocco on-line!
See this thread for details.
Win a copy of Design for the Mind this week in the Design forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

New to Java. Can you help with whit this (XML) ?

Filoche Moe
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi all.

I'm new to Java (need to do something for my master) and I'm trying to learn how to manipulate XML.

Here's my code :

DOMParser parser;
Document doc;//Document element
Element root;//Root element

public int InitXML (String path)
parser = new DOMParser();

doc = parser.getDocument();
root = doc.getDocumentElement();

catch (Exception e)
System.out.println("XML error in file : " + path );
return 0;


return 1; //No error

When using :
I got an error telling me that there whitespace in my shema (I use plain XML, no shema)

Tx for any info that could help me.

  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic