Skip to content
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

Tokenizer: Use SelectNodes instead of SelectSingleNode #71

Open
Gaikotsu2 opened this issue Jan 17, 2017 · 0 comments
Open

Tokenizer: Use SelectNodes instead of SelectSingleNode #71

Gaikotsu2 opened this issue Jan 17, 2017 · 0 comments

Comments

@Gaikotsu2
Copy link

Gaikotsu2 commented Jan 17, 2017

It would be nice to be able to use the XPath capabilities to update several nodes using a single XPath statement. I have a situation where the same value that needs to be placed into multiple similar xml hierarchies.

The limitation appears to be due to the use of SelectSingleNode(...) to return a single node based on the XPath supplied instead of using SelectNodes(...) and iterating over all returned nodes.

Current:

  {
    "KeyName": "/configuration/FileSystemTriggers/file/trigger[@name='Export']/conditions/condition[@name='FileExists']",
    "Attribute": "path",
    "Value": "__path.export_service.triggers__\\__ExtractFilename__"
  },
  {
    "KeyName": "/configuration/FileSystemTriggers/file/trigger[@name='Export']/conditions/condition[@name='FileStable']",
    "Attribute": "path",
    "Value": "__path.export_service.triggers__\\__ExtractFilename__"
  },

Desired:

 {
    "KeyName": "/configuration/FileSystemTriggers/file/trigger[@name='Export']/conditions/condition",
    "Attribute": "path",
    "Value": "__path.export_service.triggers__\\__ExtractFilename__"
  }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant