File tree Expand file tree Collapse file tree 27 files changed +147
-103
lines changed
client-auto-scaling/src/protocols
client-cloudformation/src/protocols
client-cloudfront/src/protocols
client-cloudsearch/src/protocols
client-cloudwatch/src/protocols
client-docdb/src/protocols
client-elastic-beanstalk/src/protocols
client-elastic-load-balancing-v2/src/protocols
client-elastic-load-balancing/src/protocols
client-elasticache/src/protocols
client-neptune/src/protocols
client-redshift/src/protocols
client-route-53/src/protocols
client-s3-control/src/protocols
aws-protocoltests-ec2/src/protocols
aws-protocoltests-json-10/test/functional
aws-protocoltests-query/src/protocols
aws-protocoltests-restxml Expand file tree Collapse file tree 27 files changed +147
-103
lines changed Original file line number Diff line number Diff line change @@ -21,7 +21,7 @@ import {
21
21
SerdeContext as __SerdeContext ,
22
22
} from "@aws-sdk/types" ;
23
23
import { decodeHTML } from "entities" ;
24
- import { parse as xmlParse } from "fast-xml-parser" ;
24
+ import { XMLParser } from "fast-xml-parser" ;
25
25
26
26
import { AttachInstancesCommandInput , AttachInstancesCommandOutput } from "../commands/AttachInstancesCommand" ;
27
27
import {
@@ -9837,13 +9837,13 @@ const buildHttpRpcRequest = async (
9837
9837
const parseBody = ( streamBody : any , context : __SerdeContext ) : any =>
9838
9838
collectBodyString ( streamBody , context ) . then ( ( encoded ) => {
9839
9839
if ( encoded . length ) {
9840
- const parsedObj = xmlParse ( encoded , {
9840
+ const parsedObj = new XMLParser ( {
9841
9841
attributeNamePrefix : "" ,
9842
9842
ignoreAttributes : false ,
9843
- parseNodeValue : false ,
9843
+ parseTagValue : false ,
9844
9844
trimValues : false ,
9845
9845
tagValueProcessor : ( val ) => ( val . trim ( ) === "" && val . includes ( "\n" ) ? "" : decodeHTML ( val ) ) ,
9846
- } ) ;
9846
+ } ) . parse ( encoded ) ;
9847
9847
const textNodeName = "#text" ;
9848
9848
const key = Object . keys ( parsedObj ) [ 0 ] ;
9849
9849
const parsedObjToReturn = parsedObj [ key ] ;
Original file line number Diff line number Diff line change @@ -19,7 +19,7 @@ import {
19
19
SerdeContext as __SerdeContext ,
20
20
} from "@aws-sdk/types" ;
21
21
import { decodeHTML } from "entities" ;
22
- import { parse as xmlParse } from "fast-xml-parser" ;
22
+ import { XMLParser } from "fast-xml-parser" ;
23
23
import { v4 as generateIdempotencyToken } from "uuid" ;
24
24
25
25
import { ActivateTypeCommandInput , ActivateTypeCommandOutput } from "../commands/ActivateTypeCommand" ;
@@ -10247,13 +10247,13 @@ const buildHttpRpcRequest = async (
10247
10247
const parseBody = ( streamBody : any , context : __SerdeContext ) : any =>
10248
10248
collectBodyString ( streamBody , context ) . then ( ( encoded ) => {
10249
10249
if ( encoded . length ) {
10250
- const parsedObj = xmlParse ( encoded , {
10250
+ const parsedObj = new XMLParser ( {
10251
10251
attributeNamePrefix : "" ,
10252
10252
ignoreAttributes : false ,
10253
- parseNodeValue : false ,
10253
+ parseTagValue : false ,
10254
10254
trimValues : false ,
10255
10255
tagValueProcessor : ( val ) => ( val . trim ( ) === "" && val . includes ( "\n" ) ? "" : decodeHTML ( val ) ) ,
10256
- } ) ;
10256
+ } ) . parse ( encoded ) ;
10257
10257
const textNodeName = "#text" ;
10258
10258
const key = Object . keys ( parsedObj ) [ 0 ] ;
10259
10259
const parsedObjToReturn = parsedObj [ key ] ;
Original file line number Diff line number Diff line change @@ -24,7 +24,7 @@ import {
24
24
} from "@aws-sdk/types";
25
25
import { XmlNode as __XmlNode, XmlText as __XmlText } from "@aws-sdk/xml-builder";
26
26
import { decodeHTML } from "entities";
27
- import { parse as xmlParse } from "fast-xml-parser";
27
+ import { XMLParser } from "fast-xml-parser";
28
28
29
29
import { AssociateAliasCommandInput, AssociateAliasCommandOutput } from "../commands/AssociateAliasCommand";
30
30
import { CreateCachePolicyCommandInput, CreateCachePolicyCommandOutput } from "../commands/CreateCachePolicyCommand";
@@ -17269,13 +17269,13 @@ const isSerializableHeaderValue = (value: any): boolean =>
17269
17269
const parseBody = (streamBody: any, context: __SerdeContext): any =>
17270
17270
collectBodyString(streamBody, context).then((encoded) => {
17271
17271
if (encoded.length) {
17272
- const parsedObj = xmlParse(encoded, {
17272
+ const parsedObj = new XMLParser( {
17273
17273
attributeNamePrefix: "",
17274
17274
ignoreAttributes: false,
17275
- parseNodeValue : false,
17275
+ parseTagValue : false,
17276
17276
trimValues: false,
17277
17277
tagValueProcessor: (val) => (val.trim() === "" && val.includes("\n") ? "" : decodeHTML(val)),
17278
- });
17278
+ }).parse(encoded) ;
17279
17279
const textNodeName = "#text";
17280
17280
const key = Object.keys(parsedObj)[0];
17281
17281
const parsedObjToReturn = parsedObj[key];
Original file line number Diff line number Diff line change @@ -22,7 +22,7 @@ import {
22
22
SerdeContext as __SerdeContext ,
23
23
} from "@aws-sdk/types" ;
24
24
import { decodeHTML } from "entities" ;
25
- import { parse as xmlParse } from "fast-xml-parser" ;
25
+ import { XMLParser } from "fast-xml-parser" ;
26
26
27
27
import { BuildSuggestersCommandInput , BuildSuggestersCommandOutput } from "../commands/BuildSuggestersCommand" ;
28
28
import { CreateDomainCommandInput , CreateDomainCommandOutput } from "../commands/CreateDomainCommand" ;
@@ -4185,13 +4185,13 @@ const buildHttpRpcRequest = async (
4185
4185
const parseBody = ( streamBody : any , context : __SerdeContext ) : any =>
4186
4186
collectBodyString ( streamBody , context ) . then ( ( encoded ) => {
4187
4187
if ( encoded . length ) {
4188
- const parsedObj = xmlParse ( encoded , {
4188
+ const parsedObj = new XMLParser ( {
4189
4189
attributeNamePrefix : "" ,
4190
4190
ignoreAttributes : false ,
4191
- parseNodeValue : false ,
4191
+ parseTagValue : false ,
4192
4192
trimValues : false ,
4193
4193
tagValueProcessor : ( val ) => ( val . trim ( ) === "" && val . includes ( "\n" ) ? "" : decodeHTML ( val ) ) ,
4194
- } ) ;
4194
+ } ) . parse ( encoded ) ;
4195
4195
const textNodeName = "#text" ;
4196
4196
const key = Object . keys ( parsedObj ) [ 0 ] ;
4197
4197
const parsedObjToReturn = parsedObj [ key ] ;
Original file line number Diff line number Diff line change @@ -22,7 +22,7 @@ import {
22
22
SerdeContext as __SerdeContext ,
23
23
} from "@aws-sdk/types" ;
24
24
import { decodeHTML } from "entities" ;
25
- import { parse as xmlParse } from "fast-xml-parser" ;
25
+ import { XMLParser } from "fast-xml-parser" ;
26
26
27
27
import { DeleteAlarmsCommandInput , DeleteAlarmsCommandOutput } from "../commands/DeleteAlarmsCommand" ;
28
28
import {
@@ -6188,13 +6188,13 @@ const buildHttpRpcRequest = async (
6188
6188
const parseBody = ( streamBody : any , context : __SerdeContext ) : any =>
6189
6189
collectBodyString ( streamBody , context ) . then ( ( encoded ) => {
6190
6190
if ( encoded . length ) {
6191
- const parsedObj = xmlParse ( encoded , {
6191
+ const parsedObj = new XMLParser ( {
6192
6192
attributeNamePrefix : "" ,
6193
6193
ignoreAttributes : false ,
6194
- parseNodeValue : false ,
6194
+ parseTagValue : false ,
6195
6195
trimValues : false ,
6196
6196
tagValueProcessor : ( val ) => ( val . trim ( ) === "" && val . includes ( "\n" ) ? "" : decodeHTML ( val ) ) ,
6197
- } ) ;
6197
+ } ) . parse ( encoded ) ;
6198
6198
const textNodeName = "#text" ;
6199
6199
const key = Object . keys ( parsedObj ) [ 0 ] ;
6200
6200
const parsedObjToReturn = parsedObj [ key ] ;
Original file line number Diff line number Diff line change @@ -19,7 +19,7 @@ import {
19
19
SerdeContext as __SerdeContext ,
20
20
} from "@aws-sdk/types" ;
21
21
import { decodeHTML } from "entities" ;
22
- import { parse as xmlParse } from "fast-xml-parser" ;
22
+ import { XMLParser } from "fast-xml-parser" ;
23
23
24
24
import {
25
25
AddSourceIdentifierToSubscriptionCommandInput ,
@@ -9081,13 +9081,13 @@ const buildHttpRpcRequest = async (
9081
9081
const parseBody = ( streamBody : any , context : __SerdeContext ) : any =>
9082
9082
collectBodyString ( streamBody , context ) . then ( ( encoded ) => {
9083
9083
if ( encoded . length ) {
9084
- const parsedObj = xmlParse ( encoded , {
9084
+ const parsedObj = new XMLParser ( {
9085
9085
attributeNamePrefix : "" ,
9086
9086
ignoreAttributes : false ,
9087
- parseNodeValue : false ,
9087
+ parseTagValue : false ,
9088
9088
trimValues : false ,
9089
9089
tagValueProcessor : ( val ) => ( val . trim ( ) === "" && val . includes ( "\n" ) ? "" : decodeHTML ( val ) ) ,
9090
- } ) ;
9090
+ } ) . parse ( encoded ) ;
9091
9091
const textNodeName = "#text" ;
9092
9092
const key = Object . keys ( parsedObj ) [ 0 ] ;
9093
9093
const parsedObjToReturn = parsedObj [ key ] ;
Original file line number Diff line number Diff line change @@ -21,7 +21,7 @@ import {
21
21
SerdeContext as __SerdeContext,
22
22
} from "@aws-sdk/types";
23
23
import { decodeHTML } from "entities";
24
- import { parse as xmlParse } from "fast-xml-parser";
24
+ import { XMLParser } from "fast-xml-parser";
25
25
import { v4 as generateIdempotencyToken } from "uuid";
26
26
27
27
import {
@@ -80327,13 +80327,13 @@ const buildHttpRpcRequest = async (
80327
80327
const parseBody = (streamBody: any, context: __SerdeContext): any =>
80328
80328
collectBodyString(streamBody, context).then((encoded) => {
80329
80329
if (encoded.length) {
80330
- const parsedObj = xmlParse(encoded, {
80330
+ const parsedObj = new XMLParser( {
80331
80331
attributeNamePrefix: "",
80332
80332
ignoreAttributes: false,
80333
- parseNodeValue : false,
80333
+ parseTagValue : false,
80334
80334
trimValues: false,
80335
80335
tagValueProcessor: (val) => (val.trim() === "" && val.includes("\n") ? "" : decodeHTML(val)),
80336
- });
80336
+ }).parse(encoded) ;
80337
80337
const textNodeName = "#text";
80338
80338
const key = Object.keys(parsedObj)[0];
80339
80339
const parsedObjToReturn = parsedObj[key];
Original file line number Diff line number Diff line change @@ -21,7 +21,7 @@ import {
21
21
SerdeContext as __SerdeContext ,
22
22
} from "@aws-sdk/types" ;
23
23
import { decodeHTML } from "entities" ;
24
- import { parse as xmlParse } from "fast-xml-parser" ;
24
+ import { XMLParser } from "fast-xml-parser" ;
25
25
26
26
import {
27
27
AbortEnvironmentUpdateCommandInput ,
@@ -7278,13 +7278,13 @@ const buildHttpRpcRequest = async (
7278
7278
const parseBody = ( streamBody : any , context : __SerdeContext ) : any =>
7279
7279
collectBodyString ( streamBody , context ) . then ( ( encoded ) => {
7280
7280
if ( encoded . length ) {
7281
- const parsedObj = xmlParse ( encoded , {
7281
+ const parsedObj = new XMLParser ( {
7282
7282
attributeNamePrefix : "" ,
7283
7283
ignoreAttributes : false ,
7284
- parseNodeValue : false ,
7284
+ parseTagValue : false ,
7285
7285
trimValues : false ,
7286
7286
tagValueProcessor : ( val ) => ( val . trim ( ) === "" && val . includes ( "\n" ) ? "" : decodeHTML ( val ) ) ,
7287
- } ) ;
7287
+ } ) . parse ( encoded ) ;
7288
7288
const textNodeName = "#text" ;
7289
7289
const key = Object . keys ( parsedObj ) [ 0 ] ;
7290
7290
const parsedObjToReturn = parsedObj [ key ] ;
Original file line number Diff line number Diff line change @@ -20,7 +20,7 @@ import {
20
20
SerdeContext as __SerdeContext ,
21
21
} from "@aws-sdk/types" ;
22
22
import { decodeHTML } from "entities" ;
23
- import { parse as xmlParse } from "fast-xml-parser" ;
23
+ import { XMLParser } from "fast-xml-parser" ;
24
24
25
25
import {
26
26
AddListenerCertificatesCommandInput ,
@@ -6702,13 +6702,13 @@ const buildHttpRpcRequest = async (
6702
6702
const parseBody = ( streamBody : any , context : __SerdeContext ) : any =>
6703
6703
collectBodyString ( streamBody , context ) . then ( ( encoded ) => {
6704
6704
if ( encoded . length ) {
6705
- const parsedObj = xmlParse ( encoded , {
6705
+ const parsedObj = new XMLParser ( {
6706
6706
attributeNamePrefix : "" ,
6707
6707
ignoreAttributes : false ,
6708
- parseNodeValue : false ,
6708
+ parseTagValue : false ,
6709
6709
trimValues : false ,
6710
6710
tagValueProcessor : ( val ) => ( val . trim ( ) === "" && val . includes ( "\n" ) ? "" : decodeHTML ( val ) ) ,
6711
- } ) ;
6711
+ } ) . parse ( encoded ) ;
6712
6712
const textNodeName = "#text" ;
6713
6713
const key = Object . keys ( parsedObj ) [ 0 ] ;
6714
6714
const parsedObjToReturn = parsedObj [ key ] ;
Original file line number Diff line number Diff line change @@ -20,7 +20,7 @@ import {
20
20
SerdeContext as __SerdeContext ,
21
21
} from "@aws-sdk/types" ;
22
22
import { decodeHTML } from "entities" ;
23
- import { parse as xmlParse } from "fast-xml-parser" ;
23
+ import { XMLParser } from "fast-xml-parser" ;
24
24
25
25
import { AddTagsCommandInput , AddTagsCommandOutput } from "../commands/AddTagsCommand" ;
26
26
import {
@@ -4656,13 +4656,13 @@ const buildHttpRpcRequest = async (
4656
4656
const parseBody = ( streamBody : any , context : __SerdeContext ) : any =>
4657
4657
collectBodyString ( streamBody , context ) . then ( ( encoded ) => {
4658
4658
if ( encoded . length ) {
4659
- const parsedObj = xmlParse ( encoded , {
4659
+ const parsedObj = new XMLParser ( {
4660
4660
attributeNamePrefix : "" ,
4661
4661
ignoreAttributes : false ,
4662
- parseNodeValue : false ,
4662
+ parseTagValue : false ,
4663
4663
trimValues : false ,
4664
4664
tagValueProcessor : ( val ) => ( val . trim ( ) === "" && val . includes ( "\n" ) ? "" : decodeHTML ( val ) ) ,
4665
- } ) ;
4665
+ } ) . parse ( encoded ) ;
4666
4666
const textNodeName = "#text" ;
4667
4667
const key = Object . keys ( parsedObj ) [ 0 ] ;
4668
4668
const parsedObjToReturn = parsedObj [ key ] ;
Original file line number Diff line number Diff line change @@ -20,7 +20,7 @@ import {
20
20
SerdeContext as __SerdeContext,
21
21
} from "@aws-sdk/types";
22
22
import { decodeHTML } from "entities";
23
- import { parse as xmlParse } from "fast-xml-parser";
23
+ import { XMLParser } from "fast-xml-parser";
24
24
25
25
import { AddTagsToResourceCommandInput, AddTagsToResourceCommandOutput } from "../commands/AddTagsToResourceCommand";
26
26
import {
@@ -12497,13 +12497,13 @@ const buildHttpRpcRequest = async (
12497
12497
const parseBody = (streamBody: any, context: __SerdeContext): any =>
12498
12498
collectBodyString(streamBody, context).then((encoded) => {
12499
12499
if (encoded.length) {
12500
- const parsedObj = xmlParse(encoded, {
12500
+ const parsedObj = new XMLParser( {
12501
12501
attributeNamePrefix: "",
12502
12502
ignoreAttributes: false,
12503
- parseNodeValue : false,
12503
+ parseTagValue : false,
12504
12504
trimValues: false,
12505
12505
tagValueProcessor: (val) => (val.trim() === "" && val.includes("\n") ? "" : decodeHTML(val)),
12506
- });
12506
+ }).parse(encoded) ;
12507
12507
const textNodeName = "#text";
12508
12508
const key = Object.keys(parsedObj)[0];
12509
12509
const parsedObjToReturn = parsedObj[key];
Original file line number Diff line number Diff line change @@ -19,7 +19,7 @@ import {
19
19
SerdeContext as __SerdeContext,
20
20
} from "@aws-sdk/types";
21
21
import { decodeHTML } from "entities";
22
- import { parse as xmlParse } from "fast-xml-parser";
22
+ import { XMLParser } from "fast-xml-parser";
23
23
24
24
import {
25
25
AddClientIDToOpenIDConnectProviderCommandInput,
@@ -17374,13 +17374,13 @@ const buildHttpRpcRequest = async (
17374
17374
const parseBody = (streamBody: any, context: __SerdeContext): any =>
17375
17375
collectBodyString(streamBody, context).then((encoded) => {
17376
17376
if (encoded.length) {
17377
- const parsedObj = xmlParse(encoded, {
17377
+ const parsedObj = new XMLParser( {
17378
17378
attributeNamePrefix: "",
17379
17379
ignoreAttributes: false,
17380
- parseNodeValue : false,
17380
+ parseTagValue : false,
17381
17381
trimValues: false,
17382
17382
tagValueProcessor: (val) => (val.trim() === "" && val.includes("\n") ? "" : decodeHTML(val)),
17383
- });
17383
+ }).parse(encoded) ;
17384
17384
const textNodeName = "#text";
17385
17385
const key = Object.keys(parsedObj)[0];
17386
17386
const parsedObjToReturn = parsedObj[key];
Original file line number Diff line number Diff line change @@ -20,7 +20,7 @@ import {
20
20
SerdeContext as __SerdeContext,
21
21
} from "@aws-sdk/types";
22
22
import { decodeHTML } from "entities";
23
- import { parse as xmlParse } from "fast-xml-parser";
23
+ import { XMLParser } from "fast-xml-parser";
24
24
25
25
import { AddRoleToDBClusterCommandInput, AddRoleToDBClusterCommandOutput } from "../commands/AddRoleToDBClusterCommand";
26
26
import {
@@ -12050,13 +12050,13 @@ const buildHttpRpcRequest = async (
12050
12050
const parseBody = (streamBody: any, context: __SerdeContext): any =>
12051
12051
collectBodyString(streamBody, context).then((encoded) => {
12052
12052
if (encoded.length) {
12053
- const parsedObj = xmlParse(encoded, {
12053
+ const parsedObj = new XMLParser( {
12054
12054
attributeNamePrefix: "",
12055
12055
ignoreAttributes: false,
12056
- parseNodeValue : false,
12056
+ parseTagValue : false,
12057
12057
trimValues: false,
12058
12058
tagValueProcessor: (val) => (val.trim() === "" && val.includes("\n") ? "" : decodeHTML(val)),
12059
- });
12059
+ }).parse(encoded) ;
12060
12060
const textNodeName = "#text";
12061
12061
const key = Object.keys(parsedObj)[0];
12062
12062
const parsedObjToReturn = parsedObj[key];
Original file line number Diff line number Diff line change @@ -22,7 +22,7 @@ import {
22
22
SerdeContext as __SerdeContext,
23
23
} from "@aws-sdk/types";
24
24
import { decodeHTML } from "entities";
25
- import { parse as xmlParse } from "fast-xml-parser";
25
+ import { XMLParser } from "fast-xml-parser";
26
26
27
27
import { AddRoleToDBClusterCommandInput, AddRoleToDBClusterCommandOutput } from "../commands/AddRoleToDBClusterCommand";
28
28
import {
@@ -24101,13 +24101,13 @@ const buildHttpRpcRequest = async (
24101
24101
const parseBody = (streamBody: any, context: __SerdeContext): any =>
24102
24102
collectBodyString(streamBody, context).then((encoded) => {
24103
24103
if (encoded.length) {
24104
- const parsedObj = xmlParse(encoded, {
24104
+ const parsedObj = new XMLParser( {
24105
24105
attributeNamePrefix: "",
24106
24106
ignoreAttributes: false,
24107
- parseNodeValue : false,
24107
+ parseTagValue : false,
24108
24108
trimValues: false,
24109
24109
tagValueProcessor: (val) => (val.trim() === "" && val.includes("\n") ? "" : decodeHTML(val)),
24110
- });
24110
+ }).parse(encoded) ;
24111
24111
const textNodeName = "#text";
24112
24112
const key = Object.keys(parsedObj)[0];
24113
24113
const parsedObjToReturn = parsedObj[key];
Original file line number Diff line number Diff line change @@ -21,7 +21,7 @@ import {
21
21
SerdeContext as __SerdeContext,
22
22
} from "@aws-sdk/types";
23
23
import { decodeHTML } from "entities";
24
- import { parse as xmlParse } from "fast-xml-parser";
24
+ import { XMLParser } from "fast-xml-parser";
25
25
26
26
import {
27
27
AcceptReservedNodeExchangeCommandInput,
@@ -19394,13 +19394,13 @@ const buildHttpRpcRequest = async (
19394
19394
const parseBody = (streamBody: any, context: __SerdeContext): any =>
19395
19395
collectBodyString(streamBody, context).then((encoded) => {
19396
19396
if (encoded.length) {
19397
- const parsedObj = xmlParse(encoded, {
19397
+ const parsedObj = new XMLParser( {
19398
19398
attributeNamePrefix: "",
19399
19399
ignoreAttributes: false,
19400
- parseNodeValue : false,
19400
+ parseTagValue : false,
19401
19401
trimValues: false,
19402
19402
tagValueProcessor: (val) => (val.trim() === "" && val.includes("\n") ? "" : decodeHTML(val)),
19403
- });
19403
+ }).parse(encoded) ;
19404
19404
const textNodeName = "#text";
19405
19405
const key = Object.keys(parsedObj)[0];
19406
19406
const parsedObjToReturn = parsedObj[key];
You can’t perform that action at this time.
0 commit comments