{ "info": { "author": "slaypni", "author_email": "UNKNOWN", "bugtrack_url": null, "classifiers": [ "License :: OSI Approved :: MIT License", "Operating System :: OS Independent", "Programming Language :: Python :: 2.7", "Topic :: Text Processing :: Markup :: HTML", "Topic :: Text Processing :: Markup :: XML" ], "description": "xml2data is a library for converting xml into native data, according to css-selector like template.\n\nRequirements\n------------\n\nPython 2.7\n\nExample\n-------\n\nthe following converts `a webpage `_ containing some app information::\n\n import xml2data\n template = \"\"\"{\n 'apps': [div#main-container div.section:first-child div.goods-container div.goods @ {\n 'name': div.top span.name,\n 'url': div.top span.name a $[href],\n 'description': div.goods div.bottom\n }],\n 'author': div#main-container div.section div.text p a:first-child $text,\n 'twitter': div#main-container div.section div.text p a:nth-child(2) $[href]\n }\"\"\"\n data = xml2data.urlload('http://hp.vector.co.jp/authors/VA038583/', template)\n\nresults::\n\n data == {\n 'apps': [{\n 'name': 'copipex',\n 'url': './down/copipex023.zip',\n 'description': '<\u30b3\u30d4\u30fc\u21d2\u8cbc\u4ed8\u3051> \u304c <\u30de\u30a6\u30b9\u3067\u7bc4\u56f2\u9078\u629e\u21d2\u30af\u30ea\u30c3\u30af> \u3067\u53ef\u80fd\u306b'\n }, {\n 'name': 'gummi',\n 'url': './gummi.html', \n 'description': '\u30a6\u30a3\u30f3\u30c9\u30a6\u306e\u4efb\u610f\u306e\u90e8\u5206\u3092\u5225\u7a93\u306b\u8868\u793a\u3002\u64cd\u4f5c\u3082\u53ef\u80fd'\n }, {\n 'name': 'PAWSE',\n 'url': './down/pawse032.zip',\n 'description': 'Pause\u30ad\u30fc\u3067\u3001\u30a2\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u306e\u4e00\u6642\u505c\u6b62\u3001\u5b9f\u884c\u901f\u5ea6\u306e\u5236\u9650\u304c\u53ef\u80fd\u306b'\n }, {\n 'name': 'onAir',\n 'url': './onair.html',\n 'description': '\u73fe\u5728\u653e\u9001\u4e2d\u306e\u30c6\u30ec\u30d3\u756a\u7d44\u306e\u30bf\u30a4\u30c8\u30eb\u3092\u4e00\u89a7\u8868\u793a'\n }],\n 'author': 'slay', \n 'twitter': 'http://twitter.com/slaypni'\n }", "description_content_type": null, "docs_url": null, "download_url": "UNKNOWN", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/slaypni/xml2data", "keywords": "xml html", "license": "MIT", "maintainer": null, "maintainer_email": null, "name": "xml2data", "package_url": "https://pypi.org/project/xml2data/", "platform": "UNKNOWN", "project_url": "https://pypi.org/project/xml2data/", "project_urls": { "Download": "UNKNOWN", "Homepage": "https://github.com/slaypni/xml2data" }, "release_url": "https://pypi.org/project/xml2data/0.1.0/", "requires_dist": null, "requires_python": null, "summary": "a library for converting xml into native data", "version": "0.1.0" }, "last_serial": 801844, "releases": { "0.1.0": [ { "comment_text": "", "digests": { "md5": "21223aaa800a8d0345d47b780f80fc82", "sha256": "868236364d57d023b9aa25e359e324455982822a1d3aa8f9dc5db9b9267df868" }, "downloads": -1, "filename": "xml2data-0.1.0-py2.7.egg", "has_sig": false, "md5_digest": "21223aaa800a8d0345d47b780f80fc82", "packagetype": "bdist_egg", "python_version": "2.7", "requires_python": null, "size": 8519, "upload_time": "2013-03-02T15:57:27", "url": "https://files.pythonhosted.org/packages/1e/98/aa2eaf8620b3a0537af8daf528903de2fb7ca9c45d7edf8335a94a42017f/xml2data-0.1.0-py2.7.egg" }, { "comment_text": "", "digests": { "md5": "9f65c7b5c2e645c72be1e66b5ae35373", "sha256": "8d83330936dd34c740cfcd375d2ac80b60861f86b1af093b685c4feb10887a93" }, "downloads": -1, "filename": "xml2data-0.1.0.tar.gz", "has_sig": false, "md5_digest": "9f65c7b5c2e645c72be1e66b5ae35373", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4631, "upload_time": "2013-03-02T15:57:23", "url": "https://files.pythonhosted.org/packages/ad/fe/23208fa53c7e22c6196292c8e9c861c41634c176b668b15480c10a5ee499/xml2data-0.1.0.tar.gz" } ], "0.1.0a": [ { "comment_text": "", "digests": { "md5": "7750d74f5f07500f2dfbc630b04e4e2c", "sha256": "097111f7ed63efea95349a4dfd54773e24231ef1a105ebc5d6cca59b3949633b" }, "downloads": -1, "filename": "xml2data-0.1.0a-py2.7.egg", "has_sig": false, "md5_digest": "7750d74f5f07500f2dfbc630b04e4e2c", "packagetype": "bdist_egg", "python_version": "2.7", "requires_python": null, "size": 8293, "upload_time": "2013-02-02T12:04:06", "url": "https://files.pythonhosted.org/packages/2b/1b/c8a012452be41538bade4acb4389973cae7000921901f14b40902661dea4/xml2data-0.1.0a-py2.7.egg" }, { "comment_text": "", "digests": { "md5": "2ea4564d8e299505e116365faf3b4c45", "sha256": "424f797486ba5f0f6fd7b9c48afad9db70e9e3e58bc8f029fbefb882db904ecd" }, "downloads": -1, "filename": "xml2data-0.1.0a.tar.gz", "has_sig": false, "md5_digest": "2ea4564d8e299505e116365faf3b4c45", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4556, "upload_time": "2013-02-02T12:03:58", "url": "https://files.pythonhosted.org/packages/a6/d9/b9d1467edd2841f704f736030c6c64a2d15d25b8645e5436e2fe94899feb/xml2data-0.1.0a.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "21223aaa800a8d0345d47b780f80fc82", "sha256": "868236364d57d023b9aa25e359e324455982822a1d3aa8f9dc5db9b9267df868" }, "downloads": -1, "filename": "xml2data-0.1.0-py2.7.egg", "has_sig": false, "md5_digest": "21223aaa800a8d0345d47b780f80fc82", "packagetype": "bdist_egg", "python_version": "2.7", "requires_python": null, "size": 8519, "upload_time": "2013-03-02T15:57:27", "url": "https://files.pythonhosted.org/packages/1e/98/aa2eaf8620b3a0537af8daf528903de2fb7ca9c45d7edf8335a94a42017f/xml2data-0.1.0-py2.7.egg" }, { "comment_text": "", "digests": { "md5": "9f65c7b5c2e645c72be1e66b5ae35373", "sha256": "8d83330936dd34c740cfcd375d2ac80b60861f86b1af093b685c4feb10887a93" }, "downloads": -1, "filename": "xml2data-0.1.0.tar.gz", "has_sig": false, "md5_digest": "9f65c7b5c2e645c72be1e66b5ae35373", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4631, "upload_time": "2013-03-02T15:57:23", "url": "https://files.pythonhosted.org/packages/ad/fe/23208fa53c7e22c6196292c8e9c861c41634c176b668b15480c10a5ee499/xml2data-0.1.0.tar.gz" } ] }