From 8c0e50f5962a3bd672a5fa85ae2ea0e5b8d2cffb Mon Sep 17 00:00:00 2001 From: Milo Yip Date: Mon, 20 Jul 2015 09:29:15 +0800 Subject: [PATCH] Update dom.md --- doc/dom.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/doc/dom.md b/doc/dom.md index f3e4208..24f1a39 100644 --- a/doc/dom.md +++ b/doc/dom.md @@ -124,7 +124,7 @@ And the `InputStream` is type of input stream. ## Parse Error {#ParseError} -When the parse processing succeeded, the `Document` contains the parse results. When there is an error, the original DOM is *unchanged*. And the error state of parsing can be obtained by `bool HasParseError()`, `ParseErrorCode GetParseError()` and `size_t GetParseOffet()`. +When the parse processing succeeded, the `Document` contains the parse results. When there is an error, the original DOM is *unchanged*. And the error state of parsing can be obtained by `bool HasParseError()`, `ParseErrorCode GetParseError()` and `size_t GetParseOffset()`. Parse Error Code | Description --------------------------------------------|--------------------------------------------------- @@ -159,8 +159,8 @@ Here shows an example of parse error handling. Document d; if (d.Parse(json).HasParseError()) { fprintf(stderr, "\nError(offset %u): %s\n", - (unsigned)reader.GetErrorOffset(), - GetParseError_En(reader.GetParseErrorCode())); + (unsigned)d.GetErrorOffset(), + GetParseError_En(d.GetParseErrorCode())); // ... } ~~~~~~~~~~