Is there an XML format for Lego? I've seen some pretty neat applications using customized XML formats. There is a Musical Notation XML so that a user can create sheet music on XML. With the right software, that XML can be converted to ACTUAL sheet music, and other plugins even convert this XML to a MIDI output that plays the music.

I'm wondering if there is an XML format for Lego? I would assume it would follow a procedural output where Step 1 is take a 2x2 piece and attach peg Top-Left to 4x1 piece bottom slot. Or something similar.

Just wondering... if there isn't, I feel like there should be. With a Javascript app written for it you could have people converting Lego instruction books to XML or creating custom instruction books with walk-thrus available with a Javascript app.
Yes, there is LXFML - which is if you like an "offical" XML format for LEGO models - in that it's produced and maintained by The LEGO Group.

The .LXF format used by LEGO Digital Designer is a compressed archive containing a thumbnail in .png format and a model definition file in LFXML.

As I noted in the answer to that question, the LDD team have shared both the documentation and XSD for validating this.

Within the definition, there is scope for a &lt;BuildingInstructions&gt; element that can contain one or more &lt;BuildingInstruction&gt; elements. These in turn contain &lt;steps&gt; which reference one or more parts or contain sub-steps:

&lt;BuildingInstructions&gt;
  &lt;BuildingInstruction name="b6206_" cameraRefID="4"&gt;
    &lt;Step name="b6206_s1"&gt;
      &lt;Step name="b6206_s2"&gt;
        &lt;PartRef partRefID="0"/&gt;
      &lt;/Step&gt;
      &lt;PartRef partRefID="1"/&gt;
      &lt;PartRef partRefID="2"/&gt;
    &lt;/Step&gt;
    &lt;Step&gt;
      &lt;PartRef partRefID="3"/&gt;
    &lt;/Step&gt;
  &lt;/BuildingInstruction&gt;
&lt;/BuildingInstructions&gt;


Note that the &lt;PartRefs&gt; are Ids to parts in the &lt;Model&gt; elements, which define the actual element, colour and orientation.

The default steps created within LDD have been known to be a little hit and miss, adding multiple elements at once and not always visibly or in a valid order (although that may have improved since I last used it for step creation).