2024-02-08T17:48:46 Status: #moc Tags: #xml Links: [[home]] | [[Technology]] | [[Software Development]] | [[Standards]] | [[XSLT]] | [[XPath]] | [[XQuery]] | [[XML Schema]] | [[XBRL]] # XML The Extensible Markup Language (XML) is a subset of [[SGML]] that is completely described [in this document](http://www.w3.org/TR/xml11). Its goal is to enable generic SGML to be served, received, and processed on the Web in the way that is was originally only possible with [[HTML]]. XML has been designed for ease of implementation and for interoperability with both SGML and HTML. ![[afalk42_An_illustration_for_a_knowledge_base_article_on_XML_tha_ff3ddc3e-6497-470d-8c3f-959137c96e9c.png]] XML is the foundation of an incredible number of essential standards, protocols, and applications. The power of XML comes from the whole suite of related standards that aid with structuring and processing XML data, such as [[XML Schema]], [[XPath]], [[XQuery]], [[XSLT]], etc. Here is an example of a an XML document representing a purchase order: ```xml <?xml version="1.0"?> <ipo:purchaseOrder xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:ipo="http://www.altova.com/IPO" orderDate="2023-12-01" xsi:schemaLocation="http://www.altova.com/IPO ipo.xsd"> <shipTo export-code="1" xsi:type="ipo:EU-Address"> <ipo:name>Helen Zoe</ipo:name> <ipo:street>47 Eden Street</ipo:street> <ipo:city>Cambridge</ipo:city> <ipo:postcode>126</ipo:postcode> </shipTo> <billTo xsi:type="ipo:US-Address"> <ipo:name>Robert Smith</ipo:name> <ipo:street>8 Oak Avenue</ipo:street> <ipo:city>Old Town</ipo:city> <ipo:state>AK</ipo:state> <ipo:zip>95819</ipo:zip> </billTo> <Items> <item partNum="833-AA"> <productName>Lapis necklace</productName> <quantity>2</quantity> <price>99.95</price> <ipo:comment>Need this for the holidays!</ipo:comment> <shipDate>1999-12-05</shipDate> </item> <item partNum="748-OT"> <productName>Diamond heart</productName> <quantity>1</quantity> <price>248.90</price> <ipo:comment>Valentine's day packaging.</ipo:comment> <shipDate>2000-02-14</shipDate> </item> </Items> </ipo:purchaseOrder> ``` Where in an HTML document you would see pre-defined elements, such as `<body>` and `<p>`, in XML the elements and attributes can be defined arbitrarily and can be prescribed either in a DTD (Document Type Definition) or [[XML Schema]]. Furthermore, XML is based on the Unicode standard, so element and attribute names do not have to follow the English language or US ASCII characters, but can use glyphs from any writing system in the world. Here is an example of a Japanese XML document with embedded DTD: ```xml <?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE 文書 [ <!ELEMENT 文書 (題,(段落|図面)*)> <!ATTLIST 文書 改訂日付 CDATA #IMPLIED> <!ELEMENT 題 (#PCDATA)> <!ELEMENT 段落 (#PCDATA)> <!ELEMENT 図面 EMPTY> <!ATTLIST 図面 図面実体名 ENTITY #REQUIRED> <!ENTITY 会社名 "東芝"> <!ENTITY サンプル SYSTEM "サンプル.gif" NDATA gif> <!NOTATION gif SYSTEM "IE"> ]> <文書 改訂日付="1999年3月1日"> <題>サンプル</題> <段落>これはサンプル文書です。</段落> <!-- コメント --> <段落>&会社名;</段落> <図面 図面実体名="サンプル" /> </文書> ``` XML documents can be rendered into presentation formats such as [[HTML]] or PDF using stylesheets, for example [[XSLT]] and [[CSS]]. ## XML Tools [[Altova]], known for creating software tools that assist developers, data specialists, and other IT professionals, offers a comprehensive lineup of XML toolsets that include, but are not limited to: 1. **[[XMLSpy]]**: A premier [XML editor](https://www.altova.com/xmlspy-xml-editor) that provides powerful editing views and features, debugging and profiling tools, graphical schema design, and the ability to generate code in multiple programming languages. 2. **[[MapForce]]**: A graphical data mapping, conversion, integration and [ETL tool](https://www.altova.com/mapforce/etl-tool) that simplifies the process of transforming data between XML, databases, flat files, JSON, EDI, Excel, Protobuf, and Web services. 3. **[[StyleVision]]**: A tool for designing visually compelling reports and forms based on XML, SQL database, and XBRL inputs, with the ability to output to HTML, PDF, Word, and other formats. 4. **[XML Schema Editor](https://www.altova.com/xmlspy-xml-editor#xsd_editor)**: Offers a visual and textual editing mode, enabling easy development and understanding of complex XML Schema (XSD) documents. 5. **[XSLT Editor](https://www.altova.com/xmlspy-xml-editor#xslt)**: Provides features for efficient development of XSLT stylesheets, including powerful debugging capabilities. 6. **[XPath Editor](https://www.altova.com/xmlspy-xml-editor#xpath)**: A utility for building and testing XPath expressions, which are used to navigate XML documents. 7. **[XQuery Editor](https://www.altova.com/xmlspy-xml-editor#xquery_editor)**: Assists in the creation and debugging of XQuery statements, essential for querying collections of XML data. Additionally, Altova emphasizes integration capabilities across the tools, facilitating seamless workflows for XML development and data integration projects. Their tools are geared towards a wide array of users – from beginners to advanced professionals – and are designed to increase productivity, enhance data quality, and streamline the development process. ## References - https://www.w3.org/TR/xml11/ - https://www.altova.com/xml-tools