The following code details refer to the xml data island in html. How does one link through the tree structure? I don't know how to use the tag name in xml, how to add a prefix, and how to get the name sub-element from resume? At the same time, how should I modify my html file?
The xml data file is:
XML code:
Copy codeThe Code is as follows: <? Xml version = "1.0" encoding = "UTF-8"?>
<Resume>
<Name> mike </name>
<Age> 29 </age>
</Resume>
The html file looks like this:
HTML code:Copy codeThe Code is as follows: <Body>
<XML id = "myds" src = "kg. xml"> </XML>
<Table datasrc = "myds">
<Tr>
<Td> <div dataworkflow = "resume: name"/> </div> </td>
<Td> <div dataworks = "name"/> </div> </td>
<Td> <div dataworks = "age"/> </div> </td>
</Tr>
</Table>
</Body>
</Html>
To avoid the above problems, there are two points to be modified:
1. datasrc = "# I missed #
2. span is required.
The correct code details are as follows:
XML code:Copy codeThe Code is as follows: <? Xml version = "1.0" encoding = "UTF-8"?>
<Resume>
<Name> mike </name>
<Age> 29 </age>
</Resume>
HTML code:Copy codeThe Code is as follows: <xml id = "XMLData" src = "test. xml"> </xml>
<Table id = "tblbooks" datasrc = "# XMLData" border = 1 datapagesize = 2 width = "100%">
<Thead>
<Th style = "font-style: blod"> name </th>
<Th style = "font-style: blod"> age </th>
</Thead>
<Tr>
<Td> <span dataworks = "name"> </span> </td>
<Td> <span dataworks = "age"> </span> </td>
</Tr>
</Table>