Altova Authentic 2024 Browser Edition

The HTML code below generates a page that has the following features:

 

It installs the Trusted Unicode version of Authentic Browser on the client if this is not already installed.

The body contains a window of 600px wide and 500px high into which the Authentic Browser is loaded.

Below the Authentic Browser window is a row of four buttons.

The Authentic View of OrgChart.xml is loaded.

The Find and Replace buttons pop up the Find and Replace dialogs respectively.

The Save button saves changes to a file called SaveFile.xml located in the root directory of the server

The Test Property button tests a simple property

 

When this HTML page is opened on the client, the user can start editing the XML file OrgChart.xml and save the edited file as SaveFile.xml.

 

You may wish to use this simple HTML page to test whether Authentic Browser functions properly. If you do so, be sure to use the correct URLs to locate the the CAB file, the xsd, xml, and sps files, and any other resources on the server. Note that case-sensitivity might be an issue with some servers, so if there is a problem locating a file, check the casing of filenames and of commands in the code. You can expand or modify this example to build more complex solutions using Authentic Browser. Also see The OBJECT Element for details.

 

<html>

<head>

  <meta http-equiv="Content-Type" content="text/html; charset=windows-1252">

  <title>Minimal XMLSpyDocEditPlugIn page</title>

 

  <!-- Script for handling the ControlInitialized event -->

  <SCRIPT LANGUAGE="javascript" FOR="objPlugIn" EVENT="ControlInitialized">

           objPlugIn.SchemaLoadObject.URL = "http://yourserver/OrgChart.xsd"

           objPlugIn.XMLDataLoadObject.URL = "http://yourserver/OrgChart.xml"

           objPlugIn.DesignDataLoadObject.URL = "http://yourserver/OrgChart.sps"

           objPlugIn.StartEditing()

  </SCRIPT>

 

  <!-- Script with subroutines -->

  <SCRIPT ID=clientEventHandlers LANGUAGE=vbscript>

     Sub OnClickFind

           objPlugIn.FindDialog

     End Sub

 

     Sub OnClickReplace

           objPlugIn.ReplaceDialog

     End Sub

 

     Sub BtnOnSave

           objPlugIn.XMLDataSaveUrl = "http://yourserver/SaveFile.xml"

           objPlugIn.Save

     End Sub

 

     Sub BtnOnTestProp

           If objPlugIn.IsRowInsertEnabled Then

                         msgbox "true"

           Else

                         msgbox "false"

           End If

     End Sub

  </SCRIPT>

</head>

 

<body>

  <!-- Object element has id with value that must be used -->

  <!-- as name of Authentic Browser Plug-in objects -->

  <!-- Classid selects the Trusted Unicode version -->

  <OBJECT id="objPlugIn"

  <!-- CodeBase selects 32-bit CAB file (AuthenticBrowserEdition.CAB) -->

  <!-- or 64-bit CAB file (AuthenticBrowserEdition_x64.CAB) -->

    CodeBase="http://yourserver/AuthenticBrowserEdition.CAB#Version=12,3,0,0"

  <!-- Class Id for 32-bit and 64-bit CAB files is the same -->

    Classid="clsid:B4628728-E3F0-44a2-BEC8-F838555AE780" width="600" height="500">

  </OBJECT>

  <p>

    <input type="button" value="Find" name="B4" onclick="OnClickFind()">

    <input type="button" value="Replace" name="B5" onclick="OnClickReplace()">

    <input type="button" value="Save" name="B6" onclick="BtnOnSave()">

    <input type="button" value="Test property" name="B7" onclick="BtnOnTestProp">

  </p>

</body>

</html>

 

© 2017-2023 Altova GmbH