Advertisement
nsaunders

Untitled

Oct 9th, 2022
38
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 5.40 KB | None | 0 0
  1. PS /home/nicholas/xml>
  2. PS /home/nicholas/xml>
  3. PS /home/nicholas/xml> $raw = get-content ./books.xml
  4. PS /home/nicholas/xml>
  5. PS /home/nicholas/xml> $raw
  6. <?xml version="1.0"?>
  7. <catalog>
  8. <book id="bk101">
  9. <author>Gambardella, Matthew</author>
  10. <title>XML Developer's Guide</title>
  11. <genre>Computer</genre>
  12. <price>44.95</price>
  13. <publish_date>2000-10-01</publish_date>
  14. <description>An in-depth look at creating applications
  15. with XML.</description>
  16. </book>
  17. <book id="bk102">
  18. <author>Ralls, Kim</author>
  19. <title>Midnight Rain</title>
  20. <genre>Fantasy</genre>
  21. <price>5.95</price>
  22. <publish_date>2000-12-16</publish_date>
  23. <description>A former architect battles corporate zombies,
  24. an evil sorceress, and her own childhood to become queen
  25. of the world.</description>
  26. </book>
  27. <book id="bk103">
  28. <author>Corets, Eva</author>
  29. <title>Maeve Ascendant</title>
  30. <genre>Fantasy</genre>
  31. <price>5.95</price>
  32. <publish_date>2000-11-17</publish_date>
  33. <description>After the collapse of a nanotechnology
  34. society in England, the young survivors lay the
  35. foundation for a new society.</description>
  36. </book>
  37. <book id="bk104">
  38. <author>Corets, Eva</author>
  39. <title>Oberon's Legacy</title>
  40. <genre>Fantasy</genre>
  41. <price>5.95</price>
  42. <publish_date>2001-03-10</publish_date>
  43. <description>In post-apocalypse England, the mysterious
  44. agent known only as Oberon helps to create a new life
  45. for the inhabitants of London. Sequel to Maeve
  46. Ascendant.</description>
  47. </book>
  48. <book id="bk105">
  49. <author>Corets, Eva</author>
  50. <title>The Sundered Grail</title>
  51. <genre>Fantasy</genre>
  52. <price>5.95</price>
  53. <publish_date>2001-09-10</publish_date>
  54. <description>The two daughters of Maeve, half-sisters,
  55. battle one another for control of England. Sequel to
  56. Oberon's Legacy.</description>
  57. </book>
  58. <book id="bk106">
  59. <author>Randall, Cynthia</author>
  60. <title>Lover Birds</title>
  61. <genre>Romance</genre>
  62. <price>4.95</price>
  63. <publish_date>2000-09-02</publish_date>
  64. <description>When Carla meets Paul at an ornithology
  65. conference, tempers fly as feathers get ruffled.</description>
  66. </book>
  67. <book id="bk107">
  68. <author>Thurman, Paula</author>
  69. <title>Splish Splash</title>
  70. <genre>Romance</genre>
  71. <price>4.95</price>
  72. <publish_date>2000-11-02</publish_date>
  73. <description>A deep sea diver finds true love twenty
  74. thousand leagues beneath the sea.</description>
  75. </book>
  76. <book id="bk108">
  77. <author>Knorr, Stefan</author>
  78. <title>Creepy Crawlies</title>
  79. <genre>Horror</genre>
  80. <price>4.95</price>
  81. <publish_date>2000-12-06</publish_date>
  82. <description>An anthology of horror stories about roaches,
  83. centipedes, scorpions and other insects.</description>
  84. </book>
  85. <book id="bk109">
  86. <author>Kress, Peter</author>
  87. <title>Paradox Lost</title>
  88. <genre>Science Fiction</genre>
  89. <price>6.95</price>
  90. <publish_date>2000-11-02</publish_date>
  91. <description>After an inadvertant trip through a Heisenberg
  92. Uncertainty Device, James Salway discovers the problems
  93. of being quantum.</description>
  94. </book>
  95. <book id="bk110">
  96. <author>O'Brien, Tim</author>
  97. <title>Microsoft .NET: The Programming Bible</title>
  98. <genre>Computer</genre>
  99. <price>36.95</price>
  100. <publish_date>2000-12-09</publish_date>
  101. <description>Microsoft's .NET initiative is explored in
  102. detail in this deep programmer's reference.</description>
  103. </book>
  104. <book id="bk111">
  105. <author>O'Brien, Tim</author>
  106. <title>MSXML3: A Comprehensive Guide</title>
  107. <genre>Computer</genre>
  108. <price>36.95</price>
  109. <publish_date>2000-12-01</publish_date>
  110. <description>The Microsoft MSXML3 parser is covered in
  111. detail, with attention to XML DOM interfaces, XSLT processing,
  112. SAX and more.</description>
  113. </book>
  114. <book id="bk112">
  115. <author>Galos, Mike</author>
  116. <title>Visual Studio 7: A Comprehensive Guide</title>
  117. <genre>Computer</genre>
  118. <price>49.95</price>
  119. <publish_date>2001-04-16</publish_date>
  120. <description>Microsoft Visual Studio 7 is explored in depth,
  121. looking at how Visual Basic, Visual C++, C#, and ASP+ are
  122. integrated into a comprehensive development
  123. environment.</description>
  124. </book>
  125. </catalog>
  126.  
  127.  
  128. PS /home/nicholas/xml>
  129. PS /home/nicholas/xml> $xml = Import-Clixml $raw
  130. Import-Clixml: Cannot bind argument to parameter 'Path' because it is an empty string.
  131. PS /home/nicholas/xml>
  132. PS /home/nicholas/xml> $xml = [xml]$raw
  133. PS /home/nicholas/xml>
  134. PS /home/nicholas/xml> $xml
  135.  
  136. xml catalog
  137. --- -------
  138. version="1.0" catalog
  139.  
  140. PS /home/nicholas/xml>
  141. PS /home/nicholas/xml> $books = Import-Clixml -Path '/home/nicholas/xml/books.xml'
  142. Import-Clixml: Element 'Objs' with namespace name 'http://schemas.microsoft.com/powershell/2004/04' was not found. Line 2, position 2.
  143. PS /home/nicholas/xml>
  144. PS /home/nicholas/xml> pwd
  145.  
  146. Path
  147. ----
  148. /home/nicholas/xml
  149.  
  150. PS /home/nicholas/xml>
  151. PS /home/nicholas/xml> ls
  152. books.xml
  153. PS /home/nicholas/xml>
  154. PS /home/nicholas/xml>
  155.  
  156.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement