Altova XMLSpy 2023 Enterprise 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:

try

{

   var objSelection = Application.ActiveDocument.AuthenticView.Selection;

   objSelection.FirstXMLData = varXMLData1;

   objSelection.FirstXMLdataOffset = 0;

   objSelection.LastXMLData = varXMLData2;

   objSelection.LastXMLDataOffset = -1;

   objSelection.Select();

}

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

 

Description

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

 

 

 

© 2017-2023 Altova GmbH