Dissertaç ˜ao de Mestrado Mestrado em Engenharia Informática Jo ...
Dissertaç ˜ao de Mestrado Mestrado em Engenharia Informática Jo ...
Dissertaç ˜ao de Mestrado Mestrado em Engenharia Informática Jo ...
Create successful ePaper yourself
Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.
4. AN IMPLEMENTATION 4.7. Generic to Original Syntax Converter<br />
<br />
<br />
<br />
Listing 4.12: XML el<strong>em</strong>ent with a single subel<strong>em</strong>ent<br />
Listing 4.13: XML el<strong>em</strong>ent with multiple el<strong>em</strong>ents<br />
<br />
<br />
<br />
<br />
the print method with the root no<strong>de</strong>’s children, which is, in turn, a No<strong>de</strong>List.<br />
The first el<strong>em</strong>ent in the XML files generated by the tool is always Metadata, containing the<br />
information about the original syntax. This el<strong>em</strong>ent aids the printing process and is not part of<br />
the final configuration file, therefore it must not be printed. The r<strong>em</strong>ain<strong>de</strong>r of the el<strong>em</strong>ents are<br />
then printed. XML el<strong>em</strong>ents generated by the tool always contain an FStr field, corresponding<br />
to the format string of that el<strong>em</strong>ent, explained in Section 4.6. All el<strong>em</strong>ents in the document<br />
are visited and printed according to their format string. If the current el<strong>em</strong>ent has other child<br />
no<strong>de</strong>s, they must be printed as well.<br />
49