การเข้ารหัส
XML Entities Encode/Decode
เข้ารหัสและถอดรหัส XML entities — 5 แบบมาตรฐาน (แอมเปอร์แซนด์ วงเล็บมุม อะพอสทรอฟี เครื่องหมายคำพูด) และการอ้างอิงอักขระเชิงตัวเลข
คำถามที่พบบ่อย
What are the 5 predefined XML entities?
XML only predefines five named entities: & (ampersand), < and > (angle brackets), ' (apostrophe), and " (quote). Anything beyond these needs a numeric character reference instead.
How is this different from HTML entity encoding?
HTML defines a much larger set of named entities (like or ©), while strict XML only recognizes the five predefined ones — any other special character in XML must use a numeric reference like © or ©.
When do I need to escape XML entities?
Escape characters like < > & ' " whenever they appear in text content or attribute values in an XML document, so the parser doesn't mistake them for markup and fail to parse the file.