blob: 3c588a27610f67ed18bb6f803b74fcbe9b0967d6 [file] [log] [blame]
<?xml version='1.0' encoding='utf-8' ?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
<title>user</title>
</head>
<body>
<h1 id="XML_Discoverer">XML Discoverer</h1>
<p>The goal of the Generic XML Discoverer plug-in is to allow generic extractions of XML information from a XML file, without the need for a metamodel dedicated to a conforming Document Type Definition(DTD) or XML Schema Description (XSD).</p>
<h2 id="Details">Details</h2>
<p>Considering XML files conforming to DTD or XSD, it will be more convenient to have some dedicated metamodels to manipulate information. However, Generic XML Discoverer is an alternative for miscellaneous XML files (no or uncommon DTD/XSD).</p>
<p>This plug-in aims at analyzing any XML file providing a model describing the information found, conforming to
<a href="../xml_metamodel/user.html#XML_Metamodel">the Generic XML metamodel</a>.
Moreover, it allows to serialize the xml file back from the model. Thus, some M2M transformations might be used jointly to upgrade some xml files.
</p>
<p>Since the metamodel is a subset of W3C XML concepts, the end user should be aware of some limitations in serializing back some advanced XML contents.</p>
<h2 id="User_manual">User manual</h2>
<h3 id="Discovering_and_browsing_from_contextual_menu">Discovering and browsing from contextual menu</h3>
<p>Right-click on a XML file and select the XML discoverer (
<b>Discovery &gt; Discoverers &gt; Discover XML Model...</b>):
</p>
<p>
<img align="middle" title="Menu in Eclipse to discover a XML model" alt="Menu in Eclipse to discover a XML model" border="1" src="../../img/MoDisco_XML_Discoverer_Menu.png"/>
</p>
<p>A discovery parameters dialog opens to let you specify the parameters of the discovery:</p>
<p>
<img border="0" src="../../img/MoDisco_Launching_discovery_org.eclipse.modisco.xml.discoverer.png"/>
</p>
<ul>
<li>Set
<b>SERIALIZE_TARGET</b> to true if you want to save the model to a file
</li>
<li>You can define
<b>TARGET_URI</b> to the location of a file in your workspace. If it is not defined and SERIALIZE_TARGET is true, a model file with a default name will be created in the project.
<br/>
<b>Beware: the file will be overwritten if it already exists!</b>
</li>
</ul>
<p>Once launched, a progress dialog will appear as soon as the operation begins. Depending on the size of your file, the reverse engineering process might take some time to complete:</p>
<p>
<img border="0" src="../../img/MoDisco_discoverer_org.eclipse.modisco.xml.discoverer_in_progress.png"/>
</p>
<p>At the end of the process, the newly created model file is added to the root of your project if you set SERIALIZE_TARGET to true:</p>
<p>
<img align="middle" title="XML model in the package explorer" alt="XML model in the package explorer" border="1" src="../../img/MoDisco_testXML_XMI.png"/>
</p>
<p>And the model is opened in the default model browser if you selected
<b>Open model in editor after discovery</b>:
</p>
<p>
<img align="middle" title="XML model viewed with the MoDisco model browser" alt="XML model viewed with the MoDisco model browser" border="1" src="../../img/MoDisco_TestXML_ModelBrowser.png"/>
</p>
<p>The model file for the XML file (with a filename ending in "_xml.xmi" by convention) can be opened in any model browser:</p>
<p>
<img align="middle" title="&quot;Open With&quot; on a XML model" alt="&quot;Open With&quot; on a XML model" border="1" src="../../img/MoDisco_XML_XMI_OpenWith.png"/>
</p>
</body>
</html>