Altova XMLSpy 2024 Professional Edition

Superseded by AuthenticRange.FirstXMLData and related properties


AuthenticRange supports navigation via XMLData elements as well as navigation by document elements (e.g. characters, words, tags) or text cursor positions.


// ----- javascript sample -----

// instead of:

// if (! Application.ActiveDocument.DocEditView.SelectionSet(varXMLData1, 0, varXMLData2, -1))

//    MsgBox ("Error: invalid data position");

// use now:



   var objSelection = Application.ActiveDocument.AuthenticView.Selection;

   objSelection.FirstXMLData = varXMLData1;

   objSelection.FirstXMLdataOffset = 0;

   objSelection.LastXMLData = varXMLData2;

   objSelection.LastXMLDataOffset = -1;



catch (err)

   { MsgBox ("Error: invalid data position"); }

// to select all text between varXMLData1 and varXMLdata2, inclusive


Declaration: SelectionSet (pStartElement as XMLData, nStartPos as long, pEndElement as XMLData, nEndPos as long) as Boolean



Use SelectionSet() to set a new selection in the Authentic View. Its possible to set pEndElement to null (nothing) if the selection should be just over one (pStartElement) XML element.




© 2018-2024 Altova GmbH