US 7,559,020 B2
Methods and systems for preserving unknown markup in a strongly typed environment
Charles P Jazdzewski, Redmond, Wash. (US); Jerry Dunietz, Seattle, Wash. (US); Oliver H. Foehr, Mercer Island, Wash. (US); and Robert A. Relyea, Bellevue, Wash. (US)
Assigned to Microsoft Corporation, Redmond, Wash. (US)
Filed on Dec. 30, 2004, as Appl. No. 11/26,341.
Prior Publication US 2006/0150083 A1, Jul. 06, 2006
Int. Cl. G06F 17/30 (2006.01); G06F 17/15 (2006.01)
U.S. Cl. 715—234  [715/237; 715/239; 715/255] 13 Claims
OG exemplary drawing
 
1. A computer-implemented method for preserving unknown XML-based elements so that the unknown XML-based elements are not dropped when reading XML-based markup into a memory in a strongly typed environment, wherein the method is implemented by a processor executing computer-executable instructions stored in a memory, the method comprising:
in a strongly typed environment:
receiving XML-based markup that may contain XML-based elements that are both known and unknown;
instantiating a strongly typed tree that is associated with the known XML-based elements;
instantiating a weakly typed tree that is associated with both the XML-based known and unknown elements, wherein the act of instantiating a weakly typed tree comprises:
for every known element in the XML-based markup, creating a placeholder node in the weakly typed tree; and
for every unknown element in the XML-based markup, creating a node that preserves the unknown markup; and
correlating the strongly type tree and the weakly typed tree by populating the weakly typed tree with objects or nodes from the strongly typed tree in a manner that preserves the unknown XML-based elements.