XML
Contents |
eXtensible Markup Language (commonly abbreviated as XML) is the leading data exchange format. Started as an offshoot of the SGML standard, it adds a greater level of syntax control with self-policing through validation of schemas/DTDs which provide a strict set of structural rules for a given XML document. These features of XML make it easier to later extract and reuse the data itself, the data's associated metadata (if any), or additional semantics from the structure or hierarchy of the original application data.
XML was initially envisioned as a complement to the widely adopted and successful HTML, but rather than being concerned with presentation, XML would be focused on providing a markup language for data, content and information itself, for easier sharing and reuse between applications of all types. The development of XML lead to the concept of remotely accessing and sharing not just documents or specific pieces of data between applications, but actually remotely communicating between disparate application's code (specific instances, functions or methods), or more formally, providing direct access to an application's API via structured markup. This lead to the development of a formal standard for remote application communication and API interchange known as XML-RPC.
For some, XML-RPC was not enough as it only provided extremely limited possibilities for types of application functionality it could encapsulate; for example, it had trouble with certain authentication scenarios, real-time transactional operations, as well as push message-driven or event-based responsive systems (among others). Web Services were invented as a contract-based API invocation definition via well-defined XML data operation endpoints, and mainly went a few steps further than XML-RPC by defining WSDL as a binding language to describe available operations (functions/methods) and proved the need for a more formal declaration since XML was such a permissive technology in terms of how a document can actually be structured (i.e. HTML has a limited number of possible tags, but with XML the total number of possible tags is virtually infinite and constrained only by the imagination of the developer and need only be syntactically correct and well-formed).
SOAP, the first of the major Web Service technologies was initially developed jointly by the W3C and Oasis; te SOAP specification along with the associated WS-* standards was the end result of several years of research from volunteer representatives from leading IT firms at the time (starting with mainly Microsoft, but eventually getting contributions from IBM, Oracle, Sun Microsystems, Nokia, Google, Yahoo, AOL, Canon, SAP, BEA Systems, Software AG/webMethods, etc). The existence of both Web Services and more informal XML APIs enabled a new boom in application development, centered around the mashup of data between disparate applications, companies, domains, services and websites. This lead to the creation of AJAX, formalization of the informal XML API's into REST (as a new type of Web Services unto their own), and several related web application development technologies (i.e. Flex) which provided interesting new ways of interacting with and creating insightful views on data that had been available separately on the web already, but which could not be very easily mashed up or combined/presented in visually appealing or unique ways. The advent and rapid adoption of these new web technologies is often referred to as the Web 2.0 revolution or second boom period, a term whose meaning is rarely agreed upon but generally refers to a reinvigorating of the web development, E-Commerce and IT industries after the Dot-com bust.
One famous example of a pre-XML mashup which used scraping to painfully pull data out of malformed HTML is HousingMaps[1]. In the post-XML, Web 2.0 era it has become much easier to integrate the many services and applications which provide some form of Web Service or API to access their application's data and functionality, some examples of rich mashups include: TripperMap (AJAX, Flickr + TripIt + GoogleEarth), GeoBestOfYouTube (AJAX, YouTube + GMapify/GoogleMaps), PlayMyMusicVideos (AJAX, Last.FM + YouTube), PopURLs (AJAX, Flickr + YouTube + Digg + Reddit + Delicious + RSS News Aggregator), Musicovery (FLEX, using MusicGenome + Last.FM + Amazon).
Specifications
- Extensible Markup Language (XML) 1.0: http://www.w3.org/XML/
- Extensible Markup Language (XML) 1.0: http://www.xml.com/axml/axml.html (the official XML spec with annotations throughout)
- Link Relations: https://www.iana.org/assignments/link-relations/link-relations.xhtml (discoverability standard via a single <link
- The XML Spec Schema and Stylesheets: http://www.w3.org/2002/xmlspec/
- XML Encryption Syntax and Processing: http://www.w3.org/TR/xmlenc-core/
- XML Signature Syntax and Processing (Second Edition): http://www.w3.org/TR/xmldsig-core/
XML Structure
Header
The standard XML header should look like this:
<?xml version="1.0" encoding="UTF-8"?>
NameSpaces - xmlns
XML namespaces are used for providing uniquely named elements and attributes in an XML instance. They are defined by a W3C recommendation called Namespaces in XML. A namespace is declared using the reserved XML attribute xmlns, the value of which must be a Uniform Resource Identifier (URI) reference. [2] It is included as an attribute into the root of the actual parent (first element) of the XML, for example, this code includes the XHTML namespace from W3C:
xmlns="http://www.w3.org/1999/xhtml"
Elements
What is an XML Element?
An XML element is everything from (including) the element's start tag to (including) the element's end tag.
An element can contain other elements, simple text or a mixture of both. Elements can also have attributes.
<bookstore> <book category="CHILDREN"> <title>Harry Potter</title> <author>J K. Rowling</author> <year>2005</year> <price>29.99</price> </book> <book category="WEB"> <title>Learning XML</title> <author>Erik T. Ray</author> <year>2003</year> <price>39.95</price> </book> </bookstore>
In the example above, <bookstore> and <book> have element contents, because they contain other elements. <author> has text content because it contains text.
Attributes
What are XML ATTRIBUTES?
From HTML you will surely remember this (even if you've only ever glanced at a "View Source" HTML display of a webpage before): <img src="computer.gif">. The "src" attribute provides additional information about the <img> element.
In HTML (and in XML) attributes provide additional information about elements.
Attributes often provide information that is not a part of the data. In the example below, the file type is irrelevant to the data, but important to the software that wants to manipulate the element:
XML Attributes Must be Quoted
Attribute values must always be enclosed in quotes, but either single or double quotes can be used. For a person's sex, the person tag can be written like this:
<person sex="female">
or like this:
<person sex='female'>
XML Elements vs. Attributes
Take a look at these examples:
<person sex="female"> <firstname>Anna</firstname> <lastname>Smith</lastname> </person>
<person> <sex>female</sex> <firstname>Anna</firstname> <lastname>Smith</lastname> </person>
In the first example sex is an attribute. In the last, sex is an element. Both examples provide the same information.
There are no rules about when to use attributes and when to use elements. Attributes are handy in HTML. In XML my advice is to avoid them. Use elements instead.
W3C Recommended Approach
The following 3 XML documents contain exactly the same information:
A date attribute is used in the first example:
<note date="10/01/2008"> <to>Tove</to> <from>Jani</from> <heading>Reminder</heading> <body>Don't forget me this weekend!</body> </note>
A date element is used in the second example:
<note> <date>10/01/2008</date> <to>Tove</to> <from>Jani</from> <heading>Reminder</heading> <body>Don't forget me this weekend!</body> </note>
An expanded date element is used in the third: (THIS IS MY FAVORITE):
<note> <date> <day>10</day> <month>01</month> <year>2008</year> </date> <to>Tove</to> <from>Jani</from> <heading>Reminder</heading> <body>Don't forget me this weekend!</body> </note>
Avoid XML Attributes?
Some of the problems with using attributes are:
* attributes cannot contain multiple values (elements can) * attributes cannot contain tree structures (elements can) * attributes are not easily expandable (for future changes)
Attributes are difficult to read and maintain. Use elements for data. Use attributes for information that is not relevant to the data.
Don't end up like this:
<note day="10" month="01" year="2008" to="Tove" from="Jani" heading="Reminder" body="Don't forget me this weekend!"> </note>
XML Attributes for Metadata
Sometimes ID references are assigned to elements. These IDs can be used to identify XML elements in much the same way as the ID attribute in HTML. This example demonstrates this:
<messages> <note id="501"> <to>Tove</to> <from>Jani</from> <heading>Reminder</heading> <body>Don't forget me this weekend!</body> </note> <note id="502"> <to>Jani</to> <from>Tove</from> <heading>Re: Reminder</heading> <body>I will not</body> </note> </messages>
The ID above is just an identifier, to identify the different notes. It is not a part of the note itself.
What I'm trying to say here is that metadata (data about data) should be stored as attributes, and that data itself should be stored as elements.
Tools
- Validate your XML files (against DTD or XML Schemas): http://www.xmlvalidation.com
- XML Marker (DESKTOP): http://symbolclick.com/quick_start.htm
- XML Grid (ONLINE): http://xmlgrid.net/ (Web based XML viewer and editor)[5]
- URLEncode and URLDecode Tool: http://www.albionresearch.com/misc/urlencode.php
- Remove Line Breaks: http://www.textfixer.com/tools/remove-line-breaks.php
- HTML escape online tool: http://www.htmlescape.net/htmlescape_tool.html
- XML Beautifier (format non-whitespaced/tabbed into more human-readable tabbed/spaced XML): http://codebeautify.org/xmlviewer
- XML to Java POJO generator: http://pojo.sodhanalibrary.com/Convert
- Pretty XML tree view for Opera: http://blog.webkitchen.cz/pretty-xml-tree[6]
XML Parsers
To read and update - create and manipulate - an XML document, you will need an XML parser. Parsers vary by language and implementation, but are typically an interface to a library of reusable code which can be customized to grab the structure and contents of XML data or XML documents.
There are two basic types of XML parsers:
- Tree-based parser: This parser transforms an XML document into a tree structure. It analyzes the whole document, and provides access to the tree elements. e.g. the Document Object Model (DOM)
- Event-based parser: Views an XML document as a series of events. When a specific event occurs, it calls a function to handle it
Java
- Simple XML Serialization lib: http://simple.sourceforge.net/ (simple Java-based replica of C#'s XML serializer)
- Xerces: http://xerces.apache.org/xerces-j/ (fully validating, XML, DTD, XSD & XSLT supporting parser)
- Castor: http://castor.codehaus.org/ (library-independent Java 5+ compliant XML to class generator) [7]
- Apache XMLBeans: http://xmlbeans.apache.org/ (generate XSD from Java or library-dependent Java classes from XSDs) | DOWNLOAD | TOOLS[8]
- VTD-XML: http://vtd-xml.sourceforge.net/ (XimpleWare's XML processing model for SOA and Cloud Computing real-time XML processing for large data sources)
SAX
- SAX project: http://www.saxproject.org/[9]
- Using the SAX Parser: http://www.javacommerce.com/displaypage.jsp?name=saxparser1.sql&id=18232
- XML - SAX - The Simple API for XML: http://www.brainbell.com/tutorials/XML/TOC_SAX_The_Simple_API_For_XML.htm
- A simple way to read an XML file in Java (using SAX): http://www.developerfusion.com/code/2064/a-simple-way-to-read-an-xml-file-in-java/
DOM
- How do I create a DOM parser?: http://xerces.apache.org/xerces2-j/faq-dom.html[15]
- How to read XML file in Java – (DOM Parser) : http://www.mkyong.com/java/how-to-read-xml-file-in-java-dom-parser/
- Parsing XML String using DOM: http://www.albeesonline.com/blog/2007/10/09/parsing-xml-string-using-dom/
jDom
- JDOM: http://jdom.org/
- JDOM explained: http://www.servlets.com/speaking/jdom-javaone.pdf
- How to modify XML file in Java – (JDOM): http://www.mkyong.com/java/how-to-modify-xml-file-in-java-jdom/
XPath
- The Java XPath API - Querying XML from Java programs: http://www.ibm.com/developerworks/library/x-javaxpathapi.html
- Parse with XPath (in Java): http://www.rgagnon.com/javadetails/java-0550.html
- Parsing an XML Document with XPath: http://onjava.com/pub/a/onjava/2005/01/12/xpath.htm
- XPath (for Java) Rules!: http://www.java2s.com/Article/Java/XML/XPath_Rules.html
JAXB
- Java Architecture for XML Binding (JAXB): http://java.sun.com/developer/technicalArticles/WebServices/jaxb/
- Java Technology and XML-Part 3: Performance Improvement Tips: http://java.sun.com/developer/technicalArticles/xml/JavaTechandXML_part3/
- XJC Eclipse plugin: https://jaxb-workshop.dev.java.net/plugins/eclipse/xjc-plugin.html
- Sun/Oracle docs -- Java Architecture for XML Binding (JAXB) - original technical article: https://www.oracle.com/technical-resources/articles/javase/jaxb.html#
- Oracle docs -- JAXB - Basic Examples: https://docs.oracle.com/javase/tutorial/jaxb/intro/basic.html
[27] [28] [29] [30] [31] [32] [33] [34] [35] [36] [37] [38] [39]
JAXP
- JAXP validation: http://www.ibm.com/developerworks/xml/library/x-jaxpval.html
JiBX
- XML and Java technologies -- Data binding, Part 2 - Performance: http://www.ibm.com/developerworks/xml/library/x-databdopt2/
- JiBX 1.2, Part 1: Java code to XML schema: http://www.ibm.com/developerworks/java/tutorials/j-jibx1/index.html?S_TACT=105AGX02&S_CMP=EDU
- JiBX 1.2, Part 2: XML schema to Java code: http://www.ibm.com/developerworks/java/tutorials/j-jibx2/
- XML and Java technologies: Data binding Part 3: JiBX architecture: http://www.ibm.com/developerworks/xml/library/x-databd3/
- XML and Java technologies -- Data binding Part 4 -- JiBX Usage: http://www.ibm.com/developerworks/xml/library/x-databd4/
- JiBX: Binding XML to Java Code: http://jibx.sourceforge.net/
Testing
- XML Unit: http://xmlunit.sourceforge.net/
- XMLUnit Java User's Guide: http://xmlunit.sourceforge.net/userguide/html/index.html
- Unit-Testing XML: http://www.infoq.com/articles/xml-unit-test
- XML comparison tutorial using XMLUnit: http://technicalmumbojumbo.wordpress.com/2010/01/31/xml-comparison-tutorial-using-xmlunit/
- Comparing Pieces of XML: http://xmlunit.sourceforge.net/userguide/html/ar01s03.html
JavaScript
- Parsing XML in JavaScript: http://www.hiteshagrawal.com/javascript/javascript-parsing-xml-in-javascript
- Writing XML using JavaScript: http://www.codeproject.com/KB/ajax/XMLWriter.aspx
- Javascript convert XML to string to XML: http://www.captain.at/howto-javascript-convert-string-to-xml-to-string.php
- JavaScript and XML: http://www.devarticles.com/c/a/JavaScript/JavaScript-and-XML/2/
- Get values from XML DOM: http://www.w3schools.com/xml/xml_dom.asp
jQuery
- jQuery .vs. Javascript for XML parsing: http://marcgrabanski.com/article/jquery-makes-parsing-xml-easy
- XML Parsing with jQuery: http://www.switchonthecode.com/tutorials/xml-parsing-with-jquery
- XML parsing using JQuery: http://knol.google.com/k/xml-parsing-using-jquery#
- jQuery Demo - Working With XML Documents: http://www.bennadel.com/blog/1054-jQuery-Demo-Working-With-XML-Documents.htm
- XMLJS (Javascript API for Parsing/Manipulating XML Data) - http://xmljs.sourceforge.net/
ActionScript
- AS3 - XML Parsing Example: http://help.adobe.com/en_US/FlashPlatform/reference/actionscript/3/XML.html#includeExamplesSummary
PHP
Expat
Expat is a non-validating XML parser, and ignores any DTDs. It is also the oldest approach for XML paring in PHP.
- PHP docs - Expat:
- PHP's Expat XML Parser - An Intro: http://www.codedcode.com/php/php-xml-parser-expat.asp
- W3C tutorial on Expat: http://www.w3schools.com/php/php_xml_parser_expat.asp
SAX
Create XML parsers and then define handlers for different XML events
- PHP docs - SAX parsers: http://php.net/manual/en/function.xml-parser-create.php
- PHP parsing XML data faster with SAX: http://www.brainbell.com/tutorials/php/Parsing_XML_With_SAX.htm
DOM
The DOM extension allows you to operate on XML documents through the DOM API with PHP.
- PHP - DOM API: http://se2.php.net/manual/en/book.dom.php
- DOM XML - An Alternative to Expat: http://www.phpbuilder.com/columns/matt20001228.php3?print_mode=1
XmlReader
The XMLReader extension is an XML Pull parser. The reader acts as a cursor going forward on the document stream and stopping at each node on the way.
- PHP docs - XML Reader: http://se2.php.net/manual/en/book.xmlreader.php | Open
- Parsing Huge XML Files in PHP: https://stackoverflow.com/questions/911663/parsing-huge-xml-files-in-php
- Pull parsing XML in PHP: https://www.ibm.com/developerworks/xml/library/x-pullparsingphp/index.html
SimpleXML
The easiest, most developer-friendly methods and libraries for parsing and developing XML, yet not necessarily the most efficient (performs fine on occasional small XML documents or message. The SimpleXML extension provides conversion of XML to an object that can be processed with normal property selectors and array iterators.
- PHP docs - SimpleXML: http://ca.php.net/simplexml
- How to Access XML Attributes in PHP Using SimpleXML: http://www.earn-web-cash.com/2008/02/15/xml-attributes-php/
- How-To: Parse XML with PHP (SimpleXML): http://blog.evandavey.com/2008/04/how-to-parse-xml-with-php-simple.html
- How To - Parse XML with PHP5 (including alternative to more complicated XML structures): http://paulstamatiou.com/2007/04/17/how-to-parse-xml-with-php5
- SimpleXML processing with PHP: http://www.ibm.com/developerworks/xml/library/x-simplexml.html
- Simple XML (SimpleXML) Tutorial Part 1: http://www.phpfever.com/simplexml-tutorial-part1.html
Python
- Chapter 9. XML Processing (DOM and SAX): http://www.diveintopython.org/xml_processing/index.html#kgp.divein
- Parsing XML with SAX and Python: http://www.devshed.com/c/a/Python/Parsing-XML-with-SAX-and-Python/
- Using libxml in Python: http://www.xml.com/pub/a/2003/05/14/py-xml.html
- Python and XML -- An Introduction: http://www.boddie.org.uk/python/XML_intro.html
- lxml - XML and HTML with Python: http://lxml.de
- Beautiful Soup: http://www.crummy.com/software/BeautifulSoup/[42]
Perl
- Introduction to Data Manipulation Using Perl -- Parsing XML: http://www.interoperating.info/courses/perl4data/node/26
- Parsing XML documents with Perl: http://articles.techrepublic.com.com/5100-10878_11-1044612.html?tag=rbxccnbtr1
- Parsing XML documents with Perl's XML::Simple: http://articles.techrepublic.com.com/5100-10878_11-5363190.html?tag=rbxccnbtr1
- XML for Perl developers, Part 2 -- Advanced XML parsing techniques using Perl: http://www.ibm.com/developerworks/library/x-xmlperl2.html?ca=dgr-lnxw97Perl-Parsing-XML
- Perl & XML: http://oreilly.com/catalog/perlxml/chapter/ch03.html
- REX -- XML Shallow Parsing with Regular Expressions: http://www.cs.sfu.ca/~cameron/REX.html
- Parsing XML files with Perl and the XML::parser module: http://paulbradley.tv/32/
C#
- XML in .NET: .NET Framework XML Classes and C# Offer Simple, Scalable Data Manipulation: http://msdn.microsoft.com/en-us/magazine/cc302158.aspx
- Parsing XML Files in .NET Using C#: http://www.ddj.com/windows/184416669
- Parse XML with C#: http://www.experts-exchange.com/Programming/Languages/.NET/Visual_CSharp/Q_24476364.html
- Pull Parsing in C# and Java: http://www.xml.com/pub/a/2002/05/22/parsing.html?page=1
- Introduction to XML (in C#): http://www.functionx.com/csharp/xml/Lesson01.htm
[44] [45] [46] [47] [48] [49] [50]
Objective-C
- TBXML - lightweight XML Parser in Objective-C: http://www.tbxml.co.uk/TBXML/TBXML_Free.html
C++
- A Small And Fast XML Parser For Native C++: http://msdn.microsoft.com/en-us/magazine/cc163436.aspx
- Small, simple, cross-platform, free and fast C++ XML Parser: http://www.applied-mathematics.net/tools/xmlParser.html
- Xerces-C++ (validating XML parser written in a portable subset of C++): http://xerces.apache.org/xerces-c/
- Parsing a Complex XML Document in C++: http://www.brainbell.com/tutorials/C++/Parsing_A_Complex_XML_Document.htm
C
- ezXML - XML Parsing C Library: http://ezxml.sourceforge.net/
- libxml - XML C parser and toolkit of Gnome: http://www.xmlsoft.org/
- The Expat XML Parser: http://expat.sourceforge.net/
XML Editors
- Notepad++ - XML Tools plugin: http://sourceforge.net/projects/npp-plugins/files/XML%20Tools/ (Windows only)
- XML Copy Editor: https://sourceforge.net/projects/xml-copy-editor/
- Jaxe - Free/OpenSource Cross-Platform XML editor: http://jaxe.sourceforge.net/
- StylusStudio: http://www.stylusstudio.com/
- ALTOVA XMLSpy: http://www.altova.com/products/xmlspy/xml_editor.html
- Altova - XML Schema Driven Code Generator: http://www.altova.com/xmlspy/xml-code-generation.html
- Oxygen: http://www.oxygenxml.com/
- FlashXML BUILDER: http://www.flashxmlbuilder.com/
- xPontus - Java XML Editor (Open Source): http://xpontus.sourceforge.net/index.html
- XML MarkerPro: http://symbolclick.com/
XML Databases
- Open Source XML Database: http://twit88.com/blog/2008/10/15/open-source-xml-database/
- eXist-DB -- Native XML Database project (OPEN SOURCE): http://exist.sourceforge.net/ (entire web applications can be written in XQuery, using XSLT, XHTML, CSS and Javascript)
- eXist-DB -- download: http://exist-db.org/download.html
XML Security
- W3C XML-sec -- XML Security working group: http://www.w3.org/2008/xmlsec/
- XML Security Library - C: http://www.aleksey.com/xmlsec/
- Apache Santuario - C++ or Java: http://santuario.apache.org (xmlsec library)
Resources
- XML Namespaces: http://www.jclark.com/xml/xmlns.htm
Data Sources
- BCmoney MobileTV -- OpenRecommender XML feed for user "bryan": http://bcmoney-mobiletv.com/bryan/or/
- Environment Canada XML Weather Feeds: http://dd.weatheroffice.ec.gc.ca/citypage_weather/xml/ [51]
- Wunderground - Weather Underground API: http://wiki.wunderground.com/index.php/API_-_XML[52][53] | EXAMPLE#1 - Geo Station Lookup (by PostalCode) | EXAMPLE#2 - Weather Conditions at Station
- XML Team - Industry-Leading SportsML provider for Sports Stats: http://showcase.xmlteam.com/index.php/samples/showfixtures/0/all/sportsnetwork.com/starter-set [54][55][56][57][58]
- W3schools - XML: http://www.w3schools.com/xml/default.asp
- BestBuy Remix API - search for products: http://api.remix.bestbuy.com/v1/products(manufacturer=nikon&salePrice%3E200)?sort=salePrice.desc&apiKey=j43ufvjbhbrhxxmwedwhqv8c
- XML Message: http://ajaxpatterns.org/XML_Message#Netflix_Top_100
Tutorials
- Parsing the XML in easy way using PHP: http://roshanbh.com.np/2008/06/parse-xml-easy-way-php.html
- XML for PHP developers, Part 1 -- The 15-minute PHP-with-XML sta: http://www.ibm.com/developerworks/library/x-xmlphp1.html
- XML for PHP developers, Part 2 -- Advanced XML parsing techniques: http://www.ibm.com/developerworks/xml/library/x-xmlphp2.html
- XML for PHP developers, Part 3 -- Advanced techniques to read, manipulate, and write XML: http://www.ibm.com/developerworks/xml/library/x-xmlphp3.html
- Transforming XML with PHP: http://www.xml.com/pub/a/2003/06/18/php-xml.html
- IBM Tutorial - XML Programming with PHP and Ajax: http://www.ibmdatabasemag.com/story/showArticle.jhtml?articleID=191600027
- 2002 IE6 tutorial -- XML and JavaScript: http://www.codetoad.com/xml_javascripti_tutorial.asp
- Reading an XML File in Python: https://dzone.com/articles/reading-an-xml-in-python
- Recursive XML Parsing (for variable/unknown nested depth of child elements): https://joshuanatan.medium.com/recursive-xml-parsing-1e907c71935b
- Populate Web forms with JSP and XML: http://articles.techrepublic.com.com/5100-22_11-5075463.html
- Read and Display Server-Side XML with JavaScript: http://www.sitepoint.com/article/server-side-xml-javascript/
- Consume XML In JSP: http://www.sitepoint.com/article/consume-xml-jsp/
- Development with JSP and XML-- Part II -- JSP with XML in mind: http://java.sun.com/developer/technicalArticles/xml/WebAppDev2/
- Load xml into textArea using button: http://board.flashkit.com/board/showthread.php?t=786817
- Transforming XML (required reading): http://www.xml.com/pub/at/16
- W3schools -- XML Examples (XSLT and AJAX approaches): http://www.w3schools.com/xml/xml_examples.asp
- Tutorial - XML generation with JAVA: http://www.javazoom.net/services/newsletter/xmlgeneration.html
- XML and Java - Parsing XML using Java Tutorial: http://www.java-samples.com/showtutorial.php?tutorialid=152
- Lightweight way to parse an XML String in Java: https://stackoverflow.com/questions/51251161/parse-an-xml-string-in-java
- Custom Validator to check if a String contains XML: https://www.wimdeblauwe.com/blog/2017/2017-01-21-custom-validator-to-check-if-a-string-contains-xml/
- Java DOM .vs. SAX parser (for multi-object List) XML tutorial: http://examples.javacodegeeks.com/core-java/xml/java-xml-parser-tutorial/
- JAXB - Unmarshalling strings: http://www.theserverside.com/discussions/thread.tss?thread_id=18099
- Handle the Middle of a XML Document with JAXB and StAX: http://blog.bdoughan.com/2012/08/handle-middle-of-xml-document-with-jaxb.html
- JAXB handling of (optional) Namespaces: http://blog.bdoughan.com/2010/08/jaxb-namespaces.html
- Generate JAXB classes from an XSD schema and/or the XSD schema from an XML sample document: http://blog.espenberntsen.net/2010/02/26/generate-jaxb-classes-from-an-xsd-schema-and-the-schema-from-an-xml-sample-document/
- How do I parse XML in Java with JAXB?: http://stackoverflow.com/questions/8186896/how-do-i-parse-this-xml-in-java-with-jaxb
- JAXB unmarshall XML with namespaces and prefix: http://stackoverflow.com/questions/19395400/jaxb-unmarshall-with-namespaces-and-prefix
- Parse XML with namespaces in Java using xPath: http://stackoverflow.com/questions/11644994/parse-xml-with-namespaces-in-java-using-xpath
- Unmarshalling JAXB entities from SOAP wrappers: http://adamish.com/blog/archives/711
- Working with SOAP in Java: http://docs.oracle.com/cd/E26576_01/doc.312/e24945/soap-messages.htm#aeqfh
- How to get the value of an xml element from within a SOAP response? (Android): http://stackoverflow.com/questions/12479601/how-to-get-the-value-of-an-xml-element-from-within-a-soap-response-android
- How to unmarshall SOAP response using JAXB if namespace declaration is on SOAP envelope?: http://stackoverflow.com/questions/11465653/how-to-unmarshall-soap-response-using-jaxb-if-namespace-declaration-is-on-soap-e
- Marshalling JAXB entities into SOAP wrappers: http://adamish.com/blog/archives/707
- How to loop ArrayList in Java: http://www.mkyong.com/java/how-to-loop-arraylist-in-java/
- You Should Use JAXB Generated Classes for RESTful Web Services (and here's one easy way how with Maven + XML Schemas): https://dzone.com/articles/you-should-use-jaxb-generated-classes-for-restful
- Java -- XML Parsing - Most efficient method to iterate over all elements in a org.w3c.dom.Document?: http://stackoverflow.com/questions/5386991/java-most-efficient-method-to-iterate-over-all-elements-in-a-org-w3c-dom-docume
- Transforming XML with Mustache Templates: https://dzone.com/articles/transforming-xml-with-mustache-templates (s of HTTP-RPC 7.4, the TemplateEncoder class can be used to transform XML using a lightweight syntax similar to Mustache)
- Extract XML Elements Using xmllint: https://danielmiessler.com/blog/extract-xml-elements-using-xmllint/
- Spring Batch tutorial - Reading Information From an XML File: https://www.petrikainulainen.net/programming/spring-framework/spring-batch-tutorial-reading-information-from-an-xml-file/
- Parsing XML with JavaScript: https://andrew.stwrt.ca/posts/js-xml-parsing/
- How to count the depth of XML document (Java DOM Parser): https://mkyong.com/java/how-to-count-the-depth-of-xml-document-dom-example/
- Recursively processing XML elements in C#: https://seattlesoftware.wordpress.com/2009/03/16/recursively-processing-xml-elements-in-c/
- Recursive & XML Parsing (Python): https://joshuanatan.medium.com/recursive-xml-parsing-1e907c71935b
External Links
- wikipedia: XML
- wikipedia: XML database
- IMS Question and Test Interoperability specification (QTI): https://www.imsglobal.org/question/index.html wikipedia: QTI
- WDDX - Web Distributed Data Exchange: http://xml.coverpages.org/wddx.html
- Live Data from WDDX: http://www.xml.com/pub/a/98/10/wddx21.html
- Cheaper parsing of XML on Mobile Devices (in Java, and, in general): https://www.idi.ntnu.no/grupper/su/fordypningsprosjekt-2003/fordypning2003-Andreas-Knudsen.pdf
- Use of Camel Case for Naming XML and XML-Related Components: http://xml.coverpages.org/camelCase.html
- JAVA XML - Useful code samples: http://www.exampledepot.com/egs/org.w3c.dom/pkg.html
- Error Controls for IE and Firefox - XML Errors: http://www.ajaxwith.com/Error-Controls-for-IE-and-Firefox.html
- Making the Case for XML: http://www.enticy.com/documents/xml/Making_the_Case_for_XML.htm
- Trouble with IE's loadXML from string: http://www.jguru.com/forums/view.jsp?EID=1346047
- Manipulating a XML file using DHTML: http://www.javascriptkit.com/dhtmltutors/getxml.shtml
- Creating XML Document using DOM (CSV2XML in Java): http://www.javareference.com/jrexamples/viewexample.jsp?id=63
- Postel's Law has two parts: http://essaysfromexodus.scripting.com/postelsLaw (which one should apply more to XML? strictness in definition or liberalness in acceptance)
- Why does XML suck?: https://everypageispageone.com/2016/01/28/why-does-xml-suck/
- XML vs. JSON -- Why JSON Sucks: https://codepunk.io/xml-vs-json-why-json-sucks/
- Project.json comparison with XML equivalent : https://gist.github.com/darrelmiller/07fed784d2c20de9f5d3719977167181
- Why is Everyone Choosing JSON Over XML for jQuery?: https://stackoverflow.com/questions/1743532/why-is-everyone-choosing-json-over-xml-for-jquery
- Horses for courses -- A perspective on an XML vs. JSON discussion: https://www.xml.com/articles/2017/08/06/xml-vs-json-discussion/
- XML vs JSON - University report: https://www.cs.tufts.edu/comp/150IDS/final_papers/tstras01.1/FinalReport/FinalReport.html
- XML vs. JSON -- What’s the Difference for Developers? (2019 perspective): https://insights.dice.com/2019/01/25/xml-vs-json-difference-developers/
- If XML is so bad…why do so many people use it?: https://softwareengineering.stackexchange.com/questions/61198/if-xml-is-so-bad-why-do-so-many-people-use-it
- In defense of XML: https://blog.frankel.ch/defense-xml/
References
- ↑ HousingMaps - a mashup of Craigslist real estate (apartments/houses for sale) + Google Maps (visually plotting locations on an interactive map): http://www.housingmaps.com/
- ↑ wikipedia:Xmlns
- ↑ XML Elements: http://www.w3schools.com/xml/xml_elements.asp
- ↑ W3schools on XML Attributes: http://www.w3schools.com/xml/xml_attributes.asp
- ↑ XML Viewer/Editor: http://xmlia.com/XMLBrowser.aspx (was the go-to online XML viewer, but now seems to be DOWN)
- ↑ View HTML Selection Source for Opera: http://blog.webkitchen.cz/view-selection-source
- ↑ Using the Castor source code generator: http://castor.codehaus.org/sourcegen.html
- ↑ Tutorial - First Steps with XMLBeans: http://xmlbeans.apache.org/documentation/tutorial_getstarted.html
- ↑ SAX
- ↑ JSP SAX Parser: http://www.java2s.com/Tutorial/Java/0360__JSP/JSPSAXParser.htm
- ↑ JAVA Technology and XML - Part 1 -- An Introduction to APIs for XML Processing: http://java.sun.com/developer/technicalArticles/xml/JavaTechandXML/
- ↑ Java SAX Parsing Example: http://tutorials.jenkov.com/java-xml/sax-example.html
- ↑ Java and XML Basics, Part 3: http://www.devarticles.com/c/a/XML/Java-and-XML-Basics-3/
- ↑ Tip -- Validation and the SAX ErrorHandler interface: http://www.ibm.com/developerworks/library/x-tipeh.html
- ↑ DOM
- ↑ Java DOM parser tutorial: http://tutorials.jenkov.com/java-xml/dom.html
- ↑ Parse an XML string - Using DOM and a StringReader: http://www.java2s.com/Code/Java/XML/ParseanXMLstringUsingDOMandaStringReader.htm
- ↑ XML and Java Tutorial, Part 1: http://developerlife.com/tutorials/?p=25
- ↑ Listing the Contents of Parse Tree Nodes - Using the DOM Parser to Extract XML Document Data: http://www.java2s.com/Tutorial/Java/0440__XML/ListingtheContentsofParseTreeNodesUsingtheDOMParsertoExtractXMLDocumentData.htm
- ↑ Converting an XML Fragment into a DOM Fragment: http://www.java2s.com/Code/Java/XML/ConvertinganXMLFragmentintoaDOMFragment.htm
- ↑ Simple XML Parsing (in Java) with SAX and DOM: http://onjava.com/pub/a/onjava/2002/06/26/xml.html
- ↑ wikipedia:JAXB
- ↑ JAXB hello world XML reader/writer example: http://www.mkyong.com/java/jaxb-hello-world-example/
- ↑ Simple and efficient XML parsing using JAXB 2.0: http://www.javarants.com/2006/04/30/simple-and-efficient-xml-parsing-using-jaxb-2-0/
- ↑ JAXB & Namespaces: http://blog.bdoughan.com/2010/08/jaxb-namespaces.html * How to parse an object to and from XML using JAXB : http://www.javaprogrammingforums.com/file-input-output-tutorials/4062-how-parse-object-xml-using-jaxb.html
- ↑ Binding Map to XML -- Dynamic Tag Names with JAXB: http://dzone.com/articles/map-to-xml-dynamic-tag-names-with-jaxb
- ↑ Guide to JAXB: https://www.baeldung.com/jaxb
- ↑ JAXB tutorial: https://java2blog.com/jaxb-tutorial/
- ↑ JAXB tutorial: https://www.javatpoint.com/jaxb-tutorial
- ↑ JAXB Unmarshalling Example - Converting XML into Object(s): https://www.javatpoint.com/jaxb-unmarshalling-example
- ↑ JAXB Binding and Unmarshalling example: https://www.javarticles.com/2016/09/jaxb-binding-and-unmarshalling-example.html
- ↑ JAXB - Convert XML String to Java Object: https://howtodoinjava.com/jaxb/read-xml-to-java-object/
- ↑ MKyong - JAXB HelloWorld example: https://mkyong.com/java/jaxb-hello-world-example/
- ↑ Simple and efficient XML parsing using JAXB 2.0: https://javarants.com/simple-and-efficient-xml-parsing-using-jaxb-2-0-d03c9804ff46
- ↑ JAXB and Marshal/Unmarshal Schema Validation: http://blog.bdoughan.com/2010/12/jaxb-and-marshalunmarshal-schema.html
- ↑ Java XML & JSON Binding: http://blog.bdoughan.com/2010/09/jaxb-collection-properties.html
- ↑ How do I parse this XML in Java with JAXB?: https://stackoverflow.com/questions/8186896/how-do-i-parse-this-xml-in-java-with-jaxb
- ↑ JaxbRepresentation gives error “doesnt contain ObjectFactory.class or jaxb.index": https://stackoverflow.com/questions/6017146/jaxbrepresentation-gives-error-doesnt-contain-objectfactory-class-or-jaxb-index
- ↑ WARNING -- Provider com.sun.xml.internal.bind.v2.ContextFactory not found: https://stackoverflow.com/questions/15416579/warning-provider-com-sun-xml-internal-bind-v2-contextfactory-not-found
- ↑ wikipedia:JAXP
- ↑ wikipedia:JiBX
- ↑ Webscraping with Python and BeautifulSoup: http://blog.dispatched.ch/webscraping-with-python-and-beautifulsoup/
- ↑ Perl & Simple::XML: http://www.perlmonks.org/?node_id=643008
- ↑ Learning C# XML: http://www.xml.com/pub/a/2002/03/06/csharpxml.html
- ↑ Basic XML parsing in C# (downloadable example): http://www.go4expert.com/forums/showthread.php?t=1484
- ↑ Simple XML Parser in C# (downloadable example): http://www.c-sharpcorner.com/UploadFile/shehperu/SimpleXMLParser11292005004801AM/SimpleXMLParser.aspx
- ↑ Easy XML Parsing in C# (downloadable example): http://www.codeproject.com/KB/cs/nicexmlparsing.aspx
- ↑ How to read XML from a file by using Visual C# : http://support.microsoft.com/kb/307548
- ↑ Parsing HTML in Microsoft C#: http://www.developer.com/net/csharp/article.php/2230091/Parsing-HTML-in-Microsoft-C.htm
- ↑ .NET XML Best Practices: http://support.softartisans.com/kbview.aspx?id=673
- ↑ Moncton, NB example: http://dd.weatheroffice.ec.gc.ca/citypage_weather/xml/NB/s0000654_e.xml
- ↑ Weather Underground: http://www.wunderground.com
- ↑ Geolocation Weather Mashup: http://cookbooks.adobe.com/post_Geolocation_Weather_Mash_Up-19143.html
- ↑ SportsMLT -- SportsML Transformation Library: http://www.sportsstandards.org/sm/sportsmlt
- ↑ XMLSTATS -- Using SportsML: http://erikberg.com/xmlstats/
- ↑ IPTC - SportsML (G2) examples: http://www.iptc.org/site/News_Exchange_Formats/SportsML-G2/Examples/
- ↑ MLB's own proprietary XML components: http://gd2.mlb.com/components/
- ↑ LIVE STATS (from Stats,inc. and ChalkGaming): http://stats.justbet.com/default.aspx
- ↑ How to check if element has any children in Javascript?: https://stackoverflow.com/questions/2161634/how-to-check-if-element-has-any-children-in-javascript (suggested to use if (element.childNodes.length > 0))
- ↑ How to loop through xml file in javascript and skip a node in a loop: https://www.codeproject.com/questions/1080814/how-to-loop-through-xml-file-in-javascript-and-ski
- ↑ Parse Multilevel XML file into List or Array (C#): https://social.msdn.microsoft.com/Forums/vstudio/en-US/28644cf8-7af3-473b-ac65-b3a324546509/parse-multilevel-xml-file-into-list-or-array
- ↑ Recursive xml-parsing function not working as intended: https://stackoverflow.com/questions/51986159/recursive-xml-parsing-function-not-working-as-intended
- ↑ Debugging JAXB production issues: https://dzone.com/articles/debugging-jaxb-production-issues