Glossary
Web Developer Dictionary
Визначення технічних термінів з PHP, DevOps, MySQL та AI — з прикладами коду та поясненнями простою мовою.
228
terms
27
letters
X
XML
XML (eXtensible Markup Language) is a text format for structured data with custom tags. Older, stricter, and more verbose than JSON. Still widely used in enterprise systems, configuration files, RSS, and SOAP APIs.
Structure
Alice
alice@example.com
Advantages of XML over JSON
Attributes (id="1") and element content — two distinct data types
Namespaces — avoid name conflicts between schemas
XSD schemas — stricter structural validation
XSLT — transform XML into HTML/other XML
PHP and XML
$xml = simplexml_load_string($xmlString);
echo $xml->user[0]->name; // Alice
// Or via DOM
$dom = new DOMDocument();
$dom->loadXML($xmlString);
$nodes = $dom->getElementsByTagName('name');
XSS
XSS (Cross-Site Scripting) is the injection of malicious JavaScript into a page viewed by other users. The script runs in the victim's browser with the current site's privileges: it can steal cookies, capture keystrokes, and make requests on behalf of the user.TypesReflected — script in the URL, reflected in a single response. Requires tricking the victim into clicking a linkStored — script saved in the DB (comment, profile name) and shown to all visitors. Most dangerousDOM-based — DOM manipulation via JavaScript without server involvementDefenceOutput escaping — convert special HTML characters to entities: < → &lt;. In PHP — htmlspecialchars(); in template engines — automatic escaping via double-brace syntaxContent Security Policy — an HTTP header that blocks inline scripts and scripts from untrusted domainsNever render raw user-supplied HTML without sanitisation through a dedicated library (HTML Purifier, etc.)