Skip to content

Tokenizer: Use SelectNodes instead of SelectSingleNode #71

@Gaikotsu2

Description

@Gaikotsu2

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__"
  }

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions