Home

Track breaches of an XPath rule

Description

  • The XPath rule is a set of rules that are used to define the structure and content of an XML document. The XPath rule is used to track any breaches of the rule, such as incorrect syntax, missing elements, or incorrect values. The PL/SQL code rule is used to detect any violations of the XPath rule and alert the user. This code rule can be used to ensure that the XML document is valid and conforms to the XPath rule. The PL/SQL code rule can also be used to validate the data in the XML document, ensuring that it is accurate and up-to-date. This code rule can be used to detect any errors or inconsistencies in the XML document and alert the user.

Key Benefits

  • Accurate detection - Track breaches of an XPath rule rule with high accuracy.
  • Real-time alerts - Receive real-time alerts when a breach is detected.
  • Security compliance - Ensure compliance with security regulations and standards.
  • Data integrity - Maintain data integrity and protect against malicious attacks.

 

Non-compliant Code Example

CREATE OR REPLACE PROCEDURE GetCustomerPhoneNumber1 (customerId IN INTEGER)
IS
	oracleQuery  VARCHAR2(100);     --Non compliant code (Identifier length is more then or equal to 10 character)
	customerPhoneNumber NUMBER;     --Non compliant code (Identifier length is more then or equal to 10 character)
	
BEGIN
 oracleQuery := q'{BEGIN SELECT PhoneNumber FROM Customers WHERE id = :customerId  END; }';
        
 EXECUTE IMMEDIATE oracleQuery INTO customerPhoneNumber;
END

Compliant Code Example

CREATE OR REPLACE PROCEDURE GetCustomerPhoneNumber1 (customerId IN INTEGER)
IS
	query  VARCHAR2(100);       --Compliant code (Identifier length is less then 10 character)
	phNo NUMBER;                --Compliant code (Identifier length is less then 10 character)
	
BEGIN
 query := q'{BEGIN SELECT PhoneNumber FROM Customers WHERE id = :customerId  END; }';
        
 EXECUTE IMMEDIATE query INTO phNo;
END
Visual Expert 2024
 VEPLSQLRULE167