Home Forums General XMetaL Discussion Get nodelist from Selection/Range? Reply To: Get nodelist from Selection/Range?

schwamkrug

Reply to: Get nodelist from Selection/Range?

Awesome, thanks.

So, I think an easier answer just slapped me across the face:

[code]
var rng = Application.ActiveDocument.Range;
var selectionXMLString = ““+rng.Text+”“;
var xmlDoc = new ActiveXObject(“msxml2.DOMDocument”);
xmlDoc.loadXML(selectionXMLString);
var nodes = xmlDoc.documentElement.childNodes;
[/code]

Reply

Products
Downloads
Support