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
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 5250d24641786015fd4b492ae2195d748debf54d5b1c3936eb971df727c84e86
|
|
4
|
+
data.tar.gz: c814edbd877803e291e582c450bf80a7fce4fd93ef7a8240fd7a4c2aedfe2443
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: efdc934b048c161fa83083cb0b0fe3df67fdd0c65b5f89e0fa1b7787b7b5d40eae45caca8e5b005661046085e3cda77b7753d96569026098530b31cf5f234a02
|
|
7
|
+
data.tar.gz: 005f958090275bfa95e5d627af496253207319804fb55205eab21cf51dca20c739a10d2e14053eb4be5b5a862337b43d2c9acda84f91c876b8af2847318fee65
|
data/README.md
CHANGED
|
@@ -7,7 +7,7 @@ Convert API lets you effortlessly convert file formats and types.
|
|
|
7
7
|
This SDK is automatically generated by the [Swagger Codegen](https://github.com/swagger-api/swagger-codegen) project:
|
|
8
8
|
|
|
9
9
|
- API version: v1
|
|
10
|
-
- Package version: 1.5.
|
|
10
|
+
- Package version: 1.5.7
|
|
11
11
|
- Build package: io.swagger.codegen.languages.RubyClientCodegen
|
|
12
12
|
|
|
13
13
|
## Installation
|
|
@@ -23,15 +23,15 @@ gem build cloudmersive-convert-api-client.gemspec
|
|
|
23
23
|
Then either install the gem locally:
|
|
24
24
|
|
|
25
25
|
```shell
|
|
26
|
-
gem install ./cloudmersive-convert-api-client-1.5.
|
|
26
|
+
gem install ./cloudmersive-convert-api-client-1.5.7.gem
|
|
27
27
|
```
|
|
28
|
-
(for development, run `gem install --dev ./cloudmersive-convert-api-client-1.5.
|
|
28
|
+
(for development, run `gem install --dev ./cloudmersive-convert-api-client-1.5.7.gem` to install the development dependencies)
|
|
29
29
|
|
|
30
30
|
or publish the gem to a gem hosting service, e.g. [RubyGems](https://rubygems.org/).
|
|
31
31
|
|
|
32
32
|
Finally add this to the Gemfile:
|
|
33
33
|
|
|
34
|
-
gem 'cloudmersive-convert-api-client', '~> 1.5.
|
|
34
|
+
gem 'cloudmersive-convert-api-client', '~> 1.5.7'
|
|
35
35
|
|
|
36
36
|
### Install from Git
|
|
37
37
|
|
|
@@ -90,7 +90,15 @@ Class | Method | HTTP request | Description
|
|
|
90
90
|
*CloudmersiveConvertApiClient::ConvertDataApi* | [**convert_data_json_to_xml**](docs/ConvertDataApi.md#convert_data_json_to_xml) | **POST** /convert/json/to/xml | Convert JSON to XML conversion
|
|
91
91
|
*CloudmersiveConvertApiClient::ConvertDataApi* | [**convert_data_xls_to_json**](docs/ConvertDataApi.md#convert_data_xls_to_json) | **POST** /convert/xls/to/json | Convert Excel (97-2003) XLS to JSON conversion
|
|
92
92
|
*CloudmersiveConvertApiClient::ConvertDataApi* | [**convert_data_xlsx_to_json**](docs/ConvertDataApi.md#convert_data_xlsx_to_json) | **POST** /convert/xlsx/to/json | Convert Excel XLSX to JSON conversion
|
|
93
|
+
*CloudmersiveConvertApiClient::ConvertDataApi* | [**convert_data_xml_edit_add_attribute_with_x_path**](docs/ConvertDataApi.md#convert_data_xml_edit_add_attribute_with_x_path) | **POST** /convert/xml/edit/xpath/add-attribute | Adds an attribute to all XML nodes matching XPath expression
|
|
94
|
+
*CloudmersiveConvertApiClient::ConvertDataApi* | [**convert_data_xml_edit_add_child_with_x_path**](docs/ConvertDataApi.md#convert_data_xml_edit_add_child_with_x_path) | **POST** /convert/xml/edit/xpath/add-child | Adds an XML node as a child to XML nodes matching XPath expression
|
|
95
|
+
*CloudmersiveConvertApiClient::ConvertDataApi* | [**convert_data_xml_edit_remove_all_child_nodes_with_x_path**](docs/ConvertDataApi.md#convert_data_xml_edit_remove_all_child_nodes_with_x_path) | **POST** /convert/xml/edit/xpath/remove-all-children | Removes, deletes all children of nodes matching XPath expression, but does not remove the nodes
|
|
96
|
+
*CloudmersiveConvertApiClient::ConvertDataApi* | [**convert_data_xml_edit_replace_with_x_path**](docs/ConvertDataApi.md#convert_data_xml_edit_replace_with_x_path) | **POST** /convert/xml/edit/xpath/replace | Replaces XML nodes matching XPath expression with new node
|
|
97
|
+
*CloudmersiveConvertApiClient::ConvertDataApi* | [**convert_data_xml_edit_set_value_with_x_path**](docs/ConvertDataApi.md#convert_data_xml_edit_set_value_with_x_path) | **POST** /convert/xml/edit/xpath/set-value | Sets the value contents of XML nodes matching XPath expression
|
|
98
|
+
*CloudmersiveConvertApiClient::ConvertDataApi* | [**convert_data_xml_filter_with_x_path**](docs/ConvertDataApi.md#convert_data_xml_filter_with_x_path) | **POST** /convert/xml/select/xpath | Filter, select XML nodes using XPath expression, get results
|
|
99
|
+
*CloudmersiveConvertApiClient::ConvertDataApi* | [**convert_data_xml_remove_with_x_path**](docs/ConvertDataApi.md#convert_data_xml_remove_with_x_path) | **POST** /convert/xml/edit/xpath/remove | Remove, delete XML nodes and items matching XPath expression
|
|
93
100
|
*CloudmersiveConvertApiClient::ConvertDataApi* | [**convert_data_xml_to_json**](docs/ConvertDataApi.md#convert_data_xml_to_json) | **POST** /convert/xml/to/json | Convert XML to JSON conversion
|
|
101
|
+
*CloudmersiveConvertApiClient::ConvertDataApi* | [**convert_data_xml_transform_with_xslt_to_xml**](docs/ConvertDataApi.md#convert_data_xml_transform_with_xslt_to_xml) | **POST** /convert/xml/transform/xslt/to/xml | Transform XML document file with XSLT into a new XML document
|
|
94
102
|
*CloudmersiveConvertApiClient::ConvertDocumentApi* | [**convert_document_autodetect_get_info**](docs/ConvertDocumentApi.md#convert_document_autodetect_get_info) | **POST** /convert/autodetect/get-info | Get document type information
|
|
95
103
|
*CloudmersiveConvertApiClient::ConvertDocumentApi* | [**convert_document_autodetect_to_pdf**](docs/ConvertDocumentApi.md#convert_document_autodetect_to_pdf) | **POST** /convert/autodetect/to/pdf | Convert Document to PDF
|
|
96
104
|
*CloudmersiveConvertApiClient::ConvertDocumentApi* | [**convert_document_autodetect_to_png_array**](docs/ConvertDocumentApi.md#convert_document_autodetect_to_png_array) | **POST** /convert/autodetect/to/png | Convert Document to PNG array
|
|
@@ -326,6 +334,13 @@ Class | Method | HTTP request | Description
|
|
|
326
334
|
- [CloudmersiveConvertApiClient::XlsxSpreadsheetColumn](docs/XlsxSpreadsheetColumn.md)
|
|
327
335
|
- [CloudmersiveConvertApiClient::XlsxSpreadsheetRow](docs/XlsxSpreadsheetRow.md)
|
|
328
336
|
- [CloudmersiveConvertApiClient::XlsxWorksheet](docs/XlsxWorksheet.md)
|
|
337
|
+
- [CloudmersiveConvertApiClient::XmlAddAttributeWithXPathResult](docs/XmlAddAttributeWithXPathResult.md)
|
|
338
|
+
- [CloudmersiveConvertApiClient::XmlAddChildWithXPathResult](docs/XmlAddChildWithXPathResult.md)
|
|
339
|
+
- [CloudmersiveConvertApiClient::XmlFIlterWithXPathResult](docs/XmlFIlterWithXPathResult.md)
|
|
340
|
+
- [CloudmersiveConvertApiClient::XmlRemoveAllChildrenWithXPathResult](docs/XmlRemoveAllChildrenWithXPathResult.md)
|
|
341
|
+
- [CloudmersiveConvertApiClient::XmlRemoveWithXPathResult](docs/XmlRemoveWithXPathResult.md)
|
|
342
|
+
- [CloudmersiveConvertApiClient::XmlReplaceWithXPathResult](docs/XmlReplaceWithXPathResult.md)
|
|
343
|
+
- [CloudmersiveConvertApiClient::XmlSetValueWithXPathResult](docs/XmlSetValueWithXPathResult.md)
|
|
329
344
|
|
|
330
345
|
|
|
331
346
|
## Documentation for Authorization
|
data/docs/ConvertDataApi.md
CHANGED
|
@@ -8,7 +8,15 @@ Method | HTTP request | Description
|
|
|
8
8
|
[**convert_data_json_to_xml**](ConvertDataApi.md#convert_data_json_to_xml) | **POST** /convert/json/to/xml | Convert JSON to XML conversion
|
|
9
9
|
[**convert_data_xls_to_json**](ConvertDataApi.md#convert_data_xls_to_json) | **POST** /convert/xls/to/json | Convert Excel (97-2003) XLS to JSON conversion
|
|
10
10
|
[**convert_data_xlsx_to_json**](ConvertDataApi.md#convert_data_xlsx_to_json) | **POST** /convert/xlsx/to/json | Convert Excel XLSX to JSON conversion
|
|
11
|
+
[**convert_data_xml_edit_add_attribute_with_x_path**](ConvertDataApi.md#convert_data_xml_edit_add_attribute_with_x_path) | **POST** /convert/xml/edit/xpath/add-attribute | Adds an attribute to all XML nodes matching XPath expression
|
|
12
|
+
[**convert_data_xml_edit_add_child_with_x_path**](ConvertDataApi.md#convert_data_xml_edit_add_child_with_x_path) | **POST** /convert/xml/edit/xpath/add-child | Adds an XML node as a child to XML nodes matching XPath expression
|
|
13
|
+
[**convert_data_xml_edit_remove_all_child_nodes_with_x_path**](ConvertDataApi.md#convert_data_xml_edit_remove_all_child_nodes_with_x_path) | **POST** /convert/xml/edit/xpath/remove-all-children | Removes, deletes all children of nodes matching XPath expression, but does not remove the nodes
|
|
14
|
+
[**convert_data_xml_edit_replace_with_x_path**](ConvertDataApi.md#convert_data_xml_edit_replace_with_x_path) | **POST** /convert/xml/edit/xpath/replace | Replaces XML nodes matching XPath expression with new node
|
|
15
|
+
[**convert_data_xml_edit_set_value_with_x_path**](ConvertDataApi.md#convert_data_xml_edit_set_value_with_x_path) | **POST** /convert/xml/edit/xpath/set-value | Sets the value contents of XML nodes matching XPath expression
|
|
16
|
+
[**convert_data_xml_filter_with_x_path**](ConvertDataApi.md#convert_data_xml_filter_with_x_path) | **POST** /convert/xml/select/xpath | Filter, select XML nodes using XPath expression, get results
|
|
17
|
+
[**convert_data_xml_remove_with_x_path**](ConvertDataApi.md#convert_data_xml_remove_with_x_path) | **POST** /convert/xml/edit/xpath/remove | Remove, delete XML nodes and items matching XPath expression
|
|
11
18
|
[**convert_data_xml_to_json**](ConvertDataApi.md#convert_data_xml_to_json) | **POST** /convert/xml/to/json | Convert XML to JSON conversion
|
|
19
|
+
[**convert_data_xml_transform_with_xslt_to_xml**](ConvertDataApi.md#convert_data_xml_transform_with_xslt_to_xml) | **POST** /convert/xml/transform/xslt/to/xml | Transform XML document file with XSLT into a new XML document
|
|
12
20
|
|
|
13
21
|
|
|
14
22
|
# **convert_data_csv_to_json**
|
|
@@ -66,7 +74,7 @@ Name | Type | Description | Notes
|
|
|
66
74
|
|
|
67
75
|
|
|
68
76
|
# **convert_data_json_to_xml**
|
|
69
|
-
>
|
|
77
|
+
> String convert_data_json_to_xml(json_object)
|
|
70
78
|
|
|
71
79
|
Convert JSON to XML conversion
|
|
72
80
|
|
|
@@ -106,7 +114,7 @@ Name | Type | Description | Notes
|
|
|
106
114
|
|
|
107
115
|
### Return type
|
|
108
116
|
|
|
109
|
-
**
|
|
117
|
+
**String**
|
|
110
118
|
|
|
111
119
|
### Authorization
|
|
112
120
|
|
|
@@ -227,6 +235,420 @@ Name | Type | Description | Notes
|
|
|
227
235
|
|
|
228
236
|
|
|
229
237
|
|
|
238
|
+
# **convert_data_xml_edit_add_attribute_with_x_path**
|
|
239
|
+
> XmlAddAttributeWithXPathResult convert_data_xml_edit_add_attribute_with_x_path(input_file, x_path_expression, xml_attribute_name, xml_attribute_value)
|
|
240
|
+
|
|
241
|
+
Adds an attribute to all XML nodes matching XPath expression
|
|
242
|
+
|
|
243
|
+
Return the reuslts of editing an XML document by adding an attribute to all of the nodes that match an input XPath expression.
|
|
244
|
+
|
|
245
|
+
### Example
|
|
246
|
+
```ruby
|
|
247
|
+
# load the gem
|
|
248
|
+
require 'cloudmersive-convert-api-client'
|
|
249
|
+
# setup authorization
|
|
250
|
+
CloudmersiveConvertApiClient.configure do |config|
|
|
251
|
+
# Configure API key authorization: Apikey
|
|
252
|
+
config.api_key['Apikey'] = 'YOUR API KEY'
|
|
253
|
+
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
|
|
254
|
+
#config.api_key_prefix['Apikey'] = 'Bearer'
|
|
255
|
+
end
|
|
256
|
+
|
|
257
|
+
api_instance = CloudmersiveConvertApiClient::ConvertDataApi.new
|
|
258
|
+
|
|
259
|
+
input_file = File.new("/path/to/file.txt") # File | Input XML file to perform the operation on.
|
|
260
|
+
|
|
261
|
+
x_path_expression = "x_path_expression_example" # String | Valid XML XPath query expression
|
|
262
|
+
|
|
263
|
+
xml_attribute_name = "xml_attribute_name_example" # String | Name of the XML attribute to add
|
|
264
|
+
|
|
265
|
+
xml_attribute_value = "xml_attribute_value_example" # String | Value of the XML attribute to add
|
|
266
|
+
|
|
267
|
+
|
|
268
|
+
begin
|
|
269
|
+
#Adds an attribute to all XML nodes matching XPath expression
|
|
270
|
+
result = api_instance.convert_data_xml_edit_add_attribute_with_x_path(input_file, x_path_expression, xml_attribute_name, xml_attribute_value)
|
|
271
|
+
p result
|
|
272
|
+
rescue CloudmersiveConvertApiClient::ApiError => e
|
|
273
|
+
puts "Exception when calling ConvertDataApi->convert_data_xml_edit_add_attribute_with_x_path: #{e}"
|
|
274
|
+
end
|
|
275
|
+
```
|
|
276
|
+
|
|
277
|
+
### Parameters
|
|
278
|
+
|
|
279
|
+
Name | Type | Description | Notes
|
|
280
|
+
------------- | ------------- | ------------- | -------------
|
|
281
|
+
**input_file** | **File**| Input XML file to perform the operation on. |
|
|
282
|
+
**x_path_expression** | **String**| Valid XML XPath query expression |
|
|
283
|
+
**xml_attribute_name** | **String**| Name of the XML attribute to add |
|
|
284
|
+
**xml_attribute_value** | **String**| Value of the XML attribute to add |
|
|
285
|
+
|
|
286
|
+
### Return type
|
|
287
|
+
|
|
288
|
+
[**XmlAddAttributeWithXPathResult**](XmlAddAttributeWithXPathResult.md)
|
|
289
|
+
|
|
290
|
+
### Authorization
|
|
291
|
+
|
|
292
|
+
[Apikey](../README.md#Apikey)
|
|
293
|
+
|
|
294
|
+
### HTTP request headers
|
|
295
|
+
|
|
296
|
+
- **Content-Type**: Not defined
|
|
297
|
+
- **Accept**: application/json, text/json, application/xml, text/xml
|
|
298
|
+
|
|
299
|
+
|
|
300
|
+
|
|
301
|
+
# **convert_data_xml_edit_add_child_with_x_path**
|
|
302
|
+
> XmlAddChildWithXPathResult convert_data_xml_edit_add_child_with_x_path(input_file, x_path_expression, xml_node_to_add)
|
|
303
|
+
|
|
304
|
+
Adds an XML node as a child to XML nodes matching XPath expression
|
|
305
|
+
|
|
306
|
+
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.
|
|
307
|
+
|
|
308
|
+
### Example
|
|
309
|
+
```ruby
|
|
310
|
+
# load the gem
|
|
311
|
+
require 'cloudmersive-convert-api-client'
|
|
312
|
+
# setup authorization
|
|
313
|
+
CloudmersiveConvertApiClient.configure do |config|
|
|
314
|
+
# Configure API key authorization: Apikey
|
|
315
|
+
config.api_key['Apikey'] = 'YOUR API KEY'
|
|
316
|
+
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
|
|
317
|
+
#config.api_key_prefix['Apikey'] = 'Bearer'
|
|
318
|
+
end
|
|
319
|
+
|
|
320
|
+
api_instance = CloudmersiveConvertApiClient::ConvertDataApi.new
|
|
321
|
+
|
|
322
|
+
input_file = File.new("/path/to/file.txt") # File | Input XML file to perform the operation on.
|
|
323
|
+
|
|
324
|
+
x_path_expression = "x_path_expression_example" # String | Valid XML XPath query expression
|
|
325
|
+
|
|
326
|
+
xml_node_to_add = "xml_node_to_add_example" # String | XML Node to add as a child
|
|
327
|
+
|
|
328
|
+
|
|
329
|
+
begin
|
|
330
|
+
#Adds an XML node as a child to XML nodes matching XPath expression
|
|
331
|
+
result = api_instance.convert_data_xml_edit_add_child_with_x_path(input_file, x_path_expression, xml_node_to_add)
|
|
332
|
+
p result
|
|
333
|
+
rescue CloudmersiveConvertApiClient::ApiError => e
|
|
334
|
+
puts "Exception when calling ConvertDataApi->convert_data_xml_edit_add_child_with_x_path: #{e}"
|
|
335
|
+
end
|
|
336
|
+
```
|
|
337
|
+
|
|
338
|
+
### Parameters
|
|
339
|
+
|
|
340
|
+
Name | Type | Description | Notes
|
|
341
|
+
------------- | ------------- | ------------- | -------------
|
|
342
|
+
**input_file** | **File**| Input XML file to perform the operation on. |
|
|
343
|
+
**x_path_expression** | **String**| Valid XML XPath query expression |
|
|
344
|
+
**xml_node_to_add** | **String**| XML Node to add as a child |
|
|
345
|
+
|
|
346
|
+
### Return type
|
|
347
|
+
|
|
348
|
+
[**XmlAddChildWithXPathResult**](XmlAddChildWithXPathResult.md)
|
|
349
|
+
|
|
350
|
+
### Authorization
|
|
351
|
+
|
|
352
|
+
[Apikey](../README.md#Apikey)
|
|
353
|
+
|
|
354
|
+
### HTTP request headers
|
|
355
|
+
|
|
356
|
+
- **Content-Type**: Not defined
|
|
357
|
+
- **Accept**: application/json, text/json, application/xml, text/xml
|
|
358
|
+
|
|
359
|
+
|
|
360
|
+
|
|
361
|
+
# **convert_data_xml_edit_remove_all_child_nodes_with_x_path**
|
|
362
|
+
> XmlRemoveAllChildrenWithXPathResult convert_data_xml_edit_remove_all_child_nodes_with_x_path(input_file, x_path_expression)
|
|
363
|
+
|
|
364
|
+
Removes, deletes all children of nodes matching XPath expression, but does not remove the nodes
|
|
365
|
+
|
|
366
|
+
Return the reuslts of editing an XML document by removing all child nodes of the nodes that match an input XPath expression.
|
|
367
|
+
|
|
368
|
+
### Example
|
|
369
|
+
```ruby
|
|
370
|
+
# load the gem
|
|
371
|
+
require 'cloudmersive-convert-api-client'
|
|
372
|
+
# setup authorization
|
|
373
|
+
CloudmersiveConvertApiClient.configure do |config|
|
|
374
|
+
# Configure API key authorization: Apikey
|
|
375
|
+
config.api_key['Apikey'] = 'YOUR API KEY'
|
|
376
|
+
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
|
|
377
|
+
#config.api_key_prefix['Apikey'] = 'Bearer'
|
|
378
|
+
end
|
|
379
|
+
|
|
380
|
+
api_instance = CloudmersiveConvertApiClient::ConvertDataApi.new
|
|
381
|
+
|
|
382
|
+
input_file = File.new("/path/to/file.txt") # File | Input XML file to perform the operation on.
|
|
383
|
+
|
|
384
|
+
x_path_expression = "x_path_expression_example" # String | Valid XML XPath query expression
|
|
385
|
+
|
|
386
|
+
|
|
387
|
+
begin
|
|
388
|
+
#Removes, deletes all children of nodes matching XPath expression, but does not remove the nodes
|
|
389
|
+
result = api_instance.convert_data_xml_edit_remove_all_child_nodes_with_x_path(input_file, x_path_expression)
|
|
390
|
+
p result
|
|
391
|
+
rescue CloudmersiveConvertApiClient::ApiError => e
|
|
392
|
+
puts "Exception when calling ConvertDataApi->convert_data_xml_edit_remove_all_child_nodes_with_x_path: #{e}"
|
|
393
|
+
end
|
|
394
|
+
```
|
|
395
|
+
|
|
396
|
+
### Parameters
|
|
397
|
+
|
|
398
|
+
Name | Type | Description | Notes
|
|
399
|
+
------------- | ------------- | ------------- | -------------
|
|
400
|
+
**input_file** | **File**| Input XML file to perform the operation on. |
|
|
401
|
+
**x_path_expression** | **String**| Valid XML XPath query expression |
|
|
402
|
+
|
|
403
|
+
### Return type
|
|
404
|
+
|
|
405
|
+
[**XmlRemoveAllChildrenWithXPathResult**](XmlRemoveAllChildrenWithXPathResult.md)
|
|
406
|
+
|
|
407
|
+
### Authorization
|
|
408
|
+
|
|
409
|
+
[Apikey](../README.md#Apikey)
|
|
410
|
+
|
|
411
|
+
### HTTP request headers
|
|
412
|
+
|
|
413
|
+
- **Content-Type**: Not defined
|
|
414
|
+
- **Accept**: application/json, text/json, application/xml, text/xml
|
|
415
|
+
|
|
416
|
+
|
|
417
|
+
|
|
418
|
+
# **convert_data_xml_edit_replace_with_x_path**
|
|
419
|
+
> XmlReplaceWithXPathResult convert_data_xml_edit_replace_with_x_path(input_file, x_path_expression, xml_node_replacement)
|
|
420
|
+
|
|
421
|
+
Replaces XML nodes matching XPath expression with new node
|
|
422
|
+
|
|
423
|
+
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.
|
|
424
|
+
|
|
425
|
+
### Example
|
|
426
|
+
```ruby
|
|
427
|
+
# load the gem
|
|
428
|
+
require 'cloudmersive-convert-api-client'
|
|
429
|
+
# setup authorization
|
|
430
|
+
CloudmersiveConvertApiClient.configure do |config|
|
|
431
|
+
# Configure API key authorization: Apikey
|
|
432
|
+
config.api_key['Apikey'] = 'YOUR API KEY'
|
|
433
|
+
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
|
|
434
|
+
#config.api_key_prefix['Apikey'] = 'Bearer'
|
|
435
|
+
end
|
|
436
|
+
|
|
437
|
+
api_instance = CloudmersiveConvertApiClient::ConvertDataApi.new
|
|
438
|
+
|
|
439
|
+
input_file = File.new("/path/to/file.txt") # File | Input XML file to perform the operation on.
|
|
440
|
+
|
|
441
|
+
x_path_expression = "x_path_expression_example" # String | Valid XML XPath query expression
|
|
442
|
+
|
|
443
|
+
xml_node_replacement = "xml_node_replacement_example" # String | XML Node replacement content
|
|
444
|
+
|
|
445
|
+
|
|
446
|
+
begin
|
|
447
|
+
#Replaces XML nodes matching XPath expression with new node
|
|
448
|
+
result = api_instance.convert_data_xml_edit_replace_with_x_path(input_file, x_path_expression, xml_node_replacement)
|
|
449
|
+
p result
|
|
450
|
+
rescue CloudmersiveConvertApiClient::ApiError => e
|
|
451
|
+
puts "Exception when calling ConvertDataApi->convert_data_xml_edit_replace_with_x_path: #{e}"
|
|
452
|
+
end
|
|
453
|
+
```
|
|
454
|
+
|
|
455
|
+
### Parameters
|
|
456
|
+
|
|
457
|
+
Name | Type | Description | Notes
|
|
458
|
+
------------- | ------------- | ------------- | -------------
|
|
459
|
+
**input_file** | **File**| Input XML file to perform the operation on. |
|
|
460
|
+
**x_path_expression** | **String**| Valid XML XPath query expression |
|
|
461
|
+
**xml_node_replacement** | **String**| XML Node replacement content |
|
|
462
|
+
|
|
463
|
+
### Return type
|
|
464
|
+
|
|
465
|
+
[**XmlReplaceWithXPathResult**](XmlReplaceWithXPathResult.md)
|
|
466
|
+
|
|
467
|
+
### Authorization
|
|
468
|
+
|
|
469
|
+
[Apikey](../README.md#Apikey)
|
|
470
|
+
|
|
471
|
+
### HTTP request headers
|
|
472
|
+
|
|
473
|
+
- **Content-Type**: Not defined
|
|
474
|
+
- **Accept**: application/json, text/json, application/xml, text/xml
|
|
475
|
+
|
|
476
|
+
|
|
477
|
+
|
|
478
|
+
# **convert_data_xml_edit_set_value_with_x_path**
|
|
479
|
+
> XmlSetValueWithXPathResult convert_data_xml_edit_set_value_with_x_path(input_file, x_path_expression, xml_value)
|
|
480
|
+
|
|
481
|
+
Sets the value contents of XML nodes matching XPath expression
|
|
482
|
+
|
|
483
|
+
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.
|
|
484
|
+
|
|
485
|
+
### Example
|
|
486
|
+
```ruby
|
|
487
|
+
# load the gem
|
|
488
|
+
require 'cloudmersive-convert-api-client'
|
|
489
|
+
# setup authorization
|
|
490
|
+
CloudmersiveConvertApiClient.configure do |config|
|
|
491
|
+
# Configure API key authorization: Apikey
|
|
492
|
+
config.api_key['Apikey'] = 'YOUR API KEY'
|
|
493
|
+
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
|
|
494
|
+
#config.api_key_prefix['Apikey'] = 'Bearer'
|
|
495
|
+
end
|
|
496
|
+
|
|
497
|
+
api_instance = CloudmersiveConvertApiClient::ConvertDataApi.new
|
|
498
|
+
|
|
499
|
+
input_file = File.new("/path/to/file.txt") # File | Input XML file to perform the operation on.
|
|
500
|
+
|
|
501
|
+
x_path_expression = "x_path_expression_example" # String | Valid XML XPath query expression
|
|
502
|
+
|
|
503
|
+
xml_value = "xml_value_example" # String | XML Value to set into the matching XML nodes
|
|
504
|
+
|
|
505
|
+
|
|
506
|
+
begin
|
|
507
|
+
#Sets the value contents of XML nodes matching XPath expression
|
|
508
|
+
result = api_instance.convert_data_xml_edit_set_value_with_x_path(input_file, x_path_expression, xml_value)
|
|
509
|
+
p result
|
|
510
|
+
rescue CloudmersiveConvertApiClient::ApiError => e
|
|
511
|
+
puts "Exception when calling ConvertDataApi->convert_data_xml_edit_set_value_with_x_path: #{e}"
|
|
512
|
+
end
|
|
513
|
+
```
|
|
514
|
+
|
|
515
|
+
### Parameters
|
|
516
|
+
|
|
517
|
+
Name | Type | Description | Notes
|
|
518
|
+
------------- | ------------- | ------------- | -------------
|
|
519
|
+
**input_file** | **File**| Input XML file to perform the operation on. |
|
|
520
|
+
**x_path_expression** | **String**| Valid XML XPath query expression |
|
|
521
|
+
**xml_value** | **String**| XML Value to set into the matching XML nodes |
|
|
522
|
+
|
|
523
|
+
### Return type
|
|
524
|
+
|
|
525
|
+
[**XmlSetValueWithXPathResult**](XmlSetValueWithXPathResult.md)
|
|
526
|
+
|
|
527
|
+
### Authorization
|
|
528
|
+
|
|
529
|
+
[Apikey](../README.md#Apikey)
|
|
530
|
+
|
|
531
|
+
### HTTP request headers
|
|
532
|
+
|
|
533
|
+
- **Content-Type**: Not defined
|
|
534
|
+
- **Accept**: application/json, text/json, application/xml, text/xml
|
|
535
|
+
|
|
536
|
+
|
|
537
|
+
|
|
538
|
+
# **convert_data_xml_filter_with_x_path**
|
|
539
|
+
> XmlFIlterWithXPathResult convert_data_xml_filter_with_x_path(x_path_expression, input_file)
|
|
540
|
+
|
|
541
|
+
Filter, select XML nodes using XPath expression, get results
|
|
542
|
+
|
|
543
|
+
Return the reuslts of filtering, selecting an XML document with an XPath expression
|
|
544
|
+
|
|
545
|
+
### Example
|
|
546
|
+
```ruby
|
|
547
|
+
# load the gem
|
|
548
|
+
require 'cloudmersive-convert-api-client'
|
|
549
|
+
# setup authorization
|
|
550
|
+
CloudmersiveConvertApiClient.configure do |config|
|
|
551
|
+
# Configure API key authorization: Apikey
|
|
552
|
+
config.api_key['Apikey'] = 'YOUR API KEY'
|
|
553
|
+
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
|
|
554
|
+
#config.api_key_prefix['Apikey'] = 'Bearer'
|
|
555
|
+
end
|
|
556
|
+
|
|
557
|
+
api_instance = CloudmersiveConvertApiClient::ConvertDataApi.new
|
|
558
|
+
|
|
559
|
+
x_path_expression = "x_path_expression_example" # String | Valid XML XPath query expression
|
|
560
|
+
|
|
561
|
+
input_file = File.new("/path/to/file.txt") # File | Input file to perform the operation on.
|
|
562
|
+
|
|
563
|
+
|
|
564
|
+
begin
|
|
565
|
+
#Filter, select XML nodes using XPath expression, get results
|
|
566
|
+
result = api_instance.convert_data_xml_filter_with_x_path(x_path_expression, input_file)
|
|
567
|
+
p result
|
|
568
|
+
rescue CloudmersiveConvertApiClient::ApiError => e
|
|
569
|
+
puts "Exception when calling ConvertDataApi->convert_data_xml_filter_with_x_path: #{e}"
|
|
570
|
+
end
|
|
571
|
+
```
|
|
572
|
+
|
|
573
|
+
### Parameters
|
|
574
|
+
|
|
575
|
+
Name | Type | Description | Notes
|
|
576
|
+
------------- | ------------- | ------------- | -------------
|
|
577
|
+
**x_path_expression** | **String**| Valid XML XPath query expression |
|
|
578
|
+
**input_file** | **File**| Input file to perform the operation on. |
|
|
579
|
+
|
|
580
|
+
### Return type
|
|
581
|
+
|
|
582
|
+
[**XmlFIlterWithXPathResult**](XmlFIlterWithXPathResult.md)
|
|
583
|
+
|
|
584
|
+
### Authorization
|
|
585
|
+
|
|
586
|
+
[Apikey](../README.md#Apikey)
|
|
587
|
+
|
|
588
|
+
### HTTP request headers
|
|
589
|
+
|
|
590
|
+
- **Content-Type**: multipart/form-data
|
|
591
|
+
- **Accept**: application/json, text/json, application/xml, text/xml
|
|
592
|
+
|
|
593
|
+
|
|
594
|
+
|
|
595
|
+
# **convert_data_xml_remove_with_x_path**
|
|
596
|
+
> XmlRemoveWithXPathResult convert_data_xml_remove_with_x_path(x_path_expression, input_file)
|
|
597
|
+
|
|
598
|
+
Remove, delete XML nodes and items matching XPath expression
|
|
599
|
+
|
|
600
|
+
Return the reuslts of editing an XML document by removing all of the nodes that match an input XPath expression
|
|
601
|
+
|
|
602
|
+
### Example
|
|
603
|
+
```ruby
|
|
604
|
+
# load the gem
|
|
605
|
+
require 'cloudmersive-convert-api-client'
|
|
606
|
+
# setup authorization
|
|
607
|
+
CloudmersiveConvertApiClient.configure do |config|
|
|
608
|
+
# Configure API key authorization: Apikey
|
|
609
|
+
config.api_key['Apikey'] = 'YOUR API KEY'
|
|
610
|
+
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
|
|
611
|
+
#config.api_key_prefix['Apikey'] = 'Bearer'
|
|
612
|
+
end
|
|
613
|
+
|
|
614
|
+
api_instance = CloudmersiveConvertApiClient::ConvertDataApi.new
|
|
615
|
+
|
|
616
|
+
x_path_expression = "x_path_expression_example" # String | Valid XML XPath query expression
|
|
617
|
+
|
|
618
|
+
input_file = File.new("/path/to/file.txt") # File | Input file to perform the operation on.
|
|
619
|
+
|
|
620
|
+
|
|
621
|
+
begin
|
|
622
|
+
#Remove, delete XML nodes and items matching XPath expression
|
|
623
|
+
result = api_instance.convert_data_xml_remove_with_x_path(x_path_expression, input_file)
|
|
624
|
+
p result
|
|
625
|
+
rescue CloudmersiveConvertApiClient::ApiError => e
|
|
626
|
+
puts "Exception when calling ConvertDataApi->convert_data_xml_remove_with_x_path: #{e}"
|
|
627
|
+
end
|
|
628
|
+
```
|
|
629
|
+
|
|
630
|
+
### Parameters
|
|
631
|
+
|
|
632
|
+
Name | Type | Description | Notes
|
|
633
|
+
------------- | ------------- | ------------- | -------------
|
|
634
|
+
**x_path_expression** | **String**| Valid XML XPath query expression |
|
|
635
|
+
**input_file** | **File**| Input file to perform the operation on. |
|
|
636
|
+
|
|
637
|
+
### Return type
|
|
638
|
+
|
|
639
|
+
[**XmlRemoveWithXPathResult**](XmlRemoveWithXPathResult.md)
|
|
640
|
+
|
|
641
|
+
### Authorization
|
|
642
|
+
|
|
643
|
+
[Apikey](../README.md#Apikey)
|
|
644
|
+
|
|
645
|
+
### HTTP request headers
|
|
646
|
+
|
|
647
|
+
- **Content-Type**: multipart/form-data
|
|
648
|
+
- **Accept**: application/json, text/json, application/xml, text/xml
|
|
649
|
+
|
|
650
|
+
|
|
651
|
+
|
|
230
652
|
# **convert_data_xml_to_json**
|
|
231
653
|
> Object convert_data_xml_to_json(input_file)
|
|
232
654
|
|
|
@@ -281,3 +703,60 @@ Name | Type | Description | Notes
|
|
|
281
703
|
|
|
282
704
|
|
|
283
705
|
|
|
706
|
+
# **convert_data_xml_transform_with_xslt_to_xml**
|
|
707
|
+
> String convert_data_xml_transform_with_xslt_to_xml(input_file, transform_file)
|
|
708
|
+
|
|
709
|
+
Transform XML document file with XSLT into a new XML document
|
|
710
|
+
|
|
711
|
+
Convert an XML string or file into JSON
|
|
712
|
+
|
|
713
|
+
### Example
|
|
714
|
+
```ruby
|
|
715
|
+
# load the gem
|
|
716
|
+
require 'cloudmersive-convert-api-client'
|
|
717
|
+
# setup authorization
|
|
718
|
+
CloudmersiveConvertApiClient.configure do |config|
|
|
719
|
+
# Configure API key authorization: Apikey
|
|
720
|
+
config.api_key['Apikey'] = 'YOUR API KEY'
|
|
721
|
+
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
|
|
722
|
+
#config.api_key_prefix['Apikey'] = 'Bearer'
|
|
723
|
+
end
|
|
724
|
+
|
|
725
|
+
api_instance = CloudmersiveConvertApiClient::ConvertDataApi.new
|
|
726
|
+
|
|
727
|
+
input_file = File.new("/path/to/file.txt") # File | Input XML file to perform the operation on.
|
|
728
|
+
|
|
729
|
+
transform_file = File.new("/path/to/file.txt") # File | Input XSLT file to use to transform the input XML file.
|
|
730
|
+
|
|
731
|
+
|
|
732
|
+
begin
|
|
733
|
+
#Transform XML document file with XSLT into a new XML document
|
|
734
|
+
result = api_instance.convert_data_xml_transform_with_xslt_to_xml(input_file, transform_file)
|
|
735
|
+
p result
|
|
736
|
+
rescue CloudmersiveConvertApiClient::ApiError => e
|
|
737
|
+
puts "Exception when calling ConvertDataApi->convert_data_xml_transform_with_xslt_to_xml: #{e}"
|
|
738
|
+
end
|
|
739
|
+
```
|
|
740
|
+
|
|
741
|
+
### Parameters
|
|
742
|
+
|
|
743
|
+
Name | Type | Description | Notes
|
|
744
|
+
------------- | ------------- | ------------- | -------------
|
|
745
|
+
**input_file** | **File**| Input XML file to perform the operation on. |
|
|
746
|
+
**transform_file** | **File**| Input XSLT file to use to transform the input XML file. |
|
|
747
|
+
|
|
748
|
+
### Return type
|
|
749
|
+
|
|
750
|
+
**String**
|
|
751
|
+
|
|
752
|
+
### Authorization
|
|
753
|
+
|
|
754
|
+
[Apikey](../README.md#Apikey)
|
|
755
|
+
|
|
756
|
+
### HTTP request headers
|
|
757
|
+
|
|
758
|
+
- **Content-Type**: Not defined
|
|
759
|
+
- **Accept**: application/xml
|
|
760
|
+
|
|
761
|
+
|
|
762
|
+
|