Method 1: Use the XML Control XML method 1
Method 2: Use DOM technology method 2 of XML reading
Method 3: Use a DataSet object XML reading method 3
Method 4: Read data by text XML reading method 4
The XML file format is as follows:localhostsajiayuanRead a property in a nodeXmlDocument doc=new XmlDocument ();Doc. Load ("config +");XmlNode Xnuser=doc. selectSingleNode ("UserData");String Flag=xnuser. attributes["CreateUser"]. InnerText;Reading
Note: This example is only in the code in order to read a fixed number of values, write a bit dead, so when you use the other to modify or expand their
method One: Using an XML control
Code
Copy Code code as follows:
Read XML method one
method Two: Using DOM technologyCode
Copy Code code as follows:
Read XML
There is an XML file that reads as follows:
Copy Code code as follows:
Simpsons
FOX
8:00 pm
30
law & Order
NBC
8:00 pm
60
Here we use the XmlReader extension to parse and process the file, XmlReader another
Method One: Using an XML control
The code is as follows
Copy Code
Read XML method one
Method two: Using DOM technology
code is as follows
copy code
Read XML Method two
There is a Web project that has a configuration file under the SRC directory webconfig.xml
Handwritten XML parsing class, provided that you add Jdom-2.0.5.jar, Jaxen-1.1.1.jar two jar packages to your project
Import
JavaScript parsing reads an XML file, essentially loading and parsing an XML file, and then it can test the contents of the parsed XML file and print out the output.
Online Demo: http://demo.jb51.net/js/2012/readxml/
Note: Test needs to be tested in
Xml
strSourceFile = Server.MapPath (dataxml& "/advertisement/" &id& "/adv.xml")Set objxml =server.createobject ("Microsoft.XMLDOM") ' creates an XML pair likeObjxml.load (strsourcefile) ' reads the XML file into memorySet
Http://commons.apache.org/configuration/apidocs/index.htmlCommons Configuration provides a generic Configuration interface which enables a Java application to
Read configuration data from a variety of sources.
Propertiesconfiguration loads
The output is in the following statement: Echo iconv ("UTF-8", "GBK", $Song _url); Solve Chinese garbled problem
A The first is the coding of PHP pages
1. php file itself and the encoding of the Web page should match
A. If you want to use gb2312
Asp.net|xml| problem units need to update the previous news system, need to connect with the modern society, so began to study the XML to store the news method.
Found a very famous on the Internet to read the XML file as a news method, the code is
After reading the questions on the Forum, I finally learned how to implement list nesting in store with has#and BelongTo. First look at the Interface source code & lt; html & gt; & lt; head & gt; & lt ;! -- PutyourpageTitlehere -- & gt; & lt; title &
This article mainly introduces jQuery's method of reading XML file content, and analyzes jQuery's skill in operating XML files, for more information about how jQuery reads the content of an XML file, see the following example. Share it with you for
OPENXML is a rowset function (that is, a rowset is returned), which works in a way similar to the rowset functions OPENQUERY and OPENROWSET. You can use OPENXML to perform JOINs operations on XML data without importing data first. You can also use
At present, there are about 100,000 second-level nodes, and each second-level node has a fourth-level node. I use php and echo, which consumes a lot of memory. Method brute force: {code...} is mainly used to import data to mysql. Is there any
Create a navigation menu for product classification based on the customer's needs, which was previously read recursively using ASP. It is slow and consumes a lot of server resources. Simply change it to AJAX + XML. Share it with you. I hope you can
At this point, you can send a request to read the XML data on the server. The last thing to do is to process the data. For more information About XMLHttpRequest objects, see the document About XMLHttpRequest Object.Example:// AjaxDemo.html
In.. net development often needs to read and write xml files (app. config and web. config is a special column of the xml file used in WinForm and WebForm respectively, and Microsoft provides a general method, so we will not repeat it here ),. the.
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.