diff --git a/en/application-dev/reference/apis/js-apis-url.md b/en/application-dev/reference/apis/js-apis-url.md index 9f105f845950f1f206c326dcd94c4adf8b83c12c..fd826706700190a3d2f042a155cca1a2e1c96b81 100755 --- a/en/application-dev/reference/apis/js-apis-url.md +++ b/en/application-dev/reference/apis/js-apis-url.md @@ -30,11 +30,11 @@ Creates a **URLSearchParams** instance. **Example** ```js -var objectParams = new URLSearchParams([ ['user1', 'abc1'], ['query2', 'first2'], ['query3', 'second3'] ]); -var objectParams1 = new URLSearchParams({"fod" : 1 , "bard" : 2}); -var objectParams2 = new URLSearchParams('?fod=1&bard=2'); -var urlObject = new URL('https://developer.mozilla.org/?fod=1&bard=2'); -var params = new URLSearchParams(urlObject.search); +var objectParams = new Url.URLSearchParams([ ['user1', 'abc1'], ['query2', 'first2'], ['query3', 'second3'] ]); +var objectParams1 = new Url.URLSearchParams({"fod" : 1 , "bard" : 2}); +var objectParams2 = new Url.URLSearchParams('?fod=1&bard=2'); +var urlObject = new Url.URL('https://developer.mozilla.org/?fod=1&bard=2'); +var params = new Url.URLSearchParams(urlObject.search); ``` @@ -56,8 +56,8 @@ Appends a key-value pair into the query string. **Example** ```js -let urlObject = new URL('https://developer.exampleUrl/?fod=1&bard=2'); -let paramsObject = new URLSearchParams(urlObject.search.slice(1)); +let urlObject = new Url.URL('https://developer.exampleUrl/?fod=1&bard=2'); +let paramsObject = new Url.URLSearchParams(urlObject.search.slice(1)); paramsObject.append('fod', 3); ``` @@ -79,8 +79,8 @@ Deletes key-value pairs of the specified key. **Example** ```js -let urlObject = new URL('https://developer.exampleUrl/?fod=1&bard=2'); -let paramsobject = new URLSearchParams(urlObject.search.slice(1)); +let urlObject = new Url.URL('https://developer.exampleUrl/?fod=1&bard=2'); +let paramsobject = new Url.URLSearchParams(urlObject.search.slice(1)); paramsobject.delete('fod'); ``` @@ -108,8 +108,8 @@ Obtains all the key-value pairs based on the specified key. **Example** ```js -let urlObject = new URL('https://developer.exampleUrl/?fod=1&bard=2'); -let paramsObject = new URLSearchParams(urlObject.search.slice(1)); +let urlObject = new Url.URL('https://developer.exampleUrl/?fod=1&bard=2'); +let paramsObject = new Url.URLSearchParams(urlObject.search.slice(1)); paramsObject.append('fod', 3); // Add a second value for the fod parameter. console.log(params.getAll('fod')) // Output ["1","3"]. ``` @@ -132,7 +132,7 @@ Obtains an ES6 iterator. Each item of the iterator is a JavaScript array, and th **Example** ```js -var searchParamsObject = new URLSearchParams("keyName1=valueName1&keyName2=valueName2"); +var searchParamsObject = new Url.URLSearchParams("keyName1=valueName1&keyName2=valueName2"); for (var pair of searchParamsObject .entries()) { // Show keyName/valueName pairs console.log(pair[0]+ ', '+ pair[1]); } @@ -165,7 +165,7 @@ Traverses the key-value pairs in the **URLSearchParams** instance by using a cal **Example** ```js -const myURLObject = new URL('https://developer.exampleUrl/?fod=1&bard=2'); +const myURLObject = new Url.URL('https://developer.exampleUrl/?fod=1&bard=2'); myURLObject.searchParams.forEach((value, name, searchParams) => { console.log(name, value, myURLObject.searchParams === searchParams); }); @@ -196,7 +196,7 @@ Obtains the value of the first key-value pair based on the specified key. **Example** ```js -var paramsOject = new URLSearchParams(document.location.search.substring(1)); +var paramsOject = new Url.URLSearchParams(document.location.search.substring(1)); var name = paramsOject.get("name"); // is the string "Jonathan" var age = parseInt(paramsOject.get("age"), 10); // is the number 18 var address = paramsOject.get("address"); // null @@ -226,8 +226,8 @@ Checks whether a key has a value. **Example** ```js -let urlObject = new URL('https://developer.exampleUrl/?fod=1&bard=2'); -let paramsObject = new URLSearchParams(urlObject.search.slice(1)); +let urlObject = new Url.URL('https://developer.exampleUrl/?fod=1&bard=2'); +let paramsObject = new Url.URLSearchParams(urlObject.search.slice(1)); paramsObject.has('bard') === true; ``` @@ -250,8 +250,8 @@ Sets the value for a key. If key-value pairs matching the specified key exist, t **Example** ```js -let urlObject = new URL('https://developer.exampleUrl/?fod=1&bard=2'); -let paramsObject = new URLSearchParams(urlObject.search.slice(1)); +let urlObject = new Url.URL('https://developer.exampleUrl/?fod=1&bard=2'); +let paramsObject = new Url.URLSearchParams(urlObject.search.slice(1)); paramsObject.set('baz', 3); // Add a third parameter. ``` @@ -267,7 +267,7 @@ Sorts all key-value pairs contained in this object based on the Unicode code poi **Example** ```js -var searchParamsObject = new URLSearchParams("c=3&a=9&b=4&d=2"); // Create a test URLSearchParams object +var searchParamsObject = new Url.URLSearchParams("c=3&a=9&b=4&d=2"); // Create a test URLSearchParams object searchParamsObject.sort(); // Sort the key/value pairs console.log(searchParamsObject.toString()); // Display the sorted query string // Output a=9&b=2&c=3&d=4 ``` @@ -290,7 +290,7 @@ Obtains an ES6 iterator that contains the keys of all the key-value pairs. **Example** ```js -var searchParamsObject = new URLSearchParams("key1=value1&key2=value2"); // Create a URLSearchParamsObject object for testing +var searchParamsObject = new Url.URLSearchParams("key1=value1&key2=value2"); // Create a URLSearchParamsObject object for testing for (var key of searchParamsObject .keys()) { // Output key-value pairs console.log(key); } @@ -314,7 +314,7 @@ Obtains an ES6 iterator that contains the values of all the key-value pairs. **Example** ```js -var searchParams = new URLSearchParams("key1=value1&key2=value2"); // Create a URLSearchParamsObject object for testing +var searchParams = new Url.URLSearchParams("key1=value1&key2=value2"); // Create a URLSearchParamsObject object for testing for (var value of searchParams.values()) { console.log(value); } @@ -338,7 +338,7 @@ Obtains an ES6 iterator. Each item of the iterator is a JavaScript array, and th **Example** ```js -const paramsObject = new URLSearchParams('fod=bay&edg=bap'); +const paramsObject = new Url.URLSearchParams('fod=bay&edg=bap'); for (const [name, value] of paramsObject) { console.log(name, value); } @@ -362,8 +362,8 @@ Obtains search parameters that are serialized as a string and, if necessary, per **Example** ```js -let url = new URL('https://developer.exampleUrl/?fod=1&bard=2'); -let params = new URLSearchParams(url.search.slice(1)); +let url = new Url.URL('https://developer.exampleUrl/?fod=1&bard=2'); +let params = new Url.URLSearchParams(url.search.slice(1)); params.append('fod', 3); console.log(params.toString()); ``` @@ -410,17 +410,17 @@ Creates a URL. ```js var mm = 'http://username:password@host:8080'; -var a = new URL("/", mm); // Output 'http://username:password@host:8080/'; -var b = new URL(mm); // Output 'http://username:password@host:8080/'; -new URL('path/path1', b); // Output 'http://username:password@host:8080/path/path1'; -var c = new URL('/path/path1', b); // Output 'http://username:password@host:8080/path/path1'; -new URL('/path/path1', c); // Output 'http://username:password@host:8080/path/path1'; -new URL('/path/path1', a); // Output 'http://username:password@host:8080/path/path1'; -new URL('/path/path1', "https://www.exampleUrl/fr-FR/toto"); // Output https://www.exampleUrl/path/path1 -new URL('/path/path1', ''); // Raises a TypeError exception as '' is not a valid URL -new URL('/path/path1'); // Raises a TypeError exception as '/path/path1' is not a valid URL -new URL('http://www.shanxi.com', ); // Output http://www.shanxi.com/ -new URL('http://www.shanxi.com', b); // Output http://www.shanxi.com/ +var a = new Url.URL("/", mm); // Output 'http://username:password@host:8080/'; +var b = new Url.URL(mm); // Output 'http://username:password@host:8080/'; +new Url.URL('path/path1', b); // Output 'http://username:password@host:8080/path/path1'; +var c = new Url.URL('/path/path1', b); // Output 'http://username:password@host:8080/path/path1'; +new Url.URL('/path/path1', c); // Output 'http://username:password@host:8080/path/path1'; +new Url.URL('/path/path1', a); // Output 'http://username:password@host:8080/path/path1'; +new Url.URL('/path/path1', "https://www.exampleUrl/fr-FR/toto"); // Output https://www.exampleUrl/path/path1 +new Url.URL('/path/path1', ''); // Raises a TypeError exception as '' is not a valid URL +new Url.URL('/path/path1'); // Raises a TypeError exception as '/path/path1' is not a valid URL +new Url.URL('http://www.shanxi.com', ); // Output http://www.shanxi.com/ +new Url.URL('http://www.shanxi.com', b); // Output http://www.shanxi.com/ ``` @@ -441,7 +441,7 @@ Converts the parsed URL into a string. **Example** ```js -const url = new URL('http://username:password@host:8080/directory/file?query=pppppp#qwer=da'); +const url = new Url.URL('http://username:password@host:8080/directory/file?query=pppppp#qwer=da'); url.toString() ``` @@ -462,6 +462,6 @@ Converts the parsed URL into a JSON string. **Example** ```js -const url = new URL('http://username:password@host:8080/directory/file?query=pppppp#qwer=da'); +const url = new Url.URL('http://username:password@host:8080/directory/file?query=pppppp#qwer=da'); url.toJSON() ``` \ No newline at end of file diff --git a/en/application-dev/reference/apis/js-apis-util.md b/en/application-dev/reference/apis/js-apis-util.md index 0ee9fb84705d1c23d9c453e75dd47689bc66d1d3..f427cfe5749110480fd4d7400fc3e3cb1de2c6e7 100755 --- a/en/application-dev/reference/apis/js-apis-util.md +++ b/en/application-dev/reference/apis/js-apis-util.md @@ -208,9 +208,6 @@ Decodes the input content. result[4] = 0x62; result[5] = 0x63; console.log("input num:"); - for(var j= 0; j < 6; j++) { - console.log(result[j]); - } var retStr = textDecoder.decode( result , {stream: false}); console.log("retStr = " + retStr); ``` @@ -262,6 +259,7 @@ Encodes the input content. **Example** ```js var textEncoder = new util.TextEncoder(); + var buffer = new ArrayBuffer(20); var result = new Uint8Array(buffer); result = textEncoder.encode("\uD800¥¥"); ``` diff --git a/en/application-dev/reference/apis/js-apis-xml.md b/en/application-dev/reference/apis/js-apis-xml.md index c014e5dbbef4cd972a9af5bb77efd71c3c363ae3..f22c9988cf123f79225babf014b089bb98e6247a 100644 --- a/en/application-dev/reference/apis/js-apis-xml.md +++ b/en/application-dev/reference/apis/js-apis-xml.md @@ -55,6 +55,8 @@ Sets an attribute. **Example** ```js +var arrayBuffer = new ArrayBuffer(1024); +var bufView = new DataView(arrayBuffer); var thatSer = new xml.XmlSerializer(bufView); thatSer.setAttributes("importance", "high"); ``` @@ -77,6 +79,8 @@ Adds an empty element. **Example** ```js +var arrayBuffer = new ArrayBuffer(1024); +var bufView = new DataView(arrayBuffer); var thatSer = new xml.XmlSerializer(bufView); thatSer.addEmptyElement("b"); // => ``` @@ -93,6 +97,8 @@ Sets a declaration. **Example** ```js +var arrayBuffer = new ArrayBuffer(1024); +var bufView = new DataView(arrayBuffer); var thatSer = new xml.XmlSerializer(bufView); thatSer.setDeclaration() // => ; ``` @@ -133,6 +139,8 @@ Writes the end tag of the element. **Example** ```js +var arrayBuffer = new ArrayBuffer(1024); +var bufView = new DataView(arrayBuffer); var thatSer = new xml.XmlSerializer(bufView); thatSer.setNamespace("h", "http://www.w3.org/TR/html4/"); thatSer.startElement("table"); diff --git a/zh-cn/application-dev/reference/apis/js-apis-url.md b/zh-cn/application-dev/reference/apis/js-apis-url.md index f27434cedfd295ec28219ae1b59c1a3d4a7ebec8..d85642ef859b8cae2765234923257bd7b640268c 100755 --- a/zh-cn/application-dev/reference/apis/js-apis-url.md +++ b/zh-cn/application-dev/reference/apis/js-apis-url.md @@ -30,11 +30,11 @@ URLSearchParams的构造函数。 **示例:** ```js -var objectParams = new URLSearchParams([ ['user1', 'abc1'], ['query2', 'first2'], ['query3', 'second3'] ]); -var objectParams1 = new URLSearchParams({"fod" : 1 , "bard" : 2}); -var objectParams2 = new URLSearchParams('?fod=1&bard=2'); -var urlObject = new URL('https://developer.mozilla.org/?fod=1&bard=2'); -var params = new URLSearchParams(urlObject.search); +var objectParams = new Url.URLSearchParams([ ['user1', 'abc1'], ['query2', 'first2'], ['query3', 'second3'] ]); +var objectParams1 = new Url.URLSearchParams({"fod" : 1 , "bard" : 2}); +var objectParams2 = new Url.URLSearchParams('?fod=1&bard=2'); +var urlObject = new Url.URL('https://developer.mozilla.org/?fod=1&bard=2'); +var params = new Url.URLSearchParams(urlObject.search); ``` @@ -56,8 +56,8 @@ append(name: string, value: string): void **示例:** ```js -let urlObject = new URL('https://developer.exampleUrl/?fod=1&bard=2'); -let paramsObject = new URLSearchParams(urlObject.search.slice(1)); +let urlObject = new Url.URL('https://developer.exampleUrl/?fod=1&bard=2'); +let paramsObject = new Url.URLSearchParams(urlObject.search.slice(1)); paramsObject.append('fod', 3); ``` @@ -79,8 +79,8 @@ delete(name: string): void **示例:** ```js -let urlObject = new URL('https://developer.exampleUrl/?fod=1&bard=2'); -let paramsobject = new URLSearchParams(urlObject.search.slice(1)); +let urlObject = new Url.URL('https://developer.exampleUrl/?fod=1&bard=2'); +let paramsobject = new Url.URLSearchParams(urlObject.search.slice(1)); paramsobject.delete('fod'); ``` @@ -108,8 +108,8 @@ getAll(name: string): string[] **示例:** ```js -let urlObject = new URL('https://developer.exampleUrl/?fod=1&bard=2'); -let paramsObject = new URLSearchParams(urlObject.search.slice(1)); +let urlObject = new Url.URL('https://developer.exampleUrl/?fod=1&bard=2'); +let paramsObject = new Url.URLSearchParams(urlObject.search.slice(1)); paramsObject.append('fod', 3); // Add a second value for the fod parameter. console.log(params.getAll('fod')) // Output ["1","3"]. ``` @@ -132,7 +132,7 @@ entries(): IterableIterator<[string, string]> **示例:** ```js -var searchParamsObject = new URLSearchParams("keyName1=valueName1&keyName2=valueName2"); +var searchParamsObject = new Url.URLSearchParams("keyName1=valueName1&keyName2=valueName2"); for (var pair of searchParamsObject .entries()) { // Show keyName/valueName pairs console.log(pair[0]+ ', '+ pair[1]); } @@ -165,7 +165,7 @@ forEach(callbackfn: (value: string, key: string, searchParams: this) => void, th **示例:** ```js -const myURLObject = new URL('https://developer.exampleUrl/?fod=1&bard=2'); +const myURLObject = new Url.URL('https://developer.exampleUrl/?fod=1&bard=2'); myURLObject.searchParams.forEach((value, name, searchParams) => { console.log(name, value, myURLObject.searchParams === searchParams); }); @@ -196,7 +196,7 @@ get(name: string): string | null **示例:** ```js -var paramsOject = new URLSearchParams(document.location.search.substring(1)); +var paramsOject = new Url.URLSearchParams(document.location.search.substring(1)); var name = paramsOject.get("name"); // is the string "Jonathan" var age = parseInt(paramsOject.get("age"), 10); // is the number 18 var address = paramsOject.get("address"); // null @@ -226,8 +226,8 @@ has(name: string): boolean **示例:** ```js -let urlObject = new URL('https://developer.exampleUrl/?fod=1&bard=2'); -let paramsObject = new URLSearchParams(urlObject.search.slice(1)); +let urlObject = new Url.URL('https://developer.exampleUrl/?fod=1&bard=2'); +let paramsObject = new Url.URLSearchParams(urlObject.search.slice(1)); paramsObject.has('bard') === true; ``` @@ -250,8 +250,8 @@ set(name: string, value: string): void **示例:** ```js -let urlObject = new URL('https://developer.exampleUrl/?fod=1&bard=2'); -let paramsObject = new URLSearchParams(urlObject.search.slice(1)); +let urlObject = new Url.URL('https://developer.exampleUrl/?fod=1&bard=2'); +let paramsObject = new Url.URLSearchParams(urlObject.search.slice(1)); paramsObject.set('baz', 3); // Add a third parameter. ``` @@ -267,7 +267,7 @@ sort(): void **示例:** ```js -var searchParamsObject = new URLSearchParams("c=3&a=9&b=4&d=2"); // Create a test URLSearchParams object +var searchParamsObject = new Url.URLSearchParams("c=3&a=9&b=4&d=2"); // Create a test URLSearchParams object searchParamsObject.sort(); // Sort the key/value pairs console.log(searchParamsObject.toString()); // Display the sorted query string // Output a=9&b=2&c=3&d=4 ``` @@ -290,7 +290,7 @@ keys(): IterableIterator<string> **示例:** ```js -var searchParamsObject = new URLSearchParams("key1=value1&key2=value2"); // Create a URLSearchParamsObject object for testing +var searchParamsObject = new Url.URLSearchParams("key1=value1&key2=value2"); // Create a URLSearchParamsObject object for testing for (var key of searchParamsObject .keys()) { // Output key-value pairs console.log(key); } @@ -314,7 +314,7 @@ values(): IterableIterator<string> **示例:** ```js -var searchParams = new URLSearchParams("key1=value1&key2=value2"); // Create a URLSearchParamsObject object for testing +var searchParams = new Url.URLSearchParams("key1=value1&key2=value2"); // Create a URLSearchParamsObject object for testing for (var value of searchParams.values()) { console.log(value); } @@ -338,7 +338,7 @@ for (var value of searchParams.values()) { **示例:** ```js -const paramsObject = new URLSearchParams('fod=bay&edg=bap'); +const paramsObject = new Url.URLSearchParams('fod=bay&edg=bap'); for (const [name, value] of paramsObject) { console.log(name, value); } @@ -362,8 +362,8 @@ toString(): string **示例:** ```js -let url = new URL('https://developer.exampleUrl/?fod=1&bard=2'); -let params = new URLSearchParams(url.search.slice(1)); +let url = new Url.URL('https://developer.exampleUrl/?fod=1&bard=2'); +let params = new Url.URLSearchParams(url.search.slice(1)); params.append('fod', 3); console.log(params.toString()); ``` @@ -410,17 +410,17 @@ URL的构造函数。 ```js var mm = 'http://username:password@host:8080'; -var a = new URL("/", mm); // Output 'http://username:password@host:8080/'; -var b = new URL(mm); // Output 'http://username:password@host:8080/'; -new URL('path/path1', b); // Output 'http://username:password@host:8080/path/path1'; -var c = new URL('/path/path1', b); // Output 'http://username:password@host:8080/path/path1'; -new URL('/path/path1', c); // Output 'http://username:password@host:8080/path/path1'; -new URL('/path/path1', a); // Output 'http://username:password@host:8080/path/path1'; -new URL('/path/path1', "https://www.exampleUrl/fr-FR/toto"); // Output https://www.exampleUrl/path/path1 -new URL('/path/path1', ''); // Raises a TypeError exception as '' is not a valid URL -new URL('/path/path1'); // Raises a TypeError exception as '/path/path1' is not a valid URL -new URL('http://www.shanxi.com', ); // Output http://www.shanxi.com/ -new URL('http://www.shanxi.com', b); // Output http://www.shanxi.com/ +var a = new Url.URL("/", mm); // Output 'http://username:password@host:8080/'; +var b = new Url.URL(mm); // Output 'http://username:password@host:8080/'; +new Url.URL('path/path1', b); // Output 'http://username:password@host:8080/path/path1'; +var c = new Url.URL('/path/path1', b); // Output 'http://username:password@host:8080/path/path1'; +new Url.URL('/path/path1', c); // Output 'http://username:password@host:8080/path/path1'; +new Url.URL('/path/path1', a); // Output 'http://username:password@host:8080/path/path1'; +new Url.URL('/path/path1', "https://www.exampleUrl/fr-FR/toto"); // Output https://www.exampleUrl/path/path1 +new Url.URL('/path/path1', ''); // Raises a TypeError exception as '' is not a valid URL +new Url.URL('/path/path1'); // Raises a TypeError exception as '/path/path1' is not a valid URL +new Url.URL('http://www.shanxi.com', ); // Output http://www.shanxi.com/ +new Url.URL('http://www.shanxi.com', b); // Output http://www.shanxi.com/ ``` @@ -441,7 +441,7 @@ toString(): string **示例:** ```js -const url = new URL('http://username:password@host:8080/directory/file?query=pppppp#qwer=da'); +const url = new Url.URL('http://username:password@host:8080/directory/file?query=pppppp#qwer=da'); url.toString() ``` @@ -462,6 +462,6 @@ toJSON(): string **示例:** ```js -const url = new URL('http://username:password@host:8080/directory/file?query=pppppp#qwer=da'); +const url = new Url.URL('http://username:password@host:8080/directory/file?query=pppppp#qwer=da'); url.toJSON() ``` diff --git a/zh-cn/application-dev/reference/apis/js-apis-util.md b/zh-cn/application-dev/reference/apis/js-apis-util.md index 4cf333c4ac6890d61d2332e4f92f48ae0b8fd6c2..84a9489b8551ad097f5178abe0d3b5549b4d6e87 100755 --- a/zh-cn/application-dev/reference/apis/js-apis-util.md +++ b/zh-cn/application-dev/reference/apis/js-apis-util.md @@ -208,9 +208,6 @@ decode(input: Uint8Array, options?: { stream?: false }): string result[4] = 0x62; result[5] = 0x63; console.log("input num:"); - for(var j= 0; j < 6; j++) { - console.log(result[j]); - } var retStr = textDecoder.decode( result , {stream: false}); console.log("retStr = " + retStr); ``` @@ -262,6 +259,7 @@ encode(input?: string): Uint8Array **示例:** ```js var textEncoder = new util.TextEncoder(); + var buffer = new ArrayBuffer(20); var result = new Uint8Array(buffer); result = textEncoder.encode("\uD800¥¥"); ``` diff --git a/zh-cn/application-dev/reference/apis/js-apis-xml.md b/zh-cn/application-dev/reference/apis/js-apis-xml.md index db42b40c7f735787bbb33168e7cf1a28aab465d1..d004358e5f12565e4b5e6900a11e1b3d2e0baad0 100644 --- a/zh-cn/application-dev/reference/apis/js-apis-xml.md +++ b/zh-cn/application-dev/reference/apis/js-apis-xml.md @@ -55,6 +55,8 @@ setAttributes(name: string, value: string): void **示例:** ```js +var arrayBuffer = new ArrayBuffer(1024); +var bufView = new DataView(arrayBuffer); var thatSer = new xml.XmlSerializer(bufView); thatSer.setAttributes("importance", "high"); ``` @@ -77,6 +79,8 @@ addEmptyElement(name: string): void **示例:** ```js +var arrayBuffer = new ArrayBuffer(1024); +var bufView = new DataView(arrayBuffer); var thatSer = new xml.XmlSerializer(bufView); thatSer.addEmptyElement("b"); // => ``` @@ -93,6 +97,8 @@ setDeclaration(): void **示例:** ```js +var arrayBuffer = new ArrayBuffer(1024); +var bufView = new DataView(arrayBuffer); var thatSer = new xml.XmlSerializer(bufView); thatSer.setDeclaration() // => ; ``` @@ -133,6 +139,8 @@ endElement(): void **示例:** ```js +var arrayBuffer = new ArrayBuffer(1024); +var bufView = new DataView(arrayBuffer); var thatSer = new xml.XmlSerializer(bufView); thatSer.setNamespace("h", "http://www.w3.org/TR/html4/"); thatSer.startElement("table");