# XML Extensible Markup Language (**XML**) is a markup language and file format for storing, transmitting, and reconstructing arbitrary data. It defines a set of rules for encoding documents in a format that is both human-readable and machine-readable. - Utilized often in [BBEdit](obsidian://open?vault=Coding%20Tips&file=Computers%2FMac%20OS%20X%2FBBEdit) for CLMs. - [This](https://www.w3schools.com/xml/xml_tree.asp) is a fantastic article explaining how an XML diagram which we learned about in software engineering directly translates to the XML code that is used by the system. This is why diagrams are so important in software engineering overall. - This [website](https://www.hezhengda.io/xml-file-from-quantum-espresso/) discusses how to extract XML files from quantum espresso. - XML formatter --> freeformatter.com For example, this is the XML diagram: ![[Pasted image 20221208133914.png]] And this would be the XML code: ```        Everyday Italian     Giada De Laurentiis     2005     30.00           Harry Potter     J K. Rowling     2005     29.99           Learning XML     Erik T. Ray     2003     39.95    ``` Wait so hold on just a second, wouldn't this have applications in quantum?? - apparently, [this](https://github.com/photonquantum/actix-xml) is a XML extractor for actix-web a framework that is used in Rust ![[Pasted image 20230901124958.png]] ### XPATH A query language for navigating in XML document or extract elements in HTML documents [XPath Generator](https://www.youtube.com/redirect?event=video_description&redir_token=QUFFLUhqbDNpRmQ5eUJ6amJvRFliRkFfcFI3Tk00RFNhQXxBQ3Jtc0tudXpjSVJ3RUE3TUhFTWtNMFIyVnlhaVFDUm5aTS1wRmZZVnVtdGlabVVPcDJ1Vkd5cnU0QkFINFZEeGR4T1VJX3lJM2tEVkx2ZDYyV3lkVlVHTnViN2RTc2J6WjE4c3MyMWt4aU9ZOUJnS0lvMnE5WQ&q=https%3A%2F%2Fwww.easycodeforall.com%2FXPathUtility.jsp&v=U-MZJ6rbqi4) Extract Value from [XPath Tool]([http://xpather.com/](https://www.youtube.com/redirect?event=video_description&redir_token=QUFFLUhqbEFrOUp0QnNFZGUwdlNNdDI0Z2ZsbkZmUmpld3xBQ3Jtc0tsX3JXTk1raHpQb2VHSEFOdlVBbTJ4eVlEdGk3a3BMSGpGczhMT0FTUWZpQ3hnV0h0UW1RRG1xOE5EMGNVSmRLRWo4SmtGSnczX2xjb0RBajR0aUVXOEtJRS1OSDk0eEc2NUp2a2xOM191dXZOMlNPTQ&q=http%3A%2F%2Fxpather.com%2F&v=U-MZJ6rbqi4)) [Retrieve XPath](https://www.youtube.com/redirect?event=video_description&redir_token=QUFFLUhqblczUWVNMHB0ZFVxcGlXWGp3MGNjalhEUnBVQXxBQ3Jtc0tuaVRUTUJlN0hjeEpEQS03eS1jQmdGY0U4ODlDUzBqUE1xNVAzcFV6ZDZJM1U3clJmVy0tQkZIN2dNV0hDRjhYaTQyb3A3VVlzU2ZNazRSeWREM3E5dUthWWdETURQbWlXc2dGLTQ5LU8wa1JTR0dlUQ&q=https%3A%2F%2Fxmltoolbox.appspot.com%2Fxpath_generator.html&v=U-MZJ6rbqi4) by clicking on XML Document ### XSL/XSLT XSL - eXtensible Stylesheet Language - a styling language for XML XSLT - XSL Transformations - transforms XML documents into other formats like HTML ```xml Graham Hall Garry ``` ```xsl

Student List < /h2> First Name Last Nam Nick Name ``` Output: ![[Pasted image 20230901130417.png]] #### XML Scheme: ``` ``` It is **Valid** if it follows an XML Schema or XSD (XML Scheme definition) XML Scheme describes the structure of an XML document, written in XML [XSD Generator ](https://www.youtube.com/redirect?event=video_description&redir_token=QUFFLUhqbXVlTHJCdm96UjRDSzJHOVZwVklhRTF1YWNZZ3xBQ3Jtc0ttVE5qc3BGV3d5d3NoUDBKUXYwZFpBbFdRX2xJODZkcDVsWDRqLXhobE9yYXVsRDFMbW5HWndkcmpaNk5zLXZxZ1VVQVRPZ0RWd0w1ZXR0ZEIzdnEzRFNYUE9SeGpTSzgxcnpKUm5NdWF5WWFWWHdlZw&q=https%3A%2F%2Fwww.freeformatter.com%2Fxsd-generator.html&v=1BjmZHRHDv0) Example: ``` ``` Ensure that it is valid. ### DOM DOM stands for Document Object Model. It represents the content of xml as a tree structure. ![[Pasted image 20230901131941.png]] It can easily read, access, update the contents of the document & it is a programming interface (API). It is an object-oriented representation of the web page. All XML DOMs can be accessed by any scripting language like Javascript. Every web browser uses some document object model to make web pages accessible via JavaScript.