Modules and Directories
Modules exist within directories. An XML file defines the module. It's usually just like an HTML element so it can be used within the directory as one.

An HTML element might look like: <a href='test.txt'>test.txt</a>. There might be more attributes available for an XML element than what are available for an HTML element. They're unavailable for an HTML element because there is a specification for HTML elements. XML elements can have any name-value pair.

In order to make an XML file more readable in the directory so that it can be used with other files, the files it uses should be enclosed in a directory. The directories will be checked in the PHP script. If they're used by the XML file, they won't be shown in the directory listing.

A 'dir' attribute can specify a directory name to be used by an XML element.

For an HTML-element clickable image, <a href='location.html'><img src='file.png' /></a> could be used. Elements will be placed in the <body> tag. That is important because they can also be styled -- adjusted with CSS. Normally elements read from an XML file will be placed in the directory listing as a normal element would for a file, except they will be that element.

The XML file contains only the element that corresponds to an HTML element. It does not contain the HTML code needed for a full HTML file.

If an XML element needed a CSS stylesheet or JavaScript file it could be contained in the directory, perhaps. A <script> element could be contained directly in the XML file, but if a script element was needed for a specific XML element, it would have to be contained in a directory. The directory it is contained in is specified by the dir attribute.

A module might use a specific script. Scripts could possibly interfere with each other. Scripts read should probably be appended at the end of the <body> element. We can try appending them in the place where they are encountered. Is there a way to load a script for a specific element only?

Elements can be placed on the page elsewhere with CSS. If they do not appear in the usual location, such as if their position value has been set to absolute, the other elements might take up the same space on the page. The directory listing would be like usual. Only the missing element would be placed elsewhere.

What possible use could a directory have for an XML element? It could contain a JavaScript script, which would be appended to the page. If there were additional files that were needed for the element, they could be contained in the directory too.

XML files could contain nested elements. An example of that was in our A tag that contained an IMG tag. Elements can contain other elements.

Some types of elements are used for containing elements. Two elements notable for that are Span and Div. Span is an inline element and Div is a block-level element. A Div might have several elements in it that call for an image file, which could be contained in it's folder.

A different type of attribute would have to be used if the file being referenced was in the corresponding folder. To specify a directory that is used with an XML element, use the dir attribute. Use an attribute named with a prefix of dir- if the value is a file contained within the directory for the XML element.

The PHP script for showing the directory will have to be written so that it checks for dir- prefixed attributes in XML files that are used for showing HTML elements. There might be other uses for XML files that affect the page as well. Not all XML files are used for showing directory elements.

If an XML file is used for showing a directory element, a specific suffix will be present on the file name. For the end-user, the naming could be handled by the script: a script could be used to upload files for directories of XML elements that are being used for HTML elements. The process could handle it without the need for the name of the file needing to be revealed, which has the suffix.

We started out with _url.xml for specifying an A element within the directory. However, it would be more useful to specify an element with _html.xml. Any element could be specified in that XML file. In addition to the single underscore, another should be added to make it stand out more.

The file name would look like Filename__html.xml. Filename would be replaced by the file name identifying the XML file used for the HTML element. But, the script that handles uploading information to the directory for customization could potentially name the file automatically.

A certain naming syntax could be used for files that are named automatically. The directory should perhaps be able to be adjusted. Files could be deleted by clicking a button on the page.

If a directory name has the suffix, __html.xml the XML file should be contained within it and it should have the same name as the directory, except it will not be a directory. An XML module directory can be placed in a directory to add the functionality of that module to the directory listing.