Detailed introduction to the sample code of the XML reader

Source: Internet
Author: User
Tags xml reader tutorialspoint
This chapter describes how to view XML documents. You can use a simple text editor or any browser to view XML documents. Most mainstream browsers support XML. You can open the XML file in the browser by double-clicking the XML file (if it is a local file) or entering the URL path in the address bar (if the file is on the server, you can also open other files in the browser in the same way. The XML file is saved as & quot;. xml & quot; extension. This chapter describes how to view XML documents. You can use a simple text editor or any browser to view XML documents. Most mainstream browsers support XML. You can open the XML file in the browser by double-clicking the XML file (if it is a local file) or entering the URL path in the address bar (if the file is on the server, you can also open other files in the browser in the same way. The XML file is saved as a ". xml" extension.

Next, let's explore how to view XML files. The following example (sample. xml) applies to all sections in this chapter.

 
     
  
   Tanmay Patil
      
  
   TutorialsPoint
      
  
   (011) 123-4567
  
 

Text editor

Any simple text editor, such as Notepad, Textpad, or TextEdit, can be used to create or view an XML document, as shown below:

XML document errors

If some labels are missing in our XML code, a message is displayed in the browser. We can try to open the following XML file in Chrome.

 
     
  
   Tanmay Patil
      
  
   TutorialsPoint
      
  
   (011) 123-4567
  
 

The start and end tags in the above code do not match (I .e. _ contactinfo tag), so the browser will display an error message, as shown below:

The preceding section details the sample code of the XML Reader. For more information, see other related articles in the first PHP community!

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.