index.d.ts 728 B

123456789101112131415161718192021222324252627
  1. export type Tag = { inner: null | string, outer: string };
  2. export function findTagByName(
  3. xml: string,
  4. tagName: string,
  5. options?: { debug?: boolean, nested?: boolean, startIndex?: number }
  6. ): Tag | undefined;
  7. export function findTagsByName(
  8. xml: string,
  9. tagName: string,
  10. options?: { debug?: boolean, nested?: boolean, startIndex?: boolean }
  11. ): Tag[];
  12. export function findTagsByPath(
  13. xml: string,
  14. path: string[],
  15. options?: { debug?: boolean, returnOnFirst?: boolean }
  16. ): Tag[];
  17. export function findTagByPath(
  18. xml: string,
  19. path: string[],
  20. options?: { debug?: boolean }
  21. ): Tag | undefined;
  22. export function getAttribute(tag: string | Tag, attributeName: string, options?: { debug?: boolean } ): string;