[izpack-users] Parsing xml file with NanoXML, getting MalformedURLException.

Miraodb miraodb at hotmail.com
Tue Jul 18 13:53:24 CEST 2006


Hi Jungu,

This means you have used a filename beginning c: in a context where a URL is
expected. (A filename is not a URL, despite the fact that much Microsoft
software accepts filenames whereever a URL is required).To solve this
problem try this:String dSQLFile
="file://c:\\IBOSS_NetNumen\\inet\\ums-svr\\deploy\\inet-isl-dscript-sql-fil
e.xml";try {parser = XMLParserFactory.createDefaultXMLParser();IXMLReader
reader =
StdXMLReader.fileReader(dSQLFile);parser.setReader(reader);XMLElement xml =
(XMLElement) parser.parse();} catch Hope it helps,Cheers,Fabrice----- 
Original Message ----- 
From: "jungu zhan" <zhanjungu at yahoo.com>
To: <izpack-users at lists.berlios.de>
Sent: Thursday, July 13, 2006 11:47 AM
Subject: [izpack-users] Parsing xml file with NanoXML,getting
MalformedURLException.


> Hi,
> I want to use NanoXML to parse some xml file in my
> installation.
>
> The code using Nano is as follows:
> /************************************************/
>
> String dSQLFile =
>
"C:\\IBOSS_NetNumen\\inet\\ums-svr\\deploy\\inet-isl-dscript-sql-file.xml";
> try {
> parser = XMLParserFactory.createDefaultXMLParser();
> IXMLReader reader = StdXMLReader.fileReader(dSQLFile);
> parser.setReader(reader);
> XMLElement xml = (XMLElement) parser.parse();
> } catch
> ............
>
> /************************************************/
>
> When it goes to
> "IXMLReader reader =
> StdXMLReader.fileReader(dSQLFile);", I get a
> "java.net.MalformedURLException: unknown protocol: c".
>
> if "dSQLFile" is defined as
> [String dSQLFile =
>
"D:\\IBOSS_NetNumen\\inet\\ums-svr\\deploy\\inet-isl-dscript-sql-file.xml";]
,
> then the Exception is "java.net.MalformedURLException:
> unknown protocol: d".
>
> It seems StdXMLReader.setSystemID(String systemID)
> didn't behave as expected.
>
> I have searched the mailinglist, but didn't find
> related content.
>
> Did I miss sth.?
>
> __________________________________________________
> ¸Ï¿ì×¢²áÑÅ»¢³¬´óÈÝÁ¿Ãâ·ÑÓÊÏä?
> http://cn.mail.yahoo.com
> _______________________________________________
> izpack-users mailing list
> izpack-users at bat.berlios.de
> http://bat.berlios.de/mailman/listinfo/izpack-users
>




More information about the izpack-users mailing list