Skip to content

Commit

Permalink
Merge pull request #17 from axelpale/patch-1
Browse files Browse the repository at this point in the history
doc: document how namespaces are handled
  • Loading branch information
tuananh authored Oct 12, 2017
2 parents 5232390 + 7533ec3 commit 859b3b6
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,12 @@ const template = {
const result = transform(xml, template)
```

### Namespaces

By default, a path `'//HotelSummary'` will transform all `HotelSummary` elements regardless of their namespaces. To only transform elements under a specific namespace, say `http://v3.hotel.wsapi.ean.com`, you can append the path with a filter:

'//HotelSummary[namespace-uri() = "http://v3.hotel.wsapi.ean.com"]'

## Licence

The MIT License
Expand Down

0 comments on commit 859b3b6

Please sign in to comment.