-
Notifications
You must be signed in to change notification settings - Fork 9
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
Nodes with the same value are mixed up #63
Comments
Hi @Leonti thanks for your feedback :) P.S. Special thanks for scastie examples. |
@SethTisue what do you think about this problem ? Currently in my XmlTransformer class i create a standard RewriteRule instance and, if parameter is equals to the target(the node to edit) i apply my function. The problem is that the node hasn't an unique ID and the structure is an unidirectional tree(i can't check his parent) so in this case i match the both the nodes. |
I've just opened an issue on scala-xml project for this problem. |
@geirolz sorry, no opinion, I don't know this API, either in this repo or over in scala-xml |
Hi @Leonti finally i've resolved this bug. Thanks for the support. |
Hi @geirolz! I see that Thanks again, |
@Leonti Yes unfortunately currently
So, for answer to your question:
No, the only way to traverse the document currently is using Is your bug fixed with these changes ? |
Hi @geirolz! Yes, definitely the right call with fixing the bug first and then introducing the missing functionality. Haven't had a chance to update the library in my code to see if it fixed the bug (I'm using a workaround for now - just making sure all the values are unique). Thanks a lot! |
Hi!
I'm having a weird issue with targeting nodes that I want to replace, given the following snippet:
It will output this:
https://scastie.scala-lang.org/JRM25U76S6yXpcIV6ZuDug
It correctly found
entries
of a chart which haschart-1
as a title and then replaced it.But as soon as I make the original values to be the same number:
it will replace the entry under
chart-0
, notchart-1
as expected:https://scastie.scala-lang.org/KBkU87D6T4GhNlkDq3rWjQ
Looks like it's finding the element first, so in this case
<v>12</v>
and then using it for replacement, so if you have 2 identical elements bu with different paths it will replace the first one.Or maybe I'm not using it correctly?
By they way, apart from this issue the library is a joy to use, thanks!
The text was updated successfully, but these errors were encountered: