Difference between revisions of "XML"

From Fab Lab Bcn WIKI
Jump to: navigation, search
(Created page with "'''Extensible Markup Language''' ('''XML''') is a set of rules for encoding documents in machine-readable form. It is defined in the XML 1.0 Specification<ref>{{cite web|url=...")
 
(XML editors)
 
(19 intermediate revisions by one user not shown)
Line 1: Line 1:
'''Extensible Markup Language''' ('''XML''') is a set of rules for encoding documents in [[machine-readable]] form. It is defined in the XML 1.0 Specification<ref>{{cite web|url=http://www.w3.org/TR/REC-xml |title=XML 1.0 Specification |publisher=W3.org |date= |accessdate=2010-08-22}}</ref> produced by the [[W3C]], and several other related specifications, all [[gratis]] [[open standard]]s.<ref>{{cite web|title=W3C DOCUMENT LICENSE|url=http://www.w3.org/Consortium/Legal/2002/copyright-documents-20021231}}</ref>
+
'''Extensible Markup Language''' ('''XML''') is a set of rules for encoding documents in machine-readable form. It is defined in the XML 1.0 Specification produced by the W3C, and several other related specifications, all gratis open standards.
  
The design goals of XML emphasize simplicity, generality, and usability over the [[Internet]].<ref name="XML Goals">{{cite web|title=XML 1.0 Origin and Goals|url=http://www.w3.org/TR/REC-xml/#sec-origin-goals|accessdate=July 2009}}</ref> It is a textual data format with strong support via [[Unicode]] for the languages of the world. Although the design of XML focuses on documents, it is widely used for the representation of arbitrary [[data structures]], for example in [[web service]]s.
+
The design goals of XML emphasize simplicity, generality, and usability over the Internet. It is a textual data format with strong support via Unicode for the languages of the world. Although the design of XML focuses on documents, it is widely used for the representation of arbitrary data structures, for example in web services.
  
Many [[application programming interfaces]] (APIs) have been developed that software developers use to process XML data, and several [[XML schema|schema systems]] exist to aid in the definition of XML-based languages.
+
Many application programming interfaces (APIs) have been developed that software developers use to process XML data, and several XML schema exist to aid in the definition of XML-based languages.
  
 
= Edit and create =
 
= Edit and create =
 +
Most built-in plain text editors like Notepad in Windows or TextEdit in Mac are able to open and edit XML files, however this is not a good solution when you need to edit large amounts of information.
  
= Parsing =
+
== General purpose spreadsheet tools ==
 +
* Microsoft Excel
 +
* Libre Office http://www.libreoffice.org/download (free)
 +
* Open Office http://www.openoffice.org/ (free)
  
== Processing ==
+
== General purpose text/code editors ==
 +
=== Mac ===
 +
*TextWrangler http://www.barebones.com/products/TextWrangler/
 +
*Kod http://kodapp.com/
 +
*Apple Xcode. (For Mac OS X 10.6 and older register and download it from http://developer.apple.com/. For mac 10.7 go to the App Store. You can also install it from your Mac setup DVD's)
  
<code>// The following short XML file called "sites.xml" is parsed
+
=== Win ===
// in the code below. It must be in the project's "data" directory
+
*NotePad http://notepad-plus-plus.org/
// <?xml version="1.0"?>
+
* Microsoft Visual Studio http://www.microsoft.com/visualstudio/en-us/products/2010-editions/express
// <websites>
+
//  <site id="0" url="processing.org">Processing</site>
+
//   <site id="1" url="mobile.processing.org">Processing Mobile</site>
+
// </websites>
+
  
XMLElement xml;
+
== XML editors ==
 +
*Microsoft XML Notepad http://www.microsoft.com/download/en/details.aspx?id=7973
 +
*Serna XML Editor http://www.syntext.com/products/serna-free/
 +
*Xmplify http://xmplifyapp.com/ (commercial)
  
void setup() {
+
== Google Docs ==
  size(200, 200);
+
Google docs https://docs.google.com have a spreadsheet tool. However they do not offer native XML on their visual interface you can retrieve any spreadsheet you create in XML using its API http://code.google.com/apis/spreadsheets/data/3.0/reference.html
  xml = new XMLElement(this, "sites.xml");
+
  int numSites = xml.getChildCount();
+
  for (int i = 0; i < numSites; i++) {
+
    XMLElement kid = xml.getChild(i);
+
    int id = kid.getInt("id");
+
    String url = kid.getString("url");
+
    String site = kid.getContent();
+
    println(id + " : " + url + " : " + site);   
+
  }
+
}</code>
+
  
http://processing.org/reference/XMLElement.html
+
*Tutorial http://blog.blprnt.com/blog/blprnt/open-science-h1n1-processing-and-the-google-spreadsheet-api
 +
 
 +
= Parsing =
 +
 
 +
== Processing ==
 +
* http://processing.org/reference/XMLElement.html

Latest revision as of 00:27, 8 December 2011

Extensible Markup Language (XML) is a set of rules for encoding documents in machine-readable form. It is defined in the XML 1.0 Specification produced by the W3C, and several other related specifications, all gratis open standards.

The design goals of XML emphasize simplicity, generality, and usability over the Internet. It is a textual data format with strong support via Unicode for the languages of the world. Although the design of XML focuses on documents, it is widely used for the representation of arbitrary data structures, for example in web services.

Many application programming interfaces (APIs) have been developed that software developers use to process XML data, and several XML schema exist to aid in the definition of XML-based languages.

Edit and create

Most built-in plain text editors like Notepad in Windows or TextEdit in Mac are able to open and edit XML files, however this is not a good solution when you need to edit large amounts of information.

General purpose spreadsheet tools

General purpose text/code editors

Mac

Win

XML editors

Google Docs

Google docs https://docs.google.com have a spreadsheet tool. However they do not offer native XML on their visual interface you can retrieve any spreadsheet you create in XML using its API http://code.google.com/apis/spreadsheets/data/3.0/reference.html

Parsing

Processing