rtables icon indicating copy to clipboard operation
rtables copied to clipboard

xml representation of a table tree

Open waddella opened this issue 3 years ago • 2 comments

@gmbecker, another project needs the rtable object in an xml format so that they can look into pathing and reuse (outside of R). I tried the following, but it is not exactly as is needed

library(xml2)
as_xml_document(list(root = cell_values(tbl)))

That is, the the parent child relationship got squished.

Do you have a quick solution to get an xml representation of a table tree? Otherwise we can discuss in our next meeting how to address this.

waddella avatar Mar 31 '21 12:03 waddella

@waddella So there is obviously a very natural structural mapping between our tables and XML, because both have a tree structure, but to answer your question more specifically I need to know more about what the goal is here.

What do we mean by "go to xml", like, any xml representation that retains the corresponding structure? That would fairly easy but also pretty strange to do, Id think. At that point the hardest part for us would be defining the output/representation format.

Or do we mean go to a specific XML format? in which case, I need to know what flavor (schema) of XML we are targeting.

gmbecker avatar Mar 31 '21 21:03 gmbecker

Also, XML is the chosen format for clinicaltrials.gov submissions.

waddella avatar Apr 28 '21 17:04 waddella