anchor.diff:  %% 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 
  +%% Description :
  +%%
  +%% Created : 02 Oct 2008
   %%----------------------------------------------------------------------
   -module(xmerl_sax_old_dom).
   
  
positive.code: 							  |PC]
  						} | D]};
  	_ ->
  	    ?error("Got end of element: " ++ LocalName ++ " but expected: " ++ 
  		   Current#xmlElement.name)
      end;
  
  %% Text 
  %%----------------------------------------------------------------------
  build_dom({characters, String},
  	  #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, type=text}
  								   |C]} | D]};
  build_dom({ignorableWhitespace, String},
  	  #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, 
  									    type=text}
  								   |C]} | D]};
  
  %% Comments
  %%----------------------------------------------------------------------
  build_dom({comment, String},
  	  #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) -> 
      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};
  
  %% Processing instructions
  %%----------------------------------------------------------------------
  build_dom({processingInstruction,"xml", PiData},
  	  #xmerl_sax_old_dom_state{dom=D} = State) ->
      {Vsn, PiData1}  = find_and_remove_attribute("version", PiData, []),
  
negative.code: %%----------------------------------------------------------------------
  %% Error handling
  %%----------------------------------------------------------------------
  -define(error(Reason),
  	throw({xmerl_sax_old_dom_error, Reason})).
  
  %%======================================================================
  