Ignore:
Timestamp:
May 14, 2009 4:24:39 PM (14 years ago)
Author:
ajj
Message:
  • Move isXML() to outside of test for presence of XMLUtils.XOP
File:
1 edited

Legend:

Unmodified
Added
Removed
  • sans/Dev/trunk/NCNR_User_Procedures/Common/NIST_XML_v40.ipf

    r485 r508  
    324324end 
    325325 
    326 function isXML(filestr) 
    327         String filestr 
    328          
    329         String line 
    330         Variable fileref 
    331          
    332         Open/R fileref as filestr 
    333         FReadLine fileref,  line 
    334         Close fileref 
    335          
    336         //Hopefully this will distinguish between other formats and the XML 
    337         return stringmatch(line, "*xml*")        
    338  
    339 end 
    340326 
    341327 
     
    382368            RETURN(-6) 
    383369        END 
    384 #endif  // if( Exists("XmlOpenFile") ) 
     370         
     371 
     372         
     373#endif  // if( Exists("XmlOpenFile")  
     374//Needed to test whether file is XML. The load routine will then either give an error if XMLutils is not present or load the file if it is. 
     375function isXML(filestr) 
     376        String filestr 
     377         
     378        String line 
     379        Variable fileref 
     380         
     381        Open/R fileref as filestr 
     382        FReadLine fileref,  line 
     383        Close fileref 
     384         
     385        //Hopefully this will distinguish between other formats and the XML 
     386        return stringmatch(line, "*xml*")        
     387 
     388end 
Note: See TracChangeset for help on using the changeset viewer.