Altova Authentic 2024 Browser Edition

Authentic.GetAllowedElements

Inicio Anterior Inicio Siguiente

Declaración GetAllowedElements(nAction as SPYAuthenticElementActions,pStartElement as XMLData,pEndElement as XMLData,pElements as Variant)

 

Descripción

GetAllowedElements() devuelve los elementos permitidos para las acciones especificadas por nAction.

 

 

Ejemplo de JavaScript:

 

 function GetAllowed()

 {

         var arrElements = new Array(1);

 

         var objStart = objPlugIn.CurrentSelection.Start;

         var objEnd = objPlugIn.CurrentSelection.End;

 

         var strText;

         strText = "valid elements at current selection:\";

 

         for(var i = 0;i <= 4;i++)        {

                 objPlugIn.GetAllowedElements(i,objStart,objEnd,arrElements);

                 strText = strText + ListArray(arrElements) + "------------------\";

         }

 

         return strText;

 }

 

 function ListArray(arrIn)

 {

         var strText = "";

 

         if(typeof(arrIn) == "object")        {

                 for(var i = 0;i <= (arrIn.length - 1);i++)

                         strText = strText + arrIn[i] + "\";

         }

 

         return strText;

 }

 

Ejemplo de VBScript:

 

 Sub DisplayAllowed

         dim arrElements()

 

         dim objStart

         dim objEnd

         set objStart = objPlugIn.CurrentSelection.Start

         set objEnd = objPlugIn.CurrentSelection.End

 

         dim strText

         strText = "Valid elements at current selection:" & chr(13) & chr(13)

 

         dim i

 

         For i = 1 To 4

                 objView.GetAllowedElements i,objStart,objEnd,arrElements

                 strText = strText & ListArray(arrElements) & "---------------" & chr(13)

         Next

 

         msgbox strText

 End Sub

 

 Function ListArray(arrIn)

         dim strText

 

         If IsArray(arrIn) Then

                 dim i

 

                 For i = 0 To UBound(arrIn)

                         strText = strText & arrIn(i) & chr(13)

                 Next

         End If

 

         ListArray = strText

 End Function

 

© 2017-2023 Altova GmbH