Emmanuel Guiton wrote:
Hi all,

I try setting
parser->setStandardUriConformant(true);
onmy DOMParser and I got an exception with the following result :

An exception occurred! Type:MalformedURLException, Message:No protocol
prefix present

It seems that it occurs on the first line of my file since the exception
is even thrown when using parseFirst().

Though I can't find anything wron g with my file, nor it does anything
when trying to change the first element tag.

What sort of URL are you providing to the parser in your InputSource? If you're using a LocalFileInputSource, that may be the problem. Instead, use a regular InputSource, and provide a fully qualified URL:

file:///home/foo/foo.xml

Or, perhaps all you need to do is the the system ID of the LocalFileInputSource, such that it has a correct corresponding URL for the file name.

Dave

Reply via email to