(parent, tag)
| 114 | |
| 115 | // Some S3-compatible services omit the AWS namespace; fall back to no-namespace. |
| 116 | function elsByTag(parent, tag) { |
| 117 | const r = [...parent.getElementsByTagNameNS(ns, tag)]; |
| 118 | return r.length ? r : [...parent.getElementsByTagName(tag)]; |
| 119 | } |
| 120 | function elByTag(parent, tag) { |
| 121 | return parent.getElementsByTagNameNS(ns, tag)[0] |
| 122 | || parent.getElementsByTagName(tag)[0]; |