Home >Backend Development >XML/RSS Tutorial >Easily display XML data to HTML pages using Spry

Easily display XML data to HTML pages using Spry

陈政宽~
陈政宽~Original
2017-06-28 13:58:473996browse

With the in-depth study of the integrated Spry function in Dreamweavse cs3, we understand and master some functional modules of the Spryframework, including easily displaying XML data into HTML pages through Dreamweavse cs3 visual operations .

Of course, when it comes to how to insert and display XML data into an HTML page, what usually comes to mind immediately is the data island. For example:

##[Ctrl+A Select all Note: If you need to introduce external Js, you need to refresh it before executing]

Of course, you can also use XSLT to display XML into the page, but now using Dreamweaver CS3 integrated Spry function, you can easily embed XML data into HTML, and at the same time, you can also reorder XML data and perform scheduled data
update and no refresh Display etc - standard Spry AJAX application.

1, XML data file: site.xml

##" (Note: When selecting different XPaths, the information that can be finally displayed is different), select the reference node for classification sorting in the "Sort" column, such as selecting descending or ascending order of time, in In "Options" you can set the automatic update of XML data and display without refresh mechanism.

                                                                                   /www.cnbruce.com
;
                                                                                                                                     2006
                                                                 .cc
;








2, add "Spry XML Date Set" in Dreamweaver CS3






3. Browse and select the XML data source
in the dialog box that opens. Then click "Get schema" to extract the XML node display. Select the node in "Row element" to obtain it automatically. "
XPath


4. After completing the binding of XML data, you can display the XML data (
loop) in the HTML page.

Easily display XML data to HTML pages using Spry
Generally speaking, it is easy to get started. It is also very concise to go back to [Code]
View to look at the code. All the work is done by the Spry framework. finished. However, the current problems and considerations are:
1. The data source of Chinese XML nodes cannot be well supported.
2. The hyperlink displayed by XML in HTML cannot be opened.Easily display XML data to HTML pages using Spry3, we need to solve the problem of remote XML data source, which is a function similar to RSS
aggregation

The above is the detailed content of Easily display XML data to HTML pages using Spry. For more information, please follow other related articles on the PHP Chinese website!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn