Jump to content


Photo

Importing/exporting XML node attributes

xml

  • Please log in to reply
2 replies to this topic

#1 joule

joule

    Guruh Motha Fakka is Levitating and Knows Everything About Renoise Member

  • Normal Members
  • PipPipPipPipPipPipPipPipPipPipPipPipPip
  • 1834 posts
  • Gender:Not Telling

Posted 11 July 2018 - 09:53

I find that the renoise.Document XML import/export is generally awesome. Is there some way to import attributes of nodes? (as well as write them)

 

I would hate having to resort to some custom text parser / XML generator just for being able to do this.

 

The index attribute, in this example:

<Line index="0">
                <NoteColumns>
                  <NoteColumn>
[...]

 

I guess the only chance is if these are stored in some dedicated list node, which probably isn't the case (?)



#2 danoise

danoise

    Probably More God or Borg Than Human Member

  • Renoise Team
  • PipPipPipPipPipPipPipPipPipPipPipPipPipPipPip
  • 6966 posts
  • Gender:Male
  • Location:Berlin
  • Interests:wildlife + urban trekking

Posted 11 July 2018 - 12:14

Not to my knowledge, no.

But as you point out, you could add <Index>0</Index> inside the <Line>


Tracking with Stuff. API wishlist | Soundcloud


#3 joule

joule

    Guruh Motha Fakka is Levitating and Knows Everything About Renoise Member

  • Normal Members
  • PipPipPipPipPipPipPipPipPipPipPipPipPip
  • 1834 posts
  • Gender:Not Telling

Posted 12 July 2018 - 12:35

Indeed! And I guess it's always possible to use some external XML (de)serializer to make things that load/saves or look like the native Renoise formats. Still thinking it's a pity, since doc:load_from(xml) and doc:save_as(xml) is "almost there"! (I think the support for attributes is the only thing missing)

 

Funny thing regarding this.. patterntrack data in .xrns use <line index="16">, while note data in clipboard-buffer (selection) still pads empty lines with </line>. The latter format is thereby more compatible with what the Document API can load and handle.

 

Thanks for confirming!


Edited by joule, 12 July 2018 - 12:36.






Also tagged with one or more of these keywords: xml