Xml functions and syntax

Source: Internet
Author: User
Tags processing instruction
Some special characters are embedded in xml, which cannot be directly output by the browser as is. If you want to output these special characters to the browser as they are, escape these special characters. Escape characters are called escape bytes.
2. XML role 2.1 describe the relational data (software configuration file) web server (PC ): student Management-> Add Student function-> Add student page-> name = eric & email = eric@qq.com prerequisites: Network (IP address: oracle: ipv43.12.54 Port: 1521) java code: connect to the oracle database using the ip address (ipv43.12.54) and Port (1521) to save student data. Configure the IP address port to the xml file host. xml.
 
  
   
201743.12.55
  
  
   
1521
  
 Database Server (PC): Master server (ipv43.12.54): Oracle Database software (load) slave server (ipv43.12.55): Oracle Database software 2.2 data carrier (small "database ") instructor management system: name length of service + 1 email sending instructor data to financial management system: String teacher = name = Zhang San & email = zhangsan@qq.com & workage = 2 String (question: 1) bad parsing 2) not a standard) teacher. xml
 
  
   
Zhang San
  
  
   
Zhangsan@qq.com
  
  
   
2
  
 This kind of standardized financial management system: name length of service + 1 mailbox bonus: statistical bonus. Length of service mail function: email name amount Solution 1: a set of instructor information is maintained in the financial management system. Every year: the length of service increases the maintenance information of two systems. Solution 2: Teachers' information is only maintained in the teaching management system. 3. XML syntax the xml file ends with an xml suffix. The xml file must be parsed using the xml parser. The browser has a built-in xml parser. 3.1 tag syntax:
 Start Tag body content end tag 1)
 Or
 Empty tag. No Tag body content 2) xml tag names are case sensitive. 3) the xml tag must be correctly matched. 4) spaces are not allowed between xml tag names. 5) xml tag names cannot start with numbers. 6) Note: in an xml document, there is only one root tag 3.2 attribute syntax:
 
  
Student
 Name: attribute name. Name = "eric" attribute value note: 1) the attribute value must be enclosed in quotation marks and cannot be omitted or mixed in single double quotation marks !!! 2) a tag can contain multiple attributes, but duplicate attribute names are not allowed !!! 3.3 annotation language:
 Exercise: contact data in the address book system: ID (unique) name age phone number Email QQ requirements: contact. xml1) design an xml file for storing contact data. 2) This xml file can be used to access multiple contacts. 3.4 document declaration syntax:
 Version: xml version number encoding: the code table to be queried when parsing an xml file (the code table to be queried during decoding). Note the encoding method when the browser opens: 1) if you develop an xml file in the ecplise tool, the file is automatically saved according to the declared encoding when saving the xml file. 2) If you use notepad to modify the xml file, pay attention to [Save the xml file] and save it according to the encoding code table declared in the document. 3.5 escape characters are embedded with some special characters in xml, which cannot be directly output by the browser as is. If you want to output these special characters to the browser as they are, escape these special characters. Escape characters are called escape bytes. Special character escape characters <> "" & Space & nsbp; 3.6 CDATA block function: Allows you to generate [original output] for some content that requires special characters.<itcast><br/></itcast>      3.7 processing command function: tells xml parsing if the xml document processing command is parsed, referred to as PI (processing instruction ). The processing command is used to direct the parsing engine to parse the XML document content. For example, you can use the XML-stylesheet command in the xml document to notify the XML parsing engine and apply the css file to display the content of the xml document.
 The processing command must start with"
 "As the end, XML declaration statements are the most common processing commands.

The above is the content of the xml function and syntax. For more information, see The PHP Chinese website (www.php1.cn )!

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.