Sebastian,
Yes, sorry, I forgot to mention I tried doctype(excel) as well to no avail.
Thanks for having a stab, any other suggestions?
For the moment I managed to write some code that reads a couple of files in and gets data Stata-ish using -infile- and some -split- action, but I'm sure there's a more elegant and efficient way.
Thanks again Sebastian.
Rodrigo
Rodrigo Martell
<http://www.frontier-economics.com>
Frontier Economics Pty. Ltd.
395 Collins Street
Melbourne VIC 3000
Australia
www.frontier-economics.com
switch:
direct:
fax:
mobile:
email:
+61 (0)3 9620 4488
+61 (0)3 9613 1518
+61 (0)3 8614 2711
+61 (0)407 909 811
[email protected] <mailto:[email protected]>
This e-mail, including any attachments, may contain confidential and privileged information for the sole use of the intended recipient(s). Any review, use, disclosure or distribution by others is strictly prohibited. If you are not the intended recipient (or authorised to receive information for the recipient), please contact the sender by reply e-mail and delete all copies of this message. Thank you.
-----Original Message-----
From: [email protected]
[mailto:[email protected]]On Behalf Of Sebastian F.
B�chte
Sent: Tuesday, 26 June 2007 5:23 PM
To: [email protected]
Subject: Re: st: -xmluse- won't recognize .xml file
On 6/26/07, Rodrigo Martell <[email protected]> wrote:
> I'm pretty sure this post is a consequence of my ignorance of xml, but I can't figure this out from the stata [D] manual.
> I have a bunch of .xml files I got from here ttp://www.imowa.com.au/Attachments/STEM_bids_offers/Public_EM_Sept06.zip
> I saved this to my C drive and would like to import it to Stata.
> I thought -xmluse- would do the trick, but it hasn't so far.
>
> I tried importing the first file by typing
>
> . xmluse wprtl20060927PUB_STEMResultPartInfo
> unrecognizable XML doctype
>
> I thought the error I got was because I hadn't told it it was a .xml file (although doubted my conclusion because the manual says .xml is assumed if omitted)
> I tried this again with .xml and failed again...
>
> xmluse wprtl20060927PUB_STEMResultPartInfo.xml
> unrecognizable XML doctype
>
> Now, I'm not sure if I need to open each .xml file in Excel first and then save them as xml again for -xmluse- to work or what.
> I tried opening these .xml files in Excel but it reads it in as would a normal text editor. I'm on Excel 2000 so I think that's just an Excel thing because I think xml support comes from Excel 2003 onwards.
>
>
Rodrigo
usually the doctype declaration is the first information to follow the
xml declaration in an xml file. It looks to me that -xmluse- just does
not understand what the doctype is. Have you tried - xmluse
myfile.xml, doctype(excel) - ? This is one of the options listed in
-help xmluse-
hth
Sebastian
*
* For searches and help try:
* http://www.stata.com/support/faqs/res/findit.html
* http://www.stata.com/support/statalist/faq
* http://www.ats.ucla.edu/stat/stata/
*
* For searches and help try:
* http://www.stata.com/support/faqs/res/findit.html
* http://www.stata.com/support/statalist/faq
* http://www.ats.ucla.edu/stat/stata/