1
我想將一個大的XML文件轉換爲HTML。 我有害蟲的XML文件在這裏的一部分。在xml文件中有 有重複標籤。 類似標題標籤可以多次出現在xml中。 但在body標籤中只有一個標題標籤。 內部標題標籤還有另一個子標籤,我想獲得所有的值,如Employee_B_ID,登錄ID,聘用日期,費率和顯示爲表格格式。XML到HTML轉換爲複雜的XML
<?xml version="1.0" encoding="UTF-8"?>
<report xmlns="http://www.eclipse.org/birt/2005/design" version="3.2.23" id="1">
------
----
-----
<body>
<image id="258">
<property name="height">0.9375in</property>
<property name="width">3.5104166666666665in</property>
<property name="source">embed</property>
<property name="imageName">logo-new - Copy.jpg</property>
</image>
<label id="245">
<property name="fontFamily">sans-serif</property>
<property name="fontSize">x-large</property>
<property name="fontWeight">bold</property>
<property name="textAlign">center</property>
<text-property name="text">Employee Information</text-property>
</label>
<table id="163">
<property name="width">100%</property>
<property name="dataSet">Data Set</property>
<property name="refTemplateParameter">NewTemplateParameterDefinition2</property>
<list-property name="paramBindings">
<structure>
<property name="paramName">b_id</property>
<simple-property-list name="expression">
<value type="javascript">params["b_id"]</value>
</simple-property-list>
</structure>
</list-property>
<list-property name="boundDataColumns">
<structure>
<property name="name">BusinessEntityID</property>
<text-property name="displayName">BusinessEntityID</text-property>
<expression name="expression" type="javascript">dataSetRow["BusinessEntityID"]</expression>
<property name="dataType">integer</property>
</structure>
<structure>
<property name="name">LoginID</property>
<text-property name="displayName">LoginID</text-property>
<expression name="expression" type="javascript">dataSetRow["LoginID"]</expression>
<property name="dataType">string</property>
</structure>
<structure>
<property name="name">HireDate</property>
<text-property name="displayName">HireDate</text-property>
<expression name="expression" type="javascript">dataSetRow["HireDate"]</expression>
<property name="dataType">string</property>
</structure>
<structure>
<property name="name">Rate</property>
<text-property name="displayName">Rate</text-property>
<expression name="expression" type="javascript">dataSetRow["Rate"]</expression>
<property name="dataType">decimal</property>
</structure>
</list-property>
<property name="pageBreakInterval">50</property>
<column id="187"/>
<column id="188"/>
<column id="189"/>
<column id="190"/>
<header>
<row id="164">
<cell id="165">
<label id="166">
<property name="fontFamily">sans-serif</property>
<property name="fontWeight">bold</property>
<text-property name="text">Employee_B_ID</text-property>
</label>
</cell>
<cell id="167">
<label id="168">
<property name="fontFamily">sans-serif</property>
<property name="fontWeight">bold</property>
<text-property name="text">Login ID</text-property>
</label>
</cell>
<cell id="169">
<label id="170">
<property name="fontFamily">sans-serif</property>
<property name="fontWeight">bold</property>
<text-property name="text">Hire Date</text-property>
</label>
</cell>
<cell id="171">
<label id="172">
<property name="fontFamily">sans-serif</property>
<property name="fontWeight">bold</property>
<text-property name="text">Rate</text-property>
</label>
</cell>
</row>
</header>
<detail>
<row id="173">
<cell id="174">
<data id="250">
<property name="resultSetColumn">BusinessEntityID</property>
</data>
</cell>
<cell id="176">
<data id="251">
<property name="resultSetColumn">LoginID</property>
</data>
</cell>
<cell id="178">
<data id="252">
<property name="resultSetColumn">HireDate</property>
</data>
</cell>
<cell id="180">
<data id="253">
<property name="resultSetColumn">Rate</property>
</data>
</cell>
</row>
</detail>
<footer>
<row id="182">
<cell id="183"/>
<cell id="184"/>
<cell id="185"/>
<cell id="186"/>
</row>
</footer>
</table>
</body>
-------
-----
----
</report>
如何找回這裏面
<body><header><text-property name="text">Employee_B_ID</text-property>
我需要顯示Employee_B_ID,登錄ID,服務日期,價格爲表格形式的值。
任何人都可以幫助我。
感謝 Ashim