cloudmersive-convert-api-client 1.5.6 → 1.5.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/README.md +19 -4
- data/docs/ConvertDataApi.md +481 -2
- data/docs/XmlAddAttributeWithXPathResult.md +10 -0
- data/docs/XmlAddChildWithXPathResult.md +10 -0
- data/docs/XmlFIlterWithXPathResult.md +10 -0
- data/docs/XmlRemoveAllChildrenWithXPathResult.md +10 -0
- data/docs/XmlRemoveWithXPathResult.md +11 -0
- data/docs/XmlReplaceWithXPathResult.md +10 -0
- data/docs/XmlSetValueWithXPathResult.md +10 -0
- data/lib/cloudmersive-convert-api-client.rb +7 -0
- data/lib/cloudmersive-convert-api-client/api/convert_data_api.rb +530 -3
- data/lib/cloudmersive-convert-api-client/models/xml_add_attribute_with_x_path_result.rb +209 -0
- data/lib/cloudmersive-convert-api-client/models/xml_add_child_with_x_path_result.rb +209 -0
- data/lib/cloudmersive-convert-api-client/models/xml_f_ilter_with_x_path_result.rb +211 -0
- data/lib/cloudmersive-convert-api-client/models/xml_remove_all_children_with_x_path_result.rb +209 -0
- data/lib/cloudmersive-convert-api-client/models/xml_remove_with_x_path_result.rb +221 -0
- data/lib/cloudmersive-convert-api-client/models/xml_replace_with_x_path_result.rb +209 -0
- data/lib/cloudmersive-convert-api-client/models/xml_set_value_with_x_path_result.rb +209 -0
- data/lib/cloudmersive-convert-api-client/version.rb +1 -1
- data/spec/api/convert_data_api_spec.rb +110 -1
- data/spec/models/xml_add_attribute_with_x_path_result_spec.rb +54 -0
- data/spec/models/xml_add_child_with_x_path_result_spec.rb +54 -0
- data/spec/models/xml_f_ilter_with_x_path_result_spec.rb +54 -0
- data/spec/models/xml_remove_all_children_with_x_path_result_spec.rb +54 -0
- data/spec/models/xml_remove_with_x_path_result_spec.rb +60 -0
- data/spec/models/xml_replace_with_x_path_result_spec.rb +54 -0
- data/spec/models/xml_set_value_with_x_path_result_spec.rb +54 -0
- metadata +23 -2
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
# CloudmersiveConvertApiClient::XmlAddAttributeWithXPathResult
|
|
2
|
+
|
|
3
|
+
## Properties
|
|
4
|
+
Name | Type | Description | Notes
|
|
5
|
+
------------ | ------------- | ------------- | -------------
|
|
6
|
+
**successful** | **BOOLEAN** | True if the operation was successful, false otherwise | [optional]
|
|
7
|
+
**resulting_xml_document** | **String** | Resulting, modified XML document | [optional]
|
|
8
|
+
**nodes_edited_count** | **Integer** | Count of the matching results | [optional]
|
|
9
|
+
|
|
10
|
+
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
# CloudmersiveConvertApiClient::XmlAddChildWithXPathResult
|
|
2
|
+
|
|
3
|
+
## Properties
|
|
4
|
+
Name | Type | Description | Notes
|
|
5
|
+
------------ | ------------- | ------------- | -------------
|
|
6
|
+
**successful** | **BOOLEAN** | True if the operation was successful, false otherwise | [optional]
|
|
7
|
+
**resulting_xml_document** | **String** | Resulting, modified XML document | [optional]
|
|
8
|
+
**nodes_edited_count** | **Integer** | Count of the matching results | [optional]
|
|
9
|
+
|
|
10
|
+
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
# CloudmersiveConvertApiClient::XmlFIlterWithXPathResult
|
|
2
|
+
|
|
3
|
+
## Properties
|
|
4
|
+
Name | Type | Description | Notes
|
|
5
|
+
------------ | ------------- | ------------- | -------------
|
|
6
|
+
**successful** | **BOOLEAN** | True if the operation was successful, false otherwise | [optional]
|
|
7
|
+
**xml_nodes** | **Array<String>** | Matching selected XML nodes as strings | [optional]
|
|
8
|
+
**result_count** | **Integer** | Count of the matching results | [optional]
|
|
9
|
+
|
|
10
|
+
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
# CloudmersiveConvertApiClient::XmlRemoveAllChildrenWithXPathResult
|
|
2
|
+
|
|
3
|
+
## Properties
|
|
4
|
+
Name | Type | Description | Notes
|
|
5
|
+
------------ | ------------- | ------------- | -------------
|
|
6
|
+
**successful** | **BOOLEAN** | True if the operation was successful, false otherwise | [optional]
|
|
7
|
+
**resulting_xml_document** | **String** | Resulting, modified XML document | [optional]
|
|
8
|
+
**nodes_edited_count** | **Integer** | Count of the matching results | [optional]
|
|
9
|
+
|
|
10
|
+
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
# CloudmersiveConvertApiClient::XmlRemoveWithXPathResult
|
|
2
|
+
|
|
3
|
+
## Properties
|
|
4
|
+
Name | Type | Description | Notes
|
|
5
|
+
------------ | ------------- | ------------- | -------------
|
|
6
|
+
**successful** | **BOOLEAN** | True if the operation was successful, false otherwise | [optional]
|
|
7
|
+
**resulting_xml_document** | **String** | Resulting, modified XML document with matching nodes removed as a string | [optional]
|
|
8
|
+
**xml_nodes_removed** | **Array<String>** | Matching selected XML nodes as strings | [optional]
|
|
9
|
+
**nodes_removed_count** | **Integer** | Count of the matching results | [optional]
|
|
10
|
+
|
|
11
|
+
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
# CloudmersiveConvertApiClient::XmlReplaceWithXPathResult
|
|
2
|
+
|
|
3
|
+
## Properties
|
|
4
|
+
Name | Type | Description | Notes
|
|
5
|
+
------------ | ------------- | ------------- | -------------
|
|
6
|
+
**successful** | **BOOLEAN** | True if the operation was successful, false otherwise | [optional]
|
|
7
|
+
**resulting_xml_document** | **String** | Resulting, modified XML document | [optional]
|
|
8
|
+
**nodes_edited_count** | **Integer** | Count of the matching results | [optional]
|
|
9
|
+
|
|
10
|
+
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
# CloudmersiveConvertApiClient::XmlSetValueWithXPathResult
|
|
2
|
+
|
|
3
|
+
## Properties
|
|
4
|
+
Name | Type | Description | Notes
|
|
5
|
+
------------ | ------------- | ------------- | -------------
|
|
6
|
+
**successful** | **BOOLEAN** | True if the operation was successful, false otherwise | [optional]
|
|
7
|
+
**resulting_xml_document** | **String** | Resulting, modified XML document | [optional]
|
|
8
|
+
**nodes_edited_count** | **Integer** | Count of the matching results | [optional]
|
|
9
|
+
|
|
10
|
+
|
|
@@ -138,6 +138,13 @@ require 'cloudmersive-convert-api-client/models/xlsx_spreadsheet_cell'
|
|
|
138
138
|
require 'cloudmersive-convert-api-client/models/xlsx_spreadsheet_column'
|
|
139
139
|
require 'cloudmersive-convert-api-client/models/xlsx_spreadsheet_row'
|
|
140
140
|
require 'cloudmersive-convert-api-client/models/xlsx_worksheet'
|
|
141
|
+
require 'cloudmersive-convert-api-client/models/xml_add_attribute_with_x_path_result'
|
|
142
|
+
require 'cloudmersive-convert-api-client/models/xml_add_child_with_x_path_result'
|
|
143
|
+
require 'cloudmersive-convert-api-client/models/xml_f_ilter_with_x_path_result'
|
|
144
|
+
require 'cloudmersive-convert-api-client/models/xml_remove_all_children_with_x_path_result'
|
|
145
|
+
require 'cloudmersive-convert-api-client/models/xml_remove_with_x_path_result'
|
|
146
|
+
require 'cloudmersive-convert-api-client/models/xml_replace_with_x_path_result'
|
|
147
|
+
require 'cloudmersive-convert-api-client/models/xml_set_value_with_x_path_result'
|
|
141
148
|
|
|
142
149
|
# APIs
|
|
143
150
|
require 'cloudmersive-convert-api-client/api/compare_document_api'
|
|
@@ -80,7 +80,7 @@ module CloudmersiveConvertApiClient
|
|
|
80
80
|
# Convert a JSON object into XML
|
|
81
81
|
# @param json_object
|
|
82
82
|
# @param [Hash] opts the optional parameters
|
|
83
|
-
# @return [
|
|
83
|
+
# @return [String]
|
|
84
84
|
def convert_data_json_to_xml(json_object, opts = {})
|
|
85
85
|
data, _status_code, _headers = convert_data_json_to_xml_with_http_info(json_object, opts)
|
|
86
86
|
return data
|
|
@@ -90,7 +90,7 @@ module CloudmersiveConvertApiClient
|
|
|
90
90
|
# Convert a JSON object into XML
|
|
91
91
|
# @param json_object
|
|
92
92
|
# @param [Hash] opts the optional parameters
|
|
93
|
-
# @return [Array<(
|
|
93
|
+
# @return [Array<(String, Fixnum, Hash)>] String data, response status code and response headers
|
|
94
94
|
def convert_data_json_to_xml_with_http_info(json_object, opts = {})
|
|
95
95
|
if @api_client.config.debugging
|
|
96
96
|
@api_client.config.logger.debug "Calling API: ConvertDataApi.convert_data_json_to_xml ..."
|
|
@@ -124,7 +124,7 @@ module CloudmersiveConvertApiClient
|
|
|
124
124
|
:form_params => form_params,
|
|
125
125
|
:body => post_body,
|
|
126
126
|
:auth_names => auth_names,
|
|
127
|
-
:return_type => '
|
|
127
|
+
:return_type => 'String')
|
|
128
128
|
if @api_client.config.debugging
|
|
129
129
|
@api_client.config.logger.debug "API called: ConvertDataApi#convert_data_json_to_xml\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
130
130
|
end
|
|
@@ -243,6 +243,472 @@ module CloudmersiveConvertApiClient
|
|
|
243
243
|
return data, status_code, headers
|
|
244
244
|
end
|
|
245
245
|
|
|
246
|
+
# Adds an attribute to all XML nodes matching XPath expression
|
|
247
|
+
# Return the reuslts of editing an XML document by adding an attribute to all of the nodes that match an input XPath expression.
|
|
248
|
+
# @param input_file Input XML file to perform the operation on.
|
|
249
|
+
# @param x_path_expression Valid XML XPath query expression
|
|
250
|
+
# @param xml_attribute_name Name of the XML attribute to add
|
|
251
|
+
# @param xml_attribute_value Value of the XML attribute to add
|
|
252
|
+
# @param [Hash] opts the optional parameters
|
|
253
|
+
# @return [XmlAddAttributeWithXPathResult]
|
|
254
|
+
def convert_data_xml_edit_add_attribute_with_x_path(input_file, x_path_expression, xml_attribute_name, xml_attribute_value, opts = {})
|
|
255
|
+
data, _status_code, _headers = convert_data_xml_edit_add_attribute_with_x_path_with_http_info(input_file, x_path_expression, xml_attribute_name, xml_attribute_value, opts)
|
|
256
|
+
return data
|
|
257
|
+
end
|
|
258
|
+
|
|
259
|
+
# Adds an attribute to all XML nodes matching XPath expression
|
|
260
|
+
# Return the reuslts of editing an XML document by adding an attribute to all of the nodes that match an input XPath expression.
|
|
261
|
+
# @param input_file Input XML file to perform the operation on.
|
|
262
|
+
# @param x_path_expression Valid XML XPath query expression
|
|
263
|
+
# @param xml_attribute_name Name of the XML attribute to add
|
|
264
|
+
# @param xml_attribute_value Value of the XML attribute to add
|
|
265
|
+
# @param [Hash] opts the optional parameters
|
|
266
|
+
# @return [Array<(XmlAddAttributeWithXPathResult, Fixnum, Hash)>] XmlAddAttributeWithXPathResult data, response status code and response headers
|
|
267
|
+
def convert_data_xml_edit_add_attribute_with_x_path_with_http_info(input_file, x_path_expression, xml_attribute_name, xml_attribute_value, opts = {})
|
|
268
|
+
if @api_client.config.debugging
|
|
269
|
+
@api_client.config.logger.debug "Calling API: ConvertDataApi.convert_data_xml_edit_add_attribute_with_x_path ..."
|
|
270
|
+
end
|
|
271
|
+
# verify the required parameter 'input_file' is set
|
|
272
|
+
if @api_client.config.client_side_validation && input_file.nil?
|
|
273
|
+
fail ArgumentError, "Missing the required parameter 'input_file' when calling ConvertDataApi.convert_data_xml_edit_add_attribute_with_x_path"
|
|
274
|
+
end
|
|
275
|
+
# verify the required parameter 'x_path_expression' is set
|
|
276
|
+
if @api_client.config.client_side_validation && x_path_expression.nil?
|
|
277
|
+
fail ArgumentError, "Missing the required parameter 'x_path_expression' when calling ConvertDataApi.convert_data_xml_edit_add_attribute_with_x_path"
|
|
278
|
+
end
|
|
279
|
+
# verify the required parameter 'xml_attribute_name' is set
|
|
280
|
+
if @api_client.config.client_side_validation && xml_attribute_name.nil?
|
|
281
|
+
fail ArgumentError, "Missing the required parameter 'xml_attribute_name' when calling ConvertDataApi.convert_data_xml_edit_add_attribute_with_x_path"
|
|
282
|
+
end
|
|
283
|
+
# verify the required parameter 'xml_attribute_value' is set
|
|
284
|
+
if @api_client.config.client_side_validation && xml_attribute_value.nil?
|
|
285
|
+
fail ArgumentError, "Missing the required parameter 'xml_attribute_value' when calling ConvertDataApi.convert_data_xml_edit_add_attribute_with_x_path"
|
|
286
|
+
end
|
|
287
|
+
# resource path
|
|
288
|
+
local_var_path = "/convert/xml/edit/xpath/add-attribute"
|
|
289
|
+
|
|
290
|
+
# query parameters
|
|
291
|
+
query_params = {}
|
|
292
|
+
|
|
293
|
+
# header parameters
|
|
294
|
+
header_params = {}
|
|
295
|
+
# HTTP header 'Accept' (if needed)
|
|
296
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json', 'text/json', 'application/xml', 'text/xml'])
|
|
297
|
+
header_params[:'XPathExpression'] = x_path_expression
|
|
298
|
+
header_params[:'XmlAttributeName'] = xml_attribute_name
|
|
299
|
+
header_params[:'XmlAttributeValue'] = xml_attribute_value
|
|
300
|
+
|
|
301
|
+
# form parameters
|
|
302
|
+
form_params = {}
|
|
303
|
+
form_params["inputFile"] = input_file
|
|
304
|
+
|
|
305
|
+
# http body (model)
|
|
306
|
+
post_body = nil
|
|
307
|
+
auth_names = ['Apikey']
|
|
308
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path,
|
|
309
|
+
:header_params => header_params,
|
|
310
|
+
:query_params => query_params,
|
|
311
|
+
:form_params => form_params,
|
|
312
|
+
:body => post_body,
|
|
313
|
+
:auth_names => auth_names,
|
|
314
|
+
:return_type => 'XmlAddAttributeWithXPathResult')
|
|
315
|
+
if @api_client.config.debugging
|
|
316
|
+
@api_client.config.logger.debug "API called: ConvertDataApi#convert_data_xml_edit_add_attribute_with_x_path\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
317
|
+
end
|
|
318
|
+
return data, status_code, headers
|
|
319
|
+
end
|
|
320
|
+
|
|
321
|
+
# Adds an XML node as a child to XML nodes matching XPath expression
|
|
322
|
+
# Return the reuslts of editing an XML document by adding an XML node as a child to all of the nodes that match an input XPath expression.
|
|
323
|
+
# @param input_file Input XML file to perform the operation on.
|
|
324
|
+
# @param x_path_expression Valid XML XPath query expression
|
|
325
|
+
# @param xml_node_to_add XML Node to add as a child
|
|
326
|
+
# @param [Hash] opts the optional parameters
|
|
327
|
+
# @return [XmlAddChildWithXPathResult]
|
|
328
|
+
def convert_data_xml_edit_add_child_with_x_path(input_file, x_path_expression, xml_node_to_add, opts = {})
|
|
329
|
+
data, _status_code, _headers = convert_data_xml_edit_add_child_with_x_path_with_http_info(input_file, x_path_expression, xml_node_to_add, opts)
|
|
330
|
+
return data
|
|
331
|
+
end
|
|
332
|
+
|
|
333
|
+
# Adds an XML node as a child to XML nodes matching XPath expression
|
|
334
|
+
# Return the reuslts of editing an XML document by adding an XML node as a child to all of the nodes that match an input XPath expression.
|
|
335
|
+
# @param input_file Input XML file to perform the operation on.
|
|
336
|
+
# @param x_path_expression Valid XML XPath query expression
|
|
337
|
+
# @param xml_node_to_add XML Node to add as a child
|
|
338
|
+
# @param [Hash] opts the optional parameters
|
|
339
|
+
# @return [Array<(XmlAddChildWithXPathResult, Fixnum, Hash)>] XmlAddChildWithXPathResult data, response status code and response headers
|
|
340
|
+
def convert_data_xml_edit_add_child_with_x_path_with_http_info(input_file, x_path_expression, xml_node_to_add, opts = {})
|
|
341
|
+
if @api_client.config.debugging
|
|
342
|
+
@api_client.config.logger.debug "Calling API: ConvertDataApi.convert_data_xml_edit_add_child_with_x_path ..."
|
|
343
|
+
end
|
|
344
|
+
# verify the required parameter 'input_file' is set
|
|
345
|
+
if @api_client.config.client_side_validation && input_file.nil?
|
|
346
|
+
fail ArgumentError, "Missing the required parameter 'input_file' when calling ConvertDataApi.convert_data_xml_edit_add_child_with_x_path"
|
|
347
|
+
end
|
|
348
|
+
# verify the required parameter 'x_path_expression' is set
|
|
349
|
+
if @api_client.config.client_side_validation && x_path_expression.nil?
|
|
350
|
+
fail ArgumentError, "Missing the required parameter 'x_path_expression' when calling ConvertDataApi.convert_data_xml_edit_add_child_with_x_path"
|
|
351
|
+
end
|
|
352
|
+
# verify the required parameter 'xml_node_to_add' is set
|
|
353
|
+
if @api_client.config.client_side_validation && xml_node_to_add.nil?
|
|
354
|
+
fail ArgumentError, "Missing the required parameter 'xml_node_to_add' when calling ConvertDataApi.convert_data_xml_edit_add_child_with_x_path"
|
|
355
|
+
end
|
|
356
|
+
# resource path
|
|
357
|
+
local_var_path = "/convert/xml/edit/xpath/add-child"
|
|
358
|
+
|
|
359
|
+
# query parameters
|
|
360
|
+
query_params = {}
|
|
361
|
+
|
|
362
|
+
# header parameters
|
|
363
|
+
header_params = {}
|
|
364
|
+
# HTTP header 'Accept' (if needed)
|
|
365
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json', 'text/json', 'application/xml', 'text/xml'])
|
|
366
|
+
header_params[:'XPathExpression'] = x_path_expression
|
|
367
|
+
header_params[:'XmlNodeToAdd'] = xml_node_to_add
|
|
368
|
+
|
|
369
|
+
# form parameters
|
|
370
|
+
form_params = {}
|
|
371
|
+
form_params["inputFile"] = input_file
|
|
372
|
+
|
|
373
|
+
# http body (model)
|
|
374
|
+
post_body = nil
|
|
375
|
+
auth_names = ['Apikey']
|
|
376
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path,
|
|
377
|
+
:header_params => header_params,
|
|
378
|
+
:query_params => query_params,
|
|
379
|
+
:form_params => form_params,
|
|
380
|
+
:body => post_body,
|
|
381
|
+
:auth_names => auth_names,
|
|
382
|
+
:return_type => 'XmlAddChildWithXPathResult')
|
|
383
|
+
if @api_client.config.debugging
|
|
384
|
+
@api_client.config.logger.debug "API called: ConvertDataApi#convert_data_xml_edit_add_child_with_x_path\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
385
|
+
end
|
|
386
|
+
return data, status_code, headers
|
|
387
|
+
end
|
|
388
|
+
|
|
389
|
+
# Removes, deletes all children of nodes matching XPath expression, but does not remove the nodes
|
|
390
|
+
# Return the reuslts of editing an XML document by removing all child nodes of the nodes that match an input XPath expression.
|
|
391
|
+
# @param input_file Input XML file to perform the operation on.
|
|
392
|
+
# @param x_path_expression Valid XML XPath query expression
|
|
393
|
+
# @param [Hash] opts the optional parameters
|
|
394
|
+
# @return [XmlRemoveAllChildrenWithXPathResult]
|
|
395
|
+
def convert_data_xml_edit_remove_all_child_nodes_with_x_path(input_file, x_path_expression, opts = {})
|
|
396
|
+
data, _status_code, _headers = convert_data_xml_edit_remove_all_child_nodes_with_x_path_with_http_info(input_file, x_path_expression, opts)
|
|
397
|
+
return data
|
|
398
|
+
end
|
|
399
|
+
|
|
400
|
+
# Removes, deletes all children of nodes matching XPath expression, but does not remove the nodes
|
|
401
|
+
# Return the reuslts of editing an XML document by removing all child nodes of the nodes that match an input XPath expression.
|
|
402
|
+
# @param input_file Input XML file to perform the operation on.
|
|
403
|
+
# @param x_path_expression Valid XML XPath query expression
|
|
404
|
+
# @param [Hash] opts the optional parameters
|
|
405
|
+
# @return [Array<(XmlRemoveAllChildrenWithXPathResult, Fixnum, Hash)>] XmlRemoveAllChildrenWithXPathResult data, response status code and response headers
|
|
406
|
+
def convert_data_xml_edit_remove_all_child_nodes_with_x_path_with_http_info(input_file, x_path_expression, opts = {})
|
|
407
|
+
if @api_client.config.debugging
|
|
408
|
+
@api_client.config.logger.debug "Calling API: ConvertDataApi.convert_data_xml_edit_remove_all_child_nodes_with_x_path ..."
|
|
409
|
+
end
|
|
410
|
+
# verify the required parameter 'input_file' is set
|
|
411
|
+
if @api_client.config.client_side_validation && input_file.nil?
|
|
412
|
+
fail ArgumentError, "Missing the required parameter 'input_file' when calling ConvertDataApi.convert_data_xml_edit_remove_all_child_nodes_with_x_path"
|
|
413
|
+
end
|
|
414
|
+
# verify the required parameter 'x_path_expression' is set
|
|
415
|
+
if @api_client.config.client_side_validation && x_path_expression.nil?
|
|
416
|
+
fail ArgumentError, "Missing the required parameter 'x_path_expression' when calling ConvertDataApi.convert_data_xml_edit_remove_all_child_nodes_with_x_path"
|
|
417
|
+
end
|
|
418
|
+
# resource path
|
|
419
|
+
local_var_path = "/convert/xml/edit/xpath/remove-all-children"
|
|
420
|
+
|
|
421
|
+
# query parameters
|
|
422
|
+
query_params = {}
|
|
423
|
+
|
|
424
|
+
# header parameters
|
|
425
|
+
header_params = {}
|
|
426
|
+
# HTTP header 'Accept' (if needed)
|
|
427
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json', 'text/json', 'application/xml', 'text/xml'])
|
|
428
|
+
header_params[:'XPathExpression'] = x_path_expression
|
|
429
|
+
|
|
430
|
+
# form parameters
|
|
431
|
+
form_params = {}
|
|
432
|
+
form_params["inputFile"] = input_file
|
|
433
|
+
|
|
434
|
+
# http body (model)
|
|
435
|
+
post_body = nil
|
|
436
|
+
auth_names = ['Apikey']
|
|
437
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path,
|
|
438
|
+
:header_params => header_params,
|
|
439
|
+
:query_params => query_params,
|
|
440
|
+
:form_params => form_params,
|
|
441
|
+
:body => post_body,
|
|
442
|
+
:auth_names => auth_names,
|
|
443
|
+
:return_type => 'XmlRemoveAllChildrenWithXPathResult')
|
|
444
|
+
if @api_client.config.debugging
|
|
445
|
+
@api_client.config.logger.debug "API called: ConvertDataApi#convert_data_xml_edit_remove_all_child_nodes_with_x_path\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
446
|
+
end
|
|
447
|
+
return data, status_code, headers
|
|
448
|
+
end
|
|
449
|
+
|
|
450
|
+
# Replaces XML nodes matching XPath expression with new node
|
|
451
|
+
# Return the reuslts of editing an XML document by replacing all of the nodes that match an input XPath expression with a new XML node expression.
|
|
452
|
+
# @param input_file Input XML file to perform the operation on.
|
|
453
|
+
# @param x_path_expression Valid XML XPath query expression
|
|
454
|
+
# @param xml_node_replacement XML Node replacement content
|
|
455
|
+
# @param [Hash] opts the optional parameters
|
|
456
|
+
# @return [XmlReplaceWithXPathResult]
|
|
457
|
+
def convert_data_xml_edit_replace_with_x_path(input_file, x_path_expression, xml_node_replacement, opts = {})
|
|
458
|
+
data, _status_code, _headers = convert_data_xml_edit_replace_with_x_path_with_http_info(input_file, x_path_expression, xml_node_replacement, opts)
|
|
459
|
+
return data
|
|
460
|
+
end
|
|
461
|
+
|
|
462
|
+
# Replaces XML nodes matching XPath expression with new node
|
|
463
|
+
# Return the reuslts of editing an XML document by replacing all of the nodes that match an input XPath expression with a new XML node expression.
|
|
464
|
+
# @param input_file Input XML file to perform the operation on.
|
|
465
|
+
# @param x_path_expression Valid XML XPath query expression
|
|
466
|
+
# @param xml_node_replacement XML Node replacement content
|
|
467
|
+
# @param [Hash] opts the optional parameters
|
|
468
|
+
# @return [Array<(XmlReplaceWithXPathResult, Fixnum, Hash)>] XmlReplaceWithXPathResult data, response status code and response headers
|
|
469
|
+
def convert_data_xml_edit_replace_with_x_path_with_http_info(input_file, x_path_expression, xml_node_replacement, opts = {})
|
|
470
|
+
if @api_client.config.debugging
|
|
471
|
+
@api_client.config.logger.debug "Calling API: ConvertDataApi.convert_data_xml_edit_replace_with_x_path ..."
|
|
472
|
+
end
|
|
473
|
+
# verify the required parameter 'input_file' is set
|
|
474
|
+
if @api_client.config.client_side_validation && input_file.nil?
|
|
475
|
+
fail ArgumentError, "Missing the required parameter 'input_file' when calling ConvertDataApi.convert_data_xml_edit_replace_with_x_path"
|
|
476
|
+
end
|
|
477
|
+
# verify the required parameter 'x_path_expression' is set
|
|
478
|
+
if @api_client.config.client_side_validation && x_path_expression.nil?
|
|
479
|
+
fail ArgumentError, "Missing the required parameter 'x_path_expression' when calling ConvertDataApi.convert_data_xml_edit_replace_with_x_path"
|
|
480
|
+
end
|
|
481
|
+
# verify the required parameter 'xml_node_replacement' is set
|
|
482
|
+
if @api_client.config.client_side_validation && xml_node_replacement.nil?
|
|
483
|
+
fail ArgumentError, "Missing the required parameter 'xml_node_replacement' when calling ConvertDataApi.convert_data_xml_edit_replace_with_x_path"
|
|
484
|
+
end
|
|
485
|
+
# resource path
|
|
486
|
+
local_var_path = "/convert/xml/edit/xpath/replace"
|
|
487
|
+
|
|
488
|
+
# query parameters
|
|
489
|
+
query_params = {}
|
|
490
|
+
|
|
491
|
+
# header parameters
|
|
492
|
+
header_params = {}
|
|
493
|
+
# HTTP header 'Accept' (if needed)
|
|
494
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json', 'text/json', 'application/xml', 'text/xml'])
|
|
495
|
+
header_params[:'XPathExpression'] = x_path_expression
|
|
496
|
+
header_params[:'XmlNodeReplacement'] = xml_node_replacement
|
|
497
|
+
|
|
498
|
+
# form parameters
|
|
499
|
+
form_params = {}
|
|
500
|
+
form_params["inputFile"] = input_file
|
|
501
|
+
|
|
502
|
+
# http body (model)
|
|
503
|
+
post_body = nil
|
|
504
|
+
auth_names = ['Apikey']
|
|
505
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path,
|
|
506
|
+
:header_params => header_params,
|
|
507
|
+
:query_params => query_params,
|
|
508
|
+
:form_params => form_params,
|
|
509
|
+
:body => post_body,
|
|
510
|
+
:auth_names => auth_names,
|
|
511
|
+
:return_type => 'XmlReplaceWithXPathResult')
|
|
512
|
+
if @api_client.config.debugging
|
|
513
|
+
@api_client.config.logger.debug "API called: ConvertDataApi#convert_data_xml_edit_replace_with_x_path\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
514
|
+
end
|
|
515
|
+
return data, status_code, headers
|
|
516
|
+
end
|
|
517
|
+
|
|
518
|
+
# Sets the value contents of XML nodes matching XPath expression
|
|
519
|
+
# Return the reuslts of editing an XML document by setting the contents of all of the nodes that match an input XPath expression. Supports elements and attributes.
|
|
520
|
+
# @param input_file Input XML file to perform the operation on.
|
|
521
|
+
# @param x_path_expression Valid XML XPath query expression
|
|
522
|
+
# @param xml_value XML Value to set into the matching XML nodes
|
|
523
|
+
# @param [Hash] opts the optional parameters
|
|
524
|
+
# @return [XmlSetValueWithXPathResult]
|
|
525
|
+
def convert_data_xml_edit_set_value_with_x_path(input_file, x_path_expression, xml_value, opts = {})
|
|
526
|
+
data, _status_code, _headers = convert_data_xml_edit_set_value_with_x_path_with_http_info(input_file, x_path_expression, xml_value, opts)
|
|
527
|
+
return data
|
|
528
|
+
end
|
|
529
|
+
|
|
530
|
+
# Sets the value contents of XML nodes matching XPath expression
|
|
531
|
+
# Return the reuslts of editing an XML document by setting the contents of all of the nodes that match an input XPath expression. Supports elements and attributes.
|
|
532
|
+
# @param input_file Input XML file to perform the operation on.
|
|
533
|
+
# @param x_path_expression Valid XML XPath query expression
|
|
534
|
+
# @param xml_value XML Value to set into the matching XML nodes
|
|
535
|
+
# @param [Hash] opts the optional parameters
|
|
536
|
+
# @return [Array<(XmlSetValueWithXPathResult, Fixnum, Hash)>] XmlSetValueWithXPathResult data, response status code and response headers
|
|
537
|
+
def convert_data_xml_edit_set_value_with_x_path_with_http_info(input_file, x_path_expression, xml_value, opts = {})
|
|
538
|
+
if @api_client.config.debugging
|
|
539
|
+
@api_client.config.logger.debug "Calling API: ConvertDataApi.convert_data_xml_edit_set_value_with_x_path ..."
|
|
540
|
+
end
|
|
541
|
+
# verify the required parameter 'input_file' is set
|
|
542
|
+
if @api_client.config.client_side_validation && input_file.nil?
|
|
543
|
+
fail ArgumentError, "Missing the required parameter 'input_file' when calling ConvertDataApi.convert_data_xml_edit_set_value_with_x_path"
|
|
544
|
+
end
|
|
545
|
+
# verify the required parameter 'x_path_expression' is set
|
|
546
|
+
if @api_client.config.client_side_validation && x_path_expression.nil?
|
|
547
|
+
fail ArgumentError, "Missing the required parameter 'x_path_expression' when calling ConvertDataApi.convert_data_xml_edit_set_value_with_x_path"
|
|
548
|
+
end
|
|
549
|
+
# verify the required parameter 'xml_value' is set
|
|
550
|
+
if @api_client.config.client_side_validation && xml_value.nil?
|
|
551
|
+
fail ArgumentError, "Missing the required parameter 'xml_value' when calling ConvertDataApi.convert_data_xml_edit_set_value_with_x_path"
|
|
552
|
+
end
|
|
553
|
+
# resource path
|
|
554
|
+
local_var_path = "/convert/xml/edit/xpath/set-value"
|
|
555
|
+
|
|
556
|
+
# query parameters
|
|
557
|
+
query_params = {}
|
|
558
|
+
|
|
559
|
+
# header parameters
|
|
560
|
+
header_params = {}
|
|
561
|
+
# HTTP header 'Accept' (if needed)
|
|
562
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json', 'text/json', 'application/xml', 'text/xml'])
|
|
563
|
+
header_params[:'XPathExpression'] = x_path_expression
|
|
564
|
+
header_params[:'XmlValue'] = xml_value
|
|
565
|
+
|
|
566
|
+
# form parameters
|
|
567
|
+
form_params = {}
|
|
568
|
+
form_params["inputFile"] = input_file
|
|
569
|
+
|
|
570
|
+
# http body (model)
|
|
571
|
+
post_body = nil
|
|
572
|
+
auth_names = ['Apikey']
|
|
573
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path,
|
|
574
|
+
:header_params => header_params,
|
|
575
|
+
:query_params => query_params,
|
|
576
|
+
:form_params => form_params,
|
|
577
|
+
:body => post_body,
|
|
578
|
+
:auth_names => auth_names,
|
|
579
|
+
:return_type => 'XmlSetValueWithXPathResult')
|
|
580
|
+
if @api_client.config.debugging
|
|
581
|
+
@api_client.config.logger.debug "API called: ConvertDataApi#convert_data_xml_edit_set_value_with_x_path\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
582
|
+
end
|
|
583
|
+
return data, status_code, headers
|
|
584
|
+
end
|
|
585
|
+
|
|
586
|
+
# Filter, select XML nodes using XPath expression, get results
|
|
587
|
+
# Return the reuslts of filtering, selecting an XML document with an XPath expression
|
|
588
|
+
# @param x_path_expression Valid XML XPath query expression
|
|
589
|
+
# @param input_file Input file to perform the operation on.
|
|
590
|
+
# @param [Hash] opts the optional parameters
|
|
591
|
+
# @return [XmlFIlterWithXPathResult]
|
|
592
|
+
def convert_data_xml_filter_with_x_path(x_path_expression, input_file, opts = {})
|
|
593
|
+
data, _status_code, _headers = convert_data_xml_filter_with_x_path_with_http_info(x_path_expression, input_file, opts)
|
|
594
|
+
return data
|
|
595
|
+
end
|
|
596
|
+
|
|
597
|
+
# Filter, select XML nodes using XPath expression, get results
|
|
598
|
+
# Return the reuslts of filtering, selecting an XML document with an XPath expression
|
|
599
|
+
# @param x_path_expression Valid XML XPath query expression
|
|
600
|
+
# @param input_file Input file to perform the operation on.
|
|
601
|
+
# @param [Hash] opts the optional parameters
|
|
602
|
+
# @return [Array<(XmlFIlterWithXPathResult, Fixnum, Hash)>] XmlFIlterWithXPathResult data, response status code and response headers
|
|
603
|
+
def convert_data_xml_filter_with_x_path_with_http_info(x_path_expression, input_file, opts = {})
|
|
604
|
+
if @api_client.config.debugging
|
|
605
|
+
@api_client.config.logger.debug "Calling API: ConvertDataApi.convert_data_xml_filter_with_x_path ..."
|
|
606
|
+
end
|
|
607
|
+
# verify the required parameter 'x_path_expression' is set
|
|
608
|
+
if @api_client.config.client_side_validation && x_path_expression.nil?
|
|
609
|
+
fail ArgumentError, "Missing the required parameter 'x_path_expression' when calling ConvertDataApi.convert_data_xml_filter_with_x_path"
|
|
610
|
+
end
|
|
611
|
+
# verify the required parameter 'input_file' is set
|
|
612
|
+
if @api_client.config.client_side_validation && input_file.nil?
|
|
613
|
+
fail ArgumentError, "Missing the required parameter 'input_file' when calling ConvertDataApi.convert_data_xml_filter_with_x_path"
|
|
614
|
+
end
|
|
615
|
+
# resource path
|
|
616
|
+
local_var_path = "/convert/xml/select/xpath"
|
|
617
|
+
|
|
618
|
+
# query parameters
|
|
619
|
+
query_params = {}
|
|
620
|
+
|
|
621
|
+
# header parameters
|
|
622
|
+
header_params = {}
|
|
623
|
+
# HTTP header 'Accept' (if needed)
|
|
624
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json', 'text/json', 'application/xml', 'text/xml'])
|
|
625
|
+
# HTTP header 'Content-Type'
|
|
626
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['multipart/form-data'])
|
|
627
|
+
header_params[:'XPathExpression'] = x_path_expression
|
|
628
|
+
|
|
629
|
+
# form parameters
|
|
630
|
+
form_params = {}
|
|
631
|
+
form_params["inputFile"] = input_file
|
|
632
|
+
|
|
633
|
+
# http body (model)
|
|
634
|
+
post_body = nil
|
|
635
|
+
auth_names = ['Apikey']
|
|
636
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path,
|
|
637
|
+
:header_params => header_params,
|
|
638
|
+
:query_params => query_params,
|
|
639
|
+
:form_params => form_params,
|
|
640
|
+
:body => post_body,
|
|
641
|
+
:auth_names => auth_names,
|
|
642
|
+
:return_type => 'XmlFIlterWithXPathResult')
|
|
643
|
+
if @api_client.config.debugging
|
|
644
|
+
@api_client.config.logger.debug "API called: ConvertDataApi#convert_data_xml_filter_with_x_path\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
645
|
+
end
|
|
646
|
+
return data, status_code, headers
|
|
647
|
+
end
|
|
648
|
+
|
|
649
|
+
# Remove, delete XML nodes and items matching XPath expression
|
|
650
|
+
# Return the reuslts of editing an XML document by removing all of the nodes that match an input XPath expression
|
|
651
|
+
# @param x_path_expression Valid XML XPath query expression
|
|
652
|
+
# @param input_file Input file to perform the operation on.
|
|
653
|
+
# @param [Hash] opts the optional parameters
|
|
654
|
+
# @return [XmlRemoveWithXPathResult]
|
|
655
|
+
def convert_data_xml_remove_with_x_path(x_path_expression, input_file, opts = {})
|
|
656
|
+
data, _status_code, _headers = convert_data_xml_remove_with_x_path_with_http_info(x_path_expression, input_file, opts)
|
|
657
|
+
return data
|
|
658
|
+
end
|
|
659
|
+
|
|
660
|
+
# Remove, delete XML nodes and items matching XPath expression
|
|
661
|
+
# Return the reuslts of editing an XML document by removing all of the nodes that match an input XPath expression
|
|
662
|
+
# @param x_path_expression Valid XML XPath query expression
|
|
663
|
+
# @param input_file Input file to perform the operation on.
|
|
664
|
+
# @param [Hash] opts the optional parameters
|
|
665
|
+
# @return [Array<(XmlRemoveWithXPathResult, Fixnum, Hash)>] XmlRemoveWithXPathResult data, response status code and response headers
|
|
666
|
+
def convert_data_xml_remove_with_x_path_with_http_info(x_path_expression, input_file, opts = {})
|
|
667
|
+
if @api_client.config.debugging
|
|
668
|
+
@api_client.config.logger.debug "Calling API: ConvertDataApi.convert_data_xml_remove_with_x_path ..."
|
|
669
|
+
end
|
|
670
|
+
# verify the required parameter 'x_path_expression' is set
|
|
671
|
+
if @api_client.config.client_side_validation && x_path_expression.nil?
|
|
672
|
+
fail ArgumentError, "Missing the required parameter 'x_path_expression' when calling ConvertDataApi.convert_data_xml_remove_with_x_path"
|
|
673
|
+
end
|
|
674
|
+
# verify the required parameter 'input_file' is set
|
|
675
|
+
if @api_client.config.client_side_validation && input_file.nil?
|
|
676
|
+
fail ArgumentError, "Missing the required parameter 'input_file' when calling ConvertDataApi.convert_data_xml_remove_with_x_path"
|
|
677
|
+
end
|
|
678
|
+
# resource path
|
|
679
|
+
local_var_path = "/convert/xml/edit/xpath/remove"
|
|
680
|
+
|
|
681
|
+
# query parameters
|
|
682
|
+
query_params = {}
|
|
683
|
+
|
|
684
|
+
# header parameters
|
|
685
|
+
header_params = {}
|
|
686
|
+
# HTTP header 'Accept' (if needed)
|
|
687
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json', 'text/json', 'application/xml', 'text/xml'])
|
|
688
|
+
# HTTP header 'Content-Type'
|
|
689
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['multipart/form-data'])
|
|
690
|
+
header_params[:'XPathExpression'] = x_path_expression
|
|
691
|
+
|
|
692
|
+
# form parameters
|
|
693
|
+
form_params = {}
|
|
694
|
+
form_params["inputFile"] = input_file
|
|
695
|
+
|
|
696
|
+
# http body (model)
|
|
697
|
+
post_body = nil
|
|
698
|
+
auth_names = ['Apikey']
|
|
699
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path,
|
|
700
|
+
:header_params => header_params,
|
|
701
|
+
:query_params => query_params,
|
|
702
|
+
:form_params => form_params,
|
|
703
|
+
:body => post_body,
|
|
704
|
+
:auth_names => auth_names,
|
|
705
|
+
:return_type => 'XmlRemoveWithXPathResult')
|
|
706
|
+
if @api_client.config.debugging
|
|
707
|
+
@api_client.config.logger.debug "API called: ConvertDataApi#convert_data_xml_remove_with_x_path\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
708
|
+
end
|
|
709
|
+
return data, status_code, headers
|
|
710
|
+
end
|
|
711
|
+
|
|
246
712
|
# Convert XML to JSON conversion
|
|
247
713
|
# Convert an XML string or file into JSON
|
|
248
714
|
# @param input_file Input file to perform the operation on.
|
|
@@ -298,5 +764,66 @@ module CloudmersiveConvertApiClient
|
|
|
298
764
|
end
|
|
299
765
|
return data, status_code, headers
|
|
300
766
|
end
|
|
767
|
+
|
|
768
|
+
# Transform XML document file with XSLT into a new XML document
|
|
769
|
+
# Convert an XML string or file into JSON
|
|
770
|
+
# @param input_file Input XML file to perform the operation on.
|
|
771
|
+
# @param transform_file Input XSLT file to use to transform the input XML file.
|
|
772
|
+
# @param [Hash] opts the optional parameters
|
|
773
|
+
# @return [String]
|
|
774
|
+
def convert_data_xml_transform_with_xslt_to_xml(input_file, transform_file, opts = {})
|
|
775
|
+
data, _status_code, _headers = convert_data_xml_transform_with_xslt_to_xml_with_http_info(input_file, transform_file, opts)
|
|
776
|
+
return data
|
|
777
|
+
end
|
|
778
|
+
|
|
779
|
+
# Transform XML document file with XSLT into a new XML document
|
|
780
|
+
# Convert an XML string or file into JSON
|
|
781
|
+
# @param input_file Input XML file to perform the operation on.
|
|
782
|
+
# @param transform_file Input XSLT file to use to transform the input XML file.
|
|
783
|
+
# @param [Hash] opts the optional parameters
|
|
784
|
+
# @return [Array<(String, Fixnum, Hash)>] String data, response status code and response headers
|
|
785
|
+
def convert_data_xml_transform_with_xslt_to_xml_with_http_info(input_file, transform_file, opts = {})
|
|
786
|
+
if @api_client.config.debugging
|
|
787
|
+
@api_client.config.logger.debug "Calling API: ConvertDataApi.convert_data_xml_transform_with_xslt_to_xml ..."
|
|
788
|
+
end
|
|
789
|
+
# verify the required parameter 'input_file' is set
|
|
790
|
+
if @api_client.config.client_side_validation && input_file.nil?
|
|
791
|
+
fail ArgumentError, "Missing the required parameter 'input_file' when calling ConvertDataApi.convert_data_xml_transform_with_xslt_to_xml"
|
|
792
|
+
end
|
|
793
|
+
# verify the required parameter 'transform_file' is set
|
|
794
|
+
if @api_client.config.client_side_validation && transform_file.nil?
|
|
795
|
+
fail ArgumentError, "Missing the required parameter 'transform_file' when calling ConvertDataApi.convert_data_xml_transform_with_xslt_to_xml"
|
|
796
|
+
end
|
|
797
|
+
# resource path
|
|
798
|
+
local_var_path = "/convert/xml/transform/xslt/to/xml"
|
|
799
|
+
|
|
800
|
+
# query parameters
|
|
801
|
+
query_params = {}
|
|
802
|
+
|
|
803
|
+
# header parameters
|
|
804
|
+
header_params = {}
|
|
805
|
+
# HTTP header 'Accept' (if needed)
|
|
806
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/xml'])
|
|
807
|
+
|
|
808
|
+
# form parameters
|
|
809
|
+
form_params = {}
|
|
810
|
+
form_params["inputFile"] = input_file
|
|
811
|
+
form_params["transformFile"] = transform_file
|
|
812
|
+
|
|
813
|
+
# http body (model)
|
|
814
|
+
post_body = nil
|
|
815
|
+
auth_names = ['Apikey']
|
|
816
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path,
|
|
817
|
+
:header_params => header_params,
|
|
818
|
+
:query_params => query_params,
|
|
819
|
+
:form_params => form_params,
|
|
820
|
+
:body => post_body,
|
|
821
|
+
:auth_names => auth_names,
|
|
822
|
+
:return_type => 'String')
|
|
823
|
+
if @api_client.config.debugging
|
|
824
|
+
@api_client.config.logger.debug "API called: ConvertDataApi#convert_data_xml_transform_with_xslt_to_xml\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
825
|
+
end
|
|
826
|
+
return data, status_code, headers
|
|
827
|
+
end
|
|
301
828
|
end
|
|
302
829
|
end
|