03-Atom.json 9.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678
  1. {
  2. "name": "Atom feed",
  3. "options": {"xmlMode": true},
  4. "file": "Atom_Example.xml",
  5. "expected": [
  6. {
  7. "event": "processinginstruction",
  8. "data": [
  9. "?xml",
  10. "?xml version=\"1.0\" encoding=\"utf-8\"?"
  11. ]
  12. },
  13. {
  14. "event": "text",
  15. "data": [
  16. "\n"
  17. ]
  18. },
  19. {
  20. "event": "comment",
  21. "data": [
  22. " http://en.wikipedia.org/wiki/Atom_%28standard%29 "
  23. ]
  24. },
  25. {
  26. "event": "commentend",
  27. "data": []
  28. },
  29. {
  30. "event": "text",
  31. "data": [
  32. "\n"
  33. ]
  34. },
  35. {
  36. "event": "opentagname",
  37. "data": [
  38. "feed"
  39. ]
  40. },
  41. {
  42. "event": "attribute",
  43. "data": [
  44. "xmlns",
  45. "http://www.w3.org/2005/Atom"
  46. ]
  47. },
  48. {
  49. "event": "opentag",
  50. "data": [
  51. "feed",
  52. {
  53. "xmlns": "http://www.w3.org/2005/Atom"
  54. }
  55. ]
  56. },
  57. {
  58. "event": "text",
  59. "data": [
  60. "\n\t"
  61. ]
  62. },
  63. {
  64. "event": "opentagname",
  65. "data": [
  66. "title"
  67. ]
  68. },
  69. {
  70. "event": "opentag",
  71. "data": [
  72. "title",
  73. {}
  74. ]
  75. },
  76. {
  77. "event": "text",
  78. "data": [
  79. "Example Feed"
  80. ]
  81. },
  82. {
  83. "event": "closetag",
  84. "data": [
  85. "title"
  86. ]
  87. },
  88. {
  89. "event": "text",
  90. "data": [
  91. "\n\t"
  92. ]
  93. },
  94. {
  95. "event": "opentagname",
  96. "data": [
  97. "subtitle"
  98. ]
  99. },
  100. {
  101. "event": "opentag",
  102. "data": [
  103. "subtitle",
  104. {}
  105. ]
  106. },
  107. {
  108. "event": "text",
  109. "data": [
  110. "A subtitle."
  111. ]
  112. },
  113. {
  114. "event": "closetag",
  115. "data": [
  116. "subtitle"
  117. ]
  118. },
  119. {
  120. "event": "text",
  121. "data": [
  122. "\n\t"
  123. ]
  124. },
  125. {
  126. "event": "opentagname",
  127. "data": [
  128. "link"
  129. ]
  130. },
  131. {
  132. "event": "attribute",
  133. "data": [
  134. "href",
  135. "http://example.org/feed/"
  136. ]
  137. },
  138. {
  139. "event": "attribute",
  140. "data": [
  141. "rel",
  142. "self"
  143. ]
  144. },
  145. {
  146. "event": "opentag",
  147. "data": [
  148. "link",
  149. {
  150. "href": "http://example.org/feed/",
  151. "rel": "self"
  152. }
  153. ]
  154. },
  155. {
  156. "event": "closetag",
  157. "data": [
  158. "link"
  159. ]
  160. },
  161. {
  162. "event": "text",
  163. "data": [
  164. "\n\t"
  165. ]
  166. },
  167. {
  168. "event": "opentagname",
  169. "data": [
  170. "link"
  171. ]
  172. },
  173. {
  174. "event": "attribute",
  175. "data": [
  176. "href",
  177. "http://example.org/"
  178. ]
  179. },
  180. {
  181. "event": "opentag",
  182. "data": [
  183. "link",
  184. {
  185. "href": "http://example.org/"
  186. }
  187. ]
  188. },
  189. {
  190. "event": "closetag",
  191. "data": [
  192. "link"
  193. ]
  194. },
  195. {
  196. "event": "text",
  197. "data": [
  198. "\n\t"
  199. ]
  200. },
  201. {
  202. "event": "opentagname",
  203. "data": [
  204. "id"
  205. ]
  206. },
  207. {
  208. "event": "opentag",
  209. "data": [
  210. "id",
  211. {}
  212. ]
  213. },
  214. {
  215. "event": "text",
  216. "data": [
  217. "urn:uuid:60a76c80-d399-11d9-b91C-0003939e0af6"
  218. ]
  219. },
  220. {
  221. "event": "closetag",
  222. "data": [
  223. "id"
  224. ]
  225. },
  226. {
  227. "event": "text",
  228. "data": [
  229. "\n\t"
  230. ]
  231. },
  232. {
  233. "event": "opentagname",
  234. "data": [
  235. "updated"
  236. ]
  237. },
  238. {
  239. "event": "opentag",
  240. "data": [
  241. "updated",
  242. {}
  243. ]
  244. },
  245. {
  246. "event": "text",
  247. "data": [
  248. "2003-12-13T18:30:02Z"
  249. ]
  250. },
  251. {
  252. "event": "closetag",
  253. "data": [
  254. "updated"
  255. ]
  256. },
  257. {
  258. "event": "text",
  259. "data": [
  260. "\n\t"
  261. ]
  262. },
  263. {
  264. "event": "opentagname",
  265. "data": [
  266. "author"
  267. ]
  268. },
  269. {
  270. "event": "opentag",
  271. "data": [
  272. "author",
  273. {}
  274. ]
  275. },
  276. {
  277. "event": "text",
  278. "data": [
  279. "\n\t\t"
  280. ]
  281. },
  282. {
  283. "event": "opentagname",
  284. "data": [
  285. "name"
  286. ]
  287. },
  288. {
  289. "event": "opentag",
  290. "data": [
  291. "name",
  292. {}
  293. ]
  294. },
  295. {
  296. "event": "text",
  297. "data": [
  298. "John Doe"
  299. ]
  300. },
  301. {
  302. "event": "closetag",
  303. "data": [
  304. "name"
  305. ]
  306. },
  307. {
  308. "event": "text",
  309. "data": [
  310. "\n\t\t"
  311. ]
  312. },
  313. {
  314. "event": "opentagname",
  315. "data": [
  316. "email"
  317. ]
  318. },
  319. {
  320. "event": "opentag",
  321. "data": [
  322. "email",
  323. {}
  324. ]
  325. },
  326. {
  327. "event": "text",
  328. "data": [
  329. "johndoe@example.com"
  330. ]
  331. },
  332. {
  333. "event": "closetag",
  334. "data": [
  335. "email"
  336. ]
  337. },
  338. {
  339. "event": "text",
  340. "data": [
  341. "\n\t"
  342. ]
  343. },
  344. {
  345. "event": "closetag",
  346. "data": [
  347. "author"
  348. ]
  349. },
  350. {
  351. "event": "text",
  352. "data": [
  353. "\n\n\t"
  354. ]
  355. },
  356. {
  357. "event": "opentagname",
  358. "data": [
  359. "entry"
  360. ]
  361. },
  362. {
  363. "event": "opentag",
  364. "data": [
  365. "entry",
  366. {}
  367. ]
  368. },
  369. {
  370. "event": "text",
  371. "data": [
  372. "\n\t\t"
  373. ]
  374. },
  375. {
  376. "event": "opentagname",
  377. "data": [
  378. "title"
  379. ]
  380. },
  381. {
  382. "event": "opentag",
  383. "data": [
  384. "title",
  385. {}
  386. ]
  387. },
  388. {
  389. "event": "text",
  390. "data": [
  391. "Atom-Powered Robots Run Amok"
  392. ]
  393. },
  394. {
  395. "event": "closetag",
  396. "data": [
  397. "title"
  398. ]
  399. },
  400. {
  401. "event": "text",
  402. "data": [
  403. "\n\t\t"
  404. ]
  405. },
  406. {
  407. "event": "opentagname",
  408. "data": [
  409. "link"
  410. ]
  411. },
  412. {
  413. "event": "attribute",
  414. "data": [
  415. "href",
  416. "http://example.org/2003/12/13/atom03"
  417. ]
  418. },
  419. {
  420. "event": "opentag",
  421. "data": [
  422. "link",
  423. {
  424. "href": "http://example.org/2003/12/13/atom03"
  425. }
  426. ]
  427. },
  428. {
  429. "event": "closetag",
  430. "data": [
  431. "link"
  432. ]
  433. },
  434. {
  435. "event": "text",
  436. "data": [
  437. "\n\t\t"
  438. ]
  439. },
  440. {
  441. "event": "opentagname",
  442. "data": [
  443. "link"
  444. ]
  445. },
  446. {
  447. "event": "attribute",
  448. "data": [
  449. "rel",
  450. "alternate"
  451. ]
  452. },
  453. {
  454. "event": "attribute",
  455. "data": [
  456. "type",
  457. "text/html"
  458. ]
  459. },
  460. {
  461. "event": "attribute",
  462. "data": [
  463. "href",
  464. "http://example.org/2003/12/13/atom03.html"
  465. ]
  466. },
  467. {
  468. "event": "opentag",
  469. "data": [
  470. "link",
  471. {
  472. "rel": "alternate",
  473. "type": "text/html",
  474. "href": "http://example.org/2003/12/13/atom03.html"
  475. }
  476. ]
  477. },
  478. {
  479. "event": "closetag",
  480. "data": [
  481. "link"
  482. ]
  483. },
  484. {
  485. "event": "text",
  486. "data": [
  487. "\n\t\t"
  488. ]
  489. },
  490. {
  491. "event": "opentagname",
  492. "data": [
  493. "link"
  494. ]
  495. },
  496. {
  497. "event": "attribute",
  498. "data": [
  499. "rel",
  500. "edit"
  501. ]
  502. },
  503. {
  504. "event": "attribute",
  505. "data": [
  506. "href",
  507. "http://example.org/2003/12/13/atom03/edit"
  508. ]
  509. },
  510. {
  511. "event": "opentag",
  512. "data": [
  513. "link",
  514. {
  515. "rel": "edit",
  516. "href": "http://example.org/2003/12/13/atom03/edit"
  517. }
  518. ]
  519. },
  520. {
  521. "event": "closetag",
  522. "data": [
  523. "link"
  524. ]
  525. },
  526. {
  527. "event": "text",
  528. "data": [
  529. "\n\t\t"
  530. ]
  531. },
  532. {
  533. "event": "opentagname",
  534. "data": [
  535. "id"
  536. ]
  537. },
  538. {
  539. "event": "opentag",
  540. "data": [
  541. "id",
  542. {}
  543. ]
  544. },
  545. {
  546. "event": "text",
  547. "data": [
  548. "urn:uuid:1225c695-cfb8-4ebb-aaaa-80da344efa6a"
  549. ]
  550. },
  551. {
  552. "event": "closetag",
  553. "data": [
  554. "id"
  555. ]
  556. },
  557. {
  558. "event": "text",
  559. "data": [
  560. "\n\t\t"
  561. ]
  562. },
  563. {
  564. "event": "opentagname",
  565. "data": [
  566. "updated"
  567. ]
  568. },
  569. {
  570. "event": "opentag",
  571. "data": [
  572. "updated",
  573. {}
  574. ]
  575. },
  576. {
  577. "event": "text",
  578. "data": [
  579. "2003-12-13T18:30:02Z"
  580. ]
  581. },
  582. {
  583. "event": "closetag",
  584. "data": [
  585. "updated"
  586. ]
  587. },
  588. {
  589. "event": "text",
  590. "data": [
  591. "\n\t\t"
  592. ]
  593. },
  594. {
  595. "event": "opentagname",
  596. "data": [
  597. "content"
  598. ]
  599. },
  600. {
  601. "event": "attribute",
  602. "data": [
  603. "type",
  604. "html"
  605. ]
  606. },
  607. {
  608. "event": "opentag",
  609. "data": [
  610. "content",
  611. {
  612. "type": "html"
  613. }
  614. ]
  615. },
  616. {
  617. "event": "opentagname",
  618. "data": [
  619. "p"
  620. ]
  621. },
  622. {
  623. "event": "opentag",
  624. "data": [
  625. "p",
  626. {}
  627. ]
  628. },
  629. {
  630. "event": "text",
  631. "data": [
  632. "Some content."
  633. ]
  634. },
  635. {
  636. "event": "closetag",
  637. "data": [
  638. "p"
  639. ]
  640. },
  641. {
  642. "event": "closetag",
  643. "data": [
  644. "content"
  645. ]
  646. },
  647. {
  648. "event": "text",
  649. "data": [
  650. "\n\t"
  651. ]
  652. },
  653. {
  654. "event": "closetag",
  655. "data": [
  656. "entry"
  657. ]
  658. },
  659. {
  660. "event": "text",
  661. "data": [
  662. "\n\n"
  663. ]
  664. },
  665. {
  666. "event": "closetag",
  667. "data": [
  668. "feed"
  669. ]
  670. },
  671. {
  672. "event": "text",
  673. "data": [
  674. "\n"
  675. ]
  676. }
  677. ]
  678. }