Merge pull request #32775 from denkristoffer/update-libxmljs-options

libxmljs: Allow booleans in parser options
This commit is contained in:
Armando Aguirre
2019-02-07 12:40:57 -08:00
committed by GitHub
+42 -5
View File
@@ -14,12 +14,48 @@ export const libxml_parser_version: string;
// tslint:disable-next-line:strict-export-declare-modifiers
interface StringMap { [key: string]: string; }
export function parseXml(source: string, options?: StringMap): Document;
export function parseXmlString(source: string, options?: StringMap): Document;
// tslint:disable-next-line:strict-export-declare-modifiers
interface ParserOptions {
recover?: boolean;
noent?: boolean;
dtdload?: boolean;
doctype?: boolean;
dtdattr?: any;
dtdvalid?: boolean;
noerror?: boolean;
errors?: boolean;
nowarning?: boolean;
warnings?: boolean;
pedantic?: boolean;
noblanks?: boolean;
blanks?: boolean;
sax1?: boolean;
xinclude?: boolean;
nonet?: boolean;
net?: boolean;
nodict?: boolean;
dict?: boolean;
nsclean?: boolean;
implied?: boolean;
nocdata?: boolean;
cdata?: boolean;
noxincnode?: boolean;
compact?: boolean;
old?: boolean;
nobasefix?: boolean;
basefix?: boolean;
huge?: boolean;
oldsax?: boolean;
ignore_enc?: boolean;
big_lines?: boolean;
}
export function parseHtml(source: string, options?: StringMap): Document;
export function parseHtmlString(source: string, options?: StringMap): Document;
export function parseHtmlFragment(source: string, options?: StringMap): Document;
export function parseXml(source: string, options?: ParserOptions): Document;
export function parseXmlString(source: string, options?: ParserOptions): Document;
export function parseHtml(source: string, options?: ParserOptions): Document;
export function parseHtmlString(source: string, options?: ParserOptions): Document;
export function parseHtmlFragment(source: string, options?: ParserOptions): Document;
export function memoryUsage(): number;
export function nodeCount(): number;
@@ -113,6 +149,7 @@ export class Element extends Node {
prevElement(): Element|null;
nextElement(): Element|null;
addNextSibling(siblingNode: Node): Node;
addPrevSibling(siblingNode: Node): Node;
find(xpath: string, ns_uri?: string): Node[];
find(xpath: string, namespaces: StringMap): Node[];