J2EE TUTORIAL Learning Notes (Chapter 2 Understanding XML)

zhaozj2021-02-16  55

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. me@myaddress.com XML Is Realcy Cool How Many Ways IS XML COOL? Let me count the Way This example is determined from the whole. Include its destination address Send address. Title and its content. Data components of XML are determined between ... like HTML, and ... tag is also included in . .. 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 How much ways is xml cool? Let me count the Way 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 in XML. (Another important condition is that all TAG is strict In the set, you can ... ... ... but not ... ... ... . This is not allowed .a2: Sometimes you want to build an empty tag you can use />, such as:

you@youraddress.com. me@myaddress.com xml is real cool How Many Ways IS XML Cool® Let Me Count The Way A3: XML file comment at Note A4: XML PROLOGUE: or 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 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 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, 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 5. Add Property: Title = "Sample Slide Show" Data = "Data of Publication" Author = "Yours Truly" 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'?></p> <p><! - a Sample Set of Slides -> <Slideshow Title = "Sample Slide Show" Date = "Date of Publication" Author = "Yours Truly"></p> <p><! - title slide -> <slide type = "all"> <title> wake up to wonderwidgets! </ Title> </ slide></p> <p><! - overview -> <slide type = "all"> <title> Overview </ title> <item> why <em> wonderwidgets </ em> area great </ item> <item /> <item> who <em> Buys </ em> wonderwidgets </ item> </ slide></p></div><div class="text-center mt-3 text-grey"> 转载请注明原文地址:https://www.9cbs.com/read-22867.html</div><div class="plugin d-flex justify-content-center mt-3"></div><hr><div class="row"><div class="col-lg-12 text-muted mt-2"><i class="icon-tags mr-2"></i><span class="badge border border-secondary mr-2"><h2 class="h6 mb-0 small"><a class="text-secondary" href="tag-2.html">9cbs</a></h2></span></div></div></div></div><div class="card card-postlist border-white shadow"><div class="card-body"><div class="card-title"><div class="d-flex justify-content-between"><div><b>New Post</b>(<span class="posts">0</span>) </div><div></div></div></div><ul class="postlist list-unstyled"> </ul></div></div><div class="d-none threadlist"><input type="checkbox" name="modtid" value="22867" checked /></div></div></div></div></div><footer class="text-muted small bg-dark py-4 mt-3" id="footer"><div class="container"><div class="row"><div class="col">CopyRight © 2020 All Rights Reserved </div><div class="col text-right">Processed: <b>0.047</b>, SQL: <b>9</b></div></div></div></footer><script src="./lang/en-us/lang.js?2.2.0"></script><script src="view/js/jquery.min.js?2.2.0"></script><script src="view/js/popper.min.js?2.2.0"></script><script src="view/js/bootstrap.min.js?2.2.0"></script><script src="view/js/xiuno.js?2.2.0"></script><script src="view/js/bootstrap-plugin.js?2.2.0"></script><script src="view/js/async.min.js?2.2.0"></script><script src="view/js/form.js?2.2.0"></script><script> var debug = DEBUG = 0; var url_rewrite_on = 1; var url_path = './'; var forumarr = {"1":"Tech"}; var fid = 1; var uid = 0; var gid = 0; xn.options.water_image_url = 'view/img/water-small.png'; </script><script src="view/js/wellcms.js?2.2.0"></script><a class="scroll-to-top rounded" href="javascript:void(0);"><i class="icon-angle-up"></i></a><a class="scroll-to-bottom rounded" href="javascript:void(0);" style="display: inline;"><i class="icon-angle-down"></i></a></body></html><script> var forum_url = 'list-1.html'; var safe_token = '9rGquNBRUpVdRoT2FB511pAStOiQjs6XMP75YzrKC6E5_2BfTC3Set0f7BUDbDmA0jM6YfhOzWAl2Q7he0VVJgsg_3D_3D'; var body = $('body'); body.on('submit', '#form', function() { var jthis = $(this); var jsubmit = jthis.find('#submit'); jthis.reset(); jsubmit.button('loading'); var postdata = jthis.serializeObject(); $.xpost(jthis.attr('action'), postdata, function(code, message) { if(code == 0) { location.reload(); } else { $.alert(message); jsubmit.button('reset'); } }); return false; }); function resize_image() { var jmessagelist = $('div.message'); var first_width = jmessagelist.width(); jmessagelist.each(function() { var jdiv = $(this); var maxwidth = jdiv.attr('isfirst') ? first_width : jdiv.width(); var jmessage_width = Math.min(jdiv.width(), maxwidth); jdiv.find('img, embed, iframe, video').each(function() { var jimg = $(this); var img_width = this.org_width; var img_height = this.org_height; if(!img_width) { var img_width = jimg.attr('width'); var img_height = jimg.attr('height'); this.org_width = img_width; this.org_height = img_height; } if(img_width > jmessage_width) { if(this.tagName == 'IMG') { jimg.width(jmessage_width); jimg.css('height', 'auto'); jimg.css('cursor', 'pointer'); jimg.on('click', function() { }); } else { jimg.width(jmessage_width); var height = (img_height / img_width) * jimg.width(); jimg.height(height); } } }); }); } function resize_table() { $('div.message').each(function() { var jdiv = $(this); jdiv.find('table').addClass('table').wrap('<div class="table-responsive"></div>'); }); } $(function() { resize_image(); resize_table(); $(window).on('resize', resize_image); }); var jmessage = $('#message'); jmessage.on('focus', function() {if(jmessage.t) { clearTimeout(jmessage.t); jmessage.t = null; } jmessage.css('height', '6rem'); }); jmessage.on('blur', function() {jmessage.t = setTimeout(function() { jmessage.css('height', '2.5rem');}, 1000); }); $('#nav li[data-active="fid-1"]').addClass('active'); </script>