1 | /**
|
2 | * Copyright (C) 2016-2019 Michael Kourlas
|
3 | *
|
4 | * Licensed under the Apache License, Version 2.0 (the "License");
|
5 | * you may not use this file except in compliance with the License.
|
6 | * You may obtain a copy of the License at
|
7 | *
|
8 | * http://www.apache.org/licenses/LICENSE-2.0
|
9 | *
|
10 | * Unless required by applicable law or agreed to in writing, software
|
11 | * distributed under the License is distributed on an "AS IS" BASIS,
|
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
13 | * See the License for the specific language governing permissions and
|
14 | * limitations under the License.
|
15 | */
|
16 | /**
|
17 | * Formatting options for the string representation of an XML node.
|
18 | */
|
19 | export interface IStringOptions {
|
20 | /**
|
21 | * Whether double quotes or single quotes should be used in XML attributes.
|
22 | * By default, single quotes are used.
|
23 | */
|
24 | doubleQuotes?: boolean;
|
25 | /**
|
26 | * The indent string used for pretty-printing. The default indent string is
|
27 | * four spaces.
|
28 | */
|
29 | indent?: string;
|
30 | /**
|
31 | * The newline string used for pretty-printing. The default newline string
|
32 | * is "\n".
|
33 | */
|
34 | newline?: string;
|
35 | /**
|
36 | * Whether pretty-printing is enabled. By default, pretty-printing is
|
37 | * enabled.
|
38 | */
|
39 | pretty?: boolean;
|
40 | }
|
41 | /**
|
42 | * Implementation of the IStringOptions interface used to provide default
|
43 | * values to fields.
|
44 | */
|
45 | export declare class StringOptions implements IStringOptions {
|
46 | doubleQuotes: boolean;
|
47 | indent: string;
|
48 | newline: string;
|
49 | pretty: boolean;
|
50 | constructor(options: IStringOptions);
|
51 | }
|