blockly xml tag

419 views
Skip to first unread message

seyeong Park

unread,
Sep 4, 2017, 9:39:18 AM9/4/17
to Blockly
After generate xml with blockly, is there a document that summarizes xml tag?

example)
  <variables></variables>
  <block id="ytl4j[7Eb]HDaK]m.3#X" type="text_print" x="38" y="63">
    <value name="TEXT">
      <shadow id="zh~(K?l)4W~=zLy.pIs}" type="text">
        <field name="TEXT">abc</field>
      </shadow>
    </value>
  </block>
</xml>

xml tag : variables, block, value, shadow, field etc..


The attached document is my own XML tag document. Is this document correct?


Thanks.
block.hwp

Erik Pasternak

unread,
Sep 5, 2017, 1:57:50 PM9/5/17
to Blockly
Hi Seyeong,

We don't currently have a lot of documentation on the xml format. The most details are probably in the docs for building a Toolbox, but there isn't a complete list of tags in the developer docs. The code all lives in xml.js, but again there's no list of every tag used. I don't have an easy way to open hwp files, but if you send a plain text version I can take a look.

Cheers,
Erik

Neil Fraser

unread,
Sep 5, 2017, 2:03:22 PM9/5/17
to blo...@googlegroups.com
It might be an idea to create a DTD.  Assuming that helps anyone.

--
You received this message because you are subscribed to the Google Groups "Blockly" group.
To unsubscribe from this group and stop receiving emails from it, send an email to blockly+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.



--

Erik Pasternak

unread,
Sep 5, 2017, 2:11:22 PM9/5/17
to Blockly
Agreed. Filed #1308 to track

--
You received this message because you are subscribed to a topic in the Google Groups "Blockly" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/blockly/hdr2hGleajM/unsubscribe.
To unsubscribe from this group and all its topics, send an email to blockly+unsubscribe@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.



--
Erik Pasternak | Master of the House | epas...@google.com     

seyeong Park

unread,
Sep 5, 2017, 10:30:13 PM9/5/17
to Blockly
Sorry, i uploaded it as a pdf file again.
block.pdf

Erik Pasternak

unread,
Sep 6, 2017, 11:53:03 AM9/6/17
to Blockly
Hi Seyeong,

It does look like you're missing a couple tags. The list of tags I have is:
xml - wrapper for the save file
  variables - the list of variables at the top of the save file
    variable - a single variable in the list
  block/shadow - declares a block or a shadow block
    value/statement - an input that can contain another block/shadow
    field - an item the user can edit

As for the list of block names, value names, and field names - those are defined by the set of blocks being used and are different for every use of Blockly. The Blocks we provide in the core library are a mix of common blocks and sample blocks to test functionality, so I wouldn't recommend using them as a definitive set.

Cheers,
Erik


On Tue, Sep 5, 2017 at 7:30 PM, seyeong Park <hamrr...@gmail.com> wrote:
Sorry, i uploaded it as a pdf file again.

--
You received this message because you are subscribed to a topic in the Google Groups "Blockly" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/blockly/hdr2hGleajM/unsubscribe.
To unsubscribe from this group and all its topics, send an email to blockly+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Rachel Fenichel

unread,
Sep 11, 2017, 3:49:33 PM9/11/17
to Blockly
Here's a doc from 2015 describing Blockly's XML structure at that time, with descriptions and allowed attributes on each tag.  

This document has not been kept up to date--note that it's missing at least shadow blocks and variables.

Cheers,
Rachel

On Wednesday, September 6, 2017 at 8:53:03 AM UTC-7, Erik Pasternak wrote:
Hi Seyeong,

It does look like you're missing a couple tags. The list of tags I have is:
xml - wrapper for the save file
  variables - the list of variables at the top of the save file
    variable - a single variable in the list
  block/shadow - declares a block or a shadow block
    value/statement - an input that can contain another block/shadow
    field - an item the user can edit

As for the list of block names, value names, and field names - those are defined by the set of blocks being used and are different for every use of Blockly. The Blocks we provide in the core library are a mix of common blocks and sample blocks to test functionality, so I wouldn't recommend using them as a definitive set.

Cheers,
Erik

On Tue, Sep 5, 2017 at 7:30 PM, seyeong Park <hamrr...@gmail.com> wrote:
Sorry, i uploaded it as a pdf file again.

--
You received this message because you are subscribed to a topic in the Google Groups "Blockly" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/blockly/hdr2hGleajM/unsubscribe.
To unsubscribe from this group and all its topics, send an email to blockly+u...@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.
Blockly XML structure 2015.pdf
Reply all
Reply to author
Forward
0 new messages