[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Re: parse using DOM

Subject: Re: parse using DOM
From: Herbert Hirscher <herbert.hirscher@xxxxxxxxxxxxxxxxx>
Date: Wed, 02 Feb 2000 08:56:18 +0100
herbert hirscher
Hi!

Paul Beer schrieb:

> does anyone know why this code fails :
>
> all I want to do is output the packet .....
>
> <%@ page import="java.io.*"%>
> <%@ page import="org.w3c.dom.*"%>
> <%@ page import="org.apache.xerces.parsers.DOMParser"%>
> <%@ page import="org.xml.sax.InputSource"%>
>
> <%
> String filename = "foo.xml";
> DOMParser parser = new DOMParser(filename);

In DOM-Api there is no constructor with a string-argument.
try this:
=> DOMParser parser = new DOMParser();

>
> Document fdoc = parser.parse();

=> parser.parse(new FileInputStream(filename));
to get the document:
=> Document fdoc = parser.getDocument();

>

>
> %>
>
> the error is :
>
> D:\Java\JavaWebServer2.0\tmpdir\default\pagecompile\jsp\_xml\_Dom__IBM.java:
> 91: Wrong number of arguments in constructor.
> DOMParser parser = new DOMParser(filename);
>
>  XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list

I have tested this with oracle-parser, i think it should also work in your case.

Herbert Hirscher.


 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list


Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.