7 my $xmlfile = shift(@_);
10 $xmlfile =~ s/([\[\]\*\(\)])/\\$1/g;
12 open(my $rs, "xmllint --xpath \"$xpath\" $xmlfile |") or die "Cannot open $xmlfile:$!";
13 my $result = join('', <$rs>);
16 my @result_array = split(/ +/, $result);
20 if ($#ARGV < 0 || !(-f $ARGV[0])) {
21 print "No such file or directory.\n";
25 my @item_array = getlist($ARGV[0], '//item/@name');
29 * @copyright Copyright (c) 2017-2020 TOYOTA MOTOR CORPORATION.
31 * Licensed under the Apache License, Version 2.0 (the "License");
32 * you may not use this file except in compliance with the License.
33 * You may obtain a copy of the License at
35 * http://www.apache.org/licenses/LICENSE-2.0
37 * Unless required by applicable law or agreed to in writing, software
38 * distributed under the License is distributed on an "AS IS" BASIS,
39 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
40 * See the License for the specific language governing permissions and
41 * limitations under the License.
44 * @file ns_backup_id.h
45 * @brief backup id define
48 #ifndef BACKUP_MANAGER_CONFIG_NS_BACKUP_ID_H_
49 #define BACKUP_MANAGER_CONFIG_NS_BACKUP_ID_H_
51 /** @addtogroup BaseSystem
54 /** @addtogroup native_service
58 /** @addtogroup backup_manager
59 * @ingroup native_service
65 foreach my $item (@item_array) {
66 if ($item =~ /^name="(.+)"$/) {
67 printf("#define %s \"%s\"\n", $1, $1);
70 print "Invalid input:$item\n";
77 /**@}*/ // end of backup_manager
78 /**@}*/ // end of native_service
79 /**@}*/ // end of BaseSystem
81 #endif // BACKUP_MANAGER_CONFIG_NS_BACKUP_ID_H_