更新时间:2023-10-25 23:19:10
请尝试如下。
注意:这是一个样本。请根据你的情况改变它。
XML<? xml version = 1.0 编码 = utf-8 ? >
< BookList >
< 预订 >
< 标题 > jQuery:Ninja的新手< / Title >
< 发布商 > 网站点< / Publisher >
< / Book >
< 预订 >
< 标题 > 学习jQuery < / Title >
< 发布商 > PACKT < /发布商 >
< / Book >
< 预订 >
< 标题 > Head First jQuery < / Title >
< 发布者 > O'Reilly < / Publisher >
< / Book >
< Book >
< 标题 > jQuery UI 1.8 < / Title >
< 发布商 > PACKT < /发布商 >
< / Book >
< / BookList >
Jquery
(document).ready(function(){
(#dvContent)。append(< ; ul > < / ul > );
How to read Xml file contents using javascript or jquery??
I want to read Xml file contents in my asp.net application..
Please try is as below.
Note : This is a sample.Please change it according to your situation.
XML<?xml version="1.0" encoding="utf-8" ?> <BookList> <Book> <Title>jQuery: Novice to Ninja</Title> <Publisher>Site point</Publisher> </Book> <Book> <Title>Learning jQuery</Title> <Publisher>PACKT</Publisher> </Book> <Book> <Title>Head First jQuery</Title> <Publisher>O'Reilly</Publisher> </Book> <Book> <Title>jQuery UI 1.8</Title> <Publisher>PACKT</Publisher> </Book> </BookList>
Jquery
(document).ready(function(){
("#dvContent").append("<ul></ul>");