xml.d.ts 666 B

1234567891011121314151617
  1. export declare class XElement {
  2. readonly name: string;
  3. value: string;
  4. attributes: {
  5. [key: string]: string;
  6. } | null;
  7. isCData: boolean;
  8. elements: Array<XElement> | null;
  9. constructor(name: string);
  10. attribute(name: string): string;
  11. removeAttribute(name: string): void;
  12. element(name: string, ignoreCase?: boolean, errorIfMissed?: string | null): XElement;
  13. elementOrNull(name: string, ignoreCase?: boolean): XElement | null;
  14. getElements(name: string, ignoreCase?: boolean): XElement[];
  15. elementValueOrEmpty(name: string, ignoreCase?: boolean): string;
  16. }
  17. export declare function parseXml(data: string): XElement;