This object encapsulates a response from a remote JUNOScript server.
It is returned from a JUNOS::Device::request, JUNOS::Device::command,
and all XML RPC methods within JUNOS::Device. It is a subclass of
XML::DOM::Element.
=head1 CONSTRUCTOR
new($DOC)
The XML::DOM object ($DOC) returned from the JUNOScript server.
=head1 METHODS
getFirstError()
Returns a hash reference containing all of the errors
caused by the call this object was generated in response to.
Returns undef if no errors were encountered.
toString()
Returns a string-ified representation of this object.
translateXSLtoRelease($NAMESPACE, $XSLFILE, $TMPFILE)
Returns the name of the xsl file to transform the response data.
XSLT 1.0 requires that the xsl file must declare the a prefix
with the default namespace from the XML data it transforms.
Because the default namespace in all JUNOScript responses
contains version information, the xsl file will have to
adapt to the default namespace from routers running different
versions of JUNOS.
This subroutine takes three input parameters: the prefix name ($NAMESPACE),
xsl input file name ($XSLFILE) and xsl temp file name ($TMPFILE). It replaces
the value of the prefix attribute in the input xsl file with
the default namespace from the JUNOScript response and puts
the result in the output xsl file. In some cases, it may
have to remove the prefix for default namespace from the
xsl input file because some JUNOScript responses from old versions
of JUNOS may not contain default namespace (e.g. response for
<get-bgp-neighbor-information> from pre-5.1 JUNOS).
If all is well, the name of the xsl file for transformation
is returned. Otherwise, undef is returned.
Please note that the returned xsl file can be the xsl input file or the
temp file depending whether any changes are made on the
xsl input file for transformation.
=head1 SEE ALSO
XML::DOM
JUNOS::Device
=head1 AUTHOR
Juniper Junoscript Perl Team, send bug reports, hints, tips, and suggestions
to support@juniper.net.
=head1 COPYRIGHT
Copyright (c) 2001 Juniper Networks, Inc.
All rights reserved.
=4=
THE END |