Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
export function parse(root: string, object: any, options?: IOptions): string {
const opts = new Options(options);
const document = new XmlDocument(
{
validation: opts.validation
}
);
if (opts.declaration.include) {
document.decl(opts.declaration);
}
if (opts.dtd.include) {
document.dtd(
{
// Validated in options.ts
name: opts.dtd.name!,
pubId: opts.dtd.pubId,
sysId: opts.dtd.sysId
}
);