XML schema

Category:XML elements
In World of Warcraft addons, XML files are used to define User Interface elements. XML is however not required since most functionality is also supported in Lua via the Widget API. Similar to Lua files, XML files are referenced from the TOC file.
It's advisable to use an editor like VS Code with the Red Hat XML extension. 
XML_schema_01.png|VS Code with XML extension
==Terminology==
* A tag begins with < and ends with >; for example <Frame>.
* A tag can have attributes; for example <Frame name="ShinyRedApple".
* An element consists of a start tag, end tag and anything in between; for example <Frame>content</Frame>.
==XML schema==
Each XML file consists of a Ui element. The xmlns and xsi attributes are optional but essential for XML parsers and validation.
<Ui xmlns="http://www.blizzard.com/wow/ui/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.blizzard.com/wow/ui/
https://raw.githubusercontent.com/Gethe/wow-ui-source/live/Interface/FrameXML/UI_shared.xsd">
</Ui>
<!-- can also be formatted like this for readability purposes -->
<Ui xmlns="http://www.blizzard.com/wow/ui/"
 xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
 xsi:schemaLocation="http://www.blizzard.com/wow/ui/
 https://raw.githubusercontent.com/Gethe/wow-ui-source/live/Interface/FrameXML/UI_shared.xsd">
</Ui>
* xmlns declares the default namespace. This means that all of the nested elements will use http://www.blizzard.com/wow/ui/ as namespace; organizing and associating them with World of Warcraft.
* xmlns:xsi declares the http://www.w3.org/2001/XMLSchema-instance namespace and binds it to the xsi prefix. This also allows using the xsi:schemaLocation attribute.
* xsi:schemaLocation declares whitespace-separated pairs of namespace and XSD files. This means that https://raw.githubusercontent.com/Gethe/wow-ui-source/live/Interface/FrameXML/UI_shared.xsd will be used with the http://www.blizzard.com/wow/ui/ namespace for validation and hinting.
==Example==
: See also: XML user interface
Shows a texture on the center of the screen.
<Ui xmlns="http://www.blizzard.com/wow/ui/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.blizzard.com/wow/ui/
https://raw.githubusercontent.com/Gethe/wow-ui-source/live/Interface/FrameXML/UI_shared.xsd">
 <Frame parent="UIParent">
 <Size x="64" y="64"/>
 <Anchors>
 <Anchor point="CENTER"/>
 </Anchors>
 <Layers>
 <Layer level="ARTWORK">
 <Texture file="interface/icons/inv_mushroom_11" setAllPoints="true"/>
 </Layer>
 </Layers>
 </Frame>
</Ui>
==Widget hierarchy==
Core tags	<Frame> subtypes	<Animation> subtypes
*<UI>
*<LayoutFrame>
* <Frame>
* <Texture>
** <MaskTexture>
** <Line>
* <FontString>
* <Font>
* <FontFamily>
* <Animation>
* <AnimationGroup>	 	
* <Alpha>
* <Scale>
* <LineScale>
* <Translation>
* <LineTranslation>
* <Path>
* <Rotation>
* <TextureCoordTranslation>
== UI ==
== LayoutFrame ==
== Frame ==
=== Button ===
==== CheckButton ====
==== ItemButton ====
<ItemButton> is an intrinsic frame extending .
=== ColorSelect ===
=== Cooldown ===
=== EditBox ===
=== GameTooltip ===
=== MessageFrame ===
=== Model ===
==== PlayerModel ====
<PlayerModel> (inherits from , creates a widget) displays a pose of the player character.
===== DressUpModel =====
<DressUpModel> (inherits from , creates a widget) trials equipment appearances on the player character.
===== TabardModel =====
<TabardModel> (inherits from , creates a widget) trials tabard appearances on the player character.
==== CinematicModel ====
==== UiCamera ====
<UiCamera> (inherits from , creates a widget) -- needs summary.
=== ScrollFrame ===
=== ScrollingMessageFrame ===
<ScrollingMessageFrame> is an intrinsic frame, extending 
=== SimpleHTML ===
=== Slider ===
=== StatusBar ===
=== ArchaeologyDigSiteFrame ===
=== ScenarioPOIFrame ===
=== QuestPOIFrame ===
== Texture ==
=== MaskTexture ===
=== Line ===
== FontString ==
== Font ==
== FontFamily ==
== AnimationGroup ==
== Animation ==
=== Alpha ===
=== Scale ===
==== LineScale ====
<LineScale> inherits from ; creates a animation.
=== Translation ===
==== LineTranslation ====
<LineTranslation> inherits from ; creates a animation.
=== Path ===
=== Rotation ===
=== TextureCoordTranslation ===
== See also ==
Not documented:
* 
* 
Not intended for user-made AddOns:
* 
* 
* 
Removed or no longer used:
*