1 '**************************************************************************
2 '* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4 '* Copyright 2008 by Sun Microsystems, Inc.
6 '* OpenOffice.org - a multi-platform office productivity suite
8 '* $RCSfile: itools1.inc,v $
12 '* last change: $Author: rt $ $Date: 2008-07-11 10:15:49 $
14 '* This file is part of OpenOffice.org.
16 '* OpenOffice.org is free software: you can redistribute it and/or modify
17 '* it under the terms of the GNU Lesser General Public License version 3
18 '* only, as published by the Free Software Foundation.
20 '* OpenOffice.org is distributed in the hope that it will be useful,
21 '* but WITHOUT ANY WARRANTY; without even the implied warranty of
22 '* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
23 '* GNU Lesser General Public License version 3 for more details
24 '* (a copy is included in the LICENSE file that accompanied this code).
26 '* You should have received a copy of the GNU Lesser General Public License
27 '* version 3 along with OpenOffice.org. If not, see
28 '* <http://www.openoffice.org/license.html>
29 '* for a copy of the LGPLv3 License.
31 '/************************************************************************
33 '* owner : wolfram.garten@sun.com
35 '* short description : Internet- and XML Tools
37 '***************************************************************************************
41 '\***********************************************************************************
42 function hGetXMLRoot ( XMLFileName as string ) as boolean
44 '/// +checks the initial XML-tag in the StarOffice-XML-document. This function is CASE SENSITIVE!
45 '/// +INPUT : <Filename as string>
46 '/// +RETURN : TRUE, FALSE
47 Dim FileNum as Integer
48 Dim xmlZeile as String
53 Open XMLFileName For Input As #FileNum
54 Do until EOF(#FileNum) = TRUE
55 Line input #FileNum, xmlZeile
56 xmlZeile = Trim ( xmlZeile )
57 if xmlZeile = "<?xml version=" & CHR$(34) & "1.0" & CHR$(34) & " encoding=" & CHR$(34) & "UTF-8" & CHR$(34) & "?>" then
65 '-------------------------------------------------------------------------