User:Jarle Pahr/XML: Difference between revisions
Jarle Pahr (talk | contribs) |
Jarle Pahr (talk | contribs) No edit summary |
||
Line 23: | Line 23: | ||
==lXML== | ==lXML== | ||
http://lxml.de/3.3/lxmldoc-3.3.0beta3.pdf#chapter.7 | |||
https://pypi.python.org/pypi/lxml | https://pypi.python.org/pypi/lxml | ||
Line 29: | Line 31: | ||
http://infohost.nmt.edu/tcc/help/pubs/pylxml/web/index.html | http://infohost.nmt.edu/tcc/help/pubs/pylxml/web/index.html | ||
http://stackoverflow.com/questions/4808753/find-occurrence-using-multiple-attributes-in-elementtree-python | |||
Revision as of 09:18, 9 January 2014
Notes on Extensible Markup Language (XML): https://en.wikipedia.org/wiki/XML
http://stackoverflow.com/questions/3536893/what-are-the-pros-and-cons-of-xml-and-json
XML in Python
https://wiki.python.org/moin/PythonXml
http://docs.python.org/2/library/xml.etree.elementtree.html#module-xml.etree.ElementTree
http://www.boddie.org.uk/python/XML_intro.html
http://stackoverflow.com/questions/1912434/how-do-i-parse-xml-in-python
http://oreilly.com/catalog/pythonxml/chapter/ch01.html
https://wiki.python.org/moin/MiniDom
lXML
http://lxml.de/3.3/lxmldoc-3.3.0beta3.pdf#chapter.7
https://pypi.python.org/pypi/lxml
http://lxml.de/3.3/lxmldoc-3.3.0beta3.pdf
http://infohost.nmt.edu/tcc/help/pubs/pylxml/web/index.html
The packages ElementTree and lxml uses an "Element Tree" view of .xml files differing from the Document Object Model (DOM).
The Element class in lxml contains the following attributes:
- .tag: The name of the element.
- .text: The text inside the element, up to the first child element. Equals None if no text.
- .tail: The text following the element.
- .attrib: Python dictionary with the elements attributes and their values.
Seee also:
- SBML
- JSON