Возможно ли создание формы в HTML из документов XML?Преобразование формы XML в HTML
См., Например, У меня есть следующий XML:
<record>
<IsEnrolled>Y</IsEnrolled>
<IsGraduating>N</IsGraduating>
<StudentLevel>Junior</StudentLevel>
<StudentType>InState</StudentType>
<HasScholarship>N</HasScholarship>
<Action>CodeA</Action>
</record>
<record>
<IsEnrolled>Y</IsEnrolled>
<IsGraduating>N</IsGraduating>
<StudentLevel>Sophomore</StudentLevel>
<StudentType>InState</StudentType>
<HasScholarship>Y</HasScholarship>
<Action>CodeB</Action>
</record>
<record>
<IsEnrolled>Y</IsEnrolled>
<IsGraduating>N</IsGraduating>
<StudentLevel>Freshmen</StudentLevel>
<StudentType>OutOfState</StudentType>
<HasScholarship>Y</HasScholarship>
<Action>CodeC</Action>
</record>
<record>
<IsEnrolled>Y</IsEnrolled>
<IsGraduating>Y</IsGraduating>
<StudentLevel>Senior</StudentLevel>
<StudentType>International</StudentType>
<HasScholarship>Y</HasScholarship>
<Action>CodeD</Action>
</record>
И я хочу, чтобы создать форму HTML из приведенного выше XML:
<body>
<table>
<tr>
<td>IsEnrolled</td>
<td>
<select>
<option>Yes</option>
<option>No</option>
</select>
</td>
</tr>
<tr>
<td>IsGraduating</td>
<td>
<select>
<option>Yes</option>
<option>No</option>
</select>
</td>
</tr>
<tr>
<td>StudentLevel</td>
<td>
<select>
<option>Freshmen</option>
<option>Sophomore</option>
<option>Junior</option>
<option>Senior</option>
</select>
</td>
</tr>
<tr>
<td>StudentType</td>
<td>
<select>
<option>InState</option>
<option>OutOfState</option>
<option>International</option>
</select>
</td>
</tr>
<tr>
<td>HasScholarship</td>
<td>
<select>
<option>Yes</option>
<option>No</option>
</select>
</td>
</tr>
</table>
<span id="Action">Display the Action here based on the selected answers above</span>
</body>
Действие элемент в XML является выход на вопросы. Я хочу отобразить этот вывод в элементе на основе того, что выбрано в HTML-форме.
Возможно ли это? Если да, то как мне подойти к этому?
карту XML к сущности графу, а затем вводят его в шаблон представления, Кстати ваш вопрос слишком широк – InferOn
@InvernoMuto вы могли бы указать мне любой ресурс для сопоставления графа сущности? Я понимаю, что это широкий вопрос, но я хотел знать, возможно ли это и как подойти к этому. – user793468