XML-GDOME
view release on metacpan or search on metacpan
#!/usr/bin/perl
# copyright 2001, T.J. Mather
use strict;
use XML::GDOME;
use Tie::IxHash;
use Data::Dumper;
my $gdome_dir = $ARGV[0];
unless ($gdome_dir) {
print STDERR "Usage: $0 gdome_dir\n";
exit;
}
#TODO
my %class_description = ();
my %abbrv_lookup;
my %return_var = (Document => 'doc',
ProcessingInstruction => 'pi',
DocumentFragment => 'docFrag',
Comment => 'comment',
DOMImplementation => 'DOMImpl',
CDATASection => 'cdata',
Element => 'elem',
Node => 'node',
Event => 'event',
EntityReference => 'entRef',
DOMString => 'str',
Boolean => 'bool',
Text => 'text',
DocumentType => 'docType',
NodeList => 'nodeList',
Attr => 'attr',
NamedNodeMap => 'nnm',
gulong => 'int',
'unsigned short' => 'int',
double => 'num',
XPathSetIterator => 'xpsetiter',
XPathNSResolver => 'xpnsresolv',
XPathResult => 'xpresult',
XPathEvaluator => 'xpeval',
NodeFilter => 'nodeFilter',
NodeIterator => 'nodeIter',
EventTarget => 'evtTarget',
);
#print Dumper($docs->{Node}->{firstChild});
open XS, ">GDOME.xs";
open PM, ">GDOME.pm";
print XS <<END;
/* generated automatically from generate */
#ifdef __cplusplus
extern "C" {
#endif
#include "EXTERN.h"
#include "perl.h"
#include "XSUB.h"
#include <libxml/xmlerror.h>
#include "gdome.h"
#include "gdome-xpath.h"
/*#include "gdome-traversal.h"
#include "gdome-events.h"*/
#include "dom.h"
typedef struct _Gdome_xml_Node Gdome_xml_Node;
struct _Gdome_xml_Node {
GdomeNode super;
const GdomeNodeVtab *vtab;
int refcnt;
xmlNode *n;
GdomeAccessType accessType;
void *ll;
xmlNs *ns;
};
xmlNs * gdome_xmlGetNsDeclByAttr (xmlAttr *a);
#ifdef __cplusplus
( run in 1.122 second using v1.01-cache-2.11-cpan-39bf76dae61 )