How to use xml-core - 6 common examples

To help you get started, we’ve selected a few xml-core examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github PeculiarVentures / xmldsigjs / src / xml / transform.ts View on Github external
*
 */

export interface ITransform extends XmlCore.IXmlSerializable {
    Algorithm: string;
    LoadInnerXml(node: Node): void;
    GetInnerXml(): Node | null;
    GetOutput(): any;
}

export type ITransformConstructable = new() => Transform;

/**
 * The Transform element contains a single transformation
 */
@XmlElement({
    localName: XmlSignature.ElementNames.Transform,
})
export class Transform extends XmlSignatureObject implements ITransform {

    // Public properties
    @XmlAttribute({
        localName: XmlSignature.AttributeNames.Algorithm,
        defaultValue: "",
    })
    public Algorithm: string;

    /**
     * XPath of the transformation
     */
    @XmlChildElement({
        localName: XmlSignature.ElementNames.XPath,
github PeculiarVentures / xmldsigjs / src / xml / reference.ts View on Github external
*   
 *     <element>
 *     <element>
 *     <element>
 *   </element></element></element>
 *   
 *   
 *   
 * 
 *
 */

/**
 * Represents the  element of an XML signature.
 */
@XmlElement({
    localName: XmlSignature.ElementNames.Reference,
})
export class Reference extends XmlSignatureObject {

    /**
     * Gets or sets the ID of the current Reference.
     */
    @XmlAttribute({
        defaultValue: "",
    })
    public Id: string;

    /**
     * Gets or sets the Uri of the current Reference.
     */
    @XmlAttribute({
github PeculiarVentures / xadesjs / src / xml / any.ts View on Github external
import { XmlContent, XmlElement } from "xml-core";

import { XmlXades } from "./xml";
import { XadesCollection, XadesObject } from "./xml_base";

/**
 * 
 * 
 * 	 
 * 	   
 * 	 
 * 	 
 * 
 */

@XmlElement({
    localName: XmlXades.ElementNames.Any,
})
export class Any extends XadesObject {

    @XmlContent()
    public Value: string;

}

@XmlElement({
    localName: XmlXades.ElementNames.Any,
})
export class AnyCollection extends XadesCollection { }
github PeculiarVentures / xmldsigjs / src / xml / signature.ts View on Github external
* 
 *   
 *     <element>
 *     <element>
 *     <element>
 *     <element>
 *   </element></element></element></element>
 *   
 * 
 *
 */

/**
 * Represents the  element of an XML signature.
 */
@XmlElement({
    localName: XmlSignature.ElementNames.Signature,
})
export class Signature extends XmlSignatureObject {

    /**
     * Gets or sets the ID of the current Signature.
     */
    @XmlAttribute({
        localName: XmlSignature.AttributeNames.Id,
        defaultValue: "",
    })
    public Id: string;

    /**
     * Gets or sets the SignedInfo of the current Signature.
     */
github PeculiarVentures / xadesjs / src / xml / signature_policy_identifier.ts View on Github external
*         
 *     
 * 
 *
 */

@XmlElement({ localName: XmlXades.ElementNames.SigPolicyId })
export class SigPolicyId extends ObjectIdentifier { }

@XmlElement({ localName: XmlXades.ElementNames.SigPolicyHash })
export class SigPolicyHash extends DigestAlgAndValueType { }

@XmlElement({ localName: XmlXades.ElementNames.SigPolicyQualifier })
export class SigPolicyQualifier extends AnyCollection { }

@XmlElement({ localName: "int" })
export class Integer extends XadesObject {

    @XmlContent({ converter: XmlNumberConverter, required: true })
    public Value: number;
}

@XmlElement({ localName: "IntegerList", parser: Integer })
export class IntegerList extends XadesCollection { }

@XmlElement({ localName: XmlXades.ElementNames.NoticeRef })
export class NoticeReference extends XadesObject {

    @XmlChildElement({
        localName: XmlXades.ElementNames.Organization,
        namespaceURI: XmlXades.NamespaceURI,
        prefix: XmlXades.DefaultPrefix,
github PeculiarVentures / xadesjs / src / xml / object_identifier.ts View on Github external
*     
 *     
 *   
 * 
 * 
 *   
 *      
 *   
 * 
 * 
 *
 */

export type IdentifierQualifier = "OIDAsURI" | "OIDAsURN";

@XmlElement({
    localName: XmlXades.ElementNames.Identifier,
})
export class Identifier extends XadesObject {

    @XmlAttribute({
        localName: XmlXades.AttributeNames.Qualifier,
    })
    public Qualifier: IdentifierQualifier;

    @XmlContent({
        defaultValue: "",
        required: true,
    })
    public Value: string;

}

xml-core

`xml-core` is a set of classes that make it easier to work with XML within the browser and node.

MIT
Latest version published 2 years ago

Package Health Score

45 / 100
Full package analysis

Popular xml-core functions