OpenSheetMusicDisplay
    Preparing search index...

    Class IXmlElement

    Just a wrapper for an XML Element object. It facilitates handling of XML elements by OSMD

    Index

    Constructors

    • Wraps 'elem' Element in a IXmlElement

      Parameters

      • elem: Element
      • OptionalknownName: string

        the element's lower-cased node name, when the caller already matched on it - saves a DOM read and a toLowerCase() per wrapper

      Returns IXmlElement

    Properties

    name: string

    Accessors

    • get firstAttribute(): Attr

      The first attribute of the element, undefined if it has none.

      Returns Attr

    • set firstAttribute(value: Attr): void

      Parameters

      • value: Attr

      Returns void

    • get hasElements(): boolean

      Whether the element has child nodes (of any kind, e.g. also text).

      Returns boolean

    • set hasElements(value: boolean): void

      Parameters

      • value: boolean

      Returns void

    • get value(): string

      The text of the element if it only contains one text node, otherwise "".

      Returns string

    • set value(value: string): void

      Parameters

      • value: string

      Returns void

    Methods

    • Get the attribute with the given name

      Parameters

      • attributeName: string

      Returns Attr

    • Get the first child element with the given node name with all the children of consequent child elements with the same node name. for example two tags will be combined for better processing

      Parameters

      • elementName: string

      Returns IXmlElement