Class: CloudmersiveConvertApiClient::ConvertDataApi

Inherits:
Object
  • Object
show all
Defined in:
lib/cloudmersive-convert-api-client/api/convert_data_api.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(api_client = ApiClient.default) ⇒ ConvertDataApi

Returns a new instance of ConvertDataApi.



19
20
21
# File 'lib/cloudmersive-convert-api-client/api/convert_data_api.rb', line 19

def initialize(api_client = ApiClient.default)
  @api_client = api_client
end

Instance Attribute Details

#api_clientObject

Returns the value of attribute api_client.



17
18
19
# File 'lib/cloudmersive-convert-api-client/api/convert_data_api.rb', line 17

def api_client
  @api_client
end

Instance Method Details

#convert_data_csv_to_json(input_file, opts = {}) ⇒ Object

Convert CSV to JSON conversion Convert a CSV file to a JSON object array

Parameters:

  • input_file

    Input file to perform the operation on.

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :column_names_from_first_row (BOOLEAN)

    Optional; If true, the first row will be used as the labels for the columns; if false, columns will be named Column0, Column1, etc. Default is true. Set to false if you are not using column headings, or have an irregular column structure.

Returns:

  • (Object)


28
29
30
31
# File 'lib/cloudmersive-convert-api-client/api/convert_data_api.rb', line 28

def convert_data_csv_to_json(input_file, opts = {})
  data, _status_code, _headers = convert_data_csv_to_json_with_http_info(input_file, opts)
  data
end

#convert_data_csv_to_json_with_http_info(input_file, opts = {}) ⇒ Array<(Object, Fixnum, Hash)>

Convert CSV to JSON conversion Convert a CSV file to a JSON object array

Parameters:

  • input_file

    Input file to perform the operation on.

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :column_names_from_first_row (BOOLEAN)

    Optional; If true, the first row will be used as the labels for the columns; if false, columns will be named Column0, Column1, etc. Default is true. Set to false if you are not using column headings, or have an irregular column structure.

Returns:

  • (Array<(Object, Fixnum, Hash)>)

    Object data, response status code and response headers



39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
# File 'lib/cloudmersive-convert-api-client/api/convert_data_api.rb', line 39

def convert_data_csv_to_json_with_http_info(input_file, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: ConvertDataApi.convert_data_csv_to_json ...'
  end
  # verify the required parameter 'input_file' is set
  if @api_client.config.client_side_validation && input_file.nil?
    fail ArgumentError, "Missing the required parameter 'input_file' when calling ConvertDataApi.convert_data_csv_to_json"
  end
  # resource path
  local_var_path = '/convert/csv/to/json'

  # query parameters
  query_params = {}

  # header parameters
  header_params = {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])
  # HTTP header 'Content-Type'
  header_params['Content-Type'] = @api_client.select_header_content_type(['multipart/form-data'])
  header_params[:'columnNamesFromFirstRow'] = opts[:'column_names_from_first_row'] if !opts[:'column_names_from_first_row'].nil?

  # form parameters
  form_params = {}
  form_params['inputFile'] = input_file

  # http body (model)
  post_body = nil
  auth_names = ['Apikey']
  data, status_code, headers = @api_client.call_api(:POST, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'Object')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: ConvertDataApi#convert_data_csv_to_json\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#convert_data_csv_to_xml(input_file, opts = {}) ⇒ String

Convert CSV to XML conversion Convert a CSV file to a XML file

Parameters:

  • input_file

    Input file to perform the operation on.

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :column_names_from_first_row (BOOLEAN)

    Optional; If true, the first row will be used as the labels for the columns; if false, columns will be named Column0, Column1, etc. Default is true. Set to false if you are not using column headings, or have an irregular column structure.

Returns:

  • (String)


86
87
88
89
# File 'lib/cloudmersive-convert-api-client/api/convert_data_api.rb', line 86

def convert_data_csv_to_xml(input_file, opts = {})
  data, _status_code, _headers = convert_data_csv_to_xml_with_http_info(input_file, opts)
  data
end

#convert_data_csv_to_xml_with_http_info(input_file, opts = {}) ⇒ Array<(String, Fixnum, Hash)>

Convert CSV to XML conversion Convert a CSV file to a XML file

Parameters:

  • input_file

    Input file to perform the operation on.

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :column_names_from_first_row (BOOLEAN)

    Optional; If true, the first row will be used as the labels for the columns; if false, columns will be named Column0, Column1, etc. Default is true. Set to false if you are not using column headings, or have an irregular column structure.

Returns:

  • (Array<(String, Fixnum, Hash)>)

    String data, response status code and response headers



97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
# File 'lib/cloudmersive-convert-api-client/api/convert_data_api.rb', line 97

def convert_data_csv_to_xml_with_http_info(input_file, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: ConvertDataApi.convert_data_csv_to_xml ...'
  end
  # verify the required parameter 'input_file' is set
  if @api_client.config.client_side_validation && input_file.nil?
    fail ArgumentError, "Missing the required parameter 'input_file' when calling ConvertDataApi.convert_data_csv_to_xml"
  end
  # resource path
  local_var_path = '/convert/csv/to/xml'

  # query parameters
  query_params = {}

  # header parameters
  header_params = {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/octet-stream'])
  # HTTP header 'Content-Type'
  header_params['Content-Type'] = @api_client.select_header_content_type(['multipart/form-data'])
  header_params[:'columnNamesFromFirstRow'] = opts[:'column_names_from_first_row'] if !opts[:'column_names_from_first_row'].nil?

  # form parameters
  form_params = {}
  form_params['inputFile'] = input_file

  # http body (model)
  post_body = nil
  auth_names = ['Apikey']
  data, status_code, headers = @api_client.call_api(:POST, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'String')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: ConvertDataApi#convert_data_csv_to_xml\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#convert_data_json_string_to_xml(json_string, opts = {}) ⇒ Object

Convert JSON String to XML conversion Convert a JSON object into XML

Parameters:

  • json_string

    Input JSON String to convert to XML

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (Object)


143
144
145
146
# File 'lib/cloudmersive-convert-api-client/api/convert_data_api.rb', line 143

def convert_data_json_string_to_xml(json_string, opts = {})
  data, _status_code, _headers = convert_data_json_string_to_xml_with_http_info(json_string, opts)
  data
end

#convert_data_json_string_to_xml_with_http_info(json_string, opts = {}) ⇒ Array<(Object, Fixnum, Hash)>

Convert JSON String to XML conversion Convert a JSON object into XML

Parameters:

  • json_string

    Input JSON String to convert to XML

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (Array<(Object, Fixnum, Hash)>)

    Object data, response status code and response headers



153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
# File 'lib/cloudmersive-convert-api-client/api/convert_data_api.rb', line 153

def convert_data_json_string_to_xml_with_http_info(json_string, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: ConvertDataApi.convert_data_json_string_to_xml ...'
  end
  # verify the required parameter 'json_string' is set
  if @api_client.config.client_side_validation && json_string.nil?
    fail ArgumentError, "Missing the required parameter 'json_string' when calling ConvertDataApi.convert_data_json_string_to_xml"
  end
  # resource path
  local_var_path = '/convert/json-string/to/xml'

  # query parameters
  query_params = {}
  query_params[:'JsonString'] = json_string

  # header parameters
  header_params = {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/xml'])

  # form parameters
  form_params = {}

  # http body (model)
  post_body = nil
  auth_names = ['Apikey']
  data, status_code, headers = @api_client.call_api(:POST, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'Object')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: ConvertDataApi#convert_data_json_string_to_xml\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#convert_data_json_to_xml(json_object, opts = {}) ⇒ String

Convert JSON Object to XML conversion Convert a JSON object into XML

Parameters:

  • json_object

    Input JSON Object to convert to XML

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (String)


196
197
198
199
# File 'lib/cloudmersive-convert-api-client/api/convert_data_api.rb', line 196

def convert_data_json_to_xml(json_object, opts = {})
  data, _status_code, _headers = convert_data_json_to_xml_with_http_info(json_object, opts)
  data
end

#convert_data_json_to_xml_with_http_info(json_object, opts = {}) ⇒ Array<(String, Fixnum, Hash)>

Convert JSON Object to XML conversion Convert a JSON object into XML

Parameters:

  • json_object

    Input JSON Object to convert to XML

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (Array<(String, Fixnum, Hash)>)

    String data, response status code and response headers



206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
# File 'lib/cloudmersive-convert-api-client/api/convert_data_api.rb', line 206

def convert_data_json_to_xml_with_http_info(json_object, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: ConvertDataApi.convert_data_json_to_xml ...'
  end
  # verify the required parameter 'json_object' is set
  if @api_client.config.client_side_validation && json_object.nil?
    fail ArgumentError, "Missing the required parameter 'json_object' when calling ConvertDataApi.convert_data_json_to_xml"
  end
  # resource path
  local_var_path = '/convert/json/to/xml'

  # query parameters
  query_params = {}

  # header parameters
  header_params = {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/xml'])
  # HTTP header 'Content-Type'
  header_params['Content-Type'] = @api_client.select_header_content_type(['application/json', 'text/json', 'application/xml', 'text/xml', 'application/x-www-form-urlencoded'])

  # form parameters
  form_params = {}

  # http body (model)
  post_body = @api_client.object_to_http_body(json_object)
  auth_names = ['Apikey']
  data, status_code, headers = @api_client.call_api(:POST, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'String')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: ConvertDataApi#convert_data_json_to_xml\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#convert_data_xls_to_json(input_file, opts = {}) ⇒ Object

Convert Excel (97-2003) XLS to JSON conversion Convert an Excel (97-2003) XLS file to a JSON object array

Parameters:

  • input_file

    Input file to perform the operation on.

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (Object)


250
251
252
253
# File 'lib/cloudmersive-convert-api-client/api/convert_data_api.rb', line 250

def convert_data_xls_to_json(input_file, opts = {})
  data, _status_code, _headers = convert_data_xls_to_json_with_http_info(input_file, opts)
  data
end

#convert_data_xls_to_json_with_http_info(input_file, opts = {}) ⇒ Array<(Object, Fixnum, Hash)>

Convert Excel (97-2003) XLS to JSON conversion Convert an Excel (97-2003) XLS file to a JSON object array

Parameters:

  • input_file

    Input file to perform the operation on.

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (Array<(Object, Fixnum, Hash)>)

    Object data, response status code and response headers



260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
# File 'lib/cloudmersive-convert-api-client/api/convert_data_api.rb', line 260

def convert_data_xls_to_json_with_http_info(input_file, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: ConvertDataApi.convert_data_xls_to_json ...'
  end
  # verify the required parameter 'input_file' is set
  if @api_client.config.client_side_validation && input_file.nil?
    fail ArgumentError, "Missing the required parameter 'input_file' when calling ConvertDataApi.convert_data_xls_to_json"
  end
  # resource path
  local_var_path = '/convert/xls/to/json'

  # query parameters
  query_params = {}

  # header parameters
  header_params = {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])
  # HTTP header 'Content-Type'
  header_params['Content-Type'] = @api_client.select_header_content_type(['multipart/form-data'])

  # form parameters
  form_params = {}
  form_params['inputFile'] = input_file

  # http body (model)
  post_body = nil
  auth_names = ['Apikey']
  data, status_code, headers = @api_client.call_api(:POST, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'Object')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: ConvertDataApi#convert_data_xls_to_json\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#convert_data_xlsx_to_json(input_file, opts = {}) ⇒ String

Convert Excel XLSX to JSON conversion Convert an Excel XLSX file to a JSON object array

Parameters:

  • input_file

    Input file to perform the operation on.

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (String)


305
306
307
308
# File 'lib/cloudmersive-convert-api-client/api/convert_data_api.rb', line 305

def convert_data_xlsx_to_json(input_file, opts = {})
  data, _status_code, _headers = convert_data_xlsx_to_json_with_http_info(input_file, opts)
  data
end

#convert_data_xlsx_to_json_with_http_info(input_file, opts = {}) ⇒ Array<(String, Fixnum, Hash)>

Convert Excel XLSX to JSON conversion Convert an Excel XLSX file to a JSON object array

Parameters:

  • input_file

    Input file to perform the operation on.

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (Array<(String, Fixnum, Hash)>)

    String data, response status code and response headers



315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
# File 'lib/cloudmersive-convert-api-client/api/convert_data_api.rb', line 315

def convert_data_xlsx_to_json_with_http_info(input_file, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: ConvertDataApi.convert_data_xlsx_to_json ...'
  end
  # verify the required parameter 'input_file' is set
  if @api_client.config.client_side_validation && input_file.nil?
    fail ArgumentError, "Missing the required parameter 'input_file' when calling ConvertDataApi.convert_data_xlsx_to_json"
  end
  # resource path
  local_var_path = '/convert/xlsx/to/json'

  # query parameters
  query_params = {}

  # header parameters
  header_params = {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/octet-stream'])
  # HTTP header 'Content-Type'
  header_params['Content-Type'] = @api_client.select_header_content_type(['multipart/form-data'])

  # form parameters
  form_params = {}
  form_params['inputFile'] = input_file

  # http body (model)
  post_body = nil
  auth_names = ['Apikey']
  data, status_code, headers = @api_client.call_api(:POST, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'String')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: ConvertDataApi#convert_data_xlsx_to_json\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#convert_data_xlsx_to_xml(input_file, opts = {}) ⇒ String

Convert Excel XLSX to XML conversion Convert an Excel XLSX file to a XML file

Parameters:

  • input_file

    Input file to perform the operation on.

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (String)


360
361
362
363
# File 'lib/cloudmersive-convert-api-client/api/convert_data_api.rb', line 360

def convert_data_xlsx_to_xml(input_file, opts = {})
  data, _status_code, _headers = convert_data_xlsx_to_xml_with_http_info(input_file, opts)
  data
end

#convert_data_xlsx_to_xml_with_http_info(input_file, opts = {}) ⇒ Array<(String, Fixnum, Hash)>

Convert Excel XLSX to XML conversion Convert an Excel XLSX file to a XML file

Parameters:

  • input_file

    Input file to perform the operation on.

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (Array<(String, Fixnum, Hash)>)

    String data, response status code and response headers



370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
# File 'lib/cloudmersive-convert-api-client/api/convert_data_api.rb', line 370

def convert_data_xlsx_to_xml_with_http_info(input_file, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: ConvertDataApi.convert_data_xlsx_to_xml ...'
  end
  # verify the required parameter 'input_file' is set
  if @api_client.config.client_side_validation && input_file.nil?
    fail ArgumentError, "Missing the required parameter 'input_file' when calling ConvertDataApi.convert_data_xlsx_to_xml"
  end
  # resource path
  local_var_path = '/convert/xlsx/to/xml'

  # query parameters
  query_params = {}

  # header parameters
  header_params = {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/octet-stream'])
  # HTTP header 'Content-Type'
  header_params['Content-Type'] = @api_client.select_header_content_type(['multipart/form-data'])

  # form parameters
  form_params = {}
  form_params['inputFile'] = input_file

  # http body (model)
  post_body = nil
  auth_names = ['Apikey']
  data, status_code, headers = @api_client.call_api(:POST, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'String')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: ConvertDataApi#convert_data_xlsx_to_xml\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#convert_data_xml_edit_add_attribute_with_x_path(input_file, x_path_expression, xml_attribute_name, xml_attribute_value, opts = {}) ⇒ XmlAddAttributeWithXPathResult

Adds an attribute to all XML nodes matching XPath expression Return the reuslts of editing an XML document by adding an attribute to all of the nodes that match an input XPath expression.

Parameters:

  • input_file

    Input XML file to perform the operation on.

  • x_path_expression

    Valid XML XPath query expression

  • xml_attribute_name

    Name of the XML attribute to add

  • xml_attribute_value

    Value of the XML attribute to add

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:



418
419
420
421
# File 'lib/cloudmersive-convert-api-client/api/convert_data_api.rb', line 418

def convert_data_xml_edit_add_attribute_with_x_path(input_file, x_path_expression, xml_attribute_name, xml_attribute_value, opts = {})
  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)
  data
end

#convert_data_xml_edit_add_attribute_with_x_path_with_http_info(input_file, x_path_expression, xml_attribute_name, xml_attribute_value, opts = {}) ⇒ Array<(XmlAddAttributeWithXPathResult, Fixnum, Hash)>

Adds an attribute to all XML nodes matching XPath expression Return the reuslts of editing an XML document by adding an attribute to all of the nodes that match an input XPath expression.

Parameters:

  • input_file

    Input XML file to perform the operation on.

  • x_path_expression

    Valid XML XPath query expression

  • xml_attribute_name

    Name of the XML attribute to add

  • xml_attribute_value

    Value of the XML attribute to add

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:



431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
# File 'lib/cloudmersive-convert-api-client/api/convert_data_api.rb', line 431

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 = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: ConvertDataApi.convert_data_xml_edit_add_attribute_with_x_path ...'
  end
  # verify the required parameter 'input_file' is set
  if @api_client.config.client_side_validation && input_file.nil?
    fail ArgumentError, "Missing the required parameter 'input_file' when calling ConvertDataApi.convert_data_xml_edit_add_attribute_with_x_path"
  end
  # verify the required parameter 'x_path_expression' is set
  if @api_client.config.client_side_validation && x_path_expression.nil?
    fail ArgumentError, "Missing the required parameter 'x_path_expression' when calling ConvertDataApi.convert_data_xml_edit_add_attribute_with_x_path"
  end
  # verify the required parameter 'xml_attribute_name' is set
  if @api_client.config.client_side_validation && xml_attribute_name.nil?
    fail ArgumentError, "Missing the required parameter 'xml_attribute_name' when calling ConvertDataApi.convert_data_xml_edit_add_attribute_with_x_path"
  end
  # verify the required parameter 'xml_attribute_value' is set
  if @api_client.config.client_side_validation && xml_attribute_value.nil?
    fail ArgumentError, "Missing the required parameter 'xml_attribute_value' when calling ConvertDataApi.convert_data_xml_edit_add_attribute_with_x_path"
  end
  # resource path
  local_var_path = '/convert/xml/edit/xpath/add-attribute'

  # query parameters
  query_params = {}

  # header parameters
  header_params = {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json', 'text/json', 'application/xml', 'text/xml'])
  header_params[:'XPathExpression'] = x_path_expression
  header_params[:'XmlAttributeName'] = xml_attribute_name
  header_params[:'XmlAttributeValue'] = xml_attribute_value

  # form parameters
  form_params = {}
  form_params['inputFile'] = input_file

  # http body (model)
  post_body = nil
  auth_names = ['Apikey']
  data, status_code, headers = @api_client.call_api(:POST, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'XmlAddAttributeWithXPathResult')
  if @api_client.config.debugging
    @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}"
  end
  return data, status_code, headers
end

#convert_data_xml_edit_add_child_with_x_path(input_file, x_path_expression, xml_node_to_add, opts = {}) ⇒ XmlAddChildWithXPathResult

Adds an XML node as a child to XML nodes matching XPath expression 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.

Parameters:

  • input_file

    Input XML file to perform the operation on.

  • x_path_expression

    Valid XML XPath query expression

  • xml_node_to_add

    XML Node to add as a child

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:



491
492
493
494
# File 'lib/cloudmersive-convert-api-client/api/convert_data_api.rb', line 491

def convert_data_xml_edit_add_child_with_x_path(input_file, x_path_expression, xml_node_to_add, opts = {})
  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)
  data
end

#convert_data_xml_edit_add_child_with_x_path_with_http_info(input_file, x_path_expression, xml_node_to_add, opts = {}) ⇒ Array<(XmlAddChildWithXPathResult, Fixnum, Hash)>

Adds an XML node as a child to XML nodes matching XPath expression 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.

Parameters:

  • input_file

    Input XML file to perform the operation on.

  • x_path_expression

    Valid XML XPath query expression

  • xml_node_to_add

    XML Node to add as a child

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (Array<(XmlAddChildWithXPathResult, Fixnum, Hash)>)

    XmlAddChildWithXPathResult data, response status code and response headers



503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
# File 'lib/cloudmersive-convert-api-client/api/convert_data_api.rb', line 503

def convert_data_xml_edit_add_child_with_x_path_with_http_info(input_file, x_path_expression, xml_node_to_add, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: ConvertDataApi.convert_data_xml_edit_add_child_with_x_path ...'
  end
  # verify the required parameter 'input_file' is set
  if @api_client.config.client_side_validation && input_file.nil?
    fail ArgumentError, "Missing the required parameter 'input_file' when calling ConvertDataApi.convert_data_xml_edit_add_child_with_x_path"
  end
  # verify the required parameter 'x_path_expression' is set
  if @api_client.config.client_side_validation && x_path_expression.nil?
    fail ArgumentError, "Missing the required parameter 'x_path_expression' when calling ConvertDataApi.convert_data_xml_edit_add_child_with_x_path"
  end
  # verify the required parameter 'xml_node_to_add' is set
  if @api_client.config.client_side_validation && xml_node_to_add.nil?
    fail ArgumentError, "Missing the required parameter 'xml_node_to_add' when calling ConvertDataApi.convert_data_xml_edit_add_child_with_x_path"
  end
  # resource path
  local_var_path = '/convert/xml/edit/xpath/add-child'

  # query parameters
  query_params = {}

  # header parameters
  header_params = {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json', 'text/json', 'application/xml', 'text/xml'])
  header_params[:'XPathExpression'] = x_path_expression
  header_params[:'XmlNodeToAdd'] = xml_node_to_add

  # form parameters
  form_params = {}
  form_params['inputFile'] = input_file

  # http body (model)
  post_body = nil
  auth_names = ['Apikey']
  data, status_code, headers = @api_client.call_api(:POST, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'XmlAddChildWithXPathResult')
  if @api_client.config.debugging
    @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}"
  end
  return data, status_code, headers
end

#convert_data_xml_edit_remove_all_child_nodes_with_x_path(input_file, x_path_expression, opts = {}) ⇒ XmlRemoveAllChildrenWithXPathResult

Removes, deletes all children of nodes matching XPath expression, but does not remove the nodes Return the reuslts of editing an XML document by removing all child nodes of the nodes that match an input XPath expression.

Parameters:

  • input_file

    Input XML file to perform the operation on.

  • x_path_expression

    Valid XML XPath query expression

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:



557
558
559
560
# File 'lib/cloudmersive-convert-api-client/api/convert_data_api.rb', line 557

def convert_data_xml_edit_remove_all_child_nodes_with_x_path(input_file, x_path_expression, opts = {})
  data, _status_code, _headers = convert_data_xml_edit_remove_all_child_nodes_with_x_path_with_http_info(input_file, x_path_expression, opts)
  data
end

#convert_data_xml_edit_remove_all_child_nodes_with_x_path_with_http_info(input_file, x_path_expression, opts = {}) ⇒ Array<(XmlRemoveAllChildrenWithXPathResult, Fixnum, Hash)>

Removes, deletes all children of nodes matching XPath expression, but does not remove the nodes Return the reuslts of editing an XML document by removing all child nodes of the nodes that match an input XPath expression.

Parameters:

  • input_file

    Input XML file to perform the operation on.

  • x_path_expression

    Valid XML XPath query expression

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:



568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
# File 'lib/cloudmersive-convert-api-client/api/convert_data_api.rb', line 568

def convert_data_xml_edit_remove_all_child_nodes_with_x_path_with_http_info(input_file, x_path_expression, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: ConvertDataApi.convert_data_xml_edit_remove_all_child_nodes_with_x_path ...'
  end
  # verify the required parameter 'input_file' is set
  if @api_client.config.client_side_validation && input_file.nil?
    fail ArgumentError, "Missing the required parameter 'input_file' when calling ConvertDataApi.convert_data_xml_edit_remove_all_child_nodes_with_x_path"
  end
  # verify the required parameter 'x_path_expression' is set
  if @api_client.config.client_side_validation && x_path_expression.nil?
    fail ArgumentError, "Missing the required parameter 'x_path_expression' when calling ConvertDataApi.convert_data_xml_edit_remove_all_child_nodes_with_x_path"
  end
  # resource path
  local_var_path = '/convert/xml/edit/xpath/remove-all-children'

  # query parameters
  query_params = {}

  # header parameters
  header_params = {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json', 'text/json', 'application/xml', 'text/xml'])
  header_params[:'XPathExpression'] = x_path_expression

  # form parameters
  form_params = {}
  form_params['inputFile'] = input_file

  # http body (model)
  post_body = nil
  auth_names = ['Apikey']
  data, status_code, headers = @api_client.call_api(:POST, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'XmlRemoveAllChildrenWithXPathResult')
  if @api_client.config.debugging
    @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}"
  end
  return data, status_code, headers
end

#convert_data_xml_edit_replace_with_x_path(input_file, x_path_expression, xml_node_replacement, opts = {}) ⇒ XmlReplaceWithXPathResult

Replaces XML nodes matching XPath expression with new node 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.

Parameters:

  • input_file

    Input XML file to perform the operation on.

  • x_path_expression

    Valid XML XPath query expression

  • xml_node_replacement

    XML Node replacement content

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:



618
619
620
621
# File 'lib/cloudmersive-convert-api-client/api/convert_data_api.rb', line 618

def convert_data_xml_edit_replace_with_x_path(input_file, x_path_expression, xml_node_replacement, opts = {})
  data, _status_code, _headers = convert_data_xml_edit_replace_with_x_path_with_http_info(input_file, x_path_expression, xml_node_replacement, opts)
  data
end

#convert_data_xml_edit_replace_with_x_path_with_http_info(input_file, x_path_expression, xml_node_replacement, opts = {}) ⇒ Array<(XmlReplaceWithXPathResult, Fixnum, Hash)>

Replaces XML nodes matching XPath expression with new node 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.

Parameters:

  • input_file

    Input XML file to perform the operation on.

  • x_path_expression

    Valid XML XPath query expression

  • xml_node_replacement

    XML Node replacement content

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (Array<(XmlReplaceWithXPathResult, Fixnum, Hash)>)

    XmlReplaceWithXPathResult data, response status code and response headers



630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
# File 'lib/cloudmersive-convert-api-client/api/convert_data_api.rb', line 630

def convert_data_xml_edit_replace_with_x_path_with_http_info(input_file, x_path_expression, xml_node_replacement, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: ConvertDataApi.convert_data_xml_edit_replace_with_x_path ...'
  end
  # verify the required parameter 'input_file' is set
  if @api_client.config.client_side_validation && input_file.nil?
    fail ArgumentError, "Missing the required parameter 'input_file' when calling ConvertDataApi.convert_data_xml_edit_replace_with_x_path"
  end
  # verify the required parameter 'x_path_expression' is set
  if @api_client.config.client_side_validation && x_path_expression.nil?
    fail ArgumentError, "Missing the required parameter 'x_path_expression' when calling ConvertDataApi.convert_data_xml_edit_replace_with_x_path"
  end
  # verify the required parameter 'xml_node_replacement' is set
  if @api_client.config.client_side_validation && xml_node_replacement.nil?
    fail ArgumentError, "Missing the required parameter 'xml_node_replacement' when calling ConvertDataApi.convert_data_xml_edit_replace_with_x_path"
  end
  # resource path
  local_var_path = '/convert/xml/edit/xpath/replace'

  # query parameters
  query_params = {}

  # header parameters
  header_params = {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json', 'text/json', 'application/xml', 'text/xml'])
  header_params[:'XPathExpression'] = x_path_expression
  header_params[:'XmlNodeReplacement'] = xml_node_replacement

  # form parameters
  form_params = {}
  form_params['inputFile'] = input_file

  # http body (model)
  post_body = nil
  auth_names = ['Apikey']
  data, status_code, headers = @api_client.call_api(:POST, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'XmlReplaceWithXPathResult')
  if @api_client.config.debugging
    @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}"
  end
  return data, status_code, headers
end

#convert_data_xml_edit_set_value_with_x_path(input_file, x_path_expression, xml_value, opts = {}) ⇒ XmlSetValueWithXPathResult

Sets the value contents of XML nodes matching XPath expression 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.

Parameters:

  • input_file

    Input XML file to perform the operation on.

  • x_path_expression

    Valid XML XPath query expression

  • xml_value

    XML Value to set into the matching XML nodes

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:



685
686
687
688
# File 'lib/cloudmersive-convert-api-client/api/convert_data_api.rb', line 685

def convert_data_xml_edit_set_value_with_x_path(input_file, x_path_expression, xml_value, opts = {})
  data, _status_code, _headers = convert_data_xml_edit_set_value_with_x_path_with_http_info(input_file, x_path_expression, xml_value, opts)
  data
end

#convert_data_xml_edit_set_value_with_x_path_with_http_info(input_file, x_path_expression, xml_value, opts = {}) ⇒ Array<(XmlSetValueWithXPathResult, Fixnum, Hash)>

Sets the value contents of XML nodes matching XPath expression 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.

Parameters:

  • input_file

    Input XML file to perform the operation on.

  • x_path_expression

    Valid XML XPath query expression

  • xml_value

    XML Value to set into the matching XML nodes

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (Array<(XmlSetValueWithXPathResult, Fixnum, Hash)>)

    XmlSetValueWithXPathResult data, response status code and response headers



697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
# File 'lib/cloudmersive-convert-api-client/api/convert_data_api.rb', line 697

def convert_data_xml_edit_set_value_with_x_path_with_http_info(input_file, x_path_expression, xml_value, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: ConvertDataApi.convert_data_xml_edit_set_value_with_x_path ...'
  end
  # verify the required parameter 'input_file' is set
  if @api_client.config.client_side_validation && input_file.nil?
    fail ArgumentError, "Missing the required parameter 'input_file' when calling ConvertDataApi.convert_data_xml_edit_set_value_with_x_path"
  end
  # verify the required parameter 'x_path_expression' is set
  if @api_client.config.client_side_validation && x_path_expression.nil?
    fail ArgumentError, "Missing the required parameter 'x_path_expression' when calling ConvertDataApi.convert_data_xml_edit_set_value_with_x_path"
  end
  # verify the required parameter 'xml_value' is set
  if @api_client.config.client_side_validation && xml_value.nil?
    fail ArgumentError, "Missing the required parameter 'xml_value' when calling ConvertDataApi.convert_data_xml_edit_set_value_with_x_path"
  end
  # resource path
  local_var_path = '/convert/xml/edit/xpath/set-value'

  # query parameters
  query_params = {}

  # header parameters
  header_params = {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json', 'text/json', 'application/xml', 'text/xml'])
  header_params[:'XPathExpression'] = x_path_expression
  header_params[:'XmlValue'] = xml_value

  # form parameters
  form_params = {}
  form_params['inputFile'] = input_file

  # http body (model)
  post_body = nil
  auth_names = ['Apikey']
  data, status_code, headers = @api_client.call_api(:POST, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'XmlSetValueWithXPathResult')
  if @api_client.config.debugging
    @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}"
  end
  return data, status_code, headers
end

#convert_data_xml_filter_with_x_path(x_path_expression, input_file, opts = {}) ⇒ XmlFilterWithXPathResult

Filter, select XML nodes using XPath expression, get results Return the reuslts of filtering, selecting an XML document with an XPath expression

Parameters:

  • x_path_expression

    Valid XML XPath query expression

  • input_file

    Input file to perform the operation on.

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:



751
752
753
754
# File 'lib/cloudmersive-convert-api-client/api/convert_data_api.rb', line 751

def convert_data_xml_filter_with_x_path(x_path_expression, input_file, opts = {})
  data, _status_code, _headers = convert_data_xml_filter_with_x_path_with_http_info(x_path_expression, input_file, opts)
  data
end

#convert_data_xml_filter_with_x_path_with_http_info(x_path_expression, input_file, opts = {}) ⇒ Array<(XmlFilterWithXPathResult, Fixnum, Hash)>

Filter, select XML nodes using XPath expression, get results Return the reuslts of filtering, selecting an XML document with an XPath expression

Parameters:

  • x_path_expression

    Valid XML XPath query expression

  • input_file

    Input file to perform the operation on.

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (Array<(XmlFilterWithXPathResult, Fixnum, Hash)>)

    XmlFilterWithXPathResult data, response status code and response headers



762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
# File 'lib/cloudmersive-convert-api-client/api/convert_data_api.rb', line 762

def convert_data_xml_filter_with_x_path_with_http_info(x_path_expression, input_file, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: ConvertDataApi.convert_data_xml_filter_with_x_path ...'
  end
  # verify the required parameter 'x_path_expression' is set
  if @api_client.config.client_side_validation && x_path_expression.nil?
    fail ArgumentError, "Missing the required parameter 'x_path_expression' when calling ConvertDataApi.convert_data_xml_filter_with_x_path"
  end
  # verify the required parameter 'input_file' is set
  if @api_client.config.client_side_validation && input_file.nil?
    fail ArgumentError, "Missing the required parameter 'input_file' when calling ConvertDataApi.convert_data_xml_filter_with_x_path"
  end
  # resource path
  local_var_path = '/convert/xml/select/xpath'

  # query parameters
  query_params = {}

  # header parameters
  header_params = {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json', 'text/json', 'application/xml', 'text/xml'])
  # HTTP header 'Content-Type'
  header_params['Content-Type'] = @api_client.select_header_content_type(['multipart/form-data'])
  header_params[:'XPathExpression'] = x_path_expression

  # form parameters
  form_params = {}
  form_params['inputFile'] = input_file

  # http body (model)
  post_body = nil
  auth_names = ['Apikey']
  data, status_code, headers = @api_client.call_api(:POST, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'XmlFilterWithXPathResult')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: ConvertDataApi#convert_data_xml_filter_with_x_path\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#convert_data_xml_query_with_x_query(input_file, x_query, opts = {}) ⇒ XmlQueryWithXQueryResult

Query an XML file using XQuery query, get results Return the reuslts of querying a single XML document with an XQuery expression. Supports XQuery 3.1 and earlier. This API is optimized for a single XML document as input. Provided XML document is automatically loaded as the default context; to access elements in the document, simply refer to them without a document reference, such as bookstore/book

Parameters:

  • input_file

    Input XML file to perform the operation on.

  • x_query

    Valid XML XQuery 3.1 or earlier query expression; multi-line expressions are supported

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:



813
814
815
816
# File 'lib/cloudmersive-convert-api-client/api/convert_data_api.rb', line 813

def convert_data_xml_query_with_x_query(input_file, x_query, opts = {})
  data, _status_code, _headers = convert_data_xml_query_with_x_query_with_http_info(input_file, x_query, opts)
  data
end

#convert_data_xml_query_with_x_query_multi(input_file1, x_query, opts = {}) ⇒ XmlQueryWithXQueryMultiResult

Query multiple XML files using XQuery query, get results Return the reuslts of querying an XML document with an XQuery expression. Supports XQuery 3.1 and earlier. This API is optimized for multiple XML documents as input. You can refer to the contents of a given document by name, for example doc("books.xml") or doc("restaurants.xml") if you included two input files named books.xml and restaurants.xml. If input files contain no file name, they will default to file names input1.xml, input2.xml and so on.

Parameters:

  • input_file1

    First input XML file to perform the operation on.

  • x_query

    Valid XML XQuery 3.1 or earlier query expression; multi-line expressions are supported

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :input_file2 (File)

    Second input XML file to perform the operation on.

  • :input_file3 (File)

    Third input XML file to perform the operation on.

  • :input_file4 (File)

    Fourth input XML file to perform the operation on.

  • :input_file5 (File)

    Fifth input XML file to perform the operation on.

  • :input_file6 (File)

    Sixth input XML file to perform the operation on.

  • :input_file7 (File)

    Seventh input XML file to perform the operation on.

  • :input_file8 (File)

    Eighth input XML file to perform the operation on.

  • :input_file9 (File)

    Ninth input XML file to perform the operation on.

  • :input_file10 (File)

    Tenth input XML file to perform the operation on.

Returns:



882
883
884
885
# File 'lib/cloudmersive-convert-api-client/api/convert_data_api.rb', line 882

def convert_data_xml_query_with_x_query_multi(input_file1, x_query, opts = {})
  data, _status_code, _headers = convert_data_xml_query_with_x_query_multi_with_http_info(input_file1, x_query, opts)
  data
end

#convert_data_xml_query_with_x_query_multi_with_http_info(input_file1, x_query, opts = {}) ⇒ Array<(XmlQueryWithXQueryMultiResult, Fixnum, Hash)>

Query multiple XML files using XQuery query, get results Return the reuslts of querying an XML document with an XQuery expression. Supports XQuery 3.1 and earlier. This API is optimized for multiple XML documents as input. You can refer to the contents of a given document by name, for example doc(&quot;books.xml&quot;) or doc(&quot;restaurants.xml&quot;) if you included two input files named books.xml and restaurants.xml. If input files contain no file name, they will default to file names input1.xml, input2.xml and so on.

Parameters:

  • input_file1

    First input XML file to perform the operation on.

  • x_query

    Valid XML XQuery 3.1 or earlier query expression; multi-line expressions are supported

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :input_file2 (File)

    Second input XML file to perform the operation on.

  • :input_file3 (File)

    Third input XML file to perform the operation on.

  • :input_file4 (File)

    Fourth input XML file to perform the operation on.

  • :input_file5 (File)

    Fifth input XML file to perform the operation on.

  • :input_file6 (File)

    Sixth input XML file to perform the operation on.

  • :input_file7 (File)

    Seventh input XML file to perform the operation on.

  • :input_file8 (File)

    Eighth input XML file to perform the operation on.

  • :input_file9 (File)

    Ninth input XML file to perform the operation on.

  • :input_file10 (File)

    Tenth input XML file to perform the operation on.

Returns:



902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
# File 'lib/cloudmersive-convert-api-client/api/convert_data_api.rb', line 902

def convert_data_xml_query_with_x_query_multi_with_http_info(input_file1, x_query, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: ConvertDataApi.convert_data_xml_query_with_x_query_multi ...'
  end
  # verify the required parameter 'input_file1' is set
  if @api_client.config.client_side_validation && input_file1.nil?
    fail ArgumentError, "Missing the required parameter 'input_file1' when calling ConvertDataApi.convert_data_xml_query_with_x_query_multi"
  end
  # verify the required parameter 'x_query' is set
  if @api_client.config.client_side_validation && x_query.nil?
    fail ArgumentError, "Missing the required parameter 'x_query' when calling ConvertDataApi.convert_data_xml_query_with_x_query_multi"
  end
  # resource path
  local_var_path = '/convert/xml/query/xquery/multi'

  # query parameters
  query_params = {}

  # header parameters
  header_params = {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json', 'text/json', 'application/xml', 'text/xml'])
  header_params[:'XQuery'] = x_query

  # form parameters
  form_params = {}
  form_params['inputFile1'] = input_file1
  form_params['inputFile2'] = opts[:'input_file2'] if !opts[:'input_file2'].nil?
  form_params['inputFile3'] = opts[:'input_file3'] if !opts[:'input_file3'].nil?
  form_params['inputFile4'] = opts[:'input_file4'] if !opts[:'input_file4'].nil?
  form_params['inputFile5'] = opts[:'input_file5'] if !opts[:'input_file5'].nil?
  form_params['inputFile6'] = opts[:'input_file6'] if !opts[:'input_file6'].nil?
  form_params['inputFile7'] = opts[:'input_file7'] if !opts[:'input_file7'].nil?
  form_params['inputFile8'] = opts[:'input_file8'] if !opts[:'input_file8'].nil?
  form_params['inputFile9'] = opts[:'input_file9'] if !opts[:'input_file9'].nil?
  form_params['inputFile10'] = opts[:'input_file10'] if !opts[:'input_file10'].nil?

  # http body (model)
  post_body = nil
  auth_names = ['Apikey']
  data, status_code, headers = @api_client.call_api(:POST, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'XmlQueryWithXQueryMultiResult')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: ConvertDataApi#convert_data_xml_query_with_x_query_multi\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#convert_data_xml_query_with_x_query_with_http_info(input_file, x_query, opts = {}) ⇒ Array<(XmlQueryWithXQueryResult, Fixnum, Hash)>

Query an XML file using XQuery query, get results Return the reuslts of querying a single XML document with an XQuery expression. Supports XQuery 3.1 and earlier. This API is optimized for a single XML document as input. Provided XML document is automatically loaded as the default context; to access elements in the document, simply refer to them without a document reference, such as bookstore/book

Parameters:

  • input_file

    Input XML file to perform the operation on.

  • x_query

    Valid XML XQuery 3.1 or earlier query expression; multi-line expressions are supported

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (Array<(XmlQueryWithXQueryResult, Fixnum, Hash)>)

    XmlQueryWithXQueryResult data, response status code and response headers



824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
# File 'lib/cloudmersive-convert-api-client/api/convert_data_api.rb', line 824

def convert_data_xml_query_with_x_query_with_http_info(input_file, x_query, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: ConvertDataApi.convert_data_xml_query_with_x_query ...'
  end
  # verify the required parameter 'input_file' is set
  if @api_client.config.client_side_validation && input_file.nil?
    fail ArgumentError, "Missing the required parameter 'input_file' when calling ConvertDataApi.convert_data_xml_query_with_x_query"
  end
  # verify the required parameter 'x_query' is set
  if @api_client.config.client_side_validation && x_query.nil?
    fail ArgumentError, "Missing the required parameter 'x_query' when calling ConvertDataApi.convert_data_xml_query_with_x_query"
  end
  # resource path
  local_var_path = '/convert/xml/query/xquery'

  # query parameters
  query_params = {}

  # header parameters
  header_params = {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json', 'text/json', 'application/xml', 'text/xml'])
  header_params[:'XQuery'] = x_query

  # form parameters
  form_params = {}
  form_params['inputFile'] = input_file

  # http body (model)
  post_body = nil
  auth_names = ['Apikey']
  data, status_code, headers = @api_client.call_api(:POST, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'XmlQueryWithXQueryResult')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: ConvertDataApi#convert_data_xml_query_with_x_query\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#convert_data_xml_remove_with_x_path(x_path_expression, input_file, opts = {}) ⇒ XmlRemoveWithXPathResult

Remove, delete XML nodes and items matching XPath expression Return the reuslts of editing an XML document by removing all of the nodes that match an input XPath expression

Parameters:

  • x_path_expression

    Valid XML XPath query expression

  • input_file

    Input file to perform the operation on.

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:



960
961
962
963
# File 'lib/cloudmersive-convert-api-client/api/convert_data_api.rb', line 960

def convert_data_xml_remove_with_x_path(x_path_expression, input_file, opts = {})
  data, _status_code, _headers = convert_data_xml_remove_with_x_path_with_http_info(x_path_expression, input_file, opts)
  data
end

#convert_data_xml_remove_with_x_path_with_http_info(x_path_expression, input_file, opts = {}) ⇒ Array<(XmlRemoveWithXPathResult, Fixnum, Hash)>

Remove, delete XML nodes and items matching XPath expression Return the reuslts of editing an XML document by removing all of the nodes that match an input XPath expression

Parameters:

  • x_path_expression

    Valid XML XPath query expression

  • input_file

    Input file to perform the operation on.

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (Array<(XmlRemoveWithXPathResult, Fixnum, Hash)>)

    XmlRemoveWithXPathResult data, response status code and response headers



971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
# File 'lib/cloudmersive-convert-api-client/api/convert_data_api.rb', line 971

def convert_data_xml_remove_with_x_path_with_http_info(x_path_expression, input_file, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: ConvertDataApi.convert_data_xml_remove_with_x_path ...'
  end
  # verify the required parameter 'x_path_expression' is set
  if @api_client.config.client_side_validation && x_path_expression.nil?
    fail ArgumentError, "Missing the required parameter 'x_path_expression' when calling ConvertDataApi.convert_data_xml_remove_with_x_path"
  end
  # verify the required parameter 'input_file' is set
  if @api_client.config.client_side_validation && input_file.nil?
    fail ArgumentError, "Missing the required parameter 'input_file' when calling ConvertDataApi.convert_data_xml_remove_with_x_path"
  end
  # resource path
  local_var_path = '/convert/xml/edit/xpath/remove'

  # query parameters
  query_params = {}

  # header parameters
  header_params = {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json', 'text/json', 'application/xml', 'text/xml'])
  # HTTP header 'Content-Type'
  header_params['Content-Type'] = @api_client.select_header_content_type(['multipart/form-data'])
  header_params[:'XPathExpression'] = x_path_expression

  # form parameters
  form_params = {}
  form_params['inputFile'] = input_file

  # http body (model)
  post_body = nil
  auth_names = ['Apikey']
  data, status_code, headers = @api_client.call_api(:POST, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'XmlRemoveWithXPathResult')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: ConvertDataApi#convert_data_xml_remove_with_x_path\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#convert_data_xml_to_json(input_file, opts = {}) ⇒ Object

Convert XML to JSON conversion Convert an XML string or file into JSON

Parameters:

  • input_file

    Input file to perform the operation on.

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (Object)


1021
1022
1023
1024
# File 'lib/cloudmersive-convert-api-client/api/convert_data_api.rb', line 1021

def convert_data_xml_to_json(input_file, opts = {})
  data, _status_code, _headers = convert_data_xml_to_json_with_http_info(input_file, opts)
  data
end

#convert_data_xml_to_json_with_http_info(input_file, opts = {}) ⇒ Array<(Object, Fixnum, Hash)>

Convert XML to JSON conversion Convert an XML string or file into JSON

Parameters:

  • input_file

    Input file to perform the operation on.

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (Array<(Object, Fixnum, Hash)>)

    Object data, response status code and response headers



1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
# File 'lib/cloudmersive-convert-api-client/api/convert_data_api.rb', line 1031

def convert_data_xml_to_json_with_http_info(input_file, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: ConvertDataApi.convert_data_xml_to_json ...'
  end
  # verify the required parameter 'input_file' is set
  if @api_client.config.client_side_validation && input_file.nil?
    fail ArgumentError, "Missing the required parameter 'input_file' when calling ConvertDataApi.convert_data_xml_to_json"
  end
  # resource path
  local_var_path = '/convert/xml/to/json'

  # query parameters
  query_params = {}

  # header parameters
  header_params = {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])
  # HTTP header 'Content-Type'
  header_params['Content-Type'] = @api_client.select_header_content_type(['multipart/form-data'])

  # form parameters
  form_params = {}
  form_params['inputFile'] = input_file

  # http body (model)
  post_body = nil
  auth_names = ['Apikey']
  data, status_code, headers = @api_client.call_api(:POST, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'Object')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: ConvertDataApi#convert_data_xml_to_json\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#convert_data_xml_transform_with_xslt_to_xml(input_file, transform_file, opts = {}) ⇒ String

Transform XML document file with XSLT into a new XML document Convert an XML string or file into JSON

Parameters:

  • input_file

    Input XML file to perform the operation on.

  • transform_file

    Input XSLT file to use to transform the input XML file.

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (String)


1077
1078
1079
1080
# File 'lib/cloudmersive-convert-api-client/api/convert_data_api.rb', line 1077

def convert_data_xml_transform_with_xslt_to_xml(input_file, transform_file, opts = {})
  data, _status_code, _headers = convert_data_xml_transform_with_xslt_to_xml_with_http_info(input_file, transform_file, opts)
  data
end

#convert_data_xml_transform_with_xslt_to_xml_with_http_info(input_file, transform_file, opts = {}) ⇒ Array<(String, Fixnum, Hash)>

Transform XML document file with XSLT into a new XML document Convert an XML string or file into JSON

Parameters:

  • input_file

    Input XML file to perform the operation on.

  • transform_file

    Input XSLT file to use to transform the input XML file.

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (Array<(String, Fixnum, Hash)>)

    String data, response status code and response headers



1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
# File 'lib/cloudmersive-convert-api-client/api/convert_data_api.rb', line 1088

def convert_data_xml_transform_with_xslt_to_xml_with_http_info(input_file, transform_file, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: ConvertDataApi.convert_data_xml_transform_with_xslt_to_xml ...'
  end
  # verify the required parameter 'input_file' is set
  if @api_client.config.client_side_validation && input_file.nil?
    fail ArgumentError, "Missing the required parameter 'input_file' when calling ConvertDataApi.convert_data_xml_transform_with_xslt_to_xml"
  end
  # verify the required parameter 'transform_file' is set
  if @api_client.config.client_side_validation && transform_file.nil?
    fail ArgumentError, "Missing the required parameter 'transform_file' when calling ConvertDataApi.convert_data_xml_transform_with_xslt_to_xml"
  end
  # resource path
  local_var_path = '/convert/xml/transform/xslt/to/xml'

  # query parameters
  query_params = {}

  # header parameters
  header_params = {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/xml'])

  # form parameters
  form_params = {}
  form_params['inputFile'] = input_file
  form_params['transformFile'] = transform_file

  # http body (model)
  post_body = nil
  auth_names = ['Apikey']
  data, status_code, headers = @api_client.call_api(:POST, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'String')
  if @api_client.config.debugging
    @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}"
  end
  return data, status_code, headers
end