Skip to main content
Develop Tools
← Return to usage guide

How to mask XML elements, attributes, and CDATA

XML has sensitive information not only for elements but also for attributes and CDATA. When sharing API linkage data and configuration files, it does not break the structure as XML and replaces the same value with the same relation.

Learn how to analyze XML and select elements, attributes, and CDATA to check the masking result.
Learn how to analyze XML and select elements, attributes, and CDATA to check the masking result.

Confidential information to be confirmed in XML

  • Elements containing personal information such as name, email, phone, and address
  • attribute values such as id, customerId, account and internal identifiers
  • token, password, apiKey, and creditential
  • Body text, JSON, SQL, and tokens embedded in CDATA
  • Environment name, name of the person in charge, URL in comment and processing instruction

How to mask XML

  1. XML the XML code or read the .xml file.
  2. Click "Mask" to review the detected targets for each XML path.
  3. Select the type of value and the replacement method, and compare the input and the result with the left and right.
  4. Right-click the required area in the result column and release it.
  5. Search the original name, domain, and ID in the result and save it as XML file.

Notes when maintaining structure

Namespace prefixes, attribute order, comments, empty-element notation, line breaks, and indentation can matter when comparing with or reviewing integrations. Replacing only values based on location information preserves the original notation without reserializing the entire XML.

Automatic detection uses common element names and value patterns as clues. It cannot reliably identify custom abbreviations or free-form text, so review the path list and output before sharing.

TYTYPE and external entity are dangerous to refer to local files and external URLs, so it is safe to operate not loading as masking target.

Example: Converting Customer-Linked XML to Survey Data

XML containing id attribute, name, email, phone, and authentication token in the customer element, leaves the required state for investigation such as status and replaces the value related to the individual and authentication.

If the same customer ID and email appear in multiple locations, unify the same alternative value, and then follow the corresponding relationship between data while hiding the actual value.

  1. Read customer-linked XML and make sure there is no syntax error.
  2. Target paths of id attributes, name, email, phone, andken.
  3. Compare the input and result, and confirm that identical source values were replaced with the same pseudonym.
  4. Search results by original name, domain, ID and save as UTF-8 XML.

Comments and processing instructions are not subject to automatic masking. If you have internal URLs or name of the person in charge, please delete it from input XML and share it.

Frequently asked questions

Is the XML file uploaded to the server?
No upload. Loading, syntax confirmation, masking, and file generation are done in the browser you are using.
Does XML formatting and attribute order change?
To replace the value position, maintain the original line break, indent, namespace prefix, attribute order, and empty element notation.

Try It in Your Browser

Your input is processed entirely in your browser. Keep the original data, review the output, and only then save or share it.

Open XML Masking Tool