对于那部分,我不了解 qml、qt 或 c++。但我的问题是我有这个 .lex 文件,它实际上只是 xml,还有一些以 .qml 结尾的文件,比如这个 frontpagetemplate.qml。
这里的格式我也不知道。
<qt title="{book_name}">
<h1>{book_name}</h1>
<br/>
<!-- BEGIN paragraph_tpl -->
<!-- BEGIN paragraph_html_tpl -->
{html}
<!-- END paragraph_html_tpl -->
<!-- BEGIN paragraph_header_tpl -->
<h2>{header}</h2>
<!-- END paragraph_header_tpl -->
<!-- BEGIN paragraph_text_tpl -->
<p>{text}</p>
<!-- END paragraph_text_tpl -->
<!-- BEGIN paragraph_link_tpl -->
<p><a href="{link_href}">{link_name}</a></p>
<!-- END paragraph_link_tpl -->
<!-- BEGIN paragraph_olist_tpl -->
<ol type="{list_type}">
<!-- BEGIN olist_item_tpl -->
<li>{text}</li>
<!-- END olist_item_tpl -->
</ol>
<!-- END paragraph_olist_tpl -->
<!-- BEGIN paragraph_ulist_tpl -->
<ul type="{list_type}">
<!-- BEGIN ulist_item_tpl -->
<li>{text}</li>
<!-- END ulist_item_tpl -->
</ul>
<!-- END paragraph_ulist_tpl -->
<!-- BEGIN paragraph_table_tpl -->
<table {bgcolor} {width} border="{border}" cellspacing="{cellspacing}" cellpadding="{cellpadding}">
<!-- BEGIN table_tr_tpl -->
<tr {bgcolor}>
<!-- BEGIN tr_th_tpl -->
<th {bgcolor} {width} colspan="{colspan}" rowspan="{rowspan}" align="{align}">{text}</th>
<!-- END tr_th_tpl -->
<!-- BEGIN tr_td_tpl -->
<td {bgcolor} {width} colspan="{colspan}" rowspan="{rowspan}" align="{align}">{text}</td>
<!-- END tr_td_tpl -->
</tr>
<!-- END table_tr_tpl -->
</table>
<!-- END paragraph_table_tpl -->
<!-- BEGIN paragraph_image_tpl -->
<p><img src="{img_src}" /></p>
<!-- END paragraph_image_tpl -->
<!-- END paragraph_tpl -->
<table border>
<tr>
<th align="left">ID</th>
<td>{book_id}</td>
</tr>
<tr>
<th align="left">Created</th>
<td>{created}</td>
</tr>
<tr>
<th align="left">Last modified</th>
<td>{modified}</td>
</tr>
<tr>
<th align="left">Publisher ID</th>
<td>{publisher_id}</td>
</tr>
<tr>
<th align="left">Publisher</th>
<td>{publisher_name}</td>
</tr>
</table><br/>
</qt>
这是什么语法,那里有编辑器吗?我可以将其转换为html吗?
我真的很难找到有关此的任何信息。我发现的关于 qml 的所有内容,都是看起来像 JavaScript 变体的东西。
我的目标是合并这些文件,并对 .lex 文件中的标签和数据进行 html 表示,而不是现在看起来丑陋的 lexion。