Statalist


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

st: Getting text files with quotation marks into Stata


From   "Dan Weitzenfeld" <[email protected]>
To   [email protected]
Subject   st: Getting text files with quotation marks into Stata
Date   Fri, 7 Nov 2008 11:51:46 -0800

Hi Folks,
I'm trying to read .xml files into Stata.  Once there, I can parse
them, even if they are read into just one variable - I'm handy with
-regexm- and the like.
My problem is that I can't seem to get around the quotation marks in
the file.  Two rows of the file look like this:

  <session="NCX_1" target="entrance" movie="0" start="22:22:23.000"
duration="199" />
  <session="NCX_2" target="floor" movie="0" start="22:22:24.000"
duration="179" />


When I insheet, I get

199/>
179/>

When I xmluse, I get

unrecognizable XML doctype
r(198);

regardless of which doctype I specify.


Are there any tricks for getting Stata to ignore the quotation marks
within the file?
Thanks,
Dan
*
*   For searches and help try:
*   http://www.stata.com/help.cgi?search
*   http://www.stata.com/support/statalist/faq
*   http://www.ats.ucla.edu/stat/stata/



© Copyright 1996–2024 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index