Bookmark and Share

Notice: On April 23, 2014, Statalist moved from an email list to a forum, based at

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

st: xml_tab, then xmluse, not working

From   Hewan Belay <>
To   Stata List <>
Subject   st: xml_tab, then xmluse, not working
Date   Tue, 28 Aug 2012 01:49:29 -0700 (PDT)

Dear statalist,
I am trying to save estimates produced from various regressions, send them into a spreadsheet, then bring back the estimates into stata so that i can easily organise them in a way that I can then directly use as a table presenting results. However, the procedure I am using is not working, though as per my reading of the commands, it should. What I do is this: 
1) I first save the estimates using -estimates store-
2) Then I send them to a spreadsheet using -xml_tab-
3) Finally, I try to bring the estimates themselves into a stata "data"set using -xmluse-
Here is a toy example, using the auto data, of what I am trying to achieve, where it can be easily replicated to see that it's not working for reasons unknown to me:
webuse auto
reg price mpg 
est store toyreg1
reg price rep78 headroom trunk 
est store toyreg2
reg price weight length turn 
est store toyreg3
reg price displacement gear_ratio foreign
est store toyreg4
xml_tab toyreg1 toyreg2 toyreg3 toyreg4, save("D:/toyreg_table") replace   
xmluse "D:/toyreg_table", doctype(excel) clear
All goes well until and including the xml_tab line. After that line, I can also verify that the xml file is in fact in my D:/ folder and can be opened. When I run the last line however, I get the error message "unrecognizable XML doctype". I tried using -doctype(dta)- instead, as well as no -doctype()- option; in both cases, the same error message appears. I also added the extension .xml, i.e. 
xmluse "D:/toyreg_table.xml", doctype(excel) clear
and did that again with all three options concerning -doctype()-. Again, in all of these three cases, same error message.
xmluse is supposed to be able to call up an xml file into stata... why is it not doing so??
Thank you in advance for any advice.

*   For searches and help try:

© Copyright 1996–2018 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   Site index