diff options
author | joe <joe@61a7d7f5-40b7-0310-9c16-bb0ea8cb1845> | 2005-04-04 17:30:50 +0000 |
---|---|---|
committer | joe <joe@61a7d7f5-40b7-0310-9c16-bb0ea8cb1845> | 2005-04-04 17:30:50 +0000 |
commit | 48212d53e078d28b7e52b9d542b40691c9326c3f (patch) | |
tree | c1f6e903caa88e9f7e6a908c7c18197bdd8efda2 /src/ne_xmlreq.h | |
parent | ccb3c141c3ecc888845354473add3fd5e4e64002 (diff) | |
download | neon-48212d53e078d28b7e52b9d542b40691c9326c3f.tar.gz |
* src/ne_xmlreq.h (ne_xml_parse_response, ne_xml_dispatch_request):
Specify that session error string is set for XML parse errors.
* src/ne_xmlreq.c (parse_error): New function.
(ne_xml_parse_response): On successful end-of-response, tell
the the XML parser the end of the document is reached. Use
parse_error() for error handling.
git-svn-id: http://svn.webdav.org/repos/projects/neon/trunk@541 61a7d7f5-40b7-0310-9c16-bb0ea8cb1845
Diffstat (limited to 'src/ne_xmlreq.h')
-rw-r--r-- | src/ne_xmlreq.h | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/src/ne_xmlreq.h b/src/ne_xmlreq.h index 1276655..0cb7d7c 100644 --- a/src/ne_xmlreq.h +++ b/src/ne_xmlreq.h @@ -1,6 +1,6 @@ /* XML/HTTP response handling - Copyright (C) 2004, Joe Orton <joe@manyfish.co.uk> + Copyright (C) 2004-2005, Joe Orton <joe@manyfish.co.uk> This library is free software; you can redistribute it and/or modify it under the terms of the GNU Library General Public @@ -30,12 +30,16 @@ BEGIN_NEON_DECLS /* Read the HTTP response body using calls to ne_read_response_block * (so must be enclosed by ne_begin_request/ne_end_request calls), and * parse it as an XML document, using the given parser. Returns NE_* - * error codes. */ + * error codes. If an XML parse error occurs, the session error + * string is set to the XML parser's error string, and NE_ERROR is + * returned. */ int ne_xml_parse_response(ne_request *req, ne_xml_parser *parser); /* Dispatch the HTTP request, parsing the response body as an XML * document using * the given parser, if the response status class is - * 2xx. Returns NE_* error codes. */ + * 2xx. Returns NE_* error codes. If an XML parse error occurs, the + * session error string is set to the XML parser's error string, and + * NE_ERROR is returned. */ int ne_xml_dispatch_request(ne_request *req, ne_xml_parser *parser); END_NEON_DECLS |