Man illustrationFlower illustration
Xml and JSON

Update xml

Estimated reading: 6 minutes 292 views

Update xml activity updates XML expressions.


*File nameThe XML file name is written.
*Xml stringIf any result is received as an XML string (Not a file with XML content) XML content is written. The other fields, prefixes, etc. XML is written to parse the content. Then, it is ensured that operations can be performed as a dataset.

Note: If this field is used, the File name field does not need to be used.
*Xpath expressionThe Xpath of which element/attribute to be referenced is referenced and the information related to element or attribute is selected by using Filter field.
*FilterThe information type (element/attribute) to be accessed within Xpath is entered. In the dropdown menu, two information types (element/attribute) can be selected.
*New valueThe new value of the element/attribute to be updated is written.
PrefixThis is the area where prefixes are defined when using the elements in the XML file.
UriTo define the first prefix, URI of the prefix is provided here.
Prefix2This is the area where prefixes are defined when using the elements in the XML file.
Uri2To define prefix2, URI of the prefix is provided here.
Prefix3This is the area where prefixes are defined when using the elements in the XML file.
Uri3To define first prefix3, URI of the prefix is provided here.
*Result variable nameA variable name that will be created is written.
Note: * Fields selected with are required, others are optional.

You can use the File name as shown in the example.

C:UsersAliceDocumentsinvoice.xml

You can use the Xml string as shown in the example.

<string name=”string_name” text_string </string

You can use the Xpath expressions shown in the example.


<? Xml version = “1.0” encoding = “UTF-8”?>
<Invoice>
<Return_ID>135672</Return_ID>
<Store_ID>23465</Store_ID>
<Store_Name>BELGE</Store_Name>
<Supplier_Name>Third Part Company</Supplier_Name>
<Supplier_Account_No>7330028047</Supplier_Account_No>
<Brand_ID>14235</Brand_ID>
</Invoice>
Let’s consider a file with .xml extension that has XML content in this way. Let’s want to access the Store_ID element in the tree structure in the file. The Xpath Statement to be written for this would be as follows:

//Invoice/Store_ID

You can use the Filter as shown in the example.

ELEMENT

Let’s use the XPath specified in the example above. This Xpath takes us to the Store_ID element in the tree structure. That is, the address of an element to be reached with XPath. Thus, ELEMENT is selected from the combobox.

You can use the New value as shown in the example.

<? Xml version = “1.0” encoding = “UTF-8”?>
<Invoice>
<Return_ID>135672</Return_ID>
<Store_ID>23465</Store_ID>
<Store_Name>BELGE</Store_Name>
<Supplier_Name>Third Part Company</Supplier_Name>
<Supplier_Account_No>7330028047</Supplier_Account_No>
<Brand_ID>14235</Brand_ID>
</Invoice>

Let’s change the value the Store_ID element.

9876

You can use the Prefix shown in the example.

ds:Reference

Based on the XML file content above, this field is not filled because there is no prefix for the elements in the .xml file. The prefix is specified in an xml file as follows:
<ds:Reference Id=”Reference-Id-28eeffb3-146c-4a8a-9e12-19541d39ee0e” URI=””>. The prefix of the Reference element in this expression is ‘ds’.

You can use the Prefix2 shown in the example.

cac:AdditionalDocumentReference

Based on the XML file content above, this field is not filled because there is no prefix for the elements in the .xml file. The As in the above mentioned ‘Prefix’ example, if there is another prefix like “ds”, a prefix is written in this field again. Xpath information also varies according to usage.
<cac:AdditionalDocumentReference>
<cbc:ID>0.00</cbc:ID>
<cbc:IssueDate>2020-03-18</cbc:IssueDate>
<cbc:DocumentType>ALLOWANCETOTALAMOUNT</cbc:DocumentType>
</cac:AdditionalDocumentReference>
As can be seen in this example, different prefixes (prefixes) can be included in the .xml file.

You can use the Prefix3 shown in the example.

caa:Username

Suppose that the file specified in the prefix2 example also has a field like the following:
<caa:Username>john.smith</cbc:DocumentType>
If you want to reach this field in the XML file, in addition to the cac and cbc prefixes, the caa prefix is also introduced in this field; Prefix3: becomes caa.

You can use the URI as shown in the example.

urn: oasis: names: specification: ubl: schema: xsd: CommonAggregateComponents-2

The prefix contains Uri information in the .xml file.
xmlns: cac = “urn: oasis: names: specification: ubl: schema: xsd: CommonAggregateComponents-2”, the area to the left of the equation and in quotes contains the Uri information. When writing the expression Uri, the part between the double quotes is written:
It is shown as urn: oasis: names: specification: ubl: schema: xsd: CommonAggregateComponents-2.

You can use the URI2 as shown in the example.

urn: oasis: names: specification: ubl: schema: xsd: CommonAggregateComponents-2

The prefix contains Uri information in the .xml file.
The field specified in the expression xmlns: ext = “urn: oasis: names: specification: ubl: schema: xsd: CommonExtensionComponents-2”, to the left of the equation, and in quotes contains the Uri information. When writing the expression Uri, the part between the double quotes is written:
It is shown as urn: oasis: names: specification: ubl: schema: xsd: CommonExtensionComponents-2.

You can use the URI3 as shown in the example.

urn: oasis: names: specification: ubl: schema: xsd: CommonAggregateComponents-2

or Prefix3 defined above, Uri information similar to Uri and Uri2 is written in the specified format.

You can use the Result variable name as shown in the example.

ResultVariable
Share this Doc

Update xml

Or copy link

CONTENTS
Chat Icon Close Icon