Package libxml2dom :: Package macrolib :: Module macrolib
[show private | hide private]
[frames | no frames]

Module libxml2dom.macrolib.macrolib

DOM macros for virtual libxml2mod node methods and properties.

Copyright (C) 2003, 2004, 2005, 2006, 2007 Paul Boddie <paul@boddie.org.uk>

This library 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 2.1 of the License, or (at your option) any later version.

This library 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 library; if not, write to the Free Software
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA

Function Summary
  check_document(node, tmp)
  createDocument(namespaceURI, localName, doctype)
  from_unicode(s)
  get_ns(ns)
  Node_appendChild(node, tmp)
  Node_attributes(node)
  Node_childNodes(node)
  Node_createAttribute(node, name)
  Node_createAttributeNS(node, ns, name)
  Node_createCDATASection(node, value)
  Node_createComment(node, value)
  Node_createElement(node, name)
  Node_createElementNS(node, ns, name)
  Node_createTextNode(node, value)
  Node_data(node)
  Node_doctype(node)
  Node_getAttribute(node, name)
  Node_getAttributeNode(node, name)
  Node_getAttributeNodeNS(node, ns, localName)
  Node_getAttributeNS(node, ns, localName)
  Node_hasAttribute(node, name)
  Node_hasAttributeNS(node, ns, localName)
  Node_importNode(node, other, deep)
  Node_importNode_DOM(node, other, deep)
  Node_insertBefore(node, tmp, oldNode)
  Node_localName(node)
  Node_namespaceURI(node)
  Node_nextSibling(node)
  Node_nodeName(node)
  Node_nodeType(node)
  Node_nodeValue(node)
  Node_ownerDocument(node)
  Node_parentNode(node)
  Node_prefix(node)
  Node_previousSibling(node)
  Node_removeAttribute(node, name)
  Node_removeAttributeNS(node, ns, localName)
  Node_removeChild(node, child)
  Node_replaceChild(node, tmp, oldNode)
  Node_setAttribute(node, name, value)
  Node_setAttributeNode(node, attr)
  Node_setAttributeNodeNS(node, attr)
  Node_setAttributeNS(node, ns, name, value)
  Node_setNodeValue(node, value)
  Node_tagName(node)
  Node_textContent(node)
  Node_xpath(node, expr, variables, namespaces)
  parse(stream_or_string, html, htmlencoding)
  parseFile(s, html, htmlencoding)
  parseString(s, html, htmlencoding)
  parseURI(uri, html, htmlencoding)
  to_unicode(s)
  toFile(node, f, encoding, prettyprint)
  toStream(node, stream, encoding, prettyprint)
  toString(node, encoding, prettyprint)
  _check_namespace(current, ns, prefix)
Check the 'current' namespace definition node against 'ns' and 'prefix'.
  _find_namespace(node, ns, prefix)
Find the namespace definition node in the given 'node' for the given 'ns' and 'prefix'.
  _find_namespace_for_prefix(node, prefix)
Find the namespace definition node in the given 'node' for 'prefix'.
  _get_invented_prefix(node, ns)
  _get_prefix_and_localName(name)
  _make_namespace(node, ns, prefix, set_default)
Make a new namespace definition node within the given 'node' for 'ns', 'prefix', setting the default namespace on 'node' when 'prefix' is None and 'set_default' is set to a true value (unlike the default value for that parameter).

Variable Summary
int HTML_PARSE_NOERROR = 32                                                                    
int HTML_PARSE_NONET = 2048                                                                  
int HTML_PARSE_NOWARNING = 64                                                                    
int XML_PARSE_NOERROR = 32                                                                    
int XML_PARSE_NONET = 2048                                                                  
int XML_PARSE_NOWARNING = 64                                                                    
dict _nodeTypes = {'comment': 8, 'pi': 7, 'notation': 12, 'do...
dict _reverseNodeTypes = {1: 'element', 2: 'attribute', 3: 't...

Function Details

_check_namespace(current, ns, prefix)

Check the 'current' namespace definition node against 'ns' and 'prefix'.

_find_namespace(node, ns, prefix)

Find the namespace definition node in the given 'node' for the given 'ns'
and 'prefix'.

_find_namespace_for_prefix(node, prefix)

Find the namespace definition node in the given 'node' for 'prefix'.

_make_namespace(node, ns, prefix, set_default=0)

Make a new namespace definition node within the given 'node' for 'ns',
'prefix', setting the default namespace on 'node' when 'prefix' is None and
'set_default' is set to a true value (unlike the default value for that
parameter).

Variable Details

HTML_PARSE_NOERROR

Type:
int
Value:
32                                                                    

HTML_PARSE_NONET

Type:
int
Value:
2048                                                                  

HTML_PARSE_NOWARNING

Type:
int
Value:
64                                                                    

XML_PARSE_NOERROR

Type:
int
Value:
32                                                                    

XML_PARSE_NONET

Type:
int
Value:
2048                                                                  

XML_PARSE_NOWARNING

Type:
int
Value:
64                                                                    

_nodeTypes

Type:
dict
Value:
{'attribute': 2,
 'cdata': 4,
 'comment': 8,
 'doctype': 10,
 'document_html': 9,
 'document_xml': 9,
 'dtd': 10,
 'element': 1,
...                                                                    

_reverseNodeTypes

Type:
dict
Value:
{1: 'element',
 2: 'attribute',
 3: 'text',
 4: 'cdata',
 5: 'entity_ref',
 6: 'entity',
 7: 'pi',
 8: 'comment',
...                                                                    

Generated by Epydoc 2.1 on Fri Mar 23 00:15:48 2007 http://epydoc.sf.net