-
Notifications
You must be signed in to change notification settings - Fork 14
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
[Feature] Get Element Attributes without the whole Tree #11
Comments
Hi, glad that it works for you. have you tried the If not PR would be fine. This require a new function something like |
See is my example above. Now i'm using this:
|
so to confirm 1 Then thats not possible I guess without loading all. And also following not working because it expects independent Cli and Doc tags.
As a workaround if you can just read the following doc line from the file and create a
|
I mean not possible without reading the file twice otherwise you can parse first for |
Yes! Exactly this. I was thinking in two options:
Let me know if it make sense to you. |
Hi, |
I spent a couple of hours on it and it’s not that easy. |
Lets start with simple way, each tag can be flagged for attribute only parsing with new function something like Then when looping for each tag in here if the attribute only flag true it will add directly to the channel without getting element tree otherwise it will load the element tree as it is. With this way I assume first it will parse the |
Works great! This is more like the second approach. |
All right maybe I didn't get your first idea completely but compatibility is required for me. Your changes looks good to me if the tests are passing. I added a minor comment. If you can also reflect this new feature in the README in a simple way that would be great. |
Thanks for your prompt reply! :) |
Hi, thank you for the great package. Its very fast and the only one that works for me.
I would appreciate to have an opinion to have access to an element attributes without load the whole Tree.
In my case, I have a "root" tag with important attributes and all other tags is its Childs, so it will load the whole file on memory.
I will be happy to make a PR if with give some directions.
The text was updated successfully, but these errors were encountered: