SignedXml.asXml()

Method Description

Returns the signed XML as an XML document.

Returns

xml.Document

Supported Script Types

Server scripts

For additional information, see SuiteScript 2.x Script Types.

Governance

None

Module

N/crypto/certificate Module

Parent Object

certificate.SignedXml

Sibling Object Members

SignedXml Object Members

Since

2019.2

Syntax

Important:

The following code sample shows the syntax for this member. It is not a functional example. For a complete script example, see N/crypto/certificate Module Script Samples.

            //Add additional code
...
// signedXml is a certificate.SignedXml object
var signedXml = certificate.signXml({
    algorithm: certificate.HashAlg.SHA256,
    certId: 'custcertificate1',
    rootTag: 'infNFe',
    xmlString: infNFe.getContents()
});

// signed_AsXml will be an xml.Document object
var signed_AsXml = signedXml.asXml();
...
//Add additional code 

          

Related Topics

General Notices