J2EE TUTORIAL Learning Notes (Chapter 2 Understanding XML) One .IntRoduction TO XML: 1.XML (Extensible Markup Language) is based on the text tag language, with <> tag data, becomes tag, but it is not like HTML, XML tags determined Yes, not a detailed description, how this file is displayed, the XML mainly is related to the data. Example: you@youraddress.com. To> me@myaddress.com from> XML Is Realcy Cool Subject> How Many Ways IS XML COOL? Let me count the Way text> message> This example is determined from the whole. Include its destination address Send address. Title and its content. Data components of XML are determined between ... to> like HTML, and ... to> tag is also included in . .. message> This TAG contains another TAG to make XML's description ingredients of the data structure .2.tag and attributes: tag itself can have its own additional information. Inform, in TAG itself : XML IS real color subject> How much ways is xml cool? Let me count the Way TEXT> message> is the same as the above example, but it makes TO and FROM. Message is also a TAG's Additional Information can simplify code, easy to understand. 3.empty Tag A1: HTML and XML big difference It is also very much when an XML file is well formed, and the most important of which is that each tag has end TAG, so it is essential in the end of to> in XML. (Another important condition is that all TAG is strict In the set, you can ... ... to> ... message> but not ... ... message > ... to>. This is not allowed .a2: Sometimes you want to build an empty tag you can use />, such as:
you@youraddress.com. To> me@myaddress.com from> xml is real cool subject> How Many Ways IS XML Cool® Let Me Count The Way text> message> A3: XML file comment at Note A4: XML PROLOGUE: XML Version = "1.0"?> or XML Version = "1.0" encoding = "ISO-8859-1" Standalone = "yes"?> XML files all in ...?> prologue. The standard format of the XML file is specified in the standard format of the XML file. Use ISO-8859-1.Standalone to indicate whether the file is connected to internal Entity or contact with external data Type. Contact is YES. A5: Process Description: Target Instruction to do?> Target is the name of Application To do processding. A6: Why XML is very important: B1: It is used to explain the text. To know that XML is not 2-in-law format, so you can use any editor to write XML files, usually XML file volume is small, So allow the database to save a large amount of XML data. B2.DATA firm: XML tells us what kind of data. Instead how to go to display it. B3.styLABILITY. When the display is very important, XML will tell you how to describe DATA. For example: you@youraddress.com to> describe the event .1.Start a new line.2display "to" in bold, Followed by a space.3.display the destination Data. These described DATAS. All is for this meaning to: you @
YourradDress.com told us that it is very free to send your address, more importantly, XML is free, you can use a different stylesheet to mark your description, can be a Tex PDF or have no text format that has not yet invented. This is also grateful here to HTML, clarify the connection between files and files, more important. Xml determine 2 links: mutiple-target links (multi-objective connection), Expanding Links. (Extension connection) Handling Easy. The above-mentioned formal XML markup language unified symbols make XML's Process easy, due to the XML strict marking method, so that the XML file is well formed, without any processing error. But The non-standard marking method XML is not executed. B6. Rating XML: XML from its level structure makes XML files more fast. Because you only need to load what you want. 4.XML and SPECS : Digesting The Alphabet Soup You have a certain basic understanding of XML. It is necessary to understand more XML to learn more about XML-related abbreviation formats, which represent what, universal APIs access XML files are continuous, can be random The two APIs are. SAX, and DOM. Make sure the effectiveness of XML is DTD. Another standard property is XSL Standard. A pair of XML translation. For example, HTML is converted to XML form or other The unknown new XML technology indicates how the document is executed, and there is a technology that XML Link Language Specification is 2 XML file connections. There are also some new technologies, XHTML, XML, SMIL, Mathml, SVG .... C1.Basic Standard SAX (Simple API for XML) You can understand it for a continuous access protocol, this is a quick implementation mechanism, but you can understand it to event-driven protocols in Sever, because this Technologies register an SAX interpreter. Since then, when this interpreter sees a new XML TAG, it will feedback the response method. C2.dom (Document Object Model) DOM protocol will make your XML file to a collection of objects You can manipulate the object model, he is a good performance of the Radom Access protocol, because you can Modify data, delete, or insert any new data. C3.jdom and jom4j: The DOM has its limitations here because it does not provide OO-based approach, but JDOM can provide, and more convenient. Jdom It is a clearer and smaller API when Coding Style is more important. Jdom is a very good choice. JDOM4J is a smaller execution faster API. C4.dtd is optional, can be included in yours XML file species, but it can give you a good XML specification. C5.XSL (Extensible Stylesheet Language) This again emphasizes how the XML file indicates how to identify DATA instead of how to display it, and HTML is exactly Conversely. XSL includes 2 parts (Transform Standard XSL-FO (Formating Object)) XSL-FO allows you to identify Multiple Area on Pages. C. 6: XSTL (Extensible Stylesheet Language for Transformation) The XPath Stanrad Is A Addressing mechanism. C6.dtd is not a grading, and an example
As you can see, these instructions are linear, forcing the same elements that are the same for named names in the same name, if you want to join these elements, such as You need a new Identifier. Container. D1.XML Schema: Its standard can be divided into two parts, part of the relationship between specified data, (also the most complicated, part of another part is to confirm the data type of the element by determining the elements of them D3.TREX: TRESS Regular Expression for XML D4.SXO: Schema for Object-Oriented XML F1. Connection Standard: There are a lot of branches in XML Linking: 1.xLink is processing XML The link problem between files, this LINK method can provide a lot of complicated link 'forms, such as multi-document LINK, multiple LINK, et al. 2.XMLBase and XPointer. Generally, XML file processing is file pair The process of files pass through their id. And use XPointer to handle it with the ID. 3.XHTML: Yes XML document is expressed in HTML. G1.knowLage Standard: RDF Schema 5. Create XML file: This section you can learn To how to build an XML file, you can use the text editor to write your own XML file. 1. Create a text editor to create a named Sildesample.xml file 2. Next to write a statement, declare this is an XML file, Opening, XML Version = "1.0" Encoding = 'UTF-8'?> Description Its XML Version is 1.0 uses 8-bit Unicode to write XML files. 3. Write an comment: The comment is not performed. 4. Write the most layered element first XML Version = "1.0" Encoding = 'UTF-8'?> slideow> 5. Add Property: Title = "Sample Slide Show" Data = "Data of Publication" Author = "Yours Truly" slideow> 6. Add Nesting Element: wake up to wonder weidgets! Title> slide> slideow> 7. Add HTML form in the form of text, The text in the form of HTML is the XML Version = '1.0' Encoding = 'UTF-8'?> Encoding = 'UTF-8'?> Encoding = 'UTF-8'?>
wake up to wonderwidgets! Title> slide>
Overview title> - why wonderwidgets em> area great item>
- who Buys em> wonderwidgets item> slide>