Let us document the relationship between a parser instance and the parsed document. (#699)

This commit is contained in:
Daniel Lemire 2020-04-14 08:30:06 -04:00 committed by GitHub
parent 92c34f7f38
commit d7370cc916
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 0 deletions

View File

@ -50,6 +50,8 @@ dom::parser parser;
dom::element doc = parser.parse("[1,2,3]"_padded); // parse a string
```
Note: The parsed document resulting from the `parser.load` and `parser.parse` calls depends on the `parser` instance. Thus the `parser` instance must remain in scope. Furthermore, you must have at most one parsed document in play per `parser` instance. Calling `parse` or `load` a second time invalidates the previous parsed document. If you need access simultaneously to several parsed documents, you need to have several `parser` instances.
Using the Parsed JSON
---------------------