Quantcast
Channel: Adobe Community: Message List - InDesign Scripting
Viewing all articles
Browse latest Browse all 37788

Re: How to get attribute name and its values from xml using javascript?

$
0
0

See the following example to know how to get the attribute values using javascript.

 

var myXML = new XML("<root><p att1=\"value1\" att2=\"value2\"></p></root>");
var myXMLElement = myXML.xpath ("//p");
alert(myXMLElement.attributes()[0].name()+": "+myXMLElement.attributes()[0].toString());

 

~Green4ever


Viewing all articles
Browse latest Browse all 37788

Trending Articles