Example

Consider the following XML document:

           

           
   
            
      
             Historic Park
      
             Natural Environment Park
      
             National Park      
      
             Protected Area            
   
                  
   
            
   
            
   
                              

           

The following xfMap maps each element into an FME feature.A class attribute is also added to the feature,but we use the class's long descriptive name rather than class's code as its value:

              

           
            <
            reference-map>
             
		
                                                 
      
                       
         
                   
   
               

              
		
                       
         
               
            
                 
                 
                  
                  
                 
                  
                  
                                        
         
                          
      
                                                              
   >
              
      
               
         
                
                 
                                      
         
                 
                  
                  
                   
                   
                  
                   
                   
                  
                  
                  
                   
                   
                  
                   <
                   refexpr expr="" reference-group="codes">
                    
                     
                     >
                  
                   
                 
                  
                
                 
               
               
   
              
               

             
           
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++Feature Type: `zone'                                                               Attribute(string): `class' has value `Natural Environment Park'                    Attribute(string): `name' has value `A-1'                                          Attribute(string): `xml_type' has value `xml_no_geom'                              Geometry Type: Unknown (0)                                                         =============================================================== +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Feature Type: `zone'                                                               Attribute(string): `class' has value `Protected Area'                              Attribute(string): `name' has value `B-3'                                          Attribute(string): `xml_type' has value `xml_no_geom'                              Geometry Type: Unknown (0)                                                         =============================================================== +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Feature Type: `zone'                                                               Attribute(string): `class' has value `Historic Park'                               Attribute(string): `name' has value `D-H'                                          Attribute(string): `xml_type' has value `xml_no_geom'                              Geometry Type: Unknown (0)                                                         ===============================================================