回答編集履歴
2
調整
answer
CHANGED
@@ -1,9 +1,9 @@
|
|
1
|
+
fragmentを利用しようかと思ったのですが、普通にダミーのDOMを作るだけでいけそうですね
|
1
2
|
```javascript
|
2
3
|
const xml='sample.xml';
|
3
4
|
fetch(xml).then(res=>res.text()).then(txt=>{
|
4
5
|
const xml=Object.assign(document.createElement('xml'),{innerHTML:txt});
|
5
|
-
const tmp=[xml].reduce((x,y)=>(x.appendChild(y),x),new DocumentFragment());
|
6
|
-
const ClientId=
|
6
|
+
const ClientId=xml.querySelector('RegisterClientResponse').getAttribute('ClientId');
|
7
7
|
console.log(ClientId);
|
8
8
|
});
|
9
9
|
```
|
1
ちょうせい
answer
CHANGED
@@ -1,4 +1,5 @@
|
|
1
1
|
```javascript
|
2
|
+
const xml='sample.xml';
|
2
3
|
fetch(xml).then(res=>res.text()).then(txt=>{
|
3
4
|
const xml=Object.assign(document.createElement('xml'),{innerHTML:txt});
|
4
5
|
const tmp=[xml].reduce((x,y)=>(x.appendChild(y),x),new DocumentFragment());
|