* Extracts the text content of the first matching XML tag within a fragment.
(fragment: string, tag: string)
| 387 | * Extracts the text content of the first matching XML tag within a fragment. |
| 388 | */ |
| 389 | function extractTag(fragment: string, tag: string): string | undefined { |
| 390 | const match = fragment.match(new RegExp(`<${tag}>([\\s\\S]*?)</${tag}>`)) |
| 391 | return match ? decodeXmlEntities(match[1]) : undefined |
| 392 | } |
| 393 | |
| 394 | /** |
| 395 | * Parses a ListObjectsV2 XML response into object entries plus pagination state. |
no test coverage detected