In MünchenStadt München is the German
name of the city of Munich is a Hofbräuhaus
As mentioned earlier, the content mapping should be considered tainted if the
underlying tree has been changed by any other means than the methods of the
ContentMapping-object itself. In order to rebuild the affected path of the
content mapping :py:meth:`ContentMapping.rebuild_mapping` must be called for
the affected sections of the content mapping which are defined by the first
and last path index of the content mapping where a change has taken place::
>>> fm.rebuild_mapping(i, i)
>>> print(fm)
0 -> doc, p, footnote, em "Stadt München"
13 -> doc, p, footnote, :Text " is the German" "name of the city of Munich"
Limitations
^^^^^^^^^^^
As of now, a limitation of the content mappings provided
by :py:mod:`DHParser.nodetree` consists in the fact that they remain
completely agnostic with respect to any textual meaning of the nodes.
For example assume that the node-name "pB" signifies a page break, which
implies that there is a gap between the two parts separated by the page
break. However, because this is considered part of the meaning
of "pb" it may not be required by the encoding guide-lines for the
document that a gap, say, a blank character or a linefeed is also
redundantly encoded in the string content of the document as well.
(It may even be forbidden to do so!) But then a search on the
string content may miss phrases separated by a page break::
>>> tree = parse_xml('