anchor.diff:  							  |PC]
   						} | D]};
   	_ ->
  -	    ?error("Got end of element: " ++ LocalName ++ " but expected: " ++ 
  +	    ?error("Got end of element: " ++ LocalName ++ " but expected: " ++
   		   Current#xmlElement.name)
       end;
   
  -%% Text 
  -%%----------------------------------------------------------------------
  +%%----------------------------------------------------------------------
  +%% Text
   build_dom({characters, String},
  -	  #xmerl_sax_old_dom_state{tags=T, 
  +	  #xmerl_sax_old_dom_state{tags=T,
   				   cno=[Num |CN],
   				   dom=[#xmlElement{content=C} = Current| D]} = State) ->
  -    State#xmerl_sax_old_dom_state{cno=[Num+1 |CN], 
  +    State#xmerl_sax_old_dom_state{cno=[Num+1 |CN],
   				  dom=[Current#xmlElement{content=[#xmlText{value=String, parents=T, pos=Num, type=text}
   								   |C]} | D]};
   build_dom({ignorableWhitespace, String},
  -	  #xmerl_sax_old_dom_state{tags=T, 
  +	  #xmerl_sax_old_dom_state{tags=T,
   				   cno=[Num |CN],
   				   dom=[#xmlElement{content=C} = Current| D]} = State) ->
       State#xmerl_sax_old_dom_state{cno=[Num+1 |CN],
  -				  dom=[Current#xmlElement{content=[#xmlText{value=String, 
  -									    parents=T, pos=Num, 
  +				  dom=[Current#xmlElement{content=[#xmlText{value=String,
  +									    parents=T, pos=Num,
   									    type=text}
   								   |C]} | D]};
   
  +%%----------------------------------------------------------------------
   %% Comments
  -%%----------------------------------------------------------------------
   build_dom({comment, String},
  -	  #xmerl_sax_old_dom_state{tags=T, 
  +	  #xmerl_sax_old_dom_state{tags=T,
   				   cno=[Num |CN],
   				   dom=[#xmlElement{content=C} = Current| D]} = State) ->
       State#xmerl_sax_old_dom_state{cno=[Num+1 |CN],
   				  dom=[Current#xmlElement{content=[#xmlComment{parents=T, pos=Num, value=String}|C]} | D]};
   
  +%%----------------------------------------------------------------------
   %% NameSpaces
  -%%----------------------------------------------------------------------
  -build_dom({startPrefixMapping, [], _Uri}, State) -> 
  -    State;
   build_dom({startPrefixMapping, Prefix, Uri},
  -	  #xmerl_sax_old_dom_state{namespaces=NS} = State) -> 
  +	  #xmerl_sax_old_dom_state{namespaces=NS} = State) ->
       State#xmerl_sax_old_dom_state{namespaces=[{Prefix, list_to_atom(Uri)} |NS]};
   build_dom({endPrefixMapping, Prefix},
  -	  #xmerl_sax_old_dom_state{namespaces=[{Prefix, _} |NS]} = State) -> 
  -    State#xmerl_sax_old_dom_state{namespaces=NS};
  -
  +	  #xmerl_sax_old_dom_state{namespaces=NS} = State) ->
  +    State#xmerl_sax_old_dom_state{namespaces=lists:keydelete(Prefix, 1, NS)};
  +
  +%%----------------------------------------------------------------------
   %% Processing instructions
  -%%----------------------------------------------------------------------
   build_dom({processingInstruction,"xml", PiData},
   	  #xmerl_sax_old_dom_state{dom=D} = State) ->
       {Vsn, PiData1}  = find_and_remove_attribute("version", PiData, []),
  
positive.code: %%======================================================================
  %%----------------------------------------------------------------------
  %% Function: initial_state() -> Result
  %% Parameters: 
  %% Result: 
  %% Description:
  %%----------------------------------------------------------------------
  initial_state() ->
  
negative.code: %% WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  %% See the License for the specific language governing permissions and
  %% limitations under the License.
  %%
  %% %CopyrightEnd%
  %%----------------------------------------------------------------------
  %% File    : xmerl_sax_old_dom.erl
  %% Description :
  %%
  %% Created : 02 Oct 2008
  %%----------------------------------------------------------------------
  -module(xmerl_sax_old_dom).
  
  