gulp-xmlpoke

Gulp port of grunt-xmlpoke

Showing:

Popularity

Downloads/wk

74

GitHub Stars

5

Maintenance

Last Commit

4yrs ago

Contributors

3

Package

Dependencies

5

License

Type Definitions

Tree-Shakeable

No?

Categories

Readme

gulp-xmlpoke

Gulp port of grunt-xmlpoke

Simple replacement

gulp.src('/path/to/file.xml')
    .pipe(xmlpoke({
      replacements : [{
          xpath : "//foo"        
        , value: "bar"
       }]
     }))
    .pipe(gulp.dest('/path/to/dest/file.xml'));

Replacing with a function

gulp.src('/path/to/file.xml')
    .pipe(xmlpoke({
      replacements : [{
          xpath : "//foo"        
        , value : function(node) { 
          var nodeValue = node.firstChild.data;          
          return nodeValue + "Bar";
       }]
     }))
    .pipe(gulp.dest('/path/to/dest/file.xml'));

Using Namespaces

gulp.src('/path/to/file.xml')
    .pipe(xmlpoke({
      replacements : [{
          xpath : "//foo:bar"
        , namespaces : {"foo" : "http://schemas.example.com/foo.xsd"}
        , value: "bar"
       }]
     }))
    .pipe(gulp.dest('/path/to/dest/file.xml'));

Rate & Review

Great Documentation0
Easy to Use0
Performant0
Highly Customizable0
Bleeding Edge0
Responsive Maintainers0
Poor Documentation0
Hard to Use0
Slow0
Buggy0
Abandoned0
Unwelcoming Community0
100
No reviews found
Be the first to rate

Alternatives

No alternatives found

Tutorials

No tutorials found
Add a tutorial