Skip to content

Delete

Deletes any existing data at the specified path in the repository.

1
$XmlRepository.Delete(targetPath: string):void

Parameters

string targetPath
    The path to delete. If data exists at this path, the child path is deleted.

Remarks

This method deletes nodes at a specific path. If no path is available or you need to delete specific nodes, you can use the $XmlRepository.Query method with xquery update statements.

Delete a Customer:

1
$XmlRepository.Delete( 'Customers/' + customerNode.Evaluate('Id') );

Delete all customers:

1
$XmlRepository.Delete( 'Customers' );

See Also