Advertisement
lucianb

Untitled

Mar 27th, 2022
683
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. var xmlDoc = new ActiveXObject("Msxml2.DOMDocument.6.0");  
  2. var nodeBook, nodelistAuthor;  
  3. xmlDoc.async = false;  
  4. xmlDoc.load("Lab.xml");  
  5. if (xmlDoc.parseError.errorCode != 0) {  
  6.     var myErr = xmlDoc.parseError;  
  7.     alert("You have error " + myErr.reason);  
  8. } else {  
  9.     nodeBook = xmlDoc.selectSingleNode("//dvd");  
  10.     nodelistAuthor = nodeBook.getElementsByTagName("название");  
  11.     alert(nodelistAuthor.item(0).text);  
  12. }  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement