Class: CloudmersiveConvertApiClient::ConvertDataApi
- Inherits:
-
Object
- Object
- CloudmersiveConvertApiClient::ConvertDataApi
- Defined in:
- lib/cloudmersive-convert-api-client/api/convert_data_api.rb
Instance Attribute Summary collapse
-
#api_client ⇒ Object
Returns the value of attribute api_client.
Instance Method Summary collapse
-
#convert_data_csv_to_json(input_file, opts = {}) ⇒ Object
Convert CSV to JSON conversion Convert a CSV file to a JSON object array.
-
#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.
-
#convert_data_csv_to_xml(input_file, opts = {}) ⇒ String
Convert CSV to XML conversion Convert a CSV file to a XML file.
-
#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.
-
#convert_data_json_to_xml(json_object, opts = {}) ⇒ String
Convert JSON to XML conversion Convert a JSON object into XML.
-
#convert_data_json_to_xml_with_http_info(json_object, opts = {}) ⇒ Array<(String, Fixnum, Hash)>
Convert JSON to XML conversion Convert a JSON object into XML.
-
#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.
-
#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.
-
#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.
-
#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.
-
#convert_data_xlsx_to_xml(input_file, opts = {}) ⇒ String
Convert Excel XLSX to XML conversion Convert an Excel XLSX file to a XML file.
-
#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.
-
#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.
-
#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.
-
#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.
-
#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.
-
#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.
-
#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.
-
#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.
-
#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.
-
#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.
-
#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.
-
#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.
-
#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.
-
#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.
-
#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.
-
#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.
-
#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.
-
#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.
-
#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.
-
#convert_data_xml_to_json(input_file, opts = {}) ⇒ Object
Convert XML to JSON conversion Convert an XML string or file into JSON.
-
#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.
-
#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.
-
#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.
-
#initialize(api_client = ApiClient.default) ⇒ ConvertDataApi
constructor
A new instance of ConvertDataApi.
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_client ⇒ Object
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
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
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
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
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_to_xml(json_object, opts = {}) ⇒ String
Convert JSON to XML conversion Convert a JSON object into XML
143 144 145 146 |
# File 'lib/cloudmersive-convert-api-client/api/convert_data_api.rb', line 143 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 to XML conversion Convert a JSON object into XML
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 191 |
# File 'lib/cloudmersive-convert-api-client/api/convert_data_api.rb', line 153 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
197 198 199 200 |
# File 'lib/cloudmersive-convert-api-client/api/convert_data_api.rb', line 197 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
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 245 246 |
# File 'lib/cloudmersive-convert-api-client/api/convert_data_api.rb', line 207 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
252 253 254 255 |
# File 'lib/cloudmersive-convert-api-client/api/convert_data_api.rb', line 252 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
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 300 301 |
# File 'lib/cloudmersive-convert-api-client/api/convert_data_api.rb', line 262 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
307 308 309 310 |
# File 'lib/cloudmersive-convert-api-client/api/convert_data_api.rb', line 307 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
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 355 356 |
# File 'lib/cloudmersive-convert-api-client/api/convert_data_api.rb', line 317 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.
365 366 367 368 |
# File 'lib/cloudmersive-convert-api-client/api/convert_data_api.rb', line 365 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.
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 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 |
# File 'lib/cloudmersive-convert-api-client/api/convert_data_api.rb', line 378 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.
438 439 440 441 |
# File 'lib/cloudmersive-convert-api-client/api/convert_data_api.rb', line 438 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.
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 484 485 486 487 488 489 490 491 492 493 494 495 496 497 |
# File 'lib/cloudmersive-convert-api-client/api/convert_data_api.rb', line 450 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.
504 505 506 507 |
# File 'lib/cloudmersive-convert-api-client/api/convert_data_api.rb', line 504 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.
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 551 552 553 554 555 556 557 |
# File 'lib/cloudmersive-convert-api-client/api/convert_data_api.rb', line 515 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.
565 566 567 568 |
# File 'lib/cloudmersive-convert-api-client/api/convert_data_api.rb', line 565 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.
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 611 612 613 614 615 616 617 618 619 620 621 622 623 624 |
# File 'lib/cloudmersive-convert-api-client/api/convert_data_api.rb', line 577 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.
632 633 634 635 |
# File 'lib/cloudmersive-convert-api-client/api/convert_data_api.rb', line 632 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.
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 678 679 680 681 682 683 684 685 686 687 688 689 690 691 |
# File 'lib/cloudmersive-convert-api-client/api/convert_data_api.rb', line 644 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
698 699 700 701 |
# File 'lib/cloudmersive-convert-api-client/api/convert_data_api.rb', line 698 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
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 745 746 747 748 749 750 751 752 753 |
# File 'lib/cloudmersive-convert-api-client/api/convert_data_api.rb', line 709 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
760 761 762 763 |
# File 'lib/cloudmersive-convert-api-client/api/convert_data_api.rb', line 760 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.
829 830 831 832 |
# File 'lib/cloudmersive-convert-api-client/api/convert_data_api.rb', line 829 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("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.
849 850 851 852 853 854 855 856 857 858 859 860 861 862 863 864 865 866 867 868 869 870 871 872 873 874 875 876 877 878 879 880 881 882 883 884 885 886 887 888 889 890 891 892 893 894 895 896 897 898 899 900 |
# File 'lib/cloudmersive-convert-api-client/api/convert_data_api.rb', line 849 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
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 807 808 809 810 811 812 813 |
# File 'lib/cloudmersive-convert-api-client/api/convert_data_api.rb', line 771 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
907 908 909 910 |
# File 'lib/cloudmersive-convert-api-client/api/convert_data_api.rb', line 907 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
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 954 955 956 957 958 959 960 961 962 |
# File 'lib/cloudmersive-convert-api-client/api/convert_data_api.rb', line 918 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
968 969 970 971 |
# File 'lib/cloudmersive-convert-api-client/api/convert_data_api.rb', line 968 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
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 1016 1017 |
# File 'lib/cloudmersive-convert-api-client/api/convert_data_api.rb', line 978 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
1024 1025 1026 1027 |
# File 'lib/cloudmersive-convert-api-client/api/convert_data_api.rb', line 1024 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
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 1071 1072 1073 1074 1075 1076 1077 |
# File 'lib/cloudmersive-convert-api-client/api/convert_data_api.rb', line 1035 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 |