did something yesterday yeah um session is getting recorded what I'm looking at I need to share my window and .... I'm looking at this we're gonna keep it pretty simple in this XML stuff. I've got a couple books here for reference but we're not we're just discussing so share application screen the whole thing okay there it goes all right. So I'm going to bounce into module six which takes us through April 2nd. We're gonna start looking over this what is basic XML. We
are going to keep the discussion pretty simple okay I'm just gonna highlight there's 70 slides on this and your author is very verbose and so you'll see a lot of words but I'm going to just touch on highlight most um important why do we use XML it's a way that we could mark up data what does that mean basically Port data around that describes the data itself um document type definitions and schemas for specifying and validating the structure of an XML just like we talked about the uh HTML validator didn't we or you've come across it because we did one section um where I talked in the Powerpoints about the validator and CSS validators create and use Simple extensible style language style sheets to render XML document data retrieve and manipulate XML data programmatically so we're able we're able to read like it was a field name and understand so it's transmitting and and showing a description of the data in the data XML is portable and can be widely used on a number of items and the XML basics now that one keeping it simple what we see here is that XML describes the data so that a mere humans can interpret it um all right so what we have is here we're calling or telling it that we're using it the XML version 1.0 as its standard so if we were to be doing a validation that's what you would validate on and our comments and then finally line five where they start player have we ever talked about a tag named player? What are some of the tags (we've used)? a picture you know what some of the tags are what oh come on your second right [Music] we've talked about the HTML tag which has the end HTML we had the I, and not I, B for bolds and bold what was another one table do you get what I'm trying to say here is that we have a number of tags table table row table data table header um break um HR um the horizontal rule then we have the um H1 through H6 and those are our attacks um what this data um dtds and schemas allow us to do is we Define a structure that we expect to see the data in and as long as we're following the structure we should be able to go in and gather the data that we need XML documents begin with an XML declaration our comments any elements making sure notice I'm going to come back up here A second we had player end player first name end first name last name ends last name batting average end batting average so what that does is that goes in and describes the data based on simply reading these XML tags can you gather what the data is about first name holds the first name batting average would give you their average so when we do the XML documents what we're doing is we're TR we're ex describing the data a structuring data notice something here article end article title end title date end date then they broke author up into first name and last name end author this is important every start tag has to have an end tag and um the tags need to be nested in such a way that they are we would call it first in last out life elapsed in first out yeah last in lifo lesson first out meaning in this case if you can visualize article as being one platter or one hand and then title an end title date and date so what we're doing here is we're describing the data every start tag has to have an end tag and they have to be layered correctly documents should include the XML placing any characters including white space before the XML declaration is an error an XML document each star tag must have a matching end tag omitting either is a problem as well as not layering them correctly XML is case sensitive you can't have white space because what they're talking about there's a physical space between the um name or in the name because then it's two separate words XML elements that's the field name if you would should be meaningful to humans and should not use abbreviations all right so in this case um nesting tags so we have the X the Y last in first out what this means is this tag over here what's what should be my first Out Tag why to be able to pop off X and in this case we're just going in there and showing you know XML is not going to look pretty because it's about porting the data rather than making it look nice and so showing a little bit of code again contact type type E equals sender name address city state ZIP ends contact type is an attribute contacts and then we have another contact type receiver their name address city state ZIP a paragraph followed by the end paragraph why can't we use the slash P well XML is not HTML HTML and JavaScript the stuff that makes it look pretty um so we had to call it something else so we have paragraphs then closing and signature ends letter and we started with letter here XML is not required to reference a DTD but validating um XML parsers can use a DTD to uh ensure that the document has the proper structure so this is going in there if I tell you um there is one slide out here that goes in and shows you the validation page all right naming collisions what we're finding out is like zip code of 20 years ago is different than zip code of today so what we'd have is a means by using namespaces of keeping those it data separate each name space prefix is bound to a URI that uniquely identifies the namespace and then we go in here where we're doing XML text directory and text and directory trying to see what's image is where we go in and describe what the file name is like we might keep a library of all of our images um dtds allow us to look at other files and see the relationships all right dtds and schemas solve the problem by telling um the computer reading what type of data is expected all right and so they go in here and describe um certain um elements so we're telling it so what we're doing on this part is describing the type of data something is if we're typing it in or getting it from um file it's going to be the PC data and the I so we're going in there and describing all of the elements I'm going to tell you right now I'm not really concerned over that um I what the gist of that you should get XML is used to Port data from new systems like the internet to backend systems like the database server so that they are compatible or they are they serve as the interface w3c goes in um and describes let's see what's important here simple and complex types what we see here simple and complex the only thing that would appear to be quote quote complex is this contact type equals sender sorry close the door please sorry all right um so they're just talking about being well structured tags you get to uh or create your own sample XML code um Visual Basic is the title for the book here's another book visual C another book with the title Java how to program so we basically have well this is under deedle books and and deal books so this would is a listing of all of Dido's books but if it had been another um prolific writer like Cashman um Shelly Cashman that is written for 20 years that list would be much longer all right so we go in and we describe the book list as the namespace and we go in name equals type sequence element name equals book type equals single book type Min occurrence as one maximum is Unbound that was all of sequence and that was all of complexity so we would follow the same pattern that we described in the namespace as to how to interpret the data and what we need to supply to it foreign we go about validating and the data types I mean there's somewhere in here there's a description of how to go about validating we could have a string a Boolean decimal float what's the difference between decimal and Float um integer between and that's less than or equal to zero whereas the floating point is an integer whose absolute value is less than 2 to the 24th and is an integer in the range of 149. so if our numbers are outside of that we can't use it um all right long and none of these data types should surprise you Annie because basically um the LA many of you are taking Python and they have a lot of the same data types or they have a data type that is that but names or are given a different name all right so a simple name restriction minimum inclusive value 2.1 complex name
CPU simple content extension base equals string attribute so we have extension and attribute so then we would have to end extension and then ends excuse me end attributes and this is an empty tag when I say an empty tab do you see at the end of this where it says slash greater than that's the end tag name and this one um there it is end extension and simple content and complex type and some more just showing different ways in which we could describe the data you would have to choose the one way or so that the back end processor is will work with that um all right all right so I was just looking at the projects I try to have two or three in there for each period each module and um this is what I think we're gonna hone in on I'm gonna ask that you do a small small research and when I say small research I mean five well-structured meaty um descriptions of whatever you're researching math ml is a math markup language SVG is another wireless markup language extensible business reporting extensible user interface w-3 schools XML schema extensible style sheets so what do all of these things do is they are specific XML qualities given to certain businesses or certain types of data for example what are some symbols in math that are hard to just simply type in the one that comes to my attention is pi um Sigma the e um those are the ones that come immediately to mind so we need something special to create that so we would use a math markup language um so I'm going to ask there there is quite a few of people I think what I'm going to do is your research well your five well-structured um paragraphs will be included in a discussion board and then you'll have to respond with one good paragraph to at least two others so that we get some discussion moving on some of these things and that way you don't have to be a subject matter in all expert in all of it um you'll just have to know that hey if I'm working in science I need scientific notation stuff what would I use a root node is the math element all right so they're just talking about more of the vocabularies and this is one here where they're showing the markup in math that we had the two plus um number three operator equals and then the answer was five so we would write it like this and it would with the the style sheets it would show up like this again not every browser does displays it nice all right so what about this one where we have something raised to the power and a numerator over a denominator so that's what this is a fraction numerator ah index X so that's 2 over X and it's there in this case we have a minus sign and y so 1 minus y and there it is doing the square you could absolutely see that if you're doing scientific notation and writing this stuff you have to have an editor that allows you to type that stuff in or create it so again some more markup languages I will put in um a number for you to choose from and I want you to go in and give me five good paragraphs when I had to do some of this stuff when I was working on my masters I was more surprised any of it were then to find out when something didn't work it's it gets rather complicated foreign style sheets allow us to go in and display just like a cascading style sheets a extensible style sheet um style sheet allows the markup so the style sheet looks nice and some of the stuff that you have to know all right in creating the style sheets here we have sports href Sports XSL extensible Style and so we tell it paragraph game all of this and when we've done that what it's done is it's taking this Sports X extensible style sheet and telling it qriket's going to be the first thing more popular among um Commonwealth Nations the second one was the idea of 239 baseball 239 baseball more popular in America you'll sometimes see the XML process instructions written as a style sheet with a colon rather than the dash and we got the dash again where we've gone in and described the style sheet um and created link relationship style sheet styles CSS table caption had you're familiar or okay with all those things extensible for each select so what this does is it allows us to go around and around for example if we have 36 payments and we want to see how those payments are amateurized um over the lifetime of the loan that we're able to see it and it adjusts however many rows are needed to accommodate for that particular um loan author chapters all right chapter numbers and we go in and describe the chapters and again all XML is is something that we use we can't Define our own tags that are then used to send data back and forth between an internet technology and a back-end system like a database server and we use style sheets to go in and make the um outputs pretty document object model and the answer was to one of those questions was that it I it the correct one wasn't in there so I believe I gave everybody credit for that one um but this is allows us to go in and keep a structure of what's going on in the data you know what I'm thinking about as we've been working with computers and how much we rely on compute I was just thinking at the college um had a server um malware and it got ransomware all over that would totally devastate everything so um a Dom tree allows us to go in and create a structure in how we are keeping track of the documents um child nodes are those nodes that are um underneath a parent and we should have a parent here um in this case this is a picture is it no all right I just made child notes a no a child knows to node name but when I send it back it child nodes is by itself in the structure so it is a parent with non's throw if the current module node has children so again what it is is just describing the structure keeping try as we rely more and more Heavenly heavily on these black boxes um one of the the biggest things that the Y2K from 23 years ago was we had so many programs not well documented that um we don't know how it works and we've got this big problem we got to fix this goes in there and allows us to structure the the data so that we can keep up with it okay so they're just showing you again last name and first name is a child to author author is a child to article first name and last name are siblings so some common things that we could do with this and I'm really going through this you're not going to see a whole lot if anything on this um so let me see all right all right X path is where to find something uh here title using XPath form ID my form action equals pounds input ID input field type equals text matches button so this goes in and what we're trying to do is we're giving a field name and the data type so this is matches button it's a data type of button that's going to say get matches on it so we would go in there and give us something that we are looking for and it responds back with the data or something that says um no data found all right and we may come back and visit this part A little later um but for now for now looking at this even though it are you understanding a let me do I have my nope nope what marking up data is used for and it's used to move data back and forth through the internet learn how names spaces provide unique elements and attribute names no you don't think separate um the data type definition super specifying and validating the structure so that we know what we're supposed to better Supply or how we're supposed to get data back uh extensible style sheets that go in and lets our data look nice and the idea that we can use XML remember what XML is used for moving data back and forth well we can include JavaScript that can move the data or manipulate the data for us and I hope to get into a little more of that um later on in the the semester all right so far so good so far so good all right so let's take a actually I'm going to stop the recording there recording and
2023-03-26