Home | Trees | Index | Help |
---|
Package RDFMessage :: Module Parsers |
|
Conversion of messages to and from RDF representations. Copyright (C) 2006 Paul Boddie <paul@boddie.org.uk> This program is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this program. If not, see <http://www.gnu.org/licenses/>. -------- To parse mailboxes, use the parse_mailbox function provided in this module: resource = RDFMessage.Parsers.parse_mailbox(f, store) In the above call, f should be a stream providing message data, and store should be some kind of object which can understand the actions of the parsing process; in the RDFMessage.Store module, some classes are provided for this activity. To interpret the contents of DOM documents, use the parse_document and parse_document_fragment functions provided in this module.
Classes | |
---|---|
DOMParser |
A parser which reads messages from DOM documents. |
MailboxParser |
A mailbox parser. |
Exceptions | |
---|---|
DuplicateResourceError |
Function Summary | |
---|---|
add_message(store,
attributes,
node_type,
uriref)
| |
check_existing(store,
uriref)
| |
find_uid(message)
| |
Parse the resource data found in the given DOM document 'doc', inserting the information in the given 'store'. | |
Parse the resource data found in the given DOM document 'doc' under the 'root' element, inserting the information in the given 'store'. | |
Parse the message data found through the use of the file object 'f', and put the resource information in the given 'store'. |
Function Details |
---|
parse_document(doc, store, uriref=None)Parse the resource data found in the given DOM document 'doc', inserting the information in the given 'store'. The 'uriref' must be specified to define the identity of the root node. |
parse_document_fragment(doc, root, store, uriref=None)Parse the resource data found in the given DOM document 'doc' under the 'root' element, inserting the information in the given 'store'. The 'uriref' must be specified to define the identity of the root node. |
parse_mailbox(f, store, uriref)Parse the message data found through the use of the file object 'f', and put the resource information in the given 'store'. The 'uriref' parameter must be used to set a unique reference to the resource by defining a specific URI reference. As a result of parsing the resource, the root node of the imported resource is returned. |
Home | Trees | Index | Help |
---|
Generated by Epydoc 2.1 on Tue Sep 18 23:32:37 2007 | http://epydoc.sf.net |