Deep Dive into XML and Javascript

What is XML?

XML, which stands for eXtensible Markup Language is a versatile format for structuring and storing data within a hierarchical manner with the intention to be readable and understandable by humans and computers, hence the generic text format. XML is a markup language, not a programming language.

XML allows users to create their own custom tags and website content, making it "extensible" and viable for various data structures.

How is XML used?

XML is used for describing data structures, the content within those structures, and the relationships within the structure. Its designed and used to transfer data from one system to another.

XML is very beneficial for companies as they can use it to keep track of information regarding sales, employees, orders, ect. all in one place.

What does XML look like? (Example)


            <EmployeeData>
                <Employee ID='413'>
                    <fName>Johnathan</fName>
                    <lName>Egbert</lName>
                    <position>Biologist</position>
                    <hoursPerWeek>38</hoursPerWeek>
                    <salary>$73,000</salary>
                </Employee>
                <Employee ID='1025'>
                    <fName>Rei</fName>
                    <lName>Ayanami</lName>
                    <position>Spiritualist</position>
                    <hoursPerWeek>46</hoursPerWeek>
                    <salary>$57,000</salary>
                </Employee>
                <Employee ID='1111'>
                    <fName>Peach</fName>
                    <lName>Sugars</lName>
                    <position>Maintinence</position>
                    <hoursPerWeek>28</hoursPerWeek>
                    <salary>$45,000</salary>
                </Employee>
            </EmployeeData>
            

What is JavaScript?

Javascript is a high level text based programming language primarily used on the client side of web development that allows you to customize and control complex website content. It allows much more capabilites into how interactable your website can be with animations, changing content layout, and user interactions.

How is JavaScript related to HTML and CSS?

Javascript builds on the existing HTML and CSS structures and allows users to interact with the displayed media in ways they couldnt before simply using HTML or CSS. Javascript enhances the best parts of both languages and allows for a more memorable web experience which could help with drawing more people to your site.

Common JavaScript Elements, Properties, Methods, and Functions (Example)

Elements: var age = 23, console.log("Log Message");, alert("Alert Message")

Properties: var numberOfFruits = fruits.length, person.age, myObj.cars["car3"]

Method: Math.random(), array.push('Item'), string.toUpperCase()

Function: function(x, y){ return x + y; }, function Hello(name){ console.log("Greetings, " + name); }