About HTML embedded XML data island How to cross the tree structure relationship _WML Tutorial

Source: Internet
Author: User
Tags tag name
As the following code details, HTML references XML data island, how to cross the tree structure of the relationship? I don't know how to use the tag name in XML inside this datafld, how to prefix it, how to get the name child element from resume, and how should my HTML file be modified?
The XML data file is
XML Code:
Copy Code code as follows:

<?xml version= "1.0" encoding= "UTF-8"?>
<resume>
<name>mike</name>
<age>29</age>
</resume>

The HTML file is the following:
HTML Code:
Copy Code code as follows:

<body>
<xml id= "myds" src= "Kg.xml" ></XML>
<table datasrc= "myDS" >
<tr>
<td><div datafld= "Resume:name"/></div></td>
<td><div datafld= "Name"/></div></td>
<td><div datafld= "Age"/></div></td>
</tr>
</table>
</body>

To avoid the above problems, there are two points to be modified:
1. datasrc= "# Here I'm missing #
2. span must be used.
The following are the exact code details modified:
XML Code:
Copy Code code as follows:

<?xml version= "1.0" encoding= "UTF-8"?>
<resume>
<name>mike</name>
<age>29</age>
</resume>

HTML Code:
Copy Code code 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 datafld= "Name" ></span></td>
<td><span datafld= "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.