Separate names with a comma.
Discussion in 'Mac Programming' started by handshakeit, Oct 4, 2005.
How to call XML pages in Java.
Is this a question? A statement? Just an advert?
If it is a question you'll have to be a lot more specific than that!
XML stands for eXtensible Markup Language.
There is no such thing as an "XML Page".
More specifics please.
What do you mean by "call XML pages"? XML is a standard way to represent structured data for storage in files or to exchange data. There is no active method or function embeded in XML so it is unclear what you mean by wanting to "call" an XML page.
At a guess, you mean that either you want to read in an XML file or you want to write out an XML file. Writing out an XML file is as simple as writing strings out to the file ensuring that you start with an xml header and produce the correct tags. Alternatively you could build up a DOM (Document Object Model) in memory and then write it out using one of the several XML DOM API implementations for Java.
To read an XML file most people use the SAX parser framework since this framework simplifies the task of parsing an XML file. Some distributions of Java include SAX in the default java libraries if not you can download xerces from the apache website which contains a SAX implementation.