[XML-SIG] (no subject)
Thomas B. Passin
tpassin at comcast.net
Wed Jan 7 09:29:40 EST 2004
Andrew Maclean wrote:
> I'm having a problem with xmlproc. Eventually I hope to use this
> product to validate xml files against a schema but in the meantime I'm
> trying to get to grips with basic functionality.
> My problem is with the command "parse_resource", which results in a
> SystemExit error. The test xml file I use can be opened as a file and I
> can use the "feed" command within a while loop to do some simple parsing
> of it (this tells me it finds the file and links my XMLProcessor object
> to the MyApp object) but the minute I try and use
> "parse_resource('C:/test.xml')" it shuts down my Zope instance.
That's because your path is not legal on Windows. You want to use
file = r'C:\Andy\XSL\test.xml'
The 'r', for "raw" lets you use single backslashes, otherwise they would
have to be doubled.
parse_resource is not finding the file because of the bad path, and so
you get an error (too bad the error is not more informative).
More information about the XML-SIG