90 lines
4.3 KiB
Plaintext
90 lines
4.3 KiB
Plaintext
<!DOCTYPE html>
|
|
<html lang="en">
|
|
<head>
|
|
<meta name="generator" content="HTML Tidy for HTML5 for Apple macOS version 5.8.0">
|
|
<title>JMRI: Viewing JMRI XML Files</title>
|
|
<meta name="author" content="Bob Jacobsen">
|
|
<meta name="keywords" content="JMRI technical code xml usage">
|
|
<!--#include virtual="/help/en/parts/Style.shtml" -->
|
|
</head>
|
|
<body>
|
|
<!--#include virtual="/help/en/parts/Header.shtml" -->
|
|
|
|
<div id="mBody">
|
|
<!--#include virtual="Sidebar.shtml" -->
|
|
|
|
<div id="mainContent">
|
|
<h1>JMRI: Viewing XML Files</h1>
|
|
|
|
<p>JMRI stores information about its operations and information that you create in XML files. For
|
|
example, when you use the PanelPro command <strong>File ⇒ Store</strong>, your tables and panels
|
|
are stored in an XML file. Other XML files hold preferences, control
|
|
information, operational information, decoder contents, your roster, and more. </p>
|
|
|
|
<p>Although XML is a structured text format, it is complicated and not particularly easy to read.
|
|
Most JMRI-created XML files can be displayed with more formatting (easier to read and print) in a
|
|
web browser using "XSLT stylesheets" (provided in the JMRI distribution). This <a href=
|
|
"https://jmri.org/xml/samples/TwoColumnMachine.xml">sample panel XML file</a> is an example of how
|
|
this formatting looks.</p>
|
|
|
|
<h2>Viewing Methods</h2>
|
|
|
|
<ul>
|
|
<li>To view an XML file that JMRI has created, just open the file with your favorite web
|
|
browser. In many cases, you should be able to just double-click the file name, or drag it to the web
|
|
browser's icon. On some platforms, you'll need to open it from the "File" menu.
|
|
|
|
<br>Unfortunately, this approach doesn't always work because not all browsers properly
|
|
implement the use of XSLT. If the first browser you try doesn't display the XML file (usually just
|
|
showing a blank page), try a different browser. Early versions of Internet Explorer are particularly
|
|
problematic although the most recent versions work well. Mozilla, Safari, Opera, and Chrome also work,
|
|
while Firefox seems to work properly on some platforms and not on others. (There might also be options
|
|
that affect whether it works. Here's more <a href="https://jmri.org/xml/XSLT/README">technical background</a>)
|
|
</li>
|
|
|
|
<li>Use the <a href="../../web/index.shtml">JMRI mini web server</a> that is included in JMRI (version
|
|
2.9.4 and later). The file you want to view must also have been stored with JMRI 2.9.4 or later (if it
|
|
is older than that, load it into JMRI 2.9.4 or later and store it again). Then:
|
|
|
|
<ul>
|
|
<li>Start JMRI (either DecoderPro or PanelPro). No layout connection is needed.</li>
|
|
|
|
<li>Start the JMRI Web Server:
|
|
<ul>
|
|
<li>PanelPro: <strong>Tools ⇒ Servers ⇒ Start JMRI Web Server</strong></li>
|
|
<li>DecoderPro: <strong>Actions ⇒ Start Web Server</strong>.</li>
|
|
</ul>
|
|
|
|
<li>Open any web browser on your computer and enter the URL "<a href="http://localhost:12080"
|
|
target="_blank">http://localhost:12080</a>"
|
|
</li>
|
|
|
|
<li>You should now see the JMRI "home page" for your layout, like the example below.<br>
|
|
If the XML file you wish to view is within the JMRI distribution directory, click on the
|
|
"/dist" link at bottom right. If it is within your preferences directory, click on the
|
|
"/prefs" link. Some of the key files in your /prefs directory are:
|
|
<ul>
|
|
<li>Panel files ([named by you].xml), containing details of any panels and tables you created within
|
|
PanelPro</li>
|
|
<li>Roster (roster.xml), listing information about your locomotives from DecoderPro</li>
|
|
</ul>
|
|
You can also click on any listed sub-directories to get to your files.
|
|
</li>
|
|
|
|
<li>You can then use your browser to view, print, save, etc. as desired.
|
|
<a href="images/Webstartxml.png"><img src="images/Webstartxml.png" alt="web server home page"></a>
|
|
</li>
|
|
</ul>
|
|
|
|
</li>
|
|
</ul>
|
|
|
|
<!--#include virtual="/help/en/parts/Footer.shtml" -->
|
|
</div>
|
|
<!-- closes #mainContent-->
|
|
</div>
|
|
<!-- closes #mBody-->
|
|
<script src="/js/help.js"></script>
|
|
</body>
|
|
</html>
|