Java 配置和读取XML

1.定义xsd

common.xsd:




    
        
            
                
                
            
        
    
    
        
            
                
                    
                    
                    
                    
                    
                    
                    
                    
                
            
        
        
    
    
        
            
            
        
    
    
        
            
        
    

job.xsd:



    
    
        
            
                
                    
                        
                        
                        
                        
                        
                        
                        
                        
                        
                        
                    
                
            
            
            
                
                    
                
            
            
                
                    
                
            
            
        
    
    
        
    

    
        
            
                
                    
                    
                    
                    
                    
                    
                    
                    
                    
                    
                    
                    
                
            
        
    
    
        
            
                
                    
                    
                    
                    
                    
                    
                    
                    
                    
                    
                    
                    
                    
                
            
        
    
    
        
            
                
                    
                        
                            
                                
                                    
                                        
                                            
                                                
                                            
                                        
                                    
                                    
                                
                            
                        
                    
                    
                        
                            
                                
                                    
                                        
                                            
                                                
                                            
                                        
                                    
                                    
                                        
                                            
                                                
                                                
                                                
                                                
                                                
                                            
                                        
                                    
                                    
                                
                            
                        
                    
                    
                    
                    
                
            
        
    
    
        
            
                
                    
                
                
            
        
    

    
        
            
                
                    
                        
                            
                                
                                
                            
                        
                    
                    
                        
                            
                                
                                    
                                    
                                    
                                    
                                    
                                    
                                
                            
                        
                    
                
            
        
    

    
        
            
                
                    
                
                
                
                
                
                    
                        
                            
                            
                        
                    
                
                
                
                
                
                
            
        
    

    
        
            
                
                    
                
                
                
                    
                        
                            
                            
                        
                    
                
            
        
    

    
        
            
                
                
                    
                        
                            
                        
                    
                
                
                
                
            
        
    
    
        
            
                
                    
                
                
                
            
        
    
    
        
            
                
                    
                
                
                    
                        
                            
                            
                        
                    
                
                
            
        
    
    
        
            
                
                    
                
            
        
    
    
        
            
                
                    
                
                
            
        
    
    
        
            
                
                    
                        
                            
                                
                                    
                                        
                                            
                                                
                                            
                                        
                                    
                                    
                                
                            
                        
                    
                    
                
            
        
    
    
        
            
                
                    
                
                
            
        
    
    
        
            
                
                    
                        
                            
                        
                    
                
            
        
    
    
        
            
                
                    
                    
                        
                            
                                
                            
                        
                    
                    
                    
                    
                
            
            
                
                    
                    
                
            
        
        
        
        
        
        
            
                
                    
                    
                    
                
            
        

    
    
        
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
        
    
    
        
            
            
            
            
            
            
        
    

2.实现xml



    
        
            
            
            
            
            
            
            

            
            

            
                true
                {dpi_input_path}

                {table_http_url}
                
                select START_TIME,END_TIME,IMSI,IMEI,SERV_NO,LAC,CI,USER_AGENT,HTTP_URL,DOMAIN,REFER_URI,APP_CAT_ID,APP_ID from {table_http_url} where stat_mi >= "{logDate:%Y%m%d%H}00" and stat_mi <= "{logDate:%Y%m%d%H}60"

                
                

                {input_dpi_hour}
                {history_filter_nume}
                
                {other_source_wzk}

                
                {seed_control}
                
                {hostmatch_hdfs_conf}dpi_seed_text.txt
                xxxx 


                
                
                {hostmatch_hdfs_conf}dpi_sample_all_target.txt

                {hostmatch_hdfs_conf}{dmp_hostmatch_wzk_file}
                
                {hostmatch_hdfs_conf}phone_isnew.txt
                {input_ua_control}
                shortlink
                false
                {input_app_filter_control}
                {hostmatch_hdfs_conf}common_busi_list.txt

                
                true
                dns

                
                true
                {url_secret_key}

                
                true
                
                13,11

                100
                false
                
                {model_dt_output_path}/dpi/prematch/{province}/{logDate:%Y%m%d}/{logDate:%Y%m%d%H}/

                
                {model_dt_output_path}/url_tag/prematch/{province}/{logDate:%Y%m%d}/{logDate:%Y%m%d%H}/
                {model_dt_output_path}/shortlink/prematch/{province}/{logDate:%Y%m%d}/{logDate:%Y%m%d%H}/
                {model_dt_output_path}/activity/prematch/{province}/{logDate:%Y%m%d}/{logDate:%Y%m%d%H}/
                {model_dt_output_path}/terminal/prematch/{province}/{logDate:%Y%m%d}/{logDate:%Y%m%d%H}/
                {model_dt_output_path}/dau/prematch/{province}/{logDate:%Y%m%d}/{logDate:%Y%m%d%H}/
                {model_dt_output_path}/app_basic/prematch/{province}/{logDate:%Y%m%d}/{logDate:%Y%m%d%H}/

                
                {model_dt_output_path}/url_tag_target/prematch/{province}/{logDate:%Y%m%d}/{logDate:%Y%m%d%H}/

                
                false
                
                true
                {province}
                {logDate:%Y%m%d%H}
                /tmp

                
                
                    
                    
                    
                    
                    
                    
                    
                    
                    
                    
                    
                    
                    

                
            
        
    






    0


    
        
    

3.读取xml

你可能感兴趣的:(java,xml,开发语言)