This section should demonstrate several common tasks which can be done in XiMpLe with a minimal effort.
For more information please see the user's guide which is available in the section download.

Example 1. Copy texts from a simple xml table to Excel
Example 2. Adding new rows prepared in Excel to the XML table
Example 3. Copy a part of an xml document to some other place
Example 4. Manipulate data nested inside a structure
Example 5. Create a table from csv file
Example 6. Remove table rows matching some criteria
Example 7. Split a bigger xml file then join fragments together

6. Remove table rows matching some criteria

Let’s have some xml data in a table.
Our task will be to remove all table rows which have (for example) sum of row values greater than one.
Xml data forming a table

Firstly we select the whole table, copy data and paste them to Excel or some other spreadsheet editor.
Copy and paste data to the spreadsheet

Now we create criterium conditions to distinguish between rows for keeping and deleting.
Create a condition column in the spreadsheet editor

New created column we copy and then paste in the xml table. For this purpose we create a temporary column in xml data.
Select and copy column results in the spreadsheet

A new temporary column was created and filled by data

By sorting the temporary column we can separate rows for keeping and rows for deleting.
Sorting functions used in XiMpLe are so called "stable". That means the records with the same sorting value are not swapped.
Sorting a temporary column in XiMpLe

After sorting we have to find the first row with the "deleting flag".
Hint: when the cursor is in the temporary column press the key Alt + down arrow to find the first non-empty cell.
Go to the first row with the deleting flag

Select a starting row. Then we can easily select the rest of rows (to the end of the table) by pressing Ctrl + Shift + down arrow
(shift is for keeping selection and ctrl + down is for jumping to the end of table).
Select all rows with the deleting flag

After that we delete all selected rows in the table.
All selected rows are deleted

We don't need the temporary column any more so we can delete the temporary column and we are finished.
After deleting the temporary column

Previous     Next