Skip to content

XML Exploration #46

Description

@Offroaders123

(Initially copied this from a Discord thread)

I think I figured something out

NBTML demo

I think NBT is indeed was originally meant to be typed as 'primitives, with attributes', compared to a plain 'key-value record'/'hashmap' setup
It explains the need for the name at the top level of the file
XML translates very well over between NBT/SNBT, in terms of conceptually explaining it
I want to make a demo converter to show it now

Dovetail render demo

Dovetail SNBT demo

NBTify CLI demo

So using something like SNBT or JSON to describe NBT is (possibly) counter to how the original concept was described
Maybe it was more like a markup language afterall, to where the tags themselves could have been literal markup tags

<CompoundTag name="hello world">
  <StringTag name="name">Bananrama</StringTag>
</CompoundTag>

I'm not sure how that would work for the more complex derived-types though, like ByteArrayTag, IntArrayTag, or LongArrayTag
I guess technically it is just like this

<LongArrayTag>
  <LongTag>25000</LongTag>
  <LongTag>25000</LongTag>
  <LongTag>25000</LongTag>
  <LongTag>25000</LongTag>
</LongArrayTag>

So maybe it's not complex afterall

<ListTag>
  <CompoundTag>
    <ByteTag name="nice-going-genghis">12345</ByteTag>
  </CompoundTag>
  <StringTag name="gg">hello there once again</StringTag>
</ListTag>

[Generic PnP Monitor] well a LongArrayTag doesn't store LongTags it just stores plain longs

Yeah in terms of the binary format
I'm curious how else it could be represented as plain text then? Does XML (or HTML, just for the sake of looking into it) have any list-based elements/tags that don't require a special child type for it to work?

[Generic PnP Monitor] hmm dunno maybe just having a LongValue element idk

<ol>
  <li>hello</li>
</ol>

Ok I think I'm going to try adding it into NBTify

Metadata

Metadata

Assignees

Labels

enhancementNew feature or request

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions