Synthoid / ExportSheetData

Add-on for Google Sheets that allows sheets to be exported as JSON or XML.
MIT License
236 stars 46 forks source link

<title> tag and hierarchy #85

Closed MattB82 closed 5 years ago

MattB82 commented 5 years ago

This might be related to the 'Complex Nested Elements' request:

I am trying to replicate this format for a remote phonebook file for Yealink VoIP handsets:

<?xml version="1.0" encoding="UTF-8"?>
<YealinkIPPhoneBook>
  <Title>Yealink</Title>
  <Menu Name="Suppliers">
    <Unit Name="XXX" Phone1="YYY" Phone2="" Phone3="ZZZ" default_photo="Resource:"/>
    <Unit Name="XXX" Phone1="YYY" Phone2="" Phone3="ZZZ" default_photo="Resource:"/>
    <Unit Name="XXX" Phone1="YYY" Phone2="" Phone3="ZZZ" default_photo="Resource:"/>
  </Menu>
  <Menu Name="Chargebacks">
    <Unit Name="XXX" Phone1="YYY" Phone2="" Phone3="ZZZ" default_photo="Resource:"/>
    <Unit Name="XXX" Phone1="YYY" Phone2="" Phone3="ZZZ" default_photo="Resource:"/>
    <Unit Name="XXX" Phone1="YYY" Phone2="" Phone3="ZZZ" default_photo="Resource:"/>
  </Menu>
  </Menu>
<Menu Name="Customers">
    <Unit Name="XXX" Phone1="YYY" Phone2="" Phone3="ZZZ" default_photo="Resource:"/>
    <Unit Name="XXX" Phone1="YYY" Phone2="" Phone3="ZZZ" default_photo="Resource:"/>
    <Unit Name="XXX" Phone1="YYY" Phone2="" Phone3="ZZZ" default_photo="Resource:"/>/>
  </Menu>
</YealinkIPPhoneBook>

I am just missing the <Title>Yealink</Title> and ability to setup <Menu Name="Suppliers"> and <Menu Name="Chargebacks"> and <Menu Name="Customers"> hierarchy.

Can anyone please advise?

Synthoid commented 5 years ago

This is something that would require complex nested element support for XML unfortunately. Anything beyond basic data sets requires complex nested elements. You can kind of get close without it, but the attributes for the root elements makes things difficult.

MattB82 commented 5 years ago

Ahh damn! Thanks anyway @Synthoid. :)