Home

endDocument

ENDDOCUMENT is a token used in some computer systems to indicate the end of a document within a stream of text or data. In this usage, documents may be concatenated in a single file or transmitted as a sequence of records, and ENDDOCUMENT serves as an explicit terminator that allows a processor to switch from one document to the next or to stop reading.

ENDDOCUMENT is not a universally standardized command. It occurs in various domain-specific formats, including custom document

When implementing or parsing such a marker, considerations include: ensuring the marker is unlikely to occur

Examples of usage include a text file containing several documents, each followed by a line that reads

See also: end-of-file, delimiter, end marker.

serialization
schemes,
batch
processing
pipelines,
or
tooling
that
ingests
multiple
documents
from
a
shared
source.
In
line-oriented
formats,
ENDDOCUMENT
is
commonly
placed
on
a
line
by
itself
to
reduce
ambiguity;
in
other
designs
it
may
appear
as
a
field
value
or
a
specific
delimiter
within
the
markup
or
data
syntax.
as
ordinary
content,
handling
surrounding
whitespace,
and
deciding
whether
to
support
escaping
or
alternate
markers
for
embedded
content.
Parsers
must
also
distinguish
between
an
unexpected
end
of
file
and
a
missing
end
marker,
and
should
define
error
handling
or
recovery
procedures.
ENDDOCUMENT,
after
which
the
next
document
begins,
or
a
streaming
protocol
where
ENDDOCUMENT
signals
the
end
of
a
document
chunk
before
continuing.