jasons 2002/11/12 22:47:24
Modified: perl Xerces.C Xerces.pm
Log:
new
Revision Changes Path
1.17 +105 -53 xml-xerces/perl/Xerces.C
Index: Xerces.C
===================================================================
RCS file: /home/cvs/xml-xerces/perl/Xerces.C,v
retrieving revision 1.16
retrieving revision 1.17
diff -u -r1.16 -r1.17
--- Xerces.C 19 Oct 2002 23:07:49 -0000 1.16
+++ Xerces.C 13 Nov 2002 06:47:21 -0000 1.17
@@ -712,7 +712,7 @@
SV *error = ERRSV;
SvSetSV(error,tmpsv);
(void)SvUPGRADE(error, SVt_PV);
- Perl_die(Nullch);
+ croak(Nullch);
}
void
@@ -729,7 +729,7 @@
SV *error = ERRSV;
SvSetSV(error,tmpsv);
(void)SvUPGRADE(error, SVt_PV);
- Perl_die(Nullch);
+ croak(Nullch);
}
void
@@ -746,7 +746,7 @@
SV *error = ERRSV;
SvSetSV(error,tmpsv);
(void)SvUPGRADE(error, SVt_PV);
- Perl_die(Nullch);
+ croak(Nullch);
}
void
@@ -763,7 +763,7 @@
SV *error = ERRSV;
SvSetSV(error,tmpsv);
(void)SvUPGRADE(error, SVt_PV);
- Perl_die(Nullch);
+ croak(Nullch);
}
SV*
@@ -889,6 +889,12 @@
return NULL;
}
+DOMNode *DOMDocument_toDOMNode(DOMDocument *self){
+ return (DOMNode*) self;
+ }
+DOMDocumentTraversal *DOMDocument_toDOMDocumentTraversal(DOMDocument *self){
+ return (DOMDocumentTraversal*) self;
+ }
#ifdef PERL_OBJECT
#define MAGIC_CLASS _wrap_XML::Xerces_var::
class _wrap_XML::Xerces_var : public CPerlObj {
@@ -33983,54 +33989,6 @@
croak(_swigerr);
}
-XS(_wrap_DOMDocument_getFirstChild) {
- char _swigmsg[SWIG_MAX_ERRMSG] = "";
- const char *_swigerr = _swigmsg;
- {
- DOMDocument *arg1 = (DOMDocument *) 0 ;
- DOMNode *result;
- int argvi = 0;
- dXSARGS;
-
- if ((items < 1) || (items > 1)) {
- SWIG_croak("Usage: DOMDocument_getFirstChild(self);");
- }
- {
- if (SWIG_ConvertPtr(ST(0), (void **) &arg1, SWIGTYPE_p_DOMDocument,0) <
0) {
- SWIG_croak("Type error in argument 1 of DOMDocument_getFirstChild.
Expected _p_DOMDocument");
- }
- }
- {
- try {
- result = (DOMNode *)((DOMDocument const *)arg1)->getFirstChild();
-
- }
- catch (const XMLException& e)
- {
- makeXMLException(e);
- }
- catch (const DOMException& e)
- {
- makeDOMException(e);
- }
- catch (...)
- {
- XMLPlatformUtils::Terminate();
- croak("%s", "Handling Unknown exception");
- }
- }
- {
- swig_type_info *ty = SWIG_TypeDynamicCast(SWIGTYPE_p_DOMNode, (void **)
&result);
- ST(argvi) = sv_newmortal();
- SWIG_MakePtr(ST(argvi++), (void *) result, ty,0);
- }
- XSRETURN(argvi);
- fail:
- (void) _swigerr;
- }
- croak(_swigerr);
-}
-
XS(_wrap_DOMNode_getLastChild) {
char _swigmsg[SWIG_MAX_ERRMSG] = "";
const char *_swigerr = _swigmsg;
@@ -39307,6 +39265,99 @@
XSRETURN(0);
}
+XS(_wrap_DOMDocument_toDOMNode) {
+ char _swigmsg[SWIG_MAX_ERRMSG] = "";
+ const char *_swigerr = _swigmsg;
+ {
+ DOMDocument *arg1 = (DOMDocument *) 0 ;
+ DOMNode *result;
+ int argvi = 0;
+ dXSARGS;
+
+ if ((items < 1) || (items > 1)) {
+ SWIG_croak("Usage: DOMDocument_toDOMNode(self);");
+ }
+ {
+ if (SWIG_ConvertPtr(ST(0), (void **) &arg1, SWIGTYPE_p_DOMDocument,0) <
0) {
+ SWIG_croak("Type error in argument 1 of DOMDocument_toDOMNode.
Expected _p_DOMDocument");
+ }
+ }
+ {
+ try {
+ result = (DOMNode *)DOMDocument_toDOMNode(arg1);
+
+ }
+ catch (const XMLException& e)
+ {
+ makeXMLException(e);
+ }
+ catch (const DOMException& e)
+ {
+ makeDOMException(e);
+ }
+ catch (...)
+ {
+ XMLPlatformUtils::Terminate();
+ croak("%s", "Handling Unknown exception");
+ }
+ }
+ {
+ swig_type_info *ty = SWIG_TypeDynamicCast(SWIGTYPE_p_DOMNode, (void **)
&result);
+ ST(argvi) = sv_newmortal();
+ SWIG_MakePtr(ST(argvi++), (void *) result, ty,0);
+ }
+ XSRETURN(argvi);
+ fail:
+ (void) _swigerr;
+ }
+ croak(_swigerr);
+}
+
+XS(_wrap_DOMDocument_toDOMDocumentTraversal) {
+ char _swigmsg[SWIG_MAX_ERRMSG] = "";
+ const char *_swigerr = _swigmsg;
+ {
+ DOMDocument *arg1 = (DOMDocument *) 0 ;
+ DOMDocumentTraversal *result;
+ int argvi = 0;
+ dXSARGS;
+
+ if ((items < 1) || (items > 1)) {
+ SWIG_croak("Usage: DOMDocument_toDOMDocumentTraversal(self);");
+ }
+ {
+ if (SWIG_ConvertPtr(ST(0), (void **) &arg1, SWIGTYPE_p_DOMDocument,0) <
0) {
+ SWIG_croak("Type error in argument 1 of
DOMDocument_toDOMDocumentTraversal. Expected _p_DOMDocument");
+ }
+ }
+ {
+ try {
+ result = (DOMDocumentTraversal
*)DOMDocument_toDOMDocumentTraversal(arg1);
+
+ }
+ catch (const XMLException& e)
+ {
+ makeXMLException(e);
+ }
+ catch (const DOMException& e)
+ {
+ makeDOMException(e);
+ }
+ catch (...)
+ {
+ XMLPlatformUtils::Terminate();
+ croak("%s", "Handling Unknown exception");
+ }
+ }
+ ST(argvi) = sv_newmortal();
+ SWIG_MakePtr(ST(argvi++), (void *) result,
SWIGTYPE_p_DOMDocumentTraversal,0);
+ XSRETURN(argvi);
+ fail:
+ (void) _swigerr;
+ }
+ croak(_swigerr);
+}
+
XS(_wrap_delete_DOMDocumentFragment) {
char _swigmsg[SWIG_MAX_ERRMSG] = "";
const char *_swigerr = _swigmsg;
@@ -50195,7 +50246,6 @@
{"XML::Xercesc::DOMNode_getParentNode", _wrap_DOMNode_getParentNode},
{"XML::Xercesc::DOMNode_getChildNodes", _wrap_DOMNode_getChildNodes},
{"XML::Xercesc::DOMNode_getFirstChild", _wrap_DOMNode_getFirstChild},
-{"XML::Xercesc::DOMDocument_getFirstChild", _wrap_DOMDocument_getFirstChild},
{"XML::Xercesc::DOMNode_getLastChild", _wrap_DOMNode_getLastChild},
{"XML::Xercesc::DOMNode_getPreviousSibling", _wrap_DOMNode_getPreviousSibling},
{"XML::Xercesc::DOMNode_getNextSibling", _wrap_DOMNode_getNextSibling},
@@ -50292,6 +50342,8 @@
{"XML::Xercesc::DOMDocument_createDocumentType",
_wrap_DOMDocument_createDocumentType},
{"XML::Xercesc::DOMDocument_createNotation", _wrap_DOMDocument_createNotation},
{"XML::Xercesc::DOMDocument_createElementNS", _wrap_DOMDocument_createElementNS},
+{"XML::Xercesc::DOMDocument_toDOMNode", _wrap_DOMDocument_toDOMNode},
+{"XML::Xercesc::DOMDocument_toDOMDocumentTraversal",
_wrap_DOMDocument_toDOMDocumentTraversal},
{"XML::Xercesc::delete_DOMDocumentFragment", _wrap_delete_DOMDocumentFragment},
{"XML::Xercesc::delete_DOMDocumentType", _wrap_delete_DOMDocumentType},
{"XML::Xercesc::DOMDocumentType_getName", _wrap_DOMDocumentType_getName},
1.18 +381 -51 xml-xerces/perl/Xerces.pm
Index: Xerces.pm
===================================================================
RCS file: /home/cvs/xml-xerces/perl/Xerces.pm,v
retrieving revision 1.17
retrieving revision 1.18
diff -u -r1.17 -r1.18
--- Xerces.pm 19 Oct 2002 23:07:51 -0000 1.17
+++ Xerces.pm 13 Nov 2002 06:47:23 -0000 1.18
@@ -8,13 +8,13 @@
use strict;
-INIT {
- # NOTICE: We are automatically calling XMLPlatformUtils::Initialize()
- # when the module is loaded. Don't bother calling it on your own.
- #
- #
- # XML::Xerces::XMLPlatformUtils::Initialize();
-}
+# INIT {
+# # NOTICE: We are automatically calling XMLPlatformUtils::Initialize()
+# # when the module is loaded. Don't bother calling it on your own.
+# #
+# #
+# # XML::Xerces::XMLPlatformUtils::Initialize();
+# }
END {
# NOTICE: We are automatically calling XMLPlatformUtils::Terminate()
@@ -43,6 +43,26 @@
}
}
+package XML::Xerces::DOMException;
+use vars qw(@CODES);
+@CODES = qw(__NONEXISTENT__
+ INDEX_SIZE_ERR
+ DOMSTRING_SIZE_ERR
+ HIERARCHY_REQUEST_ERR
+ WRONG_DOCUMENT_ERR
+ INVALID_CHARACTER_ERR
+ NO_DATA_ALLOWED_ERR
+ NO_MODIFICATION_ALLOWED_ERR
+ NOT_FOUND_ERR
+ NOT_SUPPORTED_ERR
+ INUSE_ATTRIBUTE_ERR
+ INVALID_STATE_ERR
+ SYNTAX_ERR
+ INVALID_MODIFICATION_ERR
+ NAMESPACE_ERR
+ INVALID_ACCESS_ERR
+ );
+
############# Class : XML::Xerces::PerlContentHandler ##############
package XML::Xerces::PerlContentHandler;
use vars qw(@ISA);
@@ -3190,6 +3210,9 @@
$XML::Xerces::DOMNodeIterator::OWNER{$self}->{__NODE_FILTER} = $callback;
}
my @args = ($self,$root,$what,$callback,$expand);
+ if ($args[0]->isa('XML::Xerces::DOMDocument')) {
+ $args[0] = $args[0]->toDOMDocumentTraversal();
+ }
my $result = XML::Xercesc::DOMDocumentTraversal_createNodeIterator(@args);
return undef if (!defined($result));
@@ -3207,6 +3230,9 @@
$XML::Xerces::DOMTreeWalker::OWNER{$self}->{__NODE_FILTER} = $callback;
}
my @args = ($self,$root,$what,$callback,$expand);
+ if ($args[0]->isa('XML::Xerces::DOMDocument')) {
+ $args[0] = $args[0]->toDOMDocumentTraversal();
+ }
my $result = XML::Xercesc::DOMDocumentTraversal_createTreeWalker(@args);
return undef if (!defined($result));
@@ -3608,13 +3634,46 @@
*TREE_POSITION_EQUIVALENT = *XML::Xercesc::DOMNode_TREE_POSITION_EQUIVALENT;
*TREE_POSITION_SAME_NODE = *XML::Xercesc::DOMNode_TREE_POSITION_SAME_NODE;
*TREE_POSITION_DISCONNECTED = *XML::Xercesc::DOMNode_TREE_POSITION_DISCONNECTED;
-*getNodeName = *XML::Xercesc::DOMNode_getNodeName;
-*getNodeValue = *XML::Xercesc::DOMNode_getNodeValue;
-*getNodeType = *XML::Xercesc::DOMNode_getNodeType;
+sub getNodeName {
+ my @args = @_;
+ if ($args[0]->isa('XML::Xerces::DOMDocument')) {
+ $args[0] = $args[0]->toDOMNode();
+ }
+ my $result = XML::Xercesc::DOMNode_getNodeName(@args);
+ return $result unless UNIVERSAL::isa($result,'XML::Xerces');
+ my %resulthash;
+ tie %resulthash, ref($result), $result;
+ return bless \%resulthash, ref($result);
+}
+sub getNodeValue {
+ my @args = @_;
+ if ($args[0]->isa('XML::Xerces::DOMDocument')) {
+ $args[0] = $args[0]->toDOMNode();
+ }
+ my $result = XML::Xercesc::DOMNode_getNodeValue(@args);
+ return $result unless UNIVERSAL::isa($result,'XML::Xerces');
+ my %resulthash;
+ tie %resulthash, ref($result), $result;
+ return bless \%resulthash, ref($result);
+}
+sub getNodeType {
+ my @args = @_;
+ if ($args[0]->isa('XML::Xerces::DOMDocument')) {
+ $args[0] = $args[0]->toDOMNode();
+ }
+ my $result = XML::Xercesc::DOMNode_getNodeType(@args);
+ return $result unless UNIVERSAL::isa($result,'XML::Xerces');
+ my %resulthash;
+ tie %resulthash, ref($result), $result;
+ return bless \%resulthash, ref($result);
+}
sub getParentNode {
my @args = @_;
+ if ($args[0]->isa('XML::Xerces::DOMDocument')) {
+ $args[0] = $args[0]->toDOMNode();
+ }
my $result = XML::Xercesc::DOMNode_getParentNode(@args);
- return $result unless UNIVERSAL::isa($result,'XML::Xerces');
+ return undef if (!defined($result));
my %resulthash;
tie %resulthash, ref($result), $result;
return bless \%resulthash, ref($result);
@@ -3635,32 +3694,44 @@
}
sub getFirstChild {
my @args = @_;
+ if ($args[0]->isa('XML::Xerces::DOMDocument')) {
+ $args[0] = $args[0]->toDOMNode();
+ }
my $result = XML::Xercesc::DOMNode_getFirstChild(@args);
- return $result unless UNIVERSAL::isa($result,'XML::Xerces');
+ return undef if (!defined($result));
my %resulthash;
tie %resulthash, ref($result), $result;
return bless \%resulthash, ref($result);
}
sub getLastChild {
my @args = @_;
+ if ($args[0]->isa('XML::Xerces::DOMDocument')) {
+ $args[0] = $args[0]->toDOMNode();
+ }
my $result = XML::Xercesc::DOMNode_getLastChild(@args);
- return $result unless UNIVERSAL::isa($result,'XML::Xerces');
+ return undef if (!defined($result));
my %resulthash;
tie %resulthash, ref($result), $result;
return bless \%resulthash, ref($result);
}
sub getPreviousSibling {
my @args = @_;
+ if ($args[0]->isa('XML::Xerces::DOMDocument')) {
+ $args[0] = $args[0]->toDOMNode();
+ }
my $result = XML::Xercesc::DOMNode_getPreviousSibling(@args);
- return $result unless UNIVERSAL::isa($result,'XML::Xerces');
+ return undef if (!defined($result));
my %resulthash;
tie %resulthash, ref($result), $result;
return bless \%resulthash, ref($result);
}
sub getNextSibling {
my @args = @_;
+ if ($args[0]->isa('XML::Xerces::DOMDocument')) {
+ $args[0] = $args[0]->toDOMNode();
+ }
my $result = XML::Xercesc::DOMNode_getNextSibling(@args);
- return $result unless UNIVERSAL::isa($result,'XML::Xerces');
+ return undef if (!defined($result));
my %resulthash;
tie %resulthash, ref($result), $result;
return bless \%resulthash, ref($result);
@@ -3681,81 +3752,312 @@
}
sub getOwnerDocument {
my @args = @_;
+ if ($args[0]->isa('XML::Xerces::DOMDocument')) {
+ $args[0] = $args[0]->toDOMNode();
+ }
my $result = XML::Xercesc::DOMNode_getOwnerDocument(@args);
- return $result unless UNIVERSAL::isa($result,'XML::Xerces');
+ return undef if (!defined($result));
my %resulthash;
tie %resulthash, ref($result), $result;
return bless \%resulthash, ref($result);
}
sub cloneNode {
my @args = @_;
+ if ($args[0]->isa('XML::Xerces::DOMDocument')) {
+ $args[0] = $args[0]->toDOMNode();
+ }
my $result = XML::Xercesc::DOMNode_cloneNode(@args);
- return $result unless UNIVERSAL::isa($result,'XML::Xerces');
+ return undef if (!defined($result));
my %resulthash;
tie %resulthash, ref($result), $result;
return bless \%resulthash, ref($result);
}
sub insertBefore {
my @args = @_;
+ if ($args[0]->isa('XML::Xerces::DOMDocument')) {
+ $args[0] = $args[0]->toDOMNode();
+ }
my $result = XML::Xercesc::DOMNode_insertBefore(@args);
- return $result unless UNIVERSAL::isa($result,'XML::Xerces');
+ return undef if (!defined($result));
my %resulthash;
tie %resulthash, ref($result), $result;
return bless \%resulthash, ref($result);
}
sub replaceChild {
my @args = @_;
+ if ($args[0]->isa('XML::Xerces::DOMDocument')) {
+ $args[0] = $args[0]->toDOMNode();
+ }
my $result = XML::Xercesc::DOMNode_replaceChild(@args);
- return $result unless UNIVERSAL::isa($result,'XML::Xerces');
+ return undef if (!defined($result));
my %resulthash;
tie %resulthash, ref($result), $result;
return bless \%resulthash, ref($result);
}
sub removeChild {
my @args = @_;
+ if ($args[0]->isa('XML::Xerces::DOMDocument')) {
+ $args[0] = $args[0]->toDOMNode();
+ }
my $result = XML::Xercesc::DOMNode_removeChild(@args);
- return $result unless UNIVERSAL::isa($result,'XML::Xerces');
+ return undef if (!defined($result));
my %resulthash;
tie %resulthash, ref($result), $result;
return bless \%resulthash, ref($result);
}
sub appendChild {
my @args = @_;
+ if ($args[0]->isa('XML::Xerces::DOMDocument')) {
+ $args[0] = $args[0]->toDOMNode();
+ }
my $result = XML::Xercesc::DOMNode_appendChild(@args);
+ return undef if (!defined($result));
+ my %resulthash;
+ tie %resulthash, ref($result), $result;
+ return bless \%resulthash, ref($result);
+}
+sub hasChildNodes {
+ my @args = @_;
+ if ($args[0]->isa('XML::Xerces::DOMDocument')) {
+ $args[0] = $args[0]->toDOMNode();
+ }
+ my $result = XML::Xercesc::DOMNode_hasChildNodes(@args);
+ return $result unless UNIVERSAL::isa($result,'XML::Xerces');
+ my %resulthash;
+ tie %resulthash, ref($result), $result;
+ return bless \%resulthash, ref($result);
+}
+sub setNodeValue {
+ my @args = @_;
+ if ($args[0]->isa('XML::Xerces::DOMDocument')) {
+ $args[0] = $args[0]->toDOMNode();
+ }
+ my $result = XML::Xercesc::DOMNode_setNodeValue(@args);
+ return $result unless UNIVERSAL::isa($result,'XML::Xerces');
+ my %resulthash;
+ tie %resulthash, ref($result), $result;
+ return bless \%resulthash, ref($result);
+}
+sub normalize {
+ my @args = @_;
+ if ($args[0]->isa('XML::Xerces::DOMDocument')) {
+ $args[0] = $args[0]->toDOMNode();
+ }
+ my $result = XML::Xercesc::DOMNode_normalize(@args);
+ return $result unless UNIVERSAL::isa($result,'XML::Xerces');
+ my %resulthash;
+ tie %resulthash, ref($result), $result;
+ return bless \%resulthash, ref($result);
+}
+sub isSupported {
+ my @args = @_;
+ if ($args[0]->isa('XML::Xerces::DOMDocument')) {
+ $args[0] = $args[0]->toDOMNode();
+ }
+ my $result = XML::Xercesc::DOMNode_isSupported(@args);
+ return $result unless UNIVERSAL::isa($result,'XML::Xerces');
+ my %resulthash;
+ tie %resulthash, ref($result), $result;
+ return bless \%resulthash, ref($result);
+}
+sub getNamespaceURI {
+ my @args = @_;
+ if ($args[0]->isa('XML::Xerces::DOMDocument')) {
+ $args[0] = $args[0]->toDOMNode();
+ }
+ my $result = XML::Xercesc::DOMNode_getNamespaceURI(@args);
+ return $result unless UNIVERSAL::isa($result,'XML::Xerces');
+ my %resulthash;
+ tie %resulthash, ref($result), $result;
+ return bless \%resulthash, ref($result);
+}
+sub getPrefix {
+ my @args = @_;
+ if ($args[0]->isa('XML::Xerces::DOMDocument')) {
+ $args[0] = $args[0]->toDOMNode();
+ }
+ my $result = XML::Xercesc::DOMNode_getPrefix(@args);
+ return $result unless UNIVERSAL::isa($result,'XML::Xerces');
+ my %resulthash;
+ tie %resulthash, ref($result), $result;
+ return bless \%resulthash, ref($result);
+}
+sub getLocalName {
+ my @args = @_;
+ if ($args[0]->isa('XML::Xerces::DOMDocument')) {
+ $args[0] = $args[0]->toDOMNode();
+ }
+ my $result = XML::Xercesc::DOMNode_getLocalName(@args);
+ return $result unless UNIVERSAL::isa($result,'XML::Xerces');
+ my %resulthash;
+ tie %resulthash, ref($result), $result;
+ return bless \%resulthash, ref($result);
+}
+sub setPrefix {
+ my @args = @_;
+ if ($args[0]->isa('XML::Xerces::DOMDocument')) {
+ $args[0] = $args[0]->toDOMNode();
+ }
+ my $result = XML::Xercesc::DOMNode_setPrefix(@args);
+ return $result unless UNIVERSAL::isa($result,'XML::Xerces');
+ my %resulthash;
+ tie %resulthash, ref($result), $result;
+ return bless \%resulthash, ref($result);
+}
+sub hasAttributes {
+ my @args = @_;
+ if ($args[0]->isa('XML::Xerces::DOMDocument')) {
+ $args[0] = $args[0]->toDOMNode();
+ }
+ my $result = XML::Xercesc::DOMNode_hasAttributes(@args);
+ return $result unless UNIVERSAL::isa($result,'XML::Xerces');
+ my %resulthash;
+ tie %resulthash, ref($result), $result;
+ return bless \%resulthash, ref($result);
+}
+sub isSameNode {
+ my @args = @_;
+ if ($args[0]->isa('XML::Xerces::DOMDocument')) {
+ $args[0] = $args[0]->toDOMNode();
+ }
+ my $result = XML::Xercesc::DOMNode_isSameNode(@args);
+ return $result unless UNIVERSAL::isa($result,'XML::Xerces');
+ my %resulthash;
+ tie %resulthash, ref($result), $result;
+ return bless \%resulthash, ref($result);
+}
+sub isEqualNode {
+ my @args = @_;
+ if ($args[0]->isa('XML::Xerces::DOMDocument')) {
+ $args[0] = $args[0]->toDOMNode();
+ }
+ my $result = XML::Xercesc::DOMNode_isEqualNode(@args);
+ return $result unless UNIVERSAL::isa($result,'XML::Xerces');
+ my %resulthash;
+ tie %resulthash, ref($result), $result;
+ return bless \%resulthash, ref($result);
+}
+sub setUserData {
+ my @args = @_;
+ if ($args[0]->isa('XML::Xerces::DOMDocument')) {
+ $args[0] = $args[0]->toDOMNode();
+ }
+ my $result = XML::Xercesc::DOMNode_setUserData(@args);
+ return $result unless UNIVERSAL::isa($result,'XML::Xerces');
+ my %resulthash;
+ tie %resulthash, ref($result), $result;
+ return bless \%resulthash, ref($result);
+}
+sub getUserData {
+ my @args = @_;
+ if ($args[0]->isa('XML::Xerces::DOMDocument')) {
+ $args[0] = $args[0]->toDOMNode();
+ }
+ my $result = XML::Xercesc::DOMNode_getUserData(@args);
+ return $result unless UNIVERSAL::isa($result,'XML::Xerces');
+ my %resulthash;
+ tie %resulthash, ref($result), $result;
+ return bless \%resulthash, ref($result);
+}
+sub getBaseURI {
+ my @args = @_;
+ if ($args[0]->isa('XML::Xerces::DOMDocument')) {
+ $args[0] = $args[0]->toDOMNode();
+ }
+ my $result = XML::Xercesc::DOMNode_getBaseURI(@args);
+ return $result unless UNIVERSAL::isa($result,'XML::Xerces');
+ my %resulthash;
+ tie %resulthash, ref($result), $result;
+ return bless \%resulthash, ref($result);
+}
+sub compareTreePosition {
+ my @args = @_;
+ if ($args[0]->isa('XML::Xerces::DOMDocument')) {
+ $args[0] = $args[0]->toDOMNode();
+ }
+ my $result = XML::Xercesc::DOMNode_compareTreePosition(@args);
+ return $result unless UNIVERSAL::isa($result,'XML::Xerces');
+ my %resulthash;
+ tie %resulthash, ref($result), $result;
+ return bless \%resulthash, ref($result);
+}
+sub getTextContent {
+ my @args = @_;
+ if ($args[0]->isa('XML::Xerces::DOMDocument')) {
+ $args[0] = $args[0]->toDOMNode();
+ }
+ my $result = XML::Xercesc::DOMNode_getTextContent(@args);
+ return $result unless UNIVERSAL::isa($result,'XML::Xerces');
+ my %resulthash;
+ tie %resulthash, ref($result), $result;
+ return bless \%resulthash, ref($result);
+}
+sub setTextContent {
+ my @args = @_;
+ if ($args[0]->isa('XML::Xerces::DOMDocument')) {
+ $args[0] = $args[0]->toDOMNode();
+ }
+ my $result = XML::Xercesc::DOMNode_setTextContent(@args);
+ return $result unless UNIVERSAL::isa($result,'XML::Xerces');
+ my %resulthash;
+ tie %resulthash, ref($result), $result;
+ return bless \%resulthash, ref($result);
+}
+sub lookupNamespacePrefix {
+ my @args = @_;
+ if ($args[0]->isa('XML::Xerces::DOMDocument')) {
+ $args[0] = $args[0]->toDOMNode();
+ }
+ my $result = XML::Xercesc::DOMNode_lookupNamespacePrefix(@args);
+ return $result unless UNIVERSAL::isa($result,'XML::Xerces');
+ my %resulthash;
+ tie %resulthash, ref($result), $result;
+ return bless \%resulthash, ref($result);
+}
+sub isDefaultNamespace {
+ my @args = @_;
+ if ($args[0]->isa('XML::Xerces::DOMDocument')) {
+ $args[0] = $args[0]->toDOMNode();
+ }
+ my $result = XML::Xercesc::DOMNode_isDefaultNamespace(@args);
+ return $result unless UNIVERSAL::isa($result,'XML::Xerces');
+ my %resulthash;
+ tie %resulthash, ref($result), $result;
+ return bless \%resulthash, ref($result);
+}
+sub lookupNamespaceURI {
+ my @args = @_;
+ if ($args[0]->isa('XML::Xerces::DOMDocument')) {
+ $args[0] = $args[0]->toDOMNode();
+ }
+ my $result = XML::Xercesc::DOMNode_lookupNamespaceURI(@args);
return $result unless UNIVERSAL::isa($result,'XML::Xerces');
my %resulthash;
tie %resulthash, ref($result), $result;
return bless \%resulthash, ref($result);
}
-*hasChildNodes = *XML::Xercesc::DOMNode_hasChildNodes;
-*setNodeValue = *XML::Xercesc::DOMNode_setNodeValue;
-*normalize = *XML::Xercesc::DOMNode_normalize;
-*isSupported = *XML::Xercesc::DOMNode_isSupported;
-*getNamespaceURI = *XML::Xercesc::DOMNode_getNamespaceURI;
-*getPrefix = *XML::Xercesc::DOMNode_getPrefix;
-*getLocalName = *XML::Xercesc::DOMNode_getLocalName;
-*setPrefix = *XML::Xercesc::DOMNode_setPrefix;
-*hasAttributes = *XML::Xercesc::DOMNode_hasAttributes;
-*isSameNode = *XML::Xercesc::DOMNode_isSameNode;
-*isEqualNode = *XML::Xercesc::DOMNode_isEqualNode;
-*setUserData = *XML::Xercesc::DOMNode_setUserData;
-*getUserData = *XML::Xercesc::DOMNode_getUserData;
-*getBaseURI = *XML::Xercesc::DOMNode_getBaseURI;
-*compareTreePosition = *XML::Xercesc::DOMNode_compareTreePosition;
-*getTextContent = *XML::Xercesc::DOMNode_getTextContent;
-*setTextContent = *XML::Xercesc::DOMNode_setTextContent;
-*lookupNamespacePrefix = *XML::Xercesc::DOMNode_lookupNamespacePrefix;
-*isDefaultNamespace = *XML::Xercesc::DOMNode_isDefaultNamespace;
-*lookupNamespaceURI = *XML::Xercesc::DOMNode_lookupNamespaceURI;
sub getInterface {
my @args = @_;
+ if ($args[0]->isa('XML::Xerces::DOMDocument')) {
+ $args[0] = $args[0]->toDOMNode();
+ }
my $result = XML::Xercesc::DOMNode_getInterface(@args);
+ return undef if (!defined($result));
+ my %resulthash;
+ tie %resulthash, ref($result), $result;
+ return bless \%resulthash, ref($result);
+}
+sub release {
+ my @args = @_;
+ if ($args[0]->isa('XML::Xerces::DOMDocument')) {
+ $args[0] = $args[0]->toDOMNode();
+ }
+ my $result = XML::Xercesc::DOMNode_release(@args);
return $result unless UNIVERSAL::isa($result,'XML::Xerces');
my %resulthash;
tie %resulthash, ref($result), $result;
return bless \%resulthash, ref($result);
}
-*release = *XML::Xercesc::DOMNode_release;
sub DISOWN {
my $self = shift;
my $ptr = tied(%$self);
@@ -4016,14 +4318,6 @@
tie %resulthash, ref($result), $result;
return bless \%resulthash, ref($result);
}
-sub getFirstChild {
- my @args = @_;
- my $result = XML::Xercesc::DOMDocument_getFirstChild(@args);
- return $result unless UNIVERSAL::isa($result,'XML::Xerces');
- my %resulthash;
- tie %resulthash, ref($result), $result;
- return bless \%resulthash, ref($result);
-}
sub getElementsByTagName {
my @args = @_;
my $result = XML::Xercesc::DOMDocument_getElementsByTagName(@args);
@@ -4154,6 +4448,22 @@
tie %resulthash, ref($result), $result;
return bless \%resulthash, ref($result);
}
+sub toDOMNode {
+ my @args = @_;
+ my $result = XML::Xercesc::DOMDocument_toDOMNode(@args);
+ return $result unless UNIVERSAL::isa($result,'XML::Xerces');
+ my %resulthash;
+ tie %resulthash, ref($result), $result;
+ return bless \%resulthash, ref($result);
+}
+sub toDOMDocumentTraversal {
+ my @args = @_;
+ my $result = XML::Xercesc::DOMDocument_toDOMDocumentTraversal(@args);
+ return $result unless UNIVERSAL::isa($result,'XML::Xerces');
+ my %resulthash;
+ tie %resulthash, ref($result), $result;
+ return bless \%resulthash, ref($result);
+}
sub DISOWN {
my $self = shift;
my $ptr = tied(%$self);
@@ -4924,8 +5234,28 @@
tie %resulthash, ref($result), $result;
return bless \%resulthash, ref($result);
}
-*writeNode = *XML::Xercesc::DOMWriter_writeNode;
-*writeToString = *XML::Xercesc::DOMWriter_writeToString;
+sub writeNode {
+ my @args = @_;
+ if ($args[2]->isa('XML::Xerces::DOMDocument')) {
+ $args[2] = $args[2]->toDOMNode();
+ }
+ my $result = XML::Xercesc::DOMWriter_writeNode(@args);
+ return $result unless UNIVERSAL::isa($result,'XML::Xerces');
+ my %resulthash;
+ tie %resulthash, ref($result), $result;
+ return bless \%resulthash, ref($result);
+}
+sub writeToString {
+ my @args = @_;
+ if ($args[1]->isa('XML::Xerces::DOMDocument')) {
+ $args[1] = $args[1]->toDOMNode();
+ }
+ my $result = XML::Xercesc::DOMWriter_writeToString(@args);
+ return $result unless UNIVERSAL::isa($result,'XML::Xerces');
+ my %resulthash;
+ tie %resulthash, ref($result), $result;
+ return bless \%resulthash, ref($result);
+}
*release = *XML::Xercesc::DOMWriter_release;
sub DISOWN {
my $self = shift;
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]