Guest User

Untitled

a guest
Oct 20th, 2017
386
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 23.12 KB | None | 0 0
  1. <article>
  2. <front>
  3. <journal-meta>
  4. <journal-title-group>
  5. <journal-title>Elsevier Science B.V. All rights reserved.
  6. P I I S</journal-title>
  7. </journal-title-group>
  8. </journal-meta>
  9. <article-meta>
  10. <title-group>
  11. <article-title>How does foreign direct investment affect economic 1 growth? E. Borenszteina ,*, J. De Gregoriob, J-W. Leec</article-title>
  12. </title-group>
  13. <contrib-group>
  14. <contrib contrib-type="author">
  15. <string-name>E. Borensztein</string-name>
  16. <email>eborensztein@imf.org</email>
  17. <xref ref-type="aff" rid="0">0</xref>
  18. </contrib>
  19. <contrib contrib-type="author">
  20. <string-name>J. De Gregorio</string-name>
  21. <xref ref-type="aff" rid="2">2</xref>
  22. </contrib>
  23. <contrib contrib-type="author">
  24. <string-name>J-W. Lee</string-name>
  25. <xref ref-type="aff" rid="3">3</xref>
  26. </contrib>
  27. <aff id="0">
  28. <label>0</label>
  29. <institution>International Monetary Fund, Research Department</institution>
  30. ,
  31. <addr-line>Washington DC 20431</addr-line>
  32. <country country="US">USA</country>
  33. </aff>
  34. <aff id="1">
  35. <label>1</label>
  36. <institution>We are grateful for comments from Robert Barro</institution>
  37. ,
  38. <addr-line>Elhanan Helpman, Boyan Jovanovic, Mohsin Khan, Se-Jik Kim, Donald Mathieson, Sergio Rebelo, Jeffrey Sachs</addr-line>
  39. ,
  40. <institution>Peter Wickham, and two anonymous referees. Comments by participants in seminars at 1995 World Congress of the Econometric Society, Korean Macroeconomics Workshop, Kobe University, and Osaka University were very helpful. This paper was partially prepared while Jose ฬ de Gregorio and Jong-Wha Lee were at the Research Department, International Monetary Fund. Any opinions expressed are only those of the</institution>
  41. </aff>
  42. <aff id="2">
  43. <label>2</label>
  44. <institution>Center for Applied Economics, Department of Industrial Engineering, Universidad de Chile</institution>
  45. ,
  46. <addr-line>Santiago</addr-line>
  47. ,
  48. <country country="CL">Chile</country>
  49. </aff>
  50. <aff id="3">
  51. <label>3</label>
  52. <institution>Economics Department, Korea University and NBER</institution>
  53. ,
  54. <addr-line>Seoul 136 -701</addr-line>
  55. <country country="KR">Korea</country>
  56. </aff>
  57. </contrib-group>
  58. <abstract>
  59. <p>We test the effect of foreign direct investment (FDI) on economic growth in a cross-country regression framework, utilizing data on FDI flows from industrial countries to 69 developing countries over the last two decades. Our results suggest that FDI is an important vehicle for the transfer of technology, contributing relatively more to growth than domestic investment. However, the higher productivity of FDI holds only when the host country has a minimum threshold stock of human capital. Thus, FDI contributes to economic growth only when a sufficient absorptive capability of the advanced technologies is available in the host economy. 1998 Elsevier Science B.V.</p>
  60. </abstract>
  61. <kwd-group>
  62. <kwd>Foreign direct investment</kwd>
  63. <kwd>Economic growth</kwd>
  64. <kwd>Cross-country regression framework</kwd>
  65. <kwd>Developing countries</kwd>
  66. </kwd-group>
  67. <volume>0</volume>
  68. <issue>0</issue>
  69. <fpage>115</fpage>
  70. <lpage>135</lpage>
  71. <pub-date>
  72. <year>1998</year>
  73. </pub-date>
  74. <history>
  75. <date date-type="accepted">
  76. <day>20</day>
  77. <month>5</month>
  78. <year>1997</year>
  79. </date>
  80. <date date-type="received">
  81. <day>21</day>
  82. <month>2</month>
  83. <year>1996</year>
  84. </date>
  85. <date date-type="revised">
  86. <day>24</day>
  87. <month>2</month>
  88. <year>1997</year>
  89. </date>
  90. </history>
  91. </article-meta>
  92. </front>
  93. <back>
  94. <ref-list>
  95. <ref id="1">
  96. <mixed-citation>
  97. <string-name>
  98. <surname>Aitken</surname>
  99. ,
  100. <given-names>B.</given-names>
  101. </string-name>
  102. ,
  103. <string-name>
  104. <surname>Harrison</surname>
  105. ,
  106. <given-names>A.</given-names>
  107. </string-name>
  108. ,
  109. <year>1993</year>
  110. ,
  111. <article-title>Do Domestically-Owned Firms Benefit from Foreign Direct Investment: Evidence from Panel Data, Unpublished manuscript</article-title>
  112. ,
  113. <source>International Monetary Fund.</source>
  114. </mixed-citation>
  115. </ref>
  116. <ref id="2">
  117. <mixed-citation>
  118. <string-name>
  119. <surname>Barro</surname>
  120. ,
  121. <given-names>R.</given-names>
  122. </string-name>
  123. ,
  124. <string-name>
  125. <surname>Lee</surname>
  126. ,
  127. <given-names>J-W.</given-names>
  128. </string-name>
  129. ,
  130. <year>1993</year>
  131. .
  132. <article-title>International comparisons of educational attainment</article-title>
  133. .
  134. <source>Journal of Monetary Economics</source>
  135. <volume>32</volume>
  136. ,
  137. <fpage>361</fpage>
  138. -
  139. <lpage>394</lpage>
  140. .
  141. </mixed-citation>
  142. </ref>
  143. <ref id="3">
  144. <mixed-citation>
  145. <string-name>
  146. <surname>Barro</surname>
  147. ,
  148. <given-names>R.</given-names>
  149. </string-name>
  150. ,
  151. <string-name>
  152. <surname>Lee</surname>
  153. ,
  154. <given-names>J-W.</given-names>
  155. </string-name>
  156. ,
  157. <year>1994</year>
  158. .
  159. <article-title>Sources of economic growth</article-title>
  160. .
  161. <source>Carnegie Rochester Conference Series on Public Policy</source>
  162. <volume>40</volume>
  163. ,
  164. <fpage>1</fpage>
  165. -
  166. <lpage>46</lpage>
  167. .
  168. </mixed-citation>
  169. </ref>
  170. <ref id="4">
  171. <mixed-citation>
  172. <string-name>
  173. <surname>Barro</surname>
  174. ,
  175. <given-names>R.</given-names>
  176. </string-name>
  177. ,
  178. <article-title>Sala-i-</article-title>
  179. <string-name>
  180. <surname>Martin</surname>
  181. ,
  182. <given-names>X.</given-names>
  183. </string-name>
  184. ,
  185. <year>1995</year>
  186. . Economic Growth,
  187. <string-name>
  188. <surname>McGraw-Hill</surname>
  189. </string-name>
  190. , Cambridge, MA.
  191. </mixed-citation>
  192. </ref>
  193. <ref id="5">
  194. <mixed-citation>
  195. <string-name>
  196. <surname>Benhabib</surname>
  197. ,
  198. <given-names>J.</given-names>
  199. </string-name>
  200. ,
  201. <string-name>
  202. <surname>Spiegel</surname>
  203. ,
  204. <given-names>M.</given-names>
  205. </string-name>
  206. ,
  207. <year>1994</year>
  208. .
  209. <article-title>The roles of human capital in economic development: evidence from aggregate cross-country data</article-title>
  210. .
  211. <source>Journal of Monetary Economics</source>
  212. <volume>34</volume>
  213. ,
  214. <fpage>143</fpage>
  215. -
  216. <lpage>173</lpage>
  217. .
  218. </mixed-citation>
  219. </ref>
  220. <ref id="6">
  221. <mixed-citation>
  222. <string-name>
  223. <surname>Blomstrom</surname>
  224. ,
  225. <given-names>M.</given-names>
  226. </string-name>
  227. ,
  228. <string-name>
  229. <surname>Lipsey</surname>
  230. ,
  231. <given-names>R.</given-names>
  232. </string-name>
  233. ,
  234. <string-name>
  235. <surname>Zejan</surname>
  236. ,
  237. <given-names>M.</given-names>
  238. </string-name>
  239. ,
  240. <year>1992</year>
  241. .
  242. <article-title>What Explains Developing Country Growth</article-title>
  243. . NBER Working Paper No.
  244. <volume>4132</volume>
  245. .
  246. </mixed-citation>
  247. </ref>
  248. <ref id="7">
  249. <mixed-citation>
  250. <string-name>
  251. <surname>Cohen</surname>
  252. ,
  253. <given-names>D.</given-names>
  254. </string-name>
  255. ,
  256. <year>1993</year>
  257. .
  258. <article-title>Foreign Finance and Economic Growth - An Empirical Analysis</article-title>
  259. .
  260. <article-title>Unpublished manuscript</article-title>
  261. , CEPREMAP.
  262. </mixed-citation>
  263. </ref>
  264. <ref id="8">
  265. <mixed-citation>
  266. <string-name>
  267. <surname>De Gregorio</surname>
  268. ,
  269. <given-names>J.</given-names>
  270. </string-name>
  271. ,
  272. <year>1992</year>
  273. .
  274. <article-title>Economic growth in Latin America</article-title>
  275. .
  276. <source>Journal of Development Economics</source>
  277. <volume>39</volume>
  278. ,
  279. <fpage>58</fpage>
  280. -
  281. <lpage>84</lpage>
  282. .
  283. </mixed-citation>
  284. </ref>
  285. <ref id="9">
  286. <mixed-citation>
  287. <string-name>
  288. <surname>Easterly</surname>
  289. ,
  290. <given-names>W.</given-names>
  291. </string-name>
  292. ,
  293. <year>1993</year>
  294. .
  295. <article-title>How much do distortions affect growth</article-title>
  296. .
  297. <source>Journal of Monetary Economics</source>
  298. <volume>32</volume>
  299. ,
  300. <fpage>187</fpage>
  301. -
  302. <lpage>212</lpage>
  303. .
  304. </mixed-citation>
  305. </ref>
  306. <ref id="10">
  307. <mixed-citation>
  308. <string-name>
  309. <surname>Easterly</surname>
  310. ,
  311. <given-names>W.</given-names>
  312. </string-name>
  313. ,
  314. <string-name>
  315. <surname>King</surname>
  316. ,
  317. <given-names>R.</given-names>
  318. </string-name>
  319. ,
  320. <string-name>
  321. <surname>Levine</surname>
  322. <given-names>R.</given-names>
  323. </string-name>
  324. ,
  325. <string-name>
  326. <surname>Rebelo</surname>
  327. ,
  328. <given-names>S.</given-names>
  329. </string-name>
  330. ,
  331. <year>1994</year>
  332. . Policy,
  333. <article-title>Technology Adoption and Growth</article-title>
  334. . NBER Working Paper No.
  335. <volume>4681</volume>
  336. .
  337. </mixed-citation>
  338. </ref>
  339. <ref id="11">
  340. <mixed-citation>
  341. <string-name>
  342. <surname>Edwards</surname>
  343. ,
  344. <given-names>S.</given-names>
  345. </string-name>
  346. ,
  347. <year>1990</year>
  348. . Capital Flows, Foreign Direct Investment, and
  349. <article-title>Debt-Equity Swaps in Developing Countries</article-title>
  350. . NBER Working Paper No.
  351. <volume>3497</volume>
  352. .
  353. </mixed-citation>
  354. </ref>
  355. <ref id="12">
  356. <mixed-citation>
  357. <string-name>
  358. <surname>Ethier</surname>
  359. ,
  360. <given-names>W.J.</given-names>
  361. </string-name>
  362. ,
  363. <year>1982</year>
  364. .
  365. <article-title>National and international returns to scale in the modern theory of international trade</article-title>
  366. .
  367. <source>American Economic Review</source>
  368. <volume>72</volume>
  369. ,
  370. <fpage>389</fpage>
  371. -
  372. <lpage>405</lpage>
  373. .
  374. </mixed-citation>
  375. </ref>
  376. <ref id="13">
  377. <mixed-citation>
  378. <string-name>
  379. <surname>Findlay</surname>
  380. ,
  381. <given-names>R.</given-names>
  382. </string-name>
  383. ,
  384. <year>1978</year>
  385. .
  386. <article-title>Relative backwardness, direct foreign investment, and the transfer of technology: a simple dynamic model</article-title>
  387. .
  388. <source>Quarterly Journal of Economics 92</source>
  389. ,
  390. <fpage>1</fpage>
  391. -
  392. <lpage>16</lpage>
  393. .
  394. </mixed-citation>
  395. </ref>
  396. <ref id="14">
  397. <mixed-citation>
  398. <string-name>
  399. <surname>Grossman</surname>
  400. ,
  401. <given-names>G.</given-names>
  402. </string-name>
  403. ,
  404. <string-name>
  405. <surname>Helpman</surname>
  406. ,
  407. <given-names>E.</given-names>
  408. </string-name>
  409. ,
  410. <year>1991</year>
  411. .
  412. <article-title>Innovation and Growth in the Global Economy</article-title>
  413. , MIT Press Cambridge, MA.
  414. </mixed-citation>
  415. </ref>
  416. <ref id="15">
  417. <mixed-citation>
  418. <string-name>
  419. <surname>Gastil</surname>
  420. ,
  421. <given-names>R.D.</given-names>
  422. </string-name>
  423. ,
  424. <year>1987</year>
  425. . Freedom in the World, Greenwood Press, Westport, CT.
  426. </mixed-citation>
  427. </ref>
  428. <ref id="16">
  429. <mixed-citation>
  430. <string-name>
  431. <surname>Graham</surname>
  432. ,
  433. <given-names>E.</given-names>
  434. </string-name>
  435. ,
  436. <string-name>
  437. <surname>Krugman</surname>
  438. ,
  439. <given-names>P.</given-names>
  440. </string-name>
  441. ,
  442. <year>1991</year>
  443. .
  444. <article-title>Foreign Direct Investment in the United States</article-title>
  445. , Institute for International Economics, Washington DC.
  446. </mixed-citation>
  447. </ref>
  448. <ref id="17">
  449. <mixed-citation>
  450. <string-name>
  451. <surname>Jovanovic</surname>
  452. ,
  453. <given-names>B.</given-names>
  454. </string-name>
  455. ,
  456. <string-name>
  457. <surname>Rob</surname>
  458. ,
  459. <given-names>R.</given-names>
  460. </string-name>
  461. ,
  462. <year>1989</year>
  463. .
  464. <article-title>Growth and diffusion of technology</article-title>
  465. .
  466. <source>Review of Economic Studies</source>
  467. <volume>56</volume>
  468. ,
  469. <fpage>569</fpage>
  470. -
  471. <lpage>582</lpage>
  472. .
  473. </mixed-citation>
  474. </ref>
  475. <ref id="18">
  476. <mixed-citation>
  477. <string-name>
  478. <surname>King</surname>
  479. ,
  480. <given-names>R.</given-names>
  481. </string-name>
  482. ,
  483. <string-name>
  484. <surname>Levine</surname>
  485. ,
  486. <given-names>R.</given-names>
  487. </string-name>
  488. ,
  489. <year>1993</year>
  490. .
  491. <article-title>Finance and growth: Schumpeter might be right</article-title>
  492. .
  493. <source>Quarterly Journal of Economics</source>
  494. <volume>108</volume>
  495. ,
  496. <fpage>717</fpage>
  497. -
  498. <lpage>738</lpage>
  499. .
  500. </mixed-citation>
  501. </ref>
  502. <ref id="19">
  503. <mixed-citation>
  504. <string-name>
  505. <surname>Knack</surname>
  506. ,
  507. <given-names>S.</given-names>
  508. </string-name>
  509. ,
  510. <string-name>
  511. <surname>Keefer</surname>
  512. ,
  513. <given-names>P.</given-names>
  514. </string-name>
  515. ,
  516. <year>1995</year>
  517. .
  518. <article-title>Institutions and economic performance: cross-country tests using alternative institutional measures</article-title>
  519. .
  520. <source>Economics and Politics</source>
  521. <volume>7</volume>
  522. ,
  523. <fpage>207</fpage>
  524. -
  525. <lpage>227</lpage>
  526. .
  527. </mixed-citation>
  528. </ref>
  529. <ref id="20">
  530. <mixed-citation>
  531. <string-name>
  532. <surname>Levine</surname>
  533. ,
  534. <given-names>R.</given-names>
  535. </string-name>
  536. ,
  537. <string-name>
  538. <surname>Renelt</surname>
  539. ,
  540. <given-names>D.</given-names>
  541. </string-name>
  542. ,
  543. <year>1992</year>
  544. .
  545. <article-title>A sensitivity analysis of cross-country growth regressions</article-title>
  546. .
  547. <source>American Economic Review</source>
  548. <volume>82</volume>
  549. ,
  550. <fpage>942</fpage>
  551. -
  552. <lpage>963</lpage>
  553. .
  554. </mixed-citation>
  555. </ref>
  556. <ref id="21">
  557. <mixed-citation>
  558. <string-name>
  559. <surname>Nelson</surname>
  560. ,
  561. <given-names>R.</given-names>
  562. </string-name>
  563. ,
  564. <string-name>
  565. <surname>Phelps</surname>
  566. ,
  567. <given-names>E.</given-names>
  568. </string-name>
  569. ,
  570. <year>1966</year>
  571. .
  572. <article-title>Investment in humans, technological diffusion, and economic growth</article-title>
  573. .
  574. <source>American Economic Review: Papers and Proceedings</source>
  575. <volume>61</volume>
  576. ,
  577. <fpage>69</fpage>
  578. -
  579. <lpage>75</lpage>
  580. .
  581. </mixed-citation>
  582. </ref>
  583. <ref id="22">
  584. <mixed-citation>
  585. <string-name>
  586. <surname>Romer</surname>
  587. ,
  588. <given-names>P.</given-names>
  589. </string-name>
  590. ,
  591. <year>1990</year>
  592. .
  593. <article-title>Endogenous technological change</article-title>
  594. .
  595. <source>Journal of Political Economy</source>
  596. <volume>98</volume>
  597. ,
  598. <fpage>S71</fpage>
  599. -
  600. <lpage>S102</lpage>
  601. .
  602. </mixed-citation>
  603. </ref>
  604. <ref id="23">
  605. <mixed-citation>
  606. <string-name>
  607. <surname>Romer</surname>
  608. ,
  609. <given-names>P.</given-names>
  610. </string-name>
  611. ,
  612. <year>1993</year>
  613. .
  614. <article-title>Idea gaps and object gaps in economic development</article-title>
  615. .
  616. <source>Journal of Monetary Economics</source>
  617. <volume>32</volume>
  618. ,
  619. <fpage>543</fpage>
  620. -
  621. <lpage>573</lpage>
  622. .
  623. </mixed-citation>
  624. </ref>
  625. <ref id="24">
  626. <mixed-citation>
  627. <string-name>
  628. <surname>Segerstrom</surname>
  629. ,
  630. <given-names>P.S.</given-names>
  631. </string-name>
  632. ,
  633. <year>1991</year>
  634. . Innovation, imitation, and
  635. <article-title>economic growth</article-title>
  636. .
  637. <source>Journal of Political Economy</source>
  638. <volume>99</volume>
  639. ,
  640. <fpage>807</fpage>
  641. -
  642. <lpage>827</lpage>
  643. .
  644. </mixed-citation>
  645. </ref>
  646. <ref id="25">
  647. <mixed-citation>
  648. <string-name>
  649. <given-names>United</given-names>
  650. <surname>Nations</surname>
  651. </string-name>
  652. ,
  653. <year>1992</year>
  654. .
  655. <source>World Investment Report 1992 Transnational Corporations as Engines of Growth</source>
  656. , Department of Economic and Social Development, United Nations, New York.
  657. </mixed-citation>
  658. </ref>
  659. <ref id="26">
  660. <mixed-citation>
  661. <string-name>
  662. <surname>Wang</surname>
  663. ,
  664. <given-names>J-Y.</given-names>
  665. </string-name>
  666. ,
  667. <year>1990</year>
  668. .
  669. <article-title>Growth, technology transfer, and the long-run theory of international capital movements</article-title>
  670. .
  671. <source>Journal of International Economics</source>
  672. <volume>29</volume>
  673. ,
  674. <fpage>255</fpage>
  675. -
  676. <lpage>271</lpage>
  677. .
  678. </mixed-citation>
  679. </ref>
  680. </ref-list>
  681. </back>
  682. </article>
  683.  
  684. fo = open('The international law on foreign investment.cermxml')
  685. doc = etree.parse(fo)
  686. ## TRY 1
  687. doc.find('abstract') # This yields nothing
  688.  
  689. ## TRY 2
  690. path_result = doc.xpath('//abstract') ## Returns empty list
  691.  
  692. ## TRY 3
  693. root = doc.getroot()
  694. result = root.iter('abstract') # This yeilds <lxml.etree.ElementDepthFirstIterator at 0x7f1f71c15a20>
  695. ## Dont know what to do ahead. Printing in loop doesn't work
  696.  
  697. ## TRY 4
  698. for child in root[0][1]:
  699. print(child.tag)
  700. ## Abstract tag is child of article-meta[0] which in turn is a child of main parent tag. Hence [0][1]
  701. ## This should ideally give abstract as one of its child - but it does not.
  702.  
  703. <body>
  704. <sec id="1">
  705. <title>1. Introduction</title>
  706. <p>Technology diffusion plays a central role in the process of economic
  707. development.2 In contrast to the traditional growth framework, where technological
  708. change was left as an unexplained residual, the recent growth literature has
  709. highlighted the dependence of growth rates on the state of domestic technology
  710. relative to that of the rest of the world. Thus, growth rates in developing countries
  711. are, in part, explained by a โ€˜catch-upโ€™ process in the level of technology. In a
  712. typical model of technology diffusion, the rate of economic growth of a backward
  713. country depends on the extent of adoption and implementation of new
  714. technologies that are already in use in leading countries.</p>
  715. <p>The paper is divided into four sections. Section 2 presents a simple model to
  716. motivate our empirical investigation; Section 3 provides an account of the data
  717. used in the empirical analysis; Section 4 describes the regression results, and
  718. Section 5 presents some concluding remarks.</p>
  719. </sec>
  720. <sec id="2">... </sec>
  721. </body>
  722.  
  723. >>> d = etree.parse(open('...')) # file with your exact content
  724. >>> e = d.getroot()
  725. >>> e.xpath('.//abstract')
  726. [<Element abstract at 0x7f9239c10710>]
  727. >>> e.xpath('.//abstract/p')[0].text # first p inside abstract
  728. 'We test the effect of foreign direct investment (FDI) ...'
  729.  
  730. from bs4 import BeautifulSoup
  731.  
  732. soup = BeautifulSoup(xmla)
  733. print (soup.find('abstract'))
  734.  
  735. >>> '<abstract>haha</abstract>'
  736.  
  737. import os
  738. import lxml.etree as et
  739.  
  740. def get_article_abstract(article_file, tag_path_elements=None):
  741. """
  742. :param article_file: the xml file for a single article
  743. :param tag_path_elements: xpath search results of the location in the article's XML tree
  744. :param article_file: individual local PLOS XML article
  745. :return: plain-text string of content in abstract
  746. """
  747. if tag_path_elements is None:
  748. tag_path_elements = ("/",
  749. "article",
  750. "front",
  751. "article-meta",
  752. "abstract")
  753.  
  754. article_tree = et.parse(article_file)
  755. article_root = article_tree.getroot()
  756. tag_location = '/'.join(tag_path_elements)
  757. abstract = article_root.xpath(tag_location)
  758. abstract_text = et.tostring(abstract[0], encoding='unicode', method='text')
  759.  
  760. # clean up text: rem white space, new line marks, blank lines
  761. abstract_text = abstract_text.strip().replace(' ', '')
  762. abstract_text = os.linesep.join([s for s in abstract_text.splitlines() if s])
  763.  
  764. return print(abstract_text)
Add Comment
Please, Sign In to add comment