]> git.proxmox.com Git - mirror_edk2.git/blob - Tools/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/common/XmlConfig.java
Fixed Enumeration ModuleType was suppose to be TOOL, not TOOLS.
[mirror_edk2.git] / Tools / Source / FrameworkWizard / src / org / tianocore / frameworkwizard / common / XmlConfig.java
1 /** @file
2
3 The file is used to config XML file format
4
5 Copyright (c) 2006, Intel Corporation
6 All rights reserved. This program and the accompanying materials
7 are licensed and made available under the terms and conditions of the BSD License
8 which accompanies this distribution. The full text of the license may be found at
9 http://opensource.org/licenses/bsd-license.php
10
11 THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
12 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
13
14 **/
15
16 package org.tianocore.frameworkwizard.common;
17
18 import org.apache.xmlbeans.XmlCursor;
19 import org.apache.xmlbeans.XmlOptions;
20
21 public class XmlConfig {
22 public static XmlCursor setupXmlCursor(XmlCursor cursor) {
23 String uri = "http://www.TianoCore.org/2006/Edk2.0";
24 cursor.push();
25 cursor.toNextToken();
26 cursor.insertNamespace("", uri);
27 cursor.insertNamespace("xsi", "http://www.w3.org/2001/XMLSchema-instance");
28 cursor.pop();
29 return cursor;
30 }
31
32 public static XmlOptions setupXmlOptions() {
33 XmlOptions options = new XmlOptions();
34 options.setCharacterEncoding("UTF-8");
35 options.setSavePrettyPrint();
36 options.setSavePrettyPrintIndent(2);
37 return options;
38 }
39
40 }