Methods and systems for preserving unknown markup in a strongly typed
environment are described. In but one embodiment, XML-based markup that
may contain XML-based elements that are both known and unknown is
received. A strongly typed tree that is associated with the known
XML-based elements is instantiated and a weakly typed tree that is
associated with both the XML-based known and unknown elements is
instantiated. The strongly and the weakly typed trees are then correlated
in a manner that preserves the unknown XML-based elements.