ml-modules.root.data-hub.third-party.fast-xml-parser.src.parser.d.ts Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of marklogic-data-hub Show documentation
Show all versions of marklogic-data-hub Show documentation
Library for Creating an Operational Data Hub on MarkLogic
type X2jOptions = {
attributeNamePrefix: string;
attrNodeName: false | string;
textNodeName: string;
ignoreAttributes: boolean;
ignoreNameSpace: boolean;
allowBooleanAttributes: boolean;
parseNodeValue: boolean;
parseAttributeValue: boolean;
arrayMode: boolean | 'strict';
trimValues: boolean;
cdataTagName: false | string;
cdataPositionChar: string;
parseTrueNumberOnly: boolean;
tagValueProcessor: (tagValue: string, tagName: string) => string;
attrValueProcessor: (attrValue: string, attrName: string) => string;
stopNodes: string[];
};
type X2jOptionsOptional = Partial;
type validationOptions = {
allowBooleanAttributes: boolean;
};
type validationOptionsOptional = Partial;
type J2xOptions = {
attributeNamePrefix: string;
attrNodeName: false | string;
textNodeName: string;
ignoreAttributes: boolean;
cdataTagName: false | string;
cdataPositionChar: string;
format: boolean;
indentBy: string;
supressEmptyNode: boolean;
tagValueProcessor: (tagValue: string) => string;
attrValueProcessor: (attrValue: string) => string;
};
type J2xOptionsOptional = Partial;
type ESchema = string | object | Array;
type ValidationError = {
err: { code: string; msg: string, line: number };
};
export function parse(xmlData: string, options?: X2jOptionsOptional, validationOptions?: validationOptionsOptional | boolean): any;
export function convert2nimn(
node: any,
e_schema: ESchema,
options?: X2jOptionsOptional
): any;
export function getTraversalObj(
xmlData: string,
options?: X2jOptionsOptional
): any;
export function convertToJson(node: any, options?: X2jOptionsOptional): any;
export function convertToJsonString(
node: any,
options?: X2jOptionsOptional
): string;
export function validate(
xmlData: string,
options?: validationOptionsOptional
): true | ValidationError;
export class j2xParser {
constructor(options: J2xOptionsOptional);
parse(options: any): any;
}
export function parseToNimn(
xmlData: string,
schema: any,
options: Partial
): any;
© 2015 - 2024 Weber Informatics LLC | Privacy Policy