New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
XMLGenerated xml looks ugly #1327
Comments
Use JQuery like tool, we call it PyQuery, and u can use Pq("name") to get a tags collection just like using jQuery in javascript runtime. |
What i realy was need - bring somehow exported xml to beauty and readable look. I thought that was generic case and maybe have some implementation in scrapy. |
I think that'd be a nice option to generate human-readable XML, and we can make it default; PRs are welcome :) |
Before you start creating PRs; you must take into account that generated XMLs can be big so creating a dom isn't an option. 😄 |
We use |
@Andrej730 the most effective way is not just converting the xml to dom model in memory but add a jquery wrapper upon it. That is why jQuery is here. By invoking jquery we can manipulate dom efficiently in innner memory. dom tree is parser is essence to analyze files of hirarchical tags tree. I recommand that you consider it seriously. |
@nramirezuy Another method is to create a javascript runtime and clicent codes to send task to js runtime to process it. Phantom or v8 engine will help on this topic. |
@yiakwy I like your enthusiasm but using I found this XMLIndentGenerator |
As mentioned, you can just use |
@barraponto it'd be nice to have a solution which doesn't require building the whole DOM tree, as @nramirezuy suggested. |
Whenever i trying to get output items in xml i get something like:
Maybe scrapy have some already provided ways to "beautify" it to something like (like xmls i found in all docs examples):
The text was updated successfully, but these errors were encountered: