From d4740fa807b374db4cce96315019464ae521d010 Mon Sep 17 00:00:00 2001 From: lihucheng Date: Fri, 11 Feb 2022 23:53:03 +0800 Subject: [PATCH] Signed-off-by: lihucheng On branch master Your branch is up to date with 'origin/master'. --- api/@ohos.convertxml.d.ts | 45 +++++++++++------------ api/@ohos.xml.d.ts | 77 +++++++++++++++++++-------------------- 2 files changed, 60 insertions(+), 62 deletions(-) diff --git a/api/@ohos.convertxml.d.ts b/api/@ohos.convertxml.d.ts index 220c27d3aa..a28fa4992b 100644 --- a/api/@ohos.convertxml.d.ts +++ b/api/@ohos.convertxml.d.ts @@ -16,8 +16,7 @@ /** * The convertxml module provides utilities for converting XML text to Javascript object. * @since 8 - * @sysCap SystemCapability.CCRuntime - * @devices phone, tablet + * @syscap SystemCapability.Utils.Lang * @import import convertXml from '@ohos.convertxml'; * @permission N/A */ @@ -26,124 +25,124 @@ declare namespace xml { /** * Whether to trim whitespace characters that may exist before and after the text, default false. * @since 8 - * @sysCap SystemCapability.CCRuntime + * @syscap SystemCapability.Utils.Lang */ trim: boolean; /** * Whether to ignore writing declaration directives of xml. * @since 8 - * @sysCap SystemCapability.CCRuntime + * @syscap SystemCapability.Utils.Lang */ ignoreDeclaration?: boolean; /** * Whether to ignore writing processing instruction of xml. * @since 8 - * @sysCap SystemCapability.CCRuntime + * @syscap SystemCapability.Utils.Lang */ ignoreInstruction?: boolean; /** * Whether to print attributes across multiple lines and indent them. * @since 8 - * @sysCap SystemCapability.CCRuntime + * @syscap SystemCapability.Utils.Lang */ ignoreAttributes?: boolean; /** * Whether to ignore writing comments of the elements. * @since 8 - * @sysCap SystemCapability.CCRuntime + * @syscap SystemCapability.Utils.Lang */ ignoreComment?: boolean; /** * Whether to ignore writing CDATA of the elements. * @since 8 - * @sysCap SystemCapability.CCRuntime + * @syscap SystemCapability.Utils.Lang */ ignoreCDATA?: boolean; /** * Whether to ignore writing Doctype of the elements. * @since 8 - * @sysCap SystemCapability.CCRuntime + * @syscap SystemCapability.Utils.Lang */ ignoreDoctype?: boolean; /** * Whether to ignore writing texts of the elements. * @since 8 - * @sysCap SystemCapability.CCRuntime + * @syscap SystemCapability.Utils.Lang */ ignoreText?: boolean; /** * Name of the property key which will be used for the declaration. * @since 8 - * @sysCap SystemCapability.CCRuntime + * @syscap SystemCapability.Utils.Lang */ declarationKey: string; /** * Name of the property key which will be used for the processing instruction. * @since 8 - * @sysCap SystemCapability.CCRuntime + * @syscap SystemCapability.Utils.Lang */ instructionKey: string; /** * Name of the property key which will be used for the attributes. * @since 8 - * @sysCap SystemCapability.CCRuntime + * @syscap SystemCapability.Utils.Lang */ attributesKey: string; /** * Name of the property key which will be used for the text. * @since 8 - * @sysCap SystemCapability.CCRuntime + * @syscap SystemCapability.Utils.Lang */ textKey: string; /** * Name of the property key which will be used for the cdata. * @since 8 - * @sysCap SystemCapability.CCRuntime + * @syscap SystemCapability.Utils.Lang */ cdataKey: string; /** * Name of the property key which will be used for the doctype. * @since 8 - * @sysCap SystemCapability.CCRuntime + * @syscap SystemCapability.Utils.Lang */ doctypeKey: string; /** * Name of the property key which will be used for the comment. * @since 8 - * @sysCap SystemCapability.CCRuntime + * @syscap SystemCapability.Utils.Lang */ commentKey: string; /** * Name of the property key which will be used for the parent. * @since 8 - * @sysCap SystemCapability.CCRuntime + * @syscap SystemCapability.Utils.Lang */ parentKey: string; /** * Name of the property key which will be used for the type. * @since 8 - * @sysCap SystemCapability.CCRuntime + * @syscap SystemCapability.Utils.Lang */ typeKey: string; /** * Name of the property key which will be used for the name. * @since 8 - * @sysCap SystemCapability.CCRuntime + * @syscap SystemCapability.Utils.Lang */ nameKey: string; /** * Name of the property key which will be used for the elements. * @since 8 - * @sysCap SystemCapability.CCRuntime + * @syscap SystemCapability.Utils.Lang */ elementsKey: string; } - interface ConvertXML { + class ConvertXML { /** * To convert XML text to JavaScript object. * @since 8 - * @sysCap SystemCapability.CCRuntime. + * @syscap SystemCapability.Utils.Lang. * @param xml The xml text to be converted. * @param option Option Inputted by user to set. * @return Returns a JavaScript object converting from XML text. diff --git a/api/@ohos.xml.d.ts b/api/@ohos.xml.d.ts index 2da579cb1e..6aed19cbd9 100644 --- a/api/@ohos.xml.d.ts +++ b/api/@ohos.xml.d.ts @@ -16,8 +16,7 @@ /** * The xml module provides utilities for converting XML text to Javascript object, XML generation and parsing. * @since 8 - * @sysCap SystemCapability.CCRuntime - * @devices phone, tablet + * @syscap SystemCapability.Utils.Lang * @import import xml from '@ohos.xml'; * @permission N/A */ @@ -35,7 +34,7 @@ declare namespace xml { /** * Write an attribute. * @since 8 - * @sysCap SystemCapability.CCRuntime + * @syscap SystemCapability.Utils.Lang * @param name Key name of the attribute. * @param value Values of attribute. */ @@ -44,7 +43,7 @@ declare namespace xml { /** * Add an empty element. * @since 8 - * @sysCap SystemCapability.CCRuntime + * @syscap SystemCapability.Utils.Lang * @param name Key name of the attribute. * @param value Values of element. */ @@ -53,14 +52,14 @@ declare namespace xml { /** * Writes xml declaration with encoding. For example: . * @since 8 - * @sysCap SystemCapability.CCRuntime + * @syscap SystemCapability.Utils.Lang */ setDeclaration(): void; /** * Writes a elemnet start tag with the given name. * @since 8 - * @sysCap SystemCapability.CCRuntime + * @syscap SystemCapability.Utils.Lang * @param name name of the element. */ startElement(name: string): void; @@ -68,14 +67,14 @@ declare namespace xml { /** * Writes end tag of the element. * @since 8 - * @sysCap SystemCapability.CCRuntime + * @syscap SystemCapability.Utils.Lang */ endElement(): void; /** * Writes the namespace of the current element tag. * @since 8 - * @sysCap SystemCapability.CCRuntime + * @syscap SystemCapability.Utils.Lang * @param prefix Values name of the prefix. * @param namespace Values of namespace. */ @@ -84,7 +83,7 @@ declare namespace xml { /** * Writes the comment. * @since 8 - * @sysCap SystemCapability.CCRuntime + * @syscap SystemCapability.Utils.Lang * @param text Values of comment. */ setComment(text: string): void; @@ -92,7 +91,7 @@ declare namespace xml { /** * Writes the CDATA. * @since 8 - * @sysCap SystemCapability.CCRuntime + * @syscap SystemCapability.Utils.Lang * @param text Values of CDATA. */ setCDATA(text: string): void; @@ -100,7 +99,7 @@ declare namespace xml { /** * Writes the text. * @since 8 - * @sysCap SystemCapability.CCRuntime + * @syscap SystemCapability.Utils.Lang * @param text Values of text. */ setText(text: string): void; @@ -108,7 +107,7 @@ declare namespace xml { /** * Writes the DOCTYPE. * @since 8 - * @sysCap SystemCapability.CCRuntime + * @syscap SystemCapability.Utils.Lang * @param text Values of docType. */ setDocType(text: string): void; @@ -118,67 +117,67 @@ declare namespace xml { /** * Start a document. * @since 8 - * @sysCap SystemCapability.CCRuntime + * @syscap SystemCapability.Utils.Lang */ START_DOCUMENT, /** * End a document. * @since 8 - * @sysCap SystemCapability.CCRuntime + * @syscap SystemCapability.Utils.Lang */ END_DOCUMENT, /** * Start a tag. * @since 8 - * @sysCap SystemCapability.CCRuntime + * @syscap SystemCapability.Utils.Lang */ START_TAG, /** * End a tag. * @since 8 - * @sysCap SystemCapability.CCRuntime + * @syscap SystemCapability.Utils.Lang */ END_TAG, /** * Character data. * @since 8 - * @sysCap SystemCapability.CCRuntime + * @syscap SystemCapability.Utils.Lang */ TEXT, /** * A CDATA sections. * @since 8 - * @sysCap SystemCapability.CCRuntime + * @syscap SystemCapability.Utils.Lang */ CDSECT, /** * An XML comment. * @since 8 - * @sysCap SystemCapability.CCRuntime + * @syscap SystemCapability.Utils.Lang */ COMMENT, /** * An XML document type declaration. * @since 8 - * @sysCap SystemCapability.CCRuntime + * @syscap SystemCapability.Utils.Lang */ DOCDECL, /** * An XML processing instruction declaration. * @since 8 - * @sysCap SystemCapability.CCRuntime + * @syscap SystemCapability.Utils.Lang */ INSTRUCTION, /** * An entity reference. * @since 8 - * @sysCap SystemCapability.CCRuntime + * @syscap SystemCapability.Utils.Lang */ ENTITY_REFERENCE, /** * a whitespace. * @since 8 - * @sysCap SystemCapability.CCRuntime + * @syscap SystemCapability.Utils.Lang */ WHITESPACE } @@ -188,61 +187,61 @@ declare namespace xml { /** * The current column number, starting from 1. * @since 8 - * @sysCap SystemCapability.CCRuntime + * @syscap SystemCapability.Utils.Lang */ getColumnNumber(): number; /** * The current depth of the element. * @since 8 - * @sysCap SystemCapability.CCRuntime + * @syscap SystemCapability.Utils.Lang */ getDepth(): number; /** * The current line number, starting from 1. * @since 8 - * @sysCap SystemCapability.CCRuntime + * @syscap SystemCapability.Utils.Lang */ getLineNumber(): number; /** * The current element's name. * @since 8 - * @sysCap SystemCapability.CCRuntime + * @syscap SystemCapability.Utils.Lang */ getName(): string; /** * The current element's namespace. * @since 8 - * @sysCap SystemCapability.CCRuntime + * @syscap SystemCapability.Utils.Lang */ getNamespace(): string; /** * The current element's prefix. * @since 8 - * @sysCap SystemCapability.CCRuntime + * @syscap SystemCapability.Utils.Lang */ getPrefix(): string; /** * The text content of the current event as String. * @since 8 - * @sysCap SystemCapability.CCRuntime + * @syscap SystemCapability.Utils.Lang */ getText(): string; /** * Returns true if the current element is empty. * @since 8 - * @sysCap SystemCapability.CCRuntime + * @syscap SystemCapability.Utils.Lang */ isEmptyElementTag(): boolean; /** * Checks whether the current TEXT event contains only whitespace characters. * @since 8 - * @sysCap SystemCapability.CCRuntime + * @syscap SystemCapability.Utils.Lang */ isWhitespace(): boolean; /** * Returns the number of attributes of the current start tag. * @since 8 - * @sysCap SystemCapability.CCRuntime + * @syscap SystemCapability.Utils.Lang */ getAttributeCount(): number; } @@ -253,21 +252,21 @@ declare namespace xml { /** * Whether to parsing Doctype of the elements. * @since 8 - * @sysCap SystemCapability.CCRuntime + * @syscap SystemCapability.Utils.Lang */ supportDoctype?: boolean; /** * Whether to ignore parsing texts of the elements. * @since 8 - * @sysCap SystemCapability.CCRuntime + * @syscap SystemCapability.Utils.Lang */ ignoreNameSpace?: boolean; /** * tag value callback function. * @since 8 - * @sysCap SystemCapability.CCRuntime + * @syscap SystemCapability.Utils.Lang * @param name The current tag name. * @param value The current tag value. * @return Returns a Boolean variable for whether parse continually. @@ -277,7 +276,7 @@ declare namespace xml { /** * attribute value callback function. * @since 8 - * @sysCap SystemCapability.CCRuntime + * @syscap SystemCapability.Utils.Lang * @param name The current attribute name. * @param value The current attribute value. * @return Returns a Boolean variable for whether parse continually. @@ -287,7 +286,7 @@ declare namespace xml { /** * token value callback function. * @since 8 - * @sysCap SystemCapability.CCRuntime + * @syscap SystemCapability.Utils.Lang * @param eventType The current token eventtype. * @param value The current token parseinfo. * @return Returns a Boolean variable for whether parse continually. @@ -304,7 +303,7 @@ declare namespace xml { /** * Starts parsing the XML file. * @since 8 - * @sysCap SystemCapability.CCRuntime + * @syscap SystemCapability.Utils.Lang * @param option parse options for XmlPullParser, the interface including two Boolean variables and three callback functions. */ parse(option: ParseOptions): void; -- Gitee