Advertisement
Guest User

Untitled

a guest
Dec 11th, 2017
22
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.56 KB | None | 0 0
  1. @action getOutputs() {
  2. fetch(state.deeply.nest.url.in.properties)
  3. .then(res => res.text())
  4. .then(text => {
  5. let valid = [];
  6. const xmlDom = new DOMParser().parseFromString(text, 'text/xml');
  7. const foos = xmlDom.getElementsByTagName('Foo');
  8. for (let foo of foos) {
  9. const name = foo.querySelectorAll(':scope > Name');
  10. if (name.length) {
  11. valid.push({
  12. name: name[0].innerHTML
  13. });
  14. }
  15. }
  16. state.layers = validLayers;
  17. });
  18. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement