Skip to content

Commit

Permalink
Fix readme examples
Browse files Browse the repository at this point in the history
  • Loading branch information
Alex Simkin committed Nov 23, 2017
1 parent a787fd0 commit 73e42ee
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -52,32 +52,32 @@ you can:
- alter existing paths

```java
new XmlBuilder(document)
new XmlBuilder()
.put("/breakfast_menu/food[1]/price", "$7.95")
.build();
.build(document);
```

- append new elements

```java
new XmlBuilder(document)
new XmlBuilder()
.put("/breakfast_menu/food[name='Homestyle Breakfast'][price='$6.95'][description='Two eggs, bacon or sausage, toast, and our ever-popular hash browns']/calories", "950")
.build();
.build(document);
```

- remove paths

```java
new XmlBuilder(document)
new XmlBuilder()
.remove("/breakfast_menu/food[name='Belgian Waffles']")
.build();
.build(document);
```

- combine any of the above actions into a single modification action

```java
new XmlBuilder(document)
new XmlBuilder()
.remove("/breakfast_menu/food[name='Homestyle Breakfast']")
.put("/breakfast_menu/food[name='Homestyle Breakfast'][price='$6.95'][description='Two eggs, bacon or sausage, toast, and our ever-popular hash browns']/calories", "950")
.build();
.build(document);
```

0 comments on commit 73e42ee

Please sign in to comment.