Updated the API documentation.

Updated examples based on the new Loader API.
(Dumper API still needs examples)
This commit is contained in:
Ferdinand Majerech 2011-10-14 10:34:53 +02:00
parent 21001b36b9
commit 765b74ffca
48 changed files with 4555 additions and 1978 deletions

View file

@ -186,8 +186,7 @@ resolution for the Color data type (in its scalar form).
We use the *addImplicitResolver* method of *Resolver*, passing the tag, regular
expression the value must match to resolve to this tag, and a string of possible
starting characters of the value. Then we pass the *Resolver* to the constructor
of *Loader*.
starting characters of the value. Then we pass the *Resolver* to *Loader*.
Note that resolvers added first override ones added later. If no resolver
matches a scalar, YAML string tag is used. Therefore our custom values must not

View file

@ -100,7 +100,7 @@ to use D:YAML - it automatically imports all needed modules.
Next we load the file using the *Loader.load()* method. *Loader* is the struct
used for parsing YAML documents, and *load()* is a method that loads the file as
**one** YAML document and throws *YAMLException*, D:YAML exception type, if the
**one** YAML document, or throws *YAMLException*, D:YAML exception type, if the
file could not be parsed or does not contain exactly one document. Note that we
don't do any error checking here in order to keep the example as simple as
possible.