Question about how html embedded xml data island passes through the tree structure

Source: Internet
Author: User

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>

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.