B
Bjoern Wolter
Ich try to learn xml with java.
ich have created a simple example like this
public static void main(String[] args) {
SAXParserFactory factory = SAXParserFactory.newInstance();
SAXParser parser;
try {
factory.setValidating( false );
parser = factory.newSAXParser();
System.out.println(parser.isValidating());
parser.parse(args[0], new cHandler());
....
....
....
the example is only a part and it is working - exactly it works only if
no dtd is defined in the xml.
For my project i need a non validating parser. if i open my file in the
shown example i become an file not found exception, with the message
file foo.dtd not found.
in the xml file is the declaration for an external dtd
<!DOCTYPE xyz:my-content PUBLIC "//fooo...." "foo.dtd">
how can i parse the xml without valdating it to the dtd. the
line: factory.setValidating( false ); takes no effect....
I want to use the parser who is delivered with java not any third party
tool like xerces, there i can set options to ignore external dtds.
any helps for me ??
ich have created a simple example like this
public static void main(String[] args) {
SAXParserFactory factory = SAXParserFactory.newInstance();
SAXParser parser;
try {
factory.setValidating( false );
parser = factory.newSAXParser();
System.out.println(parser.isValidating());
parser.parse(args[0], new cHandler());
....
....
....
the example is only a part and it is working - exactly it works only if
no dtd is defined in the xml.
For my project i need a non validating parser. if i open my file in the
shown example i become an file not found exception, with the message
file foo.dtd not found.
in the xml file is the declaration for an external dtd
<!DOCTYPE xyz:my-content PUBLIC "//fooo...." "foo.dtd">
how can i parse the xml without valdating it to the dtd. the
line: factory.setValidating( false ); takes no effect....
I want to use the parser who is delivered with java not any third party
tool like xerces, there i can set options to ignore external dtds.
any helps for me ??