Skip to content

Commit 51b7246

Browse files
committed
update docs for 0.2.0-alpha1
1 parent 85aeb13 commit 51b7246

2 files changed

Lines changed: 9 additions & 7 deletions

File tree

CHANGES.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ From 0.1.0-beta3 to 0.2.0-alpha1
44
- Introduce alias-uri
55
- Clojurescript support
66
- data.xml now requires Clojure 1.5.0+ (due to percent-sign in keywords)
7+
- Preserve whitespace by default
78

89
From 0.1.0-beta2 to 0.1.0-beta3
910
- Fix emitter to keep non-namespaced xml names out of any set default namespace

README.md

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -293,11 +293,15 @@ To elide location information, pass `:location-info false` to the parser:
293293

294294
The Clojurescript implementation uses the same namespace as the Clojure one `clojure.data.xml`.
295295

296-
### Differences from Clojure implementation
296+
### Native DOM support
297297

298-
data.xml uses native browser dom elements to represent xml. To get back the convenience of treating them as maps, call `(extend-dom-as-data!)`. This extends the native dom node prototypes to Clojurescript collection protocols, such that you can treat them as data.xml parse trees.
298+
data.xml can directly work with native dom nodes.
299299

300-
Of course, the map format is supported for emitting.
300+
- To parse into DOM objects, call parse with `:raw true`
301+
- To use DOM objects like regular persistent maps, call `(extend-dom-as-data!)`.
302+
This extends the native dom node prototypes to Clojurescript collection protocols, such that you can treat them as data.xml parse trees.
303+
- To coerce to native dom use `element-node`
304+
- To coerce to records use `element-data`
301305

302306
### Missing Features, Patches Welcome
303307

@@ -317,10 +321,7 @@ Some utilities, like `process/*-xmlns`, `prxml/sexp-as-*`, `indent` aren't yet i
317321

318322
Make `extend-dom-as-data!` also support assoc, ... on dom nodes.
319323

320-
#### Data coercions
321-
322-
323-
324+
#### Feel free to pick a [ticket](http://dev.clojure.org/jira/secure/IssueNavigator.jspa?reset=true&jqlQuery=project+%3D+DXML+AND+status+in+%28Open%2C+%22In+Progress%22%2C+Reopened%29) to work on
324325

325326
## License
326327

0 commit comments

Comments
 (0)