XML-Tiny-2.07/000755 000765 000024 00000000000 13145401440 013251 5ustar00davidstaff000000 000000 XML-Tiny-2.07/ARTISTIC.txt000644 000765 000024 00000013737 11612551241 015251 0ustar00davidstaff000000 000000 The "Artistic License" Preamble The intent of this document is to state the conditions under which a Package may be copied, such that the Copyright Holder maintains some semblance of artistic control over the development of the package, while giving the users of the package the right to use and distribute the Package in a more-or-less customary fashion, plus the right to make reasonable modifications. Definitions: "Package" refers to the collection of files distributed by the Copyright Holder, and derivatives of that collection of files created through textual modification. "Standard Version" refers to such a Package if it has not been modified, or has been modified in accordance with the wishes of the Copyright Holder as specified below. "Copyright Holder" is whoever is named in the copyright or copyrights for the package. "You" is you, if you're thinking about copying or distributing this Package. "Reasonable copying fee" is whatever you can justify on the basis of media cost, duplication charges, time of people involved, and so on. (You will not be required to justify it to the Copyright Holder, but only to the computing community at large as a market that must bear the fee.) "Freely Available" means that no fee is charged for the item itself, though there may be fees involved in handling the item. It also means that recipients of the item may redistribute it under the same conditions they received it. 1. You may make and give away verbatim copies of the source form of the Standard Version of this Package without restriction, provided that you duplicate all of the original copyright notices and associated disclaimers. 2. You may apply bug fixes, portability fixes and other modifications derived from the Public Domain or from the Copyright Holder. A Package modified in such a way shall still be considered the Standard Version. 3. You may otherwise modify your copy of this Package in any way, provided that you insert a prominent notice in each changed file stating how and when you changed that file, and provided that you do at least ONE of the following: a) place your modifications in the Public Domain or otherwise make them Freely Available, such as by posting said modifications to Usenet or an equivalent medium, or placing the modifications on a major archive site such as uunet.uu.net, or by allowing the Copyright Holder to include your modifications in the Standard Version of the Package. b) use the modified Package only within your corporation or organization. c) rename any non-standard executables so the names do not conflict with standard executables, which must also be provided, and provide a separate manual page for each non-standard executable that clearly documents how it differs from the Standard Version. d) make other distribution arrangements with the Copyright Holder. 4. You may distribute the programs of this Package in object code or executable form, provided that you do at least ONE of the following: a) distribute a Standard Version of the executables and library files, together with instructions (in the manual page or equivalent) on where to get the Standard Version. b) accompany the distribution with the machine-readable source of the Package with your modifications. c) give non-standard executables non-standard names, and clearly document the differences in manual pages (or equivalent), together with instructions on where to get the Standard Version. d) make other distribution arrangements with the Copyright Holder. 5. You may charge a reasonable copying fee for any distribution of this Package. You may charge any fee you choose for support of this Package. You may not charge a fee for this Package itself. However, you may distribute this Package in aggregate with other (possibly commercial) programs as part of a larger (possibly commercial) software distribution provided that you do not advertise this Package as a product of your own. You may embed this Package's interpreter within an executable of yours (by linking); this shall be construed as a mere form of aggregation, provided that the complete Standard Version of the interpreter is so embedded. 6. The scripts and library files supplied as input to or produced as output from the programs of this Package do not automatically fall under the copyright of this Package, but belong to whoever generated them, and may be sold commercially, and may be aggregated with this Package. If such scripts or library files are aggregated with this Package via the so-called "undump" or "unexec" methods of producing a binary executable image, then distribution of such an image shall neither be construed as a distribution of this Package nor shall it fall under the restrictions of Paragraphs 3 and 4, provided that you do not represent such an executable image as a Standard Version of this Package. 7. C subroutines (or comparably compiled subroutines in other languages) supplied by you and linked into this Package in order to emulate subroutines and variables of the language defined by this Package shall not be considered part of this Package, but are the equivalent of input as in Paragraph 6, provided these subroutines do not change the language in any way that would cause it to fail the regression tests for the language. 8. Aggregation of this Package with a commercial distribution is always permitted provided that the use of this Package is embedded; that is, when no overt attempt is made to make this Package's interfaces visible to the end user of the commercial distribution. Such use shall not be construed as a distribution of this Package. 9. The name of the Copyright Holder may not be used to endorse or promote products derived from this software without specific prior written permission. 10. THIS PACKAGE IS PROVIDED "AS IS" AND WITHOUT ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE. The End XML-Tiny-2.07/CHANGELOG000644 000765 000024 00000000650 13145400230 014460 0ustar00davidstaff000000 000000 Release history for Perl module XML::Tiny 2.07 2017-08-17 2.06 2010-12-16 2.05 2010-08-13 2.04 2010-04-23 2.03 2010-01-14 2.02 2009-03-24 2.01 2009-03-23 2.0 2009-03-22 1.12 2009-01-22 1.11 2007-11-01 1.10 2007-10-30 1.09 2007-10-29 1.08 2007-10-25 1.07 2007-10-24 1.06 2007-03-05 1.05 2007-02-28 1.04 2007-02-11 1.03 2007-02-03 1.02 2007-01-31 1.01 2007-01-30 1.0 2007-01-26 - initial CPAN release XML-Tiny-2.07/GPL2.txt000644 000765 000024 00000043103 11612551241 014521 0ustar00davidstaff000000 000000 GNU GENERAL PUBLIC LICENSE Version 2, June 1991 Copyright (C) 1989, 1991 Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed. Preamble The licenses for most software are designed to take away your freedom to share and change it. By contrast, the GNU General Public License is intended to guarantee your freedom to share and change free software--to make sure the software is free for all its users. This General Public License applies to most of the Free Software Foundation's software and to any other program whose authors commit to using it. (Some other Free Software Foundation software is covered by the GNU Lesser General Public License instead.) You can apply it to your programs, too. When we speak of free software, we are referring to freedom, not price. Our General Public Licenses are designed to make sure that you have the freedom to distribute copies of free software (and charge for this service if you wish), that you receive source code or can get it if you want it, that you can change the software or use pieces of it in new free programs; and that you know you can do these things. To protect your rights, we need to make restrictions that forbid anyone to deny you these rights or to ask you to surrender the rights. These restrictions translate to certain responsibilities for you if you distribute copies of the software, or if you modify it. For example, if you distribute copies of such a program, whether gratis or for a fee, you must give the recipients all the rights that you have. You must make sure that they, too, receive or can get the source code. And you must show them these terms so they know their rights. We protect your rights with two steps: (1) copyright the software, and (2) offer you this license which gives you legal permission to copy, distribute and/or modify the software. Also, for each author's protection and ours, we want to make certain that everyone understands that there is no warranty for this free software. If the software is modified by someone else and passed on, we want its recipients to know that what they have is not the original, so that any problems introduced by others will not reflect on the original authors' reputations. Finally, any free program is threatened constantly by software patents. We wish to avoid the danger that redistributors of a free program will individually obtain patent licenses, in effect making the program proprietary. To prevent this, we have made it clear that any patent must be licensed for everyone's free use or not licensed at all. The precise terms and conditions for copying, distribution and modification follow. GNU GENERAL PUBLIC LICENSE TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION 0. This License applies to any program or other work which contains a notice placed by the copyright holder saying it may be distributed under the terms of this General Public License. The "Program", below, refers to any such program or work, and a "work based on the Program" means either the Program or any derivative work under copyright law: that is to say, a work containing the Program or a portion of it, either verbatim or with modifications and/or translated into another language. (Hereinafter, translation is included without limitation in the term "modification".) Each licensee is addressed as "you". Activities other than copying, distribution and modification are not covered by this License; they are outside its scope. The act of running the Program is not restricted, and the output from the Program is covered only if its contents constitute a work based on the Program (independent of having been made by running the Program). Whether that is true depends on what the Program does. 1. You may copy and distribute verbatim copies of the Program's source code as you receive it, in any medium, provided that you conspicuously and appropriately publish on each copy an appropriate copyright notice and disclaimer of warranty; keep intact all the notices that refer to this License and to the absence of any warranty; and give any other recipients of the Program a copy of this License along with the Program. You may charge a fee for the physical act of transferring a copy, and you may at your option offer warranty protection in exchange for a fee. 2. You may modify your copy or copies of the Program or any portion of it, thus forming a work based on the Program, and copy and distribute such modifications or work under the terms of Section 1 above, provided that you also meet all of these conditions: a) You must cause the modified files to carry prominent notices stating that you changed the files and the date of any change. b) You must cause any work that you distribute or publish, that in whole or in part contains or is derived from the Program or any part thereof, to be licensed as a whole at no charge to all third parties under the terms of this License. c) If the modified program normally reads commands interactively when run, you must cause it, when started running for such interactive use in the most ordinary way, to print or display an announcement including an appropriate copyright notice and a notice that there is no warranty (or else, saying that you provide a warranty) and that users may redistribute the program under these conditions, and telling the user how to view a copy of this License. (Exception: if the Program itself is interactive but does not normally print such an announcement, your work based on the Program is not required to print an announcement.) These requirements apply to the modified work as a whole. If identifiable sections of that work are not derived from the Program, and can be reasonably considered independent and separate works in themselves, then this License, and its terms, do not apply to those sections when you distribute them as separate works. But when you distribute the same sections as part of a whole which is a work based on the Program, the distribution of the whole must be on the terms of this License, whose permissions for other licensees extend to the entire whole, and thus to each and every part regardless of who wrote it. Thus, it is not the intent of this section to claim rights or contest your rights to work written entirely by you; rather, the intent is to exercise the right to control the distribution of derivative or collective works based on the Program. In addition, mere aggregation of another work not based on the Program with the Program (or with a work based on the Program) on a volume of a storage or distribution medium does not bring the other work under the scope of this License. 3. You may copy and distribute the Program (or a work based on it, under Section 2) in object code or executable form under the terms of Sections 1 and 2 above provided that you also do one of the following: a) Accompany it with the complete corresponding machine-readable source code, which must be distributed under the terms of Sections 1 and 2 above on a medium customarily used for software interchange; or, b) Accompany it with a written offer, valid for at least three years, to give any third party, for a charge no more than your cost of physically performing source distribution, a complete machine-readable copy of the corresponding source code, to be distributed under the terms of Sections 1 and 2 above on a medium customarily used for software interchange; or, c) Accompany it with the information you received as to the offer to distribute corresponding source code. (This alternative is allowed only for noncommercial distribution and only if you received the program in object code or executable form with such an offer, in accord with Subsection b above.) The source code for a work means the preferred form of the work for making modifications to it. For an executable work, complete source code means all the source code for all modules it contains, plus any associated interface definition files, plus the scripts used to control compilation and installation of the executable. However, as a special exception, the source code distributed need not include anything that is normally distributed (in either source or binary form) with the major components (compiler, kernel, and so on) of the operating system on which the executable runs, unless that component itself accompanies the executable. If distribution of executable or object code is made by offering access to copy from a designated place, then offering equivalent access to copy the source code from the same place counts as distribution of the source code, even though third parties are not compelled to copy the source along with the object code. 4. You may not copy, modify, sublicense, or distribute the Program except as expressly provided under this License. Any attempt otherwise to copy, modify, sublicense or distribute the Program is void, and will automatically terminate your rights under this License. However, parties who have received copies, or rights, from you under this License will not have their licenses terminated so long as such parties remain in full compliance. 5. You are not required to accept this License, since you have not signed it. However, nothing else grants you permission to modify or distribute the Program or its derivative works. These actions are prohibited by law if you do not accept this License. Therefore, by modifying or distributing the Program (or any work based on the Program), you indicate your acceptance of this License to do so, and all its terms and conditions for copying, distributing or modifying the Program or works based on it. 6. Each time you redistribute the Program (or any work based on the Program), the recipient automatically receives a license from the original licensor to copy, distribute or modify the Program subject to these terms and conditions. You may not impose any further restrictions on the recipients' exercise of the rights granted herein. You are not responsible for enforcing compliance by third parties to this License. 7. If, as a consequence of a court judgment or allegation of patent infringement or for any other reason (not limited to patent issues), conditions are imposed on you (whether by court order, agreement or otherwise) that contradict the conditions of this License, they do not excuse you from the conditions of this License. If you cannot distribute so as to satisfy simultaneously your obligations under this License and any other pertinent obligations, then as a consequence you may not distribute the Program at all. For example, if a patent license would not permit royalty-free redistribution of the Program by all those who receive copies directly or indirectly through you, then the only way you could satisfy both it and this License would be to refrain entirely from distribution of the Program. If any portion of this section is held invalid or unenforceable under any particular circumstance, the balance of the section is intended to apply and the section as a whole is intended to apply in other circumstances. It is not the purpose of this section to induce you to infringe any patents or other property right claims or to contest validity of any such claims; this section has the sole purpose of protecting the integrity of the free software distribution system, which is implemented by public license practices. Many people have made generous contributions to the wide range of software distributed through that system in reliance on consistent application of that system; it is up to the author/donor to decide if he or she is willing to distribute software through any other system and a licensee cannot impose that choice. This section is intended to make thoroughly clear what is believed to be a consequence of the rest of this License. 8. If the distribution and/or use of the Program is restricted in certain countries either by patents or by copyrighted interfaces, the original copyright holder who places the Program under this License may add an explicit geographical distribution limitation excluding those countries, so that distribution is permitted only in or among countries not thus excluded. In such case, this License incorporates the limitation as if written in the body of this License. 9. The Free Software Foundation may publish revised and/or new versions of the General Public License from time to time. Such new versions will be similar in spirit to the present version, but may differ in detail to address new problems or concerns. Each version is given a distinguishing version number. If the Program specifies a version number of this License which applies to it and "any later version", you have the option of following the terms and conditions either of that version or of any later version published by the Free Software Foundation. If the Program does not specify a version number of this License, you may choose any version ever published by the Free Software Foundation. 10. If you wish to incorporate parts of the Program into other free programs whose distribution conditions are different, write to the author to ask for permission. For software which is copyrighted by the Free Software Foundation, write to the Free Software Foundation; we sometimes make exceptions for this. Our decision will be guided by the two goals of preserving the free status of all derivatives of our free software and of promoting the sharing and reuse of software generally. NO WARRANTY 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. END OF TERMS AND CONDITIONS How to Apply These Terms to Your New Programs If you develop a new program, and you want it to be of the greatest possible use to the public, the best way to achieve this is to make it free software which everyone can redistribute and change under these terms. To do so, attach the following notices to the program. It is safest to attach them to the start of each source file to most effectively convey the exclusion of warranty; and each file should have at least the "copyright" line and a pointer to where the full notice is found. Copyright (C) This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. Also add information on how to contact you by electronic and paper mail. If the program is interactive, make it output a short notice like this when it starts in an interactive mode: Gnomovision version 69, Copyright (C) year name of author Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'. This is free software, and you are welcome to redistribute it under certain conditions; type `show c' for details. The hypothetical commands `show w' and `show c' should show the appropriate parts of the General Public License. Of course, the commands you use may be called something other than `show w' and `show c'; they could even be mouse-clicks or menu items--whatever suits your program. You should also get your employer (if you work as a programmer) or your school, if any, to sign a "copyright disclaimer" for the program, if necessary. Here is a sample; alter the names: Yoyodyne, Inc., hereby disclaims all copyright interest in the program `Gnomovision' (which makes passes at compilers) written by James Hacker. , 1 April 1989 Ty Coon, President of Vice This General Public License does not permit incorporating your program into proprietary programs. If your program is a subroutine library, you may consider it more useful to permit linking proprietary applications with the library. If this is what you want to do, use the GNU Lesser General Public License instead of this License. XML-Tiny-2.07/lib/000755 000765 000024 00000000000 13145401437 014025 5ustar00davidstaff000000 000000 XML-Tiny-2.07/Makefile.PL000644 000765 000024 00000000642 12472736200 015234 0ustar00davidstaff000000 000000 use ExtUtils::MakeMaker; WriteMakefile( NAME => 'XML::Tiny', META_MERGE => { license => 'other', resources => { repository => 'https://github.com/DrHyde/perl-modules-XML-Tiny', bugtracker => 'https://github.com/DrHyde/perl-modules-XML-Tiny/issues' } }, VERSION_FROM => 'lib/XML/Tiny.pm', # finds $VERSION PREREQ_PM => { # no pre-reqs! } ); XML-Tiny-2.07/MANIFEST000644 000765 000024 00000012764 13145401440 014414 0ustar00davidstaff000000 000000 CHANGELOG lib/XML/Tiny.pm Makefile.PL README MANIFEST t/test_functions t/00-file-handling.t t/01-real-world-xml.t t/empty.xml t/minimal.xml t/amazon.xml t/rss.xml t/amazon-parsed-with-xml-parser-easytree t/rss-parsed-with-xml-parser-easytree t/02-oddballs.t t/two-docs.xml t/doc-and-a-bit.xml t/text-only.xml t/03-attribs.t t/04-cdata.t t/05-fatal_declarations.t t/06-entities.t t/99-w3c-not-wf.t t/w3c/not-wf/ext-sa/001.ent t/w3c/not-wf/ext-sa/001.xml t/w3c/not-wf/ext-sa/002.ent t/w3c/not-wf/ext-sa/002.xml t/w3c/not-wf/ext-sa/003.ent t/w3c/not-wf/ext-sa/003.xml t/w3c/not-wf/not-sa/001.ent t/w3c/not-wf/not-sa/001.xml t/w3c/not-wf/not-sa/002.xml t/w3c/not-wf/not-sa/003.ent t/w3c/not-wf/not-sa/003.xml t/w3c/not-wf/not-sa/004.ent t/w3c/not-wf/not-sa/004.xml t/w3c/not-wf/not-sa/005.ent t/w3c/not-wf/not-sa/005.xml t/w3c/not-wf/not-sa/006.ent t/w3c/not-wf/not-sa/006.xml t/w3c/not-wf/not-sa/007.ent t/w3c/not-wf/not-sa/007.xml t/w3c/not-wf/not-sa/008.ent t/w3c/not-wf/not-sa/008.xml t/w3c/not-wf/not-sa/009.ent t/w3c/not-wf/not-sa/009.xml t/w3c/not-wf/not-sa/010.ent t/w3c/not-wf/not-sa/010.xml t/w3c/not-wf/not-sa/011.ent t/w3c/not-wf/not-sa/011.xml t/w3c/not-wf/sa/001.xml t/w3c/not-wf/sa/002.xml t/w3c/not-wf/sa/003.xml t/w3c/not-wf/sa/004.xml t/w3c/not-wf/sa/005.xml t/w3c/not-wf/sa/006.xml t/w3c/not-wf/sa/007.xml t/w3c/not-wf/sa/008.xml t/w3c/not-wf/sa/009.xml t/w3c/not-wf/sa/010.xml t/w3c/not-wf/sa/011.xml t/w3c/not-wf/sa/012.xml t/w3c/not-wf/sa/013.xml t/w3c/not-wf/sa/014.xml t/w3c/not-wf/sa/015.xml t/w3c/not-wf/sa/016.xml t/w3c/not-wf/sa/017.xml t/w3c/not-wf/sa/018.xml t/w3c/not-wf/sa/019.xml t/w3c/not-wf/sa/020.xml t/w3c/not-wf/sa/021.xml t/w3c/not-wf/sa/022.xml t/w3c/not-wf/sa/023.xml t/w3c/not-wf/sa/024.xml t/w3c/not-wf/sa/025.xml t/w3c/not-wf/sa/026.xml t/w3c/not-wf/sa/027.xml t/w3c/not-wf/sa/028.xml t/w3c/not-wf/sa/029.xml t/w3c/not-wf/sa/030.xml t/w3c/not-wf/sa/031.xml t/w3c/not-wf/sa/032.xml t/w3c/not-wf/sa/033.xml t/w3c/not-wf/sa/034.xml t/w3c/not-wf/sa/035.xml t/w3c/not-wf/sa/036.xml t/w3c/not-wf/sa/037.xml t/w3c/not-wf/sa/038.xml t/w3c/not-wf/sa/039.xml t/w3c/not-wf/sa/040.xml t/w3c/not-wf/sa/041.xml t/w3c/not-wf/sa/042.xml t/w3c/not-wf/sa/043.xml t/w3c/not-wf/sa/044.xml t/w3c/not-wf/sa/045.xml t/w3c/not-wf/sa/046.xml t/w3c/not-wf/sa/047.xml t/w3c/not-wf/sa/048.xml t/w3c/not-wf/sa/049.xml t/w3c/not-wf/sa/050.xml t/w3c/not-wf/sa/051.xml t/w3c/not-wf/sa/052.xml t/w3c/not-wf/sa/053.xml t/w3c/not-wf/sa/054.xml t/w3c/not-wf/sa/055.xml t/w3c/not-wf/sa/056.xml t/w3c/not-wf/sa/057.xml t/w3c/not-wf/sa/058.xml t/w3c/not-wf/sa/059.xml t/w3c/not-wf/sa/060.xml t/w3c/not-wf/sa/061.xml t/w3c/not-wf/sa/062.xml t/w3c/not-wf/sa/063.xml t/w3c/not-wf/sa/064.xml t/w3c/not-wf/sa/065.xml t/w3c/not-wf/sa/066.xml t/w3c/not-wf/sa/067.xml t/w3c/not-wf/sa/068.xml t/w3c/not-wf/sa/069.xml t/w3c/not-wf/sa/070.xml t/w3c/not-wf/sa/071.xml t/w3c/not-wf/sa/072.xml t/w3c/not-wf/sa/073.xml t/w3c/not-wf/sa/074.xml t/w3c/not-wf/sa/075.xml t/w3c/not-wf/sa/076.xml t/w3c/not-wf/sa/077.xml t/w3c/not-wf/sa/078.xml t/w3c/not-wf/sa/079.xml t/w3c/not-wf/sa/080.xml t/w3c/not-wf/sa/081.xml t/w3c/not-wf/sa/082.xml t/w3c/not-wf/sa/083.xml t/w3c/not-wf/sa/084.xml t/w3c/not-wf/sa/085.xml t/w3c/not-wf/sa/086.xml t/w3c/not-wf/sa/087.xml t/w3c/not-wf/sa/088.xml t/w3c/not-wf/sa/089.xml t/w3c/not-wf/sa/090.xml t/w3c/not-wf/sa/091.xml t/w3c/not-wf/sa/092.xml t/w3c/not-wf/sa/093.xml t/w3c/not-wf/sa/103.xml t/w3c/not-wf/sa/104.xml t/w3c/not-wf/sa/106.xml t/w3c/not-wf/sa/107.xml t/w3c/not-wf/sa/108.xml t/w3c/not-wf/sa/109.xml t/w3c/not-wf/sa/110.xml t/w3c/not-wf/sa/111.xml t/w3c/not-wf/sa/112.xml t/w3c/not-wf/sa/113.xml t/w3c/not-wf/sa/114.xml t/w3c/not-wf/sa/115.xml t/w3c/not-wf/sa/116.xml t/w3c/not-wf/sa/117.xml t/w3c/not-wf/sa/118.xml t/w3c/not-wf/sa/119.xml t/w3c/not-wf/sa/120.xml t/w3c/not-wf/sa/121.xml t/w3c/not-wf/sa/122.xml t/w3c/not-wf/sa/123.xml t/w3c/not-wf/sa/124.xml t/w3c/not-wf/sa/125.xml t/w3c/not-wf/sa/126.xml t/w3c/not-wf/sa/127.xml t/w3c/not-wf/sa/128.xml t/w3c/not-wf/sa/129.xml t/w3c/not-wf/sa/130.xml t/w3c/not-wf/sa/131.xml t/w3c/not-wf/sa/132.xml t/w3c/not-wf/sa/133.xml t/w3c/not-wf/sa/134.xml t/w3c/not-wf/sa/135.xml t/w3c/not-wf/sa/136.xml t/w3c/not-wf/sa/137.xml t/w3c/not-wf/sa/138.xml t/w3c/not-wf/sa/139.xml t/w3c/not-wf/sa/140.xml t/w3c/not-wf/sa/141.xml t/w3c/not-wf/sa/142.xml t/w3c/not-wf/sa/143.xml t/w3c/not-wf/sa/144.xml t/w3c/not-wf/sa/145.xml t/w3c/not-wf/sa/146.xml t/w3c/not-wf/sa/149.xml t/w3c/not-wf/sa/153.xml t/w3c/not-wf/sa/158.xml t/w3c/not-wf/sa/159.xml t/w3c/not-wf/sa/160.xml t/w3c/not-wf/sa/161.xml t/w3c/not-wf/sa/162.xml t/w3c/not-wf/sa/163.xml t/w3c/not-wf/sa/164.xml t/w3c/not-wf/sa/165.xml t/w3c/not-wf/sa/175.xml t/w3c/not-wf/sa/176.xml t/w3c/not-wf/sa/177.xml t/w3c/not-wf/sa/178.xml t/w3c/not-wf/sa/179.xml t/w3c/not-wf/sa/180.xml t/w3c/not-wf/sa/181.xml t/w3c/not-wf/sa/182.xml t/w3c/not-wf/sa/183.xml t/w3c/not-wf/sa/184.xml t/w3c/not-wf/sa/185.ent t/w3c/not-wf/sa/185.xml t/w3c/not-wf/sa/186.xml t/w3c/not-wf/sa/null.ent t/50-trailing-whitespace.t t/trailing-whitespace-in-tags.xml t/pod-coverage.t t/pod.t t/self-closing-optional-trailing-space.xml t/51-localize-filehandle.t t/localize-filehandles.xml ARTISTIC.txt GPL2.txt t/52-bugfix-namecharacters.t t/53-bugfix-cdata-in-attrib.t t/cdata-in-attrib.xml t/54-bugfix-bom.t t/bom-UTF-16-BE.xml t/bom-UTF-16-LE.xml t/bom-UTF-8.xml t/bom-UTF-32-BE.xml t/bom-UTF-32-LE.xml t/55-null-chars-in-input.t t/null-chars.xml MANIFEST.SKIP META.yml Module YAML meta-data (added by MakeMaker) META.json Module JSON meta-data (added by MakeMaker) XML-Tiny-2.07/MANIFEST.SKIP000644 000765 000024 00000000023 12433724125 015151 0ustar00davidstaff000000 000000 .travis.yml ^\.git XML-Tiny-2.07/META.json000644 000765 000024 00000002106 13145401440 014671 0ustar00davidstaff000000 000000 { "abstract" : "unknown", "author" : [ "unknown" ], "dynamic_config" : 1, "generated_by" : "ExtUtils::MakeMaker version 7.24, CPAN::Meta::Converter version 2.150010", "license" : [ "unknown", "unknown" ], "meta-spec" : { "url" : "http://search.cpan.org/perldoc?CPAN::Meta::Spec", "version" : "2" }, "name" : "XML-Tiny", "no_index" : { "directory" : [ "t", "inc" ] }, "prereqs" : { "build" : { "requires" : { "ExtUtils::MakeMaker" : "0" } }, "configure" : { "requires" : { "ExtUtils::MakeMaker" : "0" } }, "runtime" : { "requires" : {} } }, "release_status" : "stable", "resources" : { "bugtracker" : { "web" : "https://github.com/DrHyde/perl-modules-XML-Tiny/issues" }, "repository" : { "url" : "https://github.com/DrHyde/perl-modules-XML-Tiny" } }, "version" : "2.07", "x_serialization_backend" : "JSON::PP version 2.27400_02" } XML-Tiny-2.07/META.yml000644 000765 000024 00000001170 13145401440 014521 0ustar00davidstaff000000 000000 --- abstract: unknown author: - unknown build_requires: ExtUtils::MakeMaker: '0' configure_requires: ExtUtils::MakeMaker: '0' dynamic_config: 1 generated_by: 'ExtUtils::MakeMaker version 7.24, CPAN::Meta::Converter version 2.150010' license: unknown meta-spec: url: http://module-build.sourceforge.net/META-spec-v1.4.html version: '1.4' name: XML-Tiny no_index: directory: - t - inc requires: {} resources: bugtracker: https://github.com/DrHyde/perl-modules-XML-Tiny/issues repository: https://github.com/DrHyde/perl-modules-XML-Tiny version: '2.07' x_serialization_backend: 'CPAN::Meta::YAML version 0.018' XML-Tiny-2.07/README000644 000765 000024 00000000417 11612551241 014135 0ustar00davidstaff000000 000000 This module is a minimalist parser for the useful bits of XML. It has no dependencies other than those supplied with perl, and is designed to work on perl 5.004 and higher. To install, do the usual dance: perl Makefile.PL make make test make install XML-Tiny-2.07/t/000755 000765 000024 00000000000 13145401437 013522 5ustar00davidstaff000000 000000 XML-Tiny-2.07/t/00-file-handling.t000644 000765 000024 00000002433 13145377071 016635 0ustar00davidstaff000000 000000 use strict; use lib '.'; use FileHandle; use XML::Tiny qw(parsefile); require "t/test_functions"; print "1..7\n"; $^W = 1; $SIG{__WARN__} = sub { die("Caught a warning, making it fatal:\n\n$_[0]\n"); }; eval { parsefile("t/non-existent-file"); }; ok($@ eq "XML::Tiny::parsefile: Can't open t/non-existent-file\n", "Raise error when asked to parse a non-existent file"); eval { parsefile('t/empty.xml'); }; ok($@ eq "No elements\n", "Empty files are an error"); is_deeply( parsefile('t/minimal.xml'), [{ 'name' => 'x', 'content' => [], 'type' => 'e', attrib => {} }], "Minimal file parsed correctly" ); open(FOO, 't/minimal.xml'); # pass in a glob-ref is_deeply( parsefile(\*FOO), [{ 'name' => 'x', 'content' => [], 'type' => 'e', attrib => {} }], "Passing a filehandle in a glob-ref works" ); close(FOO); my $foo = FileHandle->new; open($foo, 't/minimal.xml'); is_deeply( parsefile($foo), [{ 'name' => 'x', 'content' => [], 'type' => 'e', attrib => {} }], "Passing a lexical filehandle works" ); close($foo); is_deeply( parsefile("_TINY_XML_STRING_\n"), parsefile('t/minimal.xml'), "Strings of XML work with newlines in" ); is_deeply( parsefile('_TINY_XML_STRING_'), parsefile('t/minimal.xml'), "Strings of XML work" ); XML-Tiny-2.07/t/01-real-world-xml.t000644 000765 000024 00000000742 13145377075 017010 0ustar00davidstaff000000 000000 use strict; use lib '.'; use XML::Tiny qw(parsefile); require "t/test_functions"; print "1..2\n"; $^W = 1; $SIG{__WARN__} = sub { die("Caught a warning, making it fatal:\n\n$_[0]\n"); }; is_deeply( parsefile('t/amazon.xml'), do "t/amazon-parsed-with-xml-parser-easytree", "Real-world XML from Amazon parsed correctly" ); is_deeply( parsefile('t/rss.xml'), do "t/rss-parsed-with-xml-parser-easytree", "Real-world XML from an RSS feed parsed correctly" ); XML-Tiny-2.07/t/02-oddballs.t000644 000765 000024 00000001574 13145377100 015720 0ustar00davidstaff000000 000000 use strict; use lib '.'; use XML::Tiny qw(parsefile); require "t/test_functions"; print "1..5\n"; $^W = 1; $SIG{__WARN__} = sub { die("Caught a warning, making it fatal:\n\n$_[0]\n"); }; eval { parsefile('t/two-docs.xml'); }; ok($@ eq "Junk after end of document\n", "Fail if there's trailing XML crap"); eval { parsefile('t/doc-and-a-bit.xml'); }; ok($@ eq "Junk after end of document\n", "Fail if there's trailing text crap"); eval { parsefile('t/text-only.xml'); }; ok($@ eq "No elements\n", "Fail if there's text but no XML"); eval { parsefile('t/self-closing-optional-trailing-space.xml'); }; ok(!$@, "Don't fail on self-closing tags with no space before />"); is_deeply( parsefile('_TINY_XML_STRING_'), [{ 'attrib' => {}, 'name' => 'a', 'content' => [], 'type' => 'e' }], "No trailing slash on 'name' of self-closing tags" ); XML-Tiny-2.07/t/03-attribs.t000644 000765 000024 00000003266 13145377103 015610 0ustar00davidstaff000000 000000 use strict; use lib '.'; use XML::Tiny qw(parsefile); require "t/test_functions"; print "1..8\n"; $^W = 1; $SIG{__WARN__} = sub { die("Caught a warning, making it fatal:\n\n$_[0]\n"); }; is_deeply( parsefile(q{_TINY_XML_STRING_}), [{ 'name' => 'x', 'content' => [], 'type' => 'e', attrib => { a => 'A', b => 'B C' }}], "Double-quoted attributes parsed correctly" ); is_deeply( parsefile(q{_TINY_XML_STRING_}), [{ 'name' => 'x', 'content' => [], 'type' => 'e', attrib => { a => 'A', b => 'B C' }}], "Single-quoted attributes parsed correctly" ); is_deeply( parsefile(q{_TINY_XML_STRING_}), [{ 'name' => 'x', 'content' => [], 'type' => 'e', attrib => { single => '"', double => "'" }}], "Quoted quotes in attributes parsed correctly" ); # > sign in something that looks like an attrib is_deeply( parsefile(q{_TINY_XML_STRING_foo = ">"}), [{ 'name' => 'x', 'content' => [{ 'content' => 'foo = ">"', 'type' => 't'}], 'type' => 'e', attrib => {}}], "> signs in data that looks like attribs but isn't work OK" ); # > sign in attrib is_deeply( parsefile(q{_TINY_XML_STRING_}), [{ 'name' => 'x', 'content' => [{ 'name' => 'y', 'content' => [], 'type' => 'e', attrib => { b => '>>>' }}], 'type' => 'e', attrib => { a => 'foo>' }}], "Quoted > signs work" ); eval { parsefile(q{_TINY_XML_STRING_}) }; ok($@, "Illegal < in attributes is fatal"); eval { parsefile(q{_TINY_XML_STRING_}) }; ok($@, "Badly nested \" in attributes is fatal"); eval { parsefile(q{_TINY_XML_STRING_}) }; ok($@, "Badly nested ' in attributes is fatal"); XML-Tiny-2.07/t/04-cdata.t000644 000765 000024 00000000621 13145377107 015211 0ustar00davidstaff000000 000000 use strict; use lib '.'; use XML::Tiny qw(parsefile); require "t/test_functions"; print "1..1\n"; $^W = 1; $SIG{__WARN__} = sub { die("Caught a warning, making it fatal:\n\n$_[0]\n"); }; is_deeply( parsefile(q{_TINY_XML_STRING_]]>}), [{ 'name' => 'x', 'content' => [{'content' => '& < >', 'type' => 't'}], 'type' => 'e', attrib => {}}], "CDATA parsed correctly" ); XML-Tiny-2.07/t/05-fatal_declarations.t000644 000765 000024 00000000645 13145377113 017760 0ustar00davidstaff000000 000000 use strict; use lib '.'; use XML::Tiny qw(parsefile); require "t/test_functions"; print "1..2\n"; $^W = 1; $SIG{__WARN__} = sub { die("Caught a warning, making it fatal:\n\n$_[0]\n"); }; eval { parsefile(q{_TINY_XML_STRING_}, fatal_declarations => 1) }; ok($@, "fatal_declarations really is fatal ..."); ok(parsefile(q{_TINY_XML_STRING_}), "... but we can live without it"); XML-Tiny-2.07/t/06-entities.t000644 000765 000024 00000003072 13145377117 015767 0ustar00davidstaff000000 000000 use strict; use lib '.'; use XML::Tiny qw(parsefile); require "t/test_functions"; print "1..7\n"; $^W = 1; $SIG{__WARN__} = sub { die("Caught a warning, making it fatal:\n\n$_[0]\n"); }; is_deeply( parsefile(q{_TINY_XML_STRING_&&rubbish;&<>"'}), [{name => 'x', attrib => {}, type => 'e', content => [{type => 't', content => '&&rubbish;&<>"\''}]}], "All five entities are normally parsed OK" ); is_deeply( parsefile(q{_TINY_XML_STRING_A}), [{name => 'x', attrib => {}, type => 'e', content => [{type => 't', content => 'A'}]}], "base ten numeric char entities are normally parsed OK" ); is_deeply( parsefile(q{_TINY_XML_STRING_A}), [{name => 'x', attrib => {}, type => 'e', content => [{type => 't', content => 'A'}]}], "base 16 numeric char entities are normally parsed OK" ); is_deeply( parsefile(q{_TINY_XML_STRING_ª}), parsefile(q{_TINY_XML_STRING_ª}), "non-ASCII works, and hex entities aren't case-sensitive" ); is_deeply( parsefile(q{_TINY_XML_STRING_&&rubbish;&<>"'}, no_entity_parsing => 1), [{name => 'x', attrib => {}, type => 'e', content => [{type => 't', content => '&&rubbish;&<>"''}]}], "no_entity_parsing works" ); eval { parsefile(q{_TINY_XML_STRING_&}, strict_entity_parsing => 1) }; ok($@, 'strict entity parsing hates naked ampersands'); eval { parsefile(q{_TINY_XML_STRING_&rubbish;}, strict_entity_parsing => 1) }; ok($@, 'strict entity parsing hates unknown entities'); XML-Tiny-2.07/t/50-trailing-whitespace.t000644 000765 000024 00000000562 13145377122 020102 0ustar00davidstaff000000 000000 use strict; use lib '.'; use XML::Tiny qw(parsefile); require "t/test_functions"; print "1..1\n"; $^W = 1; $SIG{__WARN__} = sub { die("Caught a warning, making it fatal:\n\n$_[0]\n"); }; # use Data::Dumper; # die Dumper(parsefile('t/trailing-whitespace-in-tags.xml')); ok(parsefile('t/trailing-whitespace-in-tags.xml'), "Don't choke on trailing whitespace in tags"); XML-Tiny-2.07/t/51-localize-filehandle.t000644 000765 000024 00000001162 13145377211 020027 0ustar00davidstaff000000 000000 use strict; use lib '.'; use XML::Tiny qw(parsefile); require "t/test_functions"; print "1..3\n"; $^W = 1; $SIG{__WARN__} = sub { die("Caught a warning, making it fatal:\n\n$_[0]\n"); }; open(XML::Tiny::FH, $0) || die "Couldn't read '$0': $!"; # read a file seek(XML::Tiny::FH, 10, 0) || die "Couldn't seek '$0': $!"; my $fh_pos = tell XML::Tiny::FH; ok($fh_pos, "Opened and read some random file as *XML::Tiny::FH"); my $document = parsefile('t/localize-filehandles.xml'); ok(defined($document), "We read an XML file"); my $new_pos = tell *XML::Tiny::FH; ok($new_pos == $fh_pos, "The filehandle survived unchanged."); XML-Tiny-2.07/t/52-bugfix-namecharacters.t000644 000765 000024 00000001244 13145377217 020406 0ustar00davidstaff000000 000000 use strict; use lib '.'; use XML::Tiny qw(parsefile); require "t/test_functions"; print "1..2\n"; $^W = 1; $SIG{__WARN__} = sub { die("Caught a warning, making it fatal:\n\n$_[0]\n"); }; # _ can start a name (ie an element name or an attribute name) is_deeply( parsefile("_TINY_XML_STRING_<_x>\n"), [{ 'name' => '_x', 'content' => [], 'type' => 'e', attrib => {} }], "names can start with underscore" ); is_deeply( parsefile("_TINY_XML_STRING_<_x _attrib='hlagh'>\n"), [{ 'name' => '_x', 'content' => [], 'type' => 'e', 'attrib' => { '_attrib' => 'hlagh' } }], "... in attributes as well as elements" ); XML-Tiny-2.07/t/53-bugfix-cdata-in-attrib.t000644 000765 000024 00000000537 13145377222 020372 0ustar00davidstaff000000 000000 use strict; use lib '.'; use XML::Tiny qw(parsefile); require "t/test_functions"; print "1..2\n"; $^W = 1; $SIG{__WARN__} = sub { die("Caught a warning, making it fatal:\n\n$_[0]\n"); }; ok(my $xml = parsefile('t/cdata-in-attrib.xml'), "Don't choke on CDATA in attribs"); is($xml->[0]->{attrib}->{value}, "This ship's name", "parse it correctly"); XML-Tiny-2.07/t/54-bugfix-bom.t000644 000765 000024 00000001113 13145377226 016200 0ustar00davidstaff000000 000000 use strict; use lib '.'; use XML::Tiny qw(parsefile); require "t/test_functions"; print "1..20\n"; $^W = 1; my @encodings = ( "UTF-8", "UTF-16-BE", "UTF-16-LE", "UTF-32-BE", "UTF-32-LE" ); foreach my $encoding (@encodings) { ok(my $xml = parsefile("t/bom-$encoding.xml"), "Don't choke on $encoding BOM in file"); is($xml->[0]->{attrib}->{bar}, "hlagh", " parse it correctly"); open(my $fh, "t/bom-$encoding.xml"); ok($xml = parsefile("_TINY_XML_STRING_".<$fh>), "Don't choke on $encoding BOM in string"); is($xml->[0]->{attrib}->{bar}, "hlagh", " parse it correctly"); } XML-Tiny-2.07/t/55-null-chars-in-input.t000644 000765 000024 00000000724 13145377240 017756 0ustar00davidstaff000000 000000 use strict; use lib '.'; use XML::Tiny qw(parsefile); require "t/test_functions"; print "1..1\n"; $^W = 1; my @encodings = ( "UTF-8", "UTF-16-BE", "UTF-16-LE", "UTF-32-BE", "UTF-32-LE" ); eval { parsefile('t/null-chars.xml') }; # this is encoded in UTF-16 if($@) { ok($@ eq "Not well-formed (Illegal low-ASCII chars found)\n", "appropriate error message vomited"); } else { ok(1, "huh, you managed to read the file OK, guess your I/O done something clever"); } XML-Tiny-2.07/t/99-w3c-not-wf.t000644 000765 000024 00000001225 13145377254 016063 0ustar00davidstaff000000 000000 use strict; use lib '.'; use XML::Tiny qw(parsefile); require "t/test_functions"; $^W = 1; $SIG{__WARN__} = sub { die( "Caught a warning, making it fatal:\n\n$_[0]\n" # eval 'use Devel::StackTrace;Devel::StackTrace->new()->as_string()' ); }; my @testfiles = (); foreach my $testdir (map { "t/w3c/not-wf/$_" } qw(ext-sa not-sa sa)) { opendir(T, $testdir); push @testfiles, map { "$testdir/$_" } grep { /\.xml$/ } readdir(T); closedir(T); } print "1..".@testfiles."\n"; foreach my $testfile (@testfiles) { eval "parsefile('$testfile', fatal_declarations => 1, strict_entity_parsing => 1)"; ok($@, "w3c test $testfile"); } XML-Tiny-2.07/t/amazon-parsed-with-xml-parser-easytree000644 000765 000024 00000120711 11612551241 023064 0ustar00davidstaff000000 000000 $VAR1 = [ { 'content' => [ { 'content' => [ { 'content' => [ { 'content' => [], 'name' => 'Header', 'attrib' => { 'Value' => 'Wget/1.9.1', 'Name' => 'UserAgent' }, 'type' => 'e' } ], 'name' => 'HTTPHeaders', 'attrib' => {}, 'type' => 'e' }, { 'content' => [ { 'content' => '1ZASHFPN5QS4GBP2D47W', 'type' => 't' } ], 'name' => 'RequestId', 'attrib' => {}, 'type' => 'e' }, { 'content' => [ { 'content' => [], 'name' => 'Argument', 'attrib' => { 'Value' => '1I8T10N3E4BIE', 'Name' => 'ListId' }, 'type' => 'e' }, { 'content' => [], 'name' => 'Argument', 'attrib' => { 'Value' => 'DateAdded', 'Name' => 'Sort' }, 'type' => 'e' }, { 'content' => [], 'name' => 'Argument', 'attrib' => { 'Value' => 'AWSECommerceService', 'Name' => 'Service' }, 'type' => 'e' }, { 'content' => [], 'name' => 'Argument', 'attrib' => { 'Value' => '1', 'Name' => 'ProductPage' }, 'type' => 'e' }, { 'content' => [], 'name' => 'Argument', 'attrib' => { 'Value' => 'xxx', 'Name' => 'AWSAccessKeyId' }, 'type' => 'e' }, { 'content' => [], 'name' => 'Argument', 'attrib' => { 'Value' => 'ItemIds', 'Name' => 'ResponseGroup' }, 'type' => 'e' }, { 'content' => [], 'name' => 'Argument', 'attrib' => { 'Value' => 'WishList', 'Name' => 'ListType' }, 'type' => 'e' }, { 'content' => [], 'name' => 'Argument', 'attrib' => { 'Value' => 'ListLookup', 'Name' => 'Operation' }, 'type' => 'e' } ], 'name' => 'Arguments', 'attrib' => {}, 'type' => 'e' }, { 'content' => [ { 'content' => '0.153314113616943', 'type' => 't' } ], 'name' => 'RequestProcessingTime', 'attrib' => {}, 'type' => 'e' } ], 'name' => 'OperationRequest', 'attrib' => {}, 'type' => 'e' }, { 'content' => [ { 'content' => [ { 'content' => [ { 'content' => 'True', 'type' => 't' } ], 'name' => 'IsValid', 'attrib' => {}, 'type' => 'e' }, { 'content' => [ { 'content' => [ { 'content' => '1I8T10N3E4BIE', 'type' => 't' } ], 'name' => 'ListId', 'attrib' => {}, 'type' => 'e' }, { 'content' => [ { 'content' => 'WishList', 'type' => 't' } ], 'name' => 'ListType', 'attrib' => {}, 'type' => 'e' }, { 'content' => [ { 'content' => '1', 'type' => 't' } ], 'name' => 'ProductPage', 'attrib' => {}, 'type' => 'e' }, { 'content' => [ { 'content' => 'ItemIds', 'type' => 't' } ], 'name' => 'ResponseGroup', 'attrib' => {}, 'type' => 'e' }, { 'content' => [ { 'content' => 'DateAdded', 'type' => 't' } ], 'name' => 'Sort', 'attrib' => {}, 'type' => 'e' } ], 'name' => 'ListLookupRequest', 'attrib' => {}, 'type' => 'e' } ], 'name' => 'Request', 'attrib' => {}, 'type' => 'e' }, { 'content' => [ { 'content' => [ { 'content' => [ { 'content' => [ { 'content' => 'B00009R5ZM', 'type' => 't' } ], 'name' => 'ASIN', 'attrib' => {}, 'type' => 'e' } ], 'name' => 'Item', 'attrib' => {}, 'type' => 'e' } ], 'name' => 'ListItem', 'attrib' => {}, 'type' => 'e' }, { 'content' => [ { 'content' => [ { 'content' => [ { 'content' => 'B00004Y3OS', 'type' => 't' } ], 'name' => 'ASIN', 'attrib' => {}, 'type' => 'e' } ], 'name' => 'Item', 'attrib' => {}, 'type' => 'e' } ], 'name' => 'ListItem', 'attrib' => {}, 'type' => 'e' }, { 'content' => [ { 'content' => [ { 'content' => [ { 'content' => 'B00004R84D', 'type' => 't' } ], 'name' => 'ASIN', 'attrib' => {}, 'type' => 'e' } ], 'name' => 'Item', 'attrib' => {}, 'type' => 'e' } ], 'name' => 'ListItem', 'attrib' => {}, 'type' => 'e' }, { 'content' => [ { 'content' => [ { 'content' => [ { 'content' => 'B00006JY1J', 'type' => 't' } ], 'name' => 'ASIN', 'attrib' => {}, 'type' => 'e' } ], 'name' => 'Item', 'attrib' => {}, 'type' => 'e' } ], 'name' => 'ListItem', 'attrib' => {}, 'type' => 'e' }, { 'content' => [ { 'content' => [ { 'content' => [ { 'content' => 'B0002OHZP2', 'type' => 't' } ], 'name' => 'ASIN', 'attrib' => {}, 'type' => 'e' } ], 'name' => 'Item', 'attrib' => {}, 'type' => 'e' } ], 'name' => 'ListItem', 'attrib' => {}, 'type' => 'e' }, { 'content' => [ { 'content' => [ { 'content' => [ { 'content' => '0131177052', 'type' => 't' } ], 'name' => 'ASIN', 'attrib' => {}, 'type' => 'e' } ], 'name' => 'Item', 'attrib' => {}, 'type' => 'e' } ], 'name' => 'ListItem', 'attrib' => {}, 'type' => 'e' }, { 'content' => [ { 'content' => [ { 'content' => [ { 'content' => 'B00007CVRX', 'type' => 't' } ], 'name' => 'ASIN', 'attrib' => {}, 'type' => 'e' } ], 'name' => 'Item', 'attrib' => {}, 'type' => 'e' } ], 'name' => 'ListItem', 'attrib' => {}, 'type' => 'e' }, { 'content' => [ { 'content' => [ { 'content' => [ { 'content' => '0006547486', 'type' => 't' } ], 'name' => 'ASIN', 'attrib' => {}, 'type' => 'e' } ], 'name' => 'Item', 'attrib' => {}, 'type' => 'e' } ], 'name' => 'ListItem', 'attrib' => {}, 'type' => 'e' }, { 'content' => [ { 'content' => [ { 'content' => [ { 'content' => '0671319779', 'type' => 't' } ], 'name' => 'ASIN', 'attrib' => {}, 'type' => 'e' } ], 'name' => 'Item', 'attrib' => {}, 'type' => 'e' } ], 'name' => 'ListItem', 'attrib' => {}, 'type' => 'e' }, { 'content' => [ { 'content' => [ { 'content' => [ { 'content' => '0743435710', 'type' => 't' } ], 'name' => 'ASIN', 'attrib' => {}, 'type' => 'e' } ], 'name' => 'Item', 'attrib' => {}, 'type' => 'e' } ], 'name' => 'ListItem', 'attrib' => {}, 'type' => 'e' } ], 'name' => 'List', 'attrib' => {}, 'type' => 'e' } ], 'name' => 'Lists', 'attrib' => {}, 'type' => 'e' } ], 'name' => 'ListLookupResponse', 'attrib' => { 'xmlns' => 'http://webservices.amazon.com/AWSECommerceService/2005-10-05' }, 'type' => 'e' } ]; XML-Tiny-2.07/t/amazon.xml000644 000765 000024 00000003204 11612551241 015524 0ustar00davidstaff000000 000000
1ZASHFPN5QS4GBP2D47W0.153314113616943
True1I8T10N3E4BIEWishList1ItemIdsDateAddedB00009R5ZMB00004Y3OSB00004R84DB00006JY1JB0002OHZP20131177052B00007CVRX000654748606713197790743435710
XML-Tiny-2.07/t/bom-UTF-16-BE.xml000644 000765 000024 00000000025 11612551241 016156 0ustar00davidstaff000000 000000 þÿXML-Tiny-2.07/t/bom-UTF-16-LE.xml000644 000765 000024 00000000025 11612551241 016170 0ustar00davidstaff000000 000000 ÿþXML-Tiny-2.07/t/bom-UTF-32-BE.xml000644 000765 000024 00000000027 11612551241 016156 0ustar00davidstaff000000 000000 þÿXML-Tiny-2.07/t/bom-UTF-32-LE.xml000644 000765 000024 00000000027 11612551241 016170 0ustar00davidstaff000000 000000 ÿþXML-Tiny-2.07/t/bom-UTF-8.xml000644 000765 000024 00000000026 11612551241 015614 0ustar00davidstaff000000 000000 XML-Tiny-2.07/t/cdata-in-attrib.xml000644 000765 000024 00000000055 11612551241 017203 0ustar00davidstaff000000 000000 '/> XML-Tiny-2.07/t/doc-and-a-bit.xml000644 000765 000024 00000000011 11612551241 016527 0ustar00davidstaff000000 000000 0 XML-Tiny-2.07/t/empty.xml000644 000765 000024 00000000000 11612551241 015364 0ustar00davidstaff000000 000000 XML-Tiny-2.07/t/localize-filehandles.xml000644 000765 000024 00000000076 11612551241 020321 0ustar00davidstaff000000 000000 tag tag XML-Tiny-2.07/t/minimal.xml000644 000765 000024 00000000010 11612551241 015655 0ustar00davidstaff000000 000000 XML-Tiny-2.07/t/null-chars.xml000644 000765 000024 00000000720 11612551241 016307 0ustar00davidstaff000000 000000 ÿþ<!-- edited with XMLSpy v2010 (http://www.altova.com) by XMLSpy 2010 Enterprise Ed. --> <Input> <Type>A</Type> <Parameters> <MaxNumPeriods>420</MaxNumPeriods> <PeriodLength>0.25</PeriodLength> </Parameters> </Input> XML-Tiny-2.07/t/pod-coverage.t000644 000765 000024 00000000371 11612551241 016257 0ustar00davidstaff000000 000000 # $Id: pod-coverage.t,v 1.3 2007/11/01 17:00:19 drhyde Exp $ use strict; $^W=1; eval "use Test::Pod::Coverage 1.00"; if($@) { print "1..0 # SKIP Test::Pod::Coverage 1.00 required for testing POD coverage"; } else { all_pod_coverage_ok(); } XML-Tiny-2.07/t/pod.t000644 000765 000024 00000000322 11612551241 014462 0ustar00davidstaff000000 000000 # $Id: pod.t,v 1.3 2007/11/01 17:00:19 drhyde Exp $ use strict; $^W = 1; eval "use Test::Pod 1.00"; if($@) { print "1..0 # SKIP Test::Pod 1.00 required for testing POD"; } else { all_pod_files_ok(); } XML-Tiny-2.07/t/rss-parsed-with-xml-parser-easytree000644 000765 000024 00000170352 11612551241 022414 0ustar00davidstaff000000 000000 $VAR1 = [ { 'content' => [ { 'content' => [ { 'content' => [ { 'content' => 'Dave\'s Free Press', 'type' => 't' } ], 'name' => 'title', 'attrib' => {}, 'type' => 'e' }, { 'content' => [ { 'content' => 'http://www.cantrell.org.uk/david/journal/index.pl', 'type' => 't' } ], 'name' => 'link', 'attrib' => {}, 'type' => 'e' }, { 'content' => [ { 'content' => 'the Slightly Less Bad And Wrong Blog Edition', 'type' => 't' } ], 'name' => 'description', 'attrib' => {}, 'type' => 'e' }, { 'content' => [ { 'content' => 'en-us', 'type' => 't' } ], 'name' => 'dc:language', 'attrib' => {}, 'type' => 'e' }, { 'content' => [ { 'content' => '2007-01-20T22:02:42Z', 'type' => 't' } ], 'name' => 'dc:date', 'attrib' => {}, 'type' => 'e' }, { 'content' => [ { 'content' => [ { 'content' => [], 'name' => 'rdf:li', 'attrib' => { 'rdf:resource' => 'http://www.cantrell.org.uk/david/journal/index.pl/id_bryar-software-release' }, 'type' => 'e' }, { 'content' => [], 'name' => 'rdf:li', 'attrib' => { 'rdf:resource' => 'http://www.cantrell.org.uk/david/journal/index.pl/id_big-brother-racism' }, 'type' => 'e' }, { 'content' => [], 'name' => 'rdf:li', 'attrib' => { 'rdf:resource' => 'http://www.cantrell.org.uk/david/journal/index.pl/id_idiot-recruiters' }, 'type' => 'e' }, { 'content' => [], 'name' => 'rdf:li', 'attrib' => { 'rdf:resource' => 'http://www.cantrell.org.uk/david/journal/index.pl/id_measurement-in-the-digital-age' }, 'type' => 'e' }, { 'content' => [], 'name' => 'rdf:li', 'attrib' => { 'rdf:resource' => 'http://www.cantrell.org.uk/david/journal/index.pl/id_dear-amazon' }, 'type' => 'e' }, { 'content' => [], 'name' => 'rdf:li', 'attrib' => { 'rdf:resource' => 'http://www.cantrell.org.uk/david/journal/index.pl/id_new-weblog' }, 'type' => 'e' }, { 'content' => [], 'name' => 'rdf:li', 'attrib' => { 'rdf:resource' => 'http://www.cantrell.org.uk/david/journal/index.pl/id_customer-service-BA-style' }, 'type' => 'e' }, { 'content' => [], 'name' => 'rdf:li', 'attrib' => { 'rdf:resource' => 'http://www.cantrell.org.uk/david/journal/index.pl/id_amazon-recommendations' }, 'type' => 'e' }, { 'content' => [], 'name' => 'rdf:li', 'attrib' => { 'rdf:resource' => 'http://www.cantrell.org.uk/david/journal/index.pl/id_this-week-in-whisky-news' }, 'type' => 'e' }, { 'content' => [], 'name' => 'rdf:li', 'attrib' => { 'rdf:resource' => 'http://www.cantrell.org.uk/david/journal/index.pl/id_bastard-fairies' }, 'type' => 'e' } ], 'name' => 'rdf:Seq', 'attrib' => {}, 'type' => 'e' } ], 'name' => 'items', 'attrib' => {}, 'type' => 'e' } ], 'name' => 'channel', 'attrib' => { 'rdf:about' => 'http://www.cantrell.org.uk/david/journal/index.pl' }, 'type' => 'e' }, { 'content' => [ { 'content' => [ { 'content' => ' New Bryar release ', 'type' => 't' } ], 'name' => 'title', 'attrib' => {}, 'type' => 'e' }, { 'content' => [ { 'content' => ' http://www.cantrell.org.uk/david/journal/index.pl/id_bryar-software-release', 'type' => 't' } ], 'name' => 'link', 'attrib' => {}, 'type' => 'e' }, { 'content' => [ { 'content' => ' Warning: geeky content ahead

As I\'ve been promising to do for ages (it\'s over a year since Simon said I could take over maintenance of it, and several months since I promised Bob that he could have all the shiny new features I had planned) I\'ve finally got round to releasing a new version of Bryar, the software what provides the brains behind this \'ere august journal.

The most important change is that I released the stuff for filtering out comment spam. ', 'type' => 't' } ], 'name' => 'description', 'attrib' => {}, 'type' => 'e' }, { 'content' => [ { 'content' => ' 2007-01-20T22:02:42Z ', 'type' => 't' } ], 'name' => 'dc:date', 'attrib' => {}, 'type' => 'e' }, { 'content' => [ { 'content' => ' david ', 'type' => 't' } ], 'name' => 'dc:creator', 'attrib' => {}, 'type' => 'e' } ], 'name' => 'item', 'attrib' => { 'rdf:about' => 'http://www.cantrell.org.uk/david/journal/index.pl/id_bryar-software-release' }, 'type' => 'e' }, { 'content' => [ { 'content' => [ { 'content' => ' Racism on the telly ', 'type' => 't' } ], 'name' => 'title', 'attrib' => {}, 'type' => 'e' }, { 'content' => [ { 'content' => ' http://www.cantrell.org.uk/david/journal/index.pl/id_big-brother-racism', 'type' => 't' } ], 'name' => 'link', 'attrib' => {}, 'type' => 'e' }, { 'content' => [ { 'content' => '

Sherpa Shitty, famous for
being a piece of plastic
Apparently there is a television programme called "Big Brother", one of the requirements for appearing on which is being exceedingly stupid. There\'s a furore because one of the stupid people is supposed to have made some nasty racist comments about another of the stupid people. Not entirely unexpected, when you consider that the programme has the same requirements as being a racist does. Anyway, the victim is pictured here. I hope you don\'t think I\'m racist for pointing out that she looks like a plastic doll. ', 'type' => 't' } ], 'name' => 'description', 'attrib' => {}, 'type' => 'e' }, { 'content' => [ { 'content' => ' 2007-01-19T22:44:38Z ', 'type' => 't' } ], 'name' => 'dc:date', 'attrib' => {}, 'type' => 'e' }, { 'content' => [ { 'content' => ' david ', 'type' => 't' } ], 'name' => 'dc:creator', 'attrib' => {}, 'type' => 'e' } ], 'name' => 'item', 'attrib' => { 'rdf:about' => 'http://www.cantrell.org.uk/david/journal/index.pl/id_big-brother-racism' }, 'type' => 'e' }, { 'content' => [ { 'content' => [ { 'content' => ' An Idiot ', 'type' => 't' } ], 'name' => 'title', 'attrib' => {}, 'type' => 'e' }, { 'content' => [ { 'content' => ' http://www.cantrell.org.uk/david/journal/index.pl/id_idiot-recruiters', 'type' => 't' } ], 'name' => 'link', 'attrib' => {}, 'type' => 'e' }, { 'content' => [ { 'content' => ' [originally posted on 2006-01-12]

I got an email today from a recruiter. Not to see if I was available for work, but trying to push someone on to me. The email read:

Please find attached the CV of an extremely talented web developer who specialises in PHP and front end web development technologies including HTML, CSS and JavaScript.

This candidate is actively seeking work in your area at the moment. He does have several other interviews arranged therefore if you are interested in seeing him for a role you are currently recruiting for please give me a call today.

If you are not recruiting, please keep my details on record for future reference.

and was sent to my personal address, not to work. Neither I nor my lovely employer have told this girl that we are looking for anyone technical and if we had we\'d not have asked for someone who knew PHP. So yes, I most certainly will "keep her details on record for future reference". Being a gentleman, I informed her of this fact and that I was keeping them because I would otherwise not remember that she is clearly far too stupid for me to do business with.

Update 2006-01-19: she dunnit again. This time I phoned her, and she admitted sending unsolicited, untargetted mailshots - that is, spam. She, of course, thinks it was targetted, but I\'m afraid that\'s just not true as is obvious from what I wrote above. And, of course, there\'s the issue that the address she sent her spam to is one that I created only because one person (one!) continually mis-spelt my real one. I\'ve never sent email from the address in question, nor have I ever given that address to anyone apart from that one person. Consequently, the idiot spammer Claire O\'Keeffe of Huxley Associates obviously either guessed it or acquired it by some other nefarious means. ', 'type' => 't' } ], 'name' => 'description', 'attrib' => {}, 'type' => 'e' }, { 'content' => [ { 'content' => ' 2007-01-19T17:43:46Z ', 'type' => 't' } ], 'name' => 'dc:date', 'attrib' => {}, 'type' => 'e' }, { 'content' => [ { 'content' => ' david ', 'type' => 't' } ], 'name' => 'dc:creator', 'attrib' => {}, 'type' => 'e' } ], 'name' => 'item', 'attrib' => { 'rdf:about' => 'http://www.cantrell.org.uk/david/journal/index.pl/id_idiot-recruiters' }, 'type' => 'e' }, { 'content' => [ { 'content' => [ { 'content' => ' Measuring speed in the digital age ', 'type' => 't' } ], 'name' => 'title', 'attrib' => {}, 'type' => 'e' }, { 'content' => [ { 'content' => ' http://www.cantrell.org.uk/david/journal/index.pl/id_measurement-in-the-digital-age', 'type' => 't' } ], 'name' => 'link', 'attrib' => {}, 'type' => 'e' }, { 'content' => [ { 'content' => ' Warning: geeky content ahead

In the digital age, accuracy and speedy calculations come from using powers of two. You also want to stick with integers to avoid rounding error. Therefore I propose that we measure speed in nano-furlongs per mega-fortnight. The conversion from metres per second is fairly simple - 1 m/s is approximately 264 nFurlong/Mfortnight.

This means that we can measure incredibly slow speeds with great precision - down to of the order of 10-19 m/s without having to enter the dangerous world of floating point. And of course we can easily measure all the way up to the fastest possible speed, that of light, which is only about 292 nF/MF. This provides ample room for further expansion of the measuring stick if Mr. Einstein turns out to have been wrong. A 128-bit value would let us measure speeds up to 1010 times that of light, in extremely small increments. ', 'type' => 't' } ], 'name' => 'description', 'attrib' => {}, 'type' => 'e' }, { 'content' => [ { 'content' => ' 2007-01-16T21:10:18Z ', 'type' => 't' } ], 'name' => 'dc:date', 'attrib' => {}, 'type' => 'e' }, { 'content' => [ { 'content' => ' david ', 'type' => 't' } ], 'name' => 'dc:creator', 'attrib' => {}, 'type' => 'e' } ], 'name' => 'item', 'attrib' => { 'rdf:about' => 'http://www.cantrell.org.uk/david/journal/index.pl/id_measurement-in-the-digital-age' }, 'type' => 'e' }, { 'content' => [ { 'content' => [ { 'content' => ' Dear Amazon ', 'type' => 't' } ], 'name' => 'title', 'attrib' => {}, 'type' => 'e' }, { 'content' => [ { 'content' => ' http://www.cantrell.org.uk/david/journal/index.pl/id_dear-amazon', 'type' => 't' } ], 'name' => 'link', 'attrib' => {}, 'type' => 'e' }, { 'content' => [ { 'content' => ' You\'re a bunch of cunts. Not only do you provide no way for me to export my wishlist to XML or CSV or anything useful like that, you manage to break all the third-party applications that do it as well. I hate you and hope you die.

update: they had for no apparent reason disabled my account, although they were still sending me information about how to use it. It would have been nice if they\'d told me. It would have been nice if I got helpful error messages back from the Net::Amazon module too. ', 'type' => 't' } ], 'name' => 'description', 'attrib' => {}, 'type' => 'e' }, { 'content' => [ { 'content' => ' 2007-01-14T17:30:49Z ', 'type' => 't' } ], 'name' => 'dc:date', 'attrib' => {}, 'type' => 'e' }, { 'content' => [ { 'content' => ' david ', 'type' => 't' } ], 'name' => 'dc:creator', 'attrib' => {}, 'type' => 'e' } ], 'name' => 'item', 'attrib' => { 'rdf:about' => 'http://www.cantrell.org.uk/david/journal/index.pl/id_dear-amazon' }, 'type' => 'e' }, { 'content' => [ { 'content' => [ { 'content' => ' New weblog ', 'type' => 't' } ], 'name' => 'title', 'attrib' => {}, 'type' => 'e' }, { 'content' => [ { 'content' => ' http://www.cantrell.org.uk/david/journal/index.pl/id_new-weblog', 'type' => 't' } ], 'name' => 'link', 'attrib' => {}, 'type' => 'e' }, { 'content' => [ { 'content' => ' I\'ve got a new weblog here. ', 'type' => 't' } ], 'name' => 'description', 'attrib' => {}, 'type' => 'e' }, { 'content' => [ { 'content' => ' 2007-01-05T22:09:45Z ', 'type' => 't' } ], 'name' => 'dc:date', 'attrib' => {}, 'type' => 'e' }, { 'content' => [ { 'content' => ' david ', 'type' => 't' } ], 'name' => 'dc:creator', 'attrib' => {}, 'type' => 'e' } ], 'name' => 'item', 'attrib' => { 'rdf:about' => 'http://www.cantrell.org.uk/david/journal/index.pl/id_new-weblog' }, 'type' => 'e' }, { 'content' => [ { 'content' => [ { 'content' => ' Customer Service, BA-style ', 'type' => 't' } ], 'name' => 'title', 'attrib' => {}, 'type' => 'e' }, { 'content' => [ { 'content' => ' http://www.cantrell.org.uk/david/journal/index.pl/id_customer-service-BA-style', 'type' => 't' } ], 'name' => 'link', 'attrib' => {}, 'type' => 'e' }, { 'content' => [ { 'content' => ' British Airways\' "vision" is to "create the best possible airport experience before you fly", according to some bumph they sent me. To do this they have a "new simpler checked and excess baggage policy". I wonder what that new policy is, so reading on a bit ... "the maximum weight per bag will be reduced". The overall effect is that ordinary people will be able to take less luggage.

Obviously, that makes flying so much nicer!

Now I\'ve known for some time that the government basically doesn\'t want people to fly, and that the method they\'ve chosen to implement this part of their giving in to terrorists errm, I mean security agenda is to make it as inconvenient as possible. I\'d already stopped flying because I quite literally can\'t take all my valuable items in hand luggage like I used to and I don\'t trust the baggage monkeys to not steal them / use them as footballs / run them over with trucks / send them to Ulaan Bator. I use Eurostar and other trains, which for the vast majority of my journeys is not significantly more time-consuming, as well as being cheaper and a great deal less unpleasant.

What I can\'t understand is why an airline would want to collaborate with the enemy in this way and drive even more of its customers away. Although I do note that BA own 10% of the shares in the company that runs Eurostar ... ', 'type' => 't' } ], 'name' => 'description', 'attrib' => {}, 'type' => 'e' }, { 'content' => [ { 'content' => ' 2006-12-29T20:02:44Z ', 'type' => 't' } ], 'name' => 'dc:date', 'attrib' => {}, 'type' => 'e' }, { 'content' => [ { 'content' => ' david ', 'type' => 't' } ], 'name' => 'dc:creator', 'attrib' => {}, 'type' => 'e' } ], 'name' => 'item', 'attrib' => { 'rdf:about' => 'http://www.cantrell.org.uk/david/journal/index.pl/id_customer-service-BA-style' }, 'type' => 'e' }, { 'content' => [ { 'content' => [ { 'content' => ' Amazon recommendations ', 'type' => 't' } ], 'name' => 'title', 'attrib' => {}, 'type' => 'e' }, { 'content' => [ { 'content' => ' http://www.cantrell.org.uk/david/journal/index.pl/id_amazon-recommendations', 'type' => 't' } ], 'name' => 'link', 'attrib' => {}, 'type' => 'e' }, { 'content' => [ { 'content' => ' Today I ordered a spoon from Amazon. This seems to have screwed up its recommendations system so now it seems to be ignoring the zillion bits of sci-fi, the zombie flicks and the metal CDs I\'ve bought and thinks that I want:

  • a slotted spoon
  • a ladle
  • a spaghetti server
  • an omelette turner
  • some tongs

mixed in with:

  • "selected works" of Cicero (no thanks, I\'ll select my own)
  • "Iron Sunrise" by Charlie Stross
  • "Adventures of a bacon curer"
  • a DVD of The Da Vinci Code
  • Now 65

Well done Amazon, you score two out of ten.

And what the FUCK is an omelette turner? ', 'type' => 't' } ], 'name' => 'description', 'attrib' => {}, 'type' => 'e' }, { 'content' => [ { 'content' => ' 2006-12-28T14:07:23Z ', 'type' => 't' } ], 'name' => 'dc:date', 'attrib' => {}, 'type' => 'e' }, { 'content' => [ { 'content' => ' david ', 'type' => 't' } ], 'name' => 'dc:creator', 'attrib' => {}, 'type' => 'e' } ], 'name' => 'item', 'attrib' => { 'rdf:about' => 'http://www.cantrell.org.uk/david/journal/index.pl/id_amazon-recommendations' }, 'type' => 'e' }, { 'content' => [ { 'content' => [ { 'content' => ' This week in Whisky news ', 'type' => 't' } ], 'name' => 'title', 'attrib' => {}, 'type' => 'e' }, { 'content' => [ { 'content' => ' http://www.cantrell.org.uk/david/journal/index.pl/id_this-week-in-whisky-news', 'type' => 't' } ], 'name' => 'link', 'attrib' => {}, 'type' => 'e' }, { 'content' => [ { 'content' => ' Having come back from Edinburgh after the weekend with a splendid bottle of the society\'s Laphroaig, I was pleased to discover a whisky shop in Vinopolis near London Bridge. At which there was a bottle of 50 year old Talisker, which I persuaded to come home with me.

I\'m doomed, and not just when the credit card bill arrives. ', 'type' => 't' } ], 'name' => 'description', 'attrib' => {}, 'type' => 'e' }, { 'content' => [ { 'content' => ' 2006-12-19T15:08:04Z ', 'type' => 't' } ], 'name' => 'dc:date', 'attrib' => {}, 'type' => 'e' }, { 'content' => [ { 'content' => ' david ', 'type' => 't' } ], 'name' => 'dc:creator', 'attrib' => {}, 'type' => 'e' } ], 'name' => 'item', 'attrib' => { 'rdf:about' => 'http://www.cantrell.org.uk/david/journal/index.pl/id_this-week-in-whisky-news' }, 'type' => 'e' }, { 'content' => [ { 'content' => [ { 'content' => ' Bastard Fairies ', 'type' => 't' } ], 'name' => 'title', 'attrib' => {}, 'type' => 'e' }, { 'content' => [ { 'content' => ' http://www.cantrell.org.uk/david/journal/index.pl/id_bastard-fairies', 'type' => 't' } ], 'name' => 'link', 'attrib' => {}, 'type' => 'e' }, { 'content' => [ { 'content' => ' You! Yes, you behind the bikesheds! Listen to The Bastard Fairies now.

Even if you don\'t like the music, the name rules. ', 'type' => 't' } ], 'name' => 'description', 'attrib' => {}, 'type' => 'e' }, { 'content' => [ { 'content' => ' 2006-12-18T00:10:46Z ', 'type' => 't' } ], 'name' => 'dc:date', 'attrib' => {}, 'type' => 'e' }, { 'content' => [ { 'content' => ' david ', 'type' => 't' } ], 'name' => 'dc:creator', 'attrib' => {}, 'type' => 'e' } ], 'name' => 'item', 'attrib' => { 'rdf:about' => 'http://www.cantrell.org.uk/david/journal/index.pl/id_bastard-fairies' }, 'type' => 'e' } ], 'name' => 'rdf:RDF', 'attrib' => { 'xmlns' => 'http://purl.org/rss/1.0/', 'xmlns:content' => 'http://purl.org/rss/1.0/modules/content/', 'xmlns:admin' => 'http://webns.net/mvcb/', 'xmlns:rdf' => 'http://www.w3.org/1999/02/22-rdf-syntax-ns#', 'xmlns:sy' => 'http://purl.org/rss/1.0/modules/syndication/', 'xmlns:dc' => 'http://purl.org/dc/elements/1.1/' }, 'type' => 'e' } ]; XML-Tiny-2.07/t/rss.xml000644 000765 000024 00000032175 11612551241 015057 0ustar00davidstaff000000 000000 Dave's Free Press http://www.cantrell.org.uk/david/journal/index.pl the Slightly Less Bad And Wrong Blog Edition en-us 2007-01-20T22:02:42Z New Bryar release http://www.cantrell.org.uk/david/journal/index.pl/id_bryar-software-release Warning: geeky content ahead<p>As I've been promising to do for ages (it's over a year since Simon said I could take over maintenance of it, and several months since I promised <a href=http://randomness.org.uk/>Bob</a> that he could have all the <a href=http://search.cpan.org/src/DCANTRELL/Bryar-3.0/Changes>shiny new features</a> I had planned) I've finally got round to releasing a <a href=http://search.cpan.org/~dcantrell/Bryar-3.0/>new version of Bryar</a>, the software what provides the brains behind this 'ere august journal.<p>The most important change is that I released the stuff for filtering out comment spam. 2007-01-20T22:02:42Z david Racism on the telly http://www.cantrell.org.uk/david/journal/index.pl/id_big-brother-racism <table border=1 align=right><tr><td align=center><font size=-2><img src=/david/journal/images/sherpa-shitty.jpg><br>Sherpa Shitty, famous for<br>being a piece of plastic</font></td></tr></table>Apparently there is a television programme called "Big Brother", one of the requirements for appearing on which is being exceedingly stupid. There's a furore because one of the stupid people is supposed to have made some nasty racist comments about another of the stupid people. Not entirely unexpected, when you consider that the programme has the same requirements as being a racist does. Anyway, the victim is pictured here. I hope you don't think I'm racist for pointing out that she looks like a plastic doll. 2007-01-19T22:44:38Z david An Idiot http://www.cantrell.org.uk/david/journal/index.pl/id_idiot-recruiters [originally posted on 2006-01-12]<p>I got an email today from a recruiter. Not to see if I was available for work, but trying to push someone on to me. The email read:<p><blockquote> Please find attached the CV of an extremely talented web developer who specialises in PHP and front end web development technologies including HTML, CSS and JavaScript.<p>This candidate is actively seeking work in your area at the moment. He does have several other interviews arranged therefore if you are interested in seeing him for a role you are currently recruiting for please give me a call today.<p>If you are not recruiting, please keep my details on record for future reference. </blockquote><p>and was sent to my personal address, not to work. Neither I nor my lovely employer have told this girl that we are looking for anyone technical and if we had we'd not have asked for someone who knew PHP. So yes, I most certainly will "keep her details on record for future reference". Being a gentleman, I informed her of this fact and that I was keeping them because I would otherwise not remember that she is clearly far too stupid for me to do business with.<p><strong>Update 2006-01-19:</strong> she dunnit again. This time I phoned her, and she admitted sending unsolicited, untargetted mailshots - that is, spam. She, of course, thinks it was targetted, but I'm afraid that's just not true as is obvious from what I wrote above. And, of course, there's the issue that the address she sent her spam to is one that I created only because one person (one!) continually mis-spelt my real one. I've never sent email from the address in question, nor have I ever given that address to anyone apart from that one person. Consequently, the idiot spammer Claire O'Keeffe of Huxley Associates obviously either guessed it or acquired it by some other nefarious means. 2007-01-19T17:43:46Z david Measuring speed in the digital age http://www.cantrell.org.uk/david/journal/index.pl/id_measurement-in-the-digital-age Warning: geeky content ahead<p>In the digital age, accuracy and speedy calculations come from using powers of two. You also want to stick with integers to avoid rounding error. Therefore I propose that we measure speed in nano-furlongs per mega-fortnight. The conversion from metres per second is fairly simple - 1&nbsp;m/s is approximately 2<sup>64</sup>&nbsp;nFurlong/Mfortnight.<p>This means that we can measure incredibly slow speeds with great precision - down to of the order of 10<sup>-19</sup> m/s without having to enter the dangerous world of floating point. And of course we can easily measure all the way up to the fastest possible speed, that of light, which is only about 2<sup>92</sup> nF/MF. This provides ample room for further expansion of the measuring stick if Mr. Einstein turns out to have been wrong. A 128-bit value would let us measure speeds up to 10<sup>10</sup> times that of light, in extremely small increments. 2007-01-16T21:10:18Z david Dear Amazon http://www.cantrell.org.uk/david/journal/index.pl/id_dear-amazon You're a bunch of cunts. Not only do you provide no way for me to export my wishlist to XML or CSV or anything useful like that, you manage to break all the third-party applications that do it as well. I hate you and hope you die.<p><strong>update:</strong> they had for no apparent reason disabled my account, although they were still sending me information about how to use it. It would have been nice if they'd told me. It would have been nice if I got helpful error messages back from the Net::Amazon module too. 2007-01-14T17:30:49Z david New weblog http://www.cantrell.org.uk/david/journal/index.pl/id_new-weblog I've got a new weblog <a href=http://www.cantrell.org.uk/david/journal/weblog.tt2>here</a>. 2007-01-05T22:09:45Z david Customer Service, BA-style http://www.cantrell.org.uk/david/journal/index.pl/id_customer-service-BA-style British Airways' "vision" is to "create the best possible airport experience before you fly", according to some <a href=/david/journal/images/ba-bumph.txt>bumph</a> they sent me. To do this they have a "new simpler checked and excess baggage policy". I wonder what that new policy is, so reading on a bit ... "the maximum weight per bag will be reduced". The overall effect is that ordinary people will be able to take less luggage.<p>Obviously, that makes flying so much nicer!<p>Now I've known for some time that the government basically doesn't want people to fly, and that the method they've chosen to implement this part of their <strike>giving in to terrorists</strike> errm, I mean security agenda is to make it as inconvenient as possible. I'd already stopped flying because I quite literally can't take all my valuable items in hand luggage like I used to and I don't trust the baggage monkeys to not steal them&nbsp;/ use them as footballs&nbsp;/ run them over with trucks&nbsp;/ send them to Ulaan Bator. I use Eurostar and other trains, which for the vast majority of my journeys is not significantly more time-consuming, as well as being cheaper and a great deal less unpleasant.<p>What I can't understand is why an <em>airline</em> would want to collaborate with the enemy in this way and drive even more of its customers away. Although I do note that BA own 10% of the shares in the company that runs Eurostar ... 2006-12-29T20:02:44Z david Amazon recommendations http://www.cantrell.org.uk/david/journal/index.pl/id_amazon-recommendations Today I ordered a spoon from Amazon. This seems to have screwed up its recommendations system so now it seems to be ignoring the zillion bits of sci-fi, the zombie flicks and the metal CDs I've bought and thinks that I want:<p><ul><li>a slotted spoon <li>a ladle <li>a spaghetti server <li>an omelette turner <li>some tongs </ul><p>mixed in with:<p><ul><li>"selected works" of Cicero (no thanks, I'll select my own) <li>"Iron Sunrise" by Charlie Stross <li>"Adventures of a bacon curer" <li>a DVD of The Da Vinci Code <li>Now 65 </ul><p>Well done Amazon, you score two out of ten.<p>And what the FUCK is an omelette turner? 2006-12-28T14:07:23Z david This week in Whisky news http://www.cantrell.org.uk/david/journal/index.pl/id_this-week-in-whisky-news Having come back from Edinburgh after the weekend with a splendid bottle of <a href=http://www.smws.com>the society</a>'s <a href=https://www.smws.co.uk/shop/whisky_details.php?id_bottlings=1837>Laphroaig</a>, I was pleased to discover a whisky shop in Vinopolis near London Bridge. At which there was a bottle of <a href=http://www.royalmilewhiskies.com/product.asp?pf_id=0040000007487>50 year old Talisker</a>, which I persuaded to come home with me.<p>I'm doomed, and not just when the credit card bill arrives. 2006-12-19T15:08:04Z david Bastard Fairies http://www.cantrell.org.uk/david/journal/index.pl/id_bastard-fairies You! Yes, you behind the bikesheds! Listen to <a href=http://www.thebastardfairies.com/>The Bastard Fairies</a> now.<p>Even if you don't like the music, the name rules. 2006-12-18T00:10:46Z david XML-Tiny-2.07/t/self-closing-optional-trailing-space.xml000644 000765 000024 00000000236 11612551241 023351 0ustar00davidstaff000000 000000 Hello Worlld XML-Tiny-2.07/t/test_functions000644 000765 000024 00000003557 11612551241 016522 0ustar00davidstaff000000 000000 #!/usr/bin/perl use strict; $^W = 1; my $counter = 0; # takes a true/false value as first arg, prints "[not] ok ..." followed # by the second arg sub ok { $counter++; print ''.($_[0] ? 'ok ' : 'not ok ').$counter."\t$_[1]\n"; return $_[0]; } sub is { ok($_[0] eq $_[1], $_[2]) || print "# got: [$_[0]]\n# exp: [$_[1]]\n"; } # compares first two args deeply, prints "[not] ok ..." followed by third arg # NB *only* handles scalars, hashes and arrays sub is_deeply { my($msg, @args) = reverse(@_); ok(_is_deeply(@args), $msg); } sub _is_deeply { my @args = @_; return 0 unless(ref($args[0]) eq ref($args[1])); if(ref($args[0]) eq '') { return ($args[0] eq $args[1]); } elsif(ref($args[0]) eq 'ARRAY') { return _is_deeply_arrays(@args); } elsif(ref($args[0]) eq 'HASH') { return _is_deeply_hashes(@args); } else { return 0 } } sub _is_deeply_arrays { return 0 if(@{$_[0]} != @{$_[1]}); # different sizes foreach my $i (0 .. $#{$_[0]}) { return 0 if(!_is_deeply($_[0]->[$i], $_[1]->[$i])); } return 1; } sub _is_deeply_hashes { my %arg1 = %{$_[0]}; my %arg2 = %{$_[1]}; return 0 if((keys %arg1) != (keys %arg2)); # different sizes return 0 if(!_is_deeply_arrays( # different keys [sort keys %arg1], [sort keys %arg2] )); return 0 if(!_is_deeply_arrays( # different values [@arg1{sort keys %arg1}], [@arg2{sort keys %arg1}] )); return 1; }; # strips the 'attrib' key out of any hashes in a structure sub strip_attribs { return unless(ref($_[0])); if(ref($_[0]) eq 'ARRAY') { foreach (@{$_[0]}) { strip_attribs($_) } } elsif(ref($_[0]) eq 'HASH') { delete $_[0]->{attrib}; if($_[0]->{type} eq 'e') { foreach (@{$_[0]->{content}}) { strip_attribs($_) } } } } 1; XML-Tiny-2.07/t/text-only.xml000644 000765 000024 00000000017 11612551241 016201 0ustar00davidstaff000000 000000 this isn't XML XML-Tiny-2.07/t/trailing-whitespace-in-tags.xml000644 000765 000024 00000000166 11612551241 021546 0ustar00davidstaff000000 000000 XML-Tiny-2.07/t/two-docs.xml000644 000765 000024 00000000020 11612551241 015767 0ustar00davidstaff000000 000000 XML-Tiny-2.07/t/w3c/000755 000765 000024 00000000000 13145401437 014216 5ustar00davidstaff000000 000000 XML-Tiny-2.07/t/w3c/not-wf/000755 000765 000024 00000000000 13145401437 015430 5ustar00davidstaff000000 000000 XML-Tiny-2.07/t/w3c/not-wf/ext-sa/000755 000765 000024 00000000000 13145401437 016631 5ustar00davidstaff000000 000000 XML-Tiny-2.07/t/w3c/not-wf/not-sa/000755 000765 000024 00000000000 13145401437 016631 5ustar00davidstaff000000 000000 XML-Tiny-2.07/t/w3c/not-wf/sa/000755 000765 000024 00000000000 13145401437 016033 5ustar00davidstaff000000 000000 XML-Tiny-2.07/t/w3c/not-wf/sa/001.xml000644 000765 000024 00000000040 11612551241 017043 0ustar00davidstaff000000 000000 XML-Tiny-2.07/t/w3c/not-wf/sa/002.xml000644 000765 000024 00000000040 11612551241 017044 0ustar00davidstaff000000 000000 <.doc> XML-Tiny-2.07/t/w3c/not-wf/sa/003.xml000644 000765 000024 00000000022 11612551241 017045 0ustar00davidstaff000000 000000 XML-Tiny-2.07/t/w3c/not-wf/sa/004.xml000644 000765 000024 00000000040 11612551241 017046 0ustar00davidstaff000000 000000 XML-Tiny-2.07/t/w3c/not-wf/sa/005.xml000644 000765 000024 00000000040 11612551241 017047 0ustar00davidstaff000000 000000 XML-Tiny-2.07/t/w3c/not-wf/sa/006.xml000644 000765 000024 00000000052 11612551241 017053 0ustar00davidstaff000000 000000 XML-Tiny-2.07/t/w3c/not-wf/sa/007.xml000644 000765 000024 00000000031 11612551241 017051 0ustar00davidstaff000000 000000 & no refc XML-Tiny-2.07/t/w3c/not-wf/sa/008.xml000644 000765 000024 00000000026 11612551241 017056 0ustar00davidstaff000000 000000 &.entity; XML-Tiny-2.07/t/w3c/not-wf/sa/009.xml000644 000765 000024 00000000022 11612551241 017053 0ustar00davidstaff000000 000000 &#RE; XML-Tiny-2.07/t/w3c/not-wf/sa/010.xml000644 000765 000024 00000000022 11612551241 017043 0ustar00davidstaff000000 000000 A & B XML-Tiny-2.07/t/w3c/not-wf/sa/011.xml000644 000765 000024 00000000020 11612551241 017042 0ustar00davidstaff000000 000000 XML-Tiny-2.07/t/w3c/not-wf/sa/012.xml000644 000765 000024 00000000023 11612551241 017046 0ustar00davidstaff000000 000000 XML-Tiny-2.07/t/w3c/not-wf/sa/013.xml000644 000765 000024 00000000025 11612551241 017051 0ustar00davidstaff000000 000000 "> XML-Tiny-2.07/t/w3c/not-wf/sa/015.xml000644 000765 000024 00000000021 11612551241 017047 0ustar00davidstaff000000 000000 XML-Tiny-2.07/t/w3c/not-wf/sa/016.xml000644 000765 000024 00000000032 11612551241 017052 0ustar00davidstaff000000 000000 XML-Tiny-2.07/t/w3c/not-wf/sa/017.xml000644 000765 000024 00000000026 11612551241 017056 0ustar00davidstaff000000 000000 XML-Tiny-2.07/t/w3c/not-wf/sa/018.xml000644 000765 000024 00000000040 11612551241 017053 0ustar00davidstaff000000 000000 XML-Tiny-2.07/t/w3c/not-wf/sa/019.xml000644 000765 000024 00000000012 11612551241 017053 0ustar00davidstaff000000 000000 XML-Tiny-2.07/t/w3c/not-wf/sa/020.xml000644 000765 000024 00000000030 11612551241 017043 0ustar00davidstaff000000 000000 XML-Tiny-2.07/t/w3c/not-wf/sa/021.xml000644 000765 000024 00000000026 11612551241 017051 0ustar00davidstaff000000 000000 XML-Tiny-2.07/t/w3c/not-wf/sa/022.xml000644 000765 000024 00000000031 11612551241 017046 0ustar00davidstaff000000 000000 XML-Tiny-2.07/t/w3c/not-wf/sa/023.xml000644 000765 000024 00000000025 11612551241 017052 0ustar00davidstaff000000 000000 XML-Tiny-2.07/t/w3c/not-wf/sa/024.xml000644 000765 000024 00000000034 11612551241 017053 0ustar00davidstaff000000 000000 <123> XML-Tiny-2.07/t/w3c/not-wf/sa/025.xml000644 000765 000024 00000000020 11612551241 017047 0ustar00davidstaff000000 000000 ]]> XML-Tiny-2.07/t/w3c/not-wf/sa/026.xml000644 000765 000024 00000000021 11612551241 017051 0ustar00davidstaff000000 000000 ]]]> XML-Tiny-2.07/t/w3c/not-wf/sa/027.xml000644 000765 000024 00000000031 11612551241 017053 0ustar00davidstaff000000 000000 XML-Tiny-2.07/t/w3c/not-wf/sa/033.xml000644 000765 000024 00000000024 11612551241 017052 0ustar00davidstaff000000 000000 abcdef XML-Tiny-2.07/t/w3c/not-wf/sa/034.xml000644 000765 000024 00000000101 11612551241 017047 0ustar00davidstaff000000 000000 A form-feed is not white space or a name character XML-Tiny-2.07/t/w3c/not-wf/sa/035.xml000644 000765 000024 00000000041 11612551241 017053 0ustar00davidstaff000000 000000 1 < 2 but not in XML XML-Tiny-2.07/t/w3c/not-wf/sa/036.xml000644 000765 000024 00000000033 11612551241 017055 0ustar00davidstaff000000 000000 Illegal data XML-Tiny-2.07/t/w3c/not-wf/sa/037.xml000644 000765 000024 00000000024 11612551241 017056 0ustar00davidstaff000000 000000 XML-Tiny-2.07/t/w3c/not-wf/sa/038.xml000644 000765 000024 00000000045 11612551241 017062 0ustar00davidstaff000000 000000 XML-Tiny-2.07/t/w3c/not-wf/sa/039.xml000644 000765 000024 00000000025 11612551241 017061 0ustar00davidstaff000000 000000 XML-Tiny-2.07/t/w3c/not-wf/sa/040.xml000644 000765 000024 00000000032 11612551241 017047 0ustar00davidstaff000000 000000 XML-Tiny-2.07/t/w3c/not-wf/sa/041.xml000644 000765 000024 00000000025 11612551241 017052 0ustar00davidstaff000000 000000 XML-Tiny-2.07/t/w3c/not-wf/sa/042.xml000644 000765 000024 00000000017 11612551241 017054 0ustar00davidstaff000000 000000 XML-Tiny-2.07/t/w3c/not-wf/sa/043.xml000644 000765 000024 00000000026 11612551241 017055 0ustar00davidstaff000000 000000 Illegal data XML-Tiny-2.07/t/w3c/not-wf/sa/044.xml000644 000765 000024 00000000016 11612551241 017055 0ustar00davidstaff000000 000000 XML-Tiny-2.07/t/w3c/not-wf/sa/045.xml000644 000765 000024 00000000026 11612551241 017057 0ustar00davidstaff000000 000000 XML-Tiny-2.07/t/w3c/not-wf/sa/046.xml000644 000765 000024 00000000030 11612551241 017053 0ustar00davidstaff000000 000000 XML-Tiny-2.07/t/w3c/not-wf/sa/047.xml000644 000765 000024 00000000027 11612551241 017062 0ustar00davidstaff000000 000000 XML-Tiny-2.07/t/w3c/not-wf/sa/048.xml000644 000765 000024 00000000035 11612551241 017062 0ustar00davidstaff000000 000000 XML-Tiny-2.07/t/w3c/not-wf/sa/049.xml000644 000765 000024 00000000072 11612551241 017064 0ustar00davidstaff000000 000000 XML-Tiny-2.07/t/w3c/not-wf/sa/050.xml000644 000765 000024 00000000000 11612551241 017043 0ustar00davidstaff000000 000000 XML-Tiny-2.07/t/w3c/not-wf/sa/051.xml000644 000765 000024 00000000057 11612551241 017060 0ustar00davidstaff000000 000000 XML-Tiny-2.07/t/w3c/not-wf/sa/052.xml000644 000765 000024 00000000050 11612551241 017052 0ustar00davidstaff000000 000000 XML-Tiny-2.07/t/w3c/not-wf/sa/053.xml000644 000765 000024 00000000015 11612551241 017054 0ustar00davidstaff000000 000000 XML-Tiny-2.07/t/w3c/not-wf/sa/054.xml000644 000765 000024 00000000111 11612551241 017052 0ustar00davidstaff000000 000000 ]> XML-Tiny-2.07/t/w3c/not-wf/sa/055.xml000644 000765 000024 00000000036 11612551241 017061 0ustar00davidstaff000000 000000 XML-Tiny-2.07/t/w3c/not-wf/sa/056.xml000644 000765 000024 00000000060 11612551241 017057 0ustar00davidstaff000000 000000 XML-Tiny-2.07/t/w3c/not-wf/sa/057.xml000644 000765 000024 00000000112 11612551241 017056 0ustar00davidstaff000000 000000 ]> XML-Tiny-2.07/t/w3c/not-wf/sa/058.xml000644 000765 000024 00000000142 11612551241 017062 0ustar00davidstaff000000 000000 ]> XML-Tiny-2.07/t/w3c/not-wf/sa/059.xml000644 000765 000024 00000000132 11612551241 017062 0ustar00davidstaff000000 000000 ]> XML-Tiny-2.07/t/w3c/not-wf/sa/060.xml000644 000765 000024 00000000135 11612551241 017055 0ustar00davidstaff000000 000000 ]> XML-Tiny-2.07/t/w3c/not-wf/sa/061.xml000644 000765 000024 00000000110 11612551241 017047 0ustar00davidstaff000000 000000 ]> XML-Tiny-2.07/t/w3c/not-wf/sa/062.xml000644 000765 000024 00000000074 11612551241 017061 0ustar00davidstaff000000 000000 ]> XML-Tiny-2.07/t/w3c/not-wf/sa/063.xml000644 000765 000024 00000000063 11612551241 017060 0ustar00davidstaff000000 000000 ]> XML-Tiny-2.07/t/w3c/not-wf/sa/064.xml000644 000765 000024 00000000130 11612551241 017054 0ustar00davidstaff000000 000000 ]> XML-Tiny-2.07/t/w3c/not-wf/sa/065.xml000644 000765 000024 00000000141 11612551241 017057 0ustar00davidstaff000000 000000 ]> XML-Tiny-2.07/t/w3c/not-wf/sa/066.xml000644 000765 000024 00000000141 11612551241 017060 0ustar00davidstaff000000 000000 ]> XML-Tiny-2.07/t/w3c/not-wf/sa/067.xml000644 000765 000024 00000000132 11612551241 017061 0ustar00davidstaff000000 000000 ]> XML-Tiny-2.07/t/w3c/not-wf/sa/068.xml000644 000765 000024 00000000146 11612551241 017067 0ustar00davidstaff000000 000000 ]> XML-Tiny-2.07/t/w3c/not-wf/sa/069.xml000644 000765 000024 00000000222 11612551241 017063 0ustar00davidstaff000000 000000 ]> XML-Tiny-2.07/t/w3c/not-wf/sa/070.xml000644 000765 000024 00000000073 11612551241 017057 0ustar00davidstaff000000 000000 XML-Tiny-2.07/t/w3c/not-wf/sa/071.xml000644 000765 000024 00000000145 11612551241 017060 0ustar00davidstaff000000 000000 ]> &e1; XML-Tiny-2.07/t/w3c/not-wf/sa/072.xml000644 000765 000024 00000000022 11612551241 017053 0ustar00davidstaff000000 000000 &foo; XML-Tiny-2.07/t/w3c/not-wf/sa/073.xml000644 000765 000024 00000000075 11612551241 017064 0ustar00davidstaff000000 000000 ]> &f; XML-Tiny-2.07/t/w3c/not-wf/sa/074.xml000644 000765 000024 00000000117 11612551241 017062 0ustar00davidstaff000000 000000 "> ]> &e; XML-Tiny-2.07/t/w3c/not-wf/sa/075.xml000644 000765 000024 00000000154 11612551241 017064 0ustar00davidstaff000000 000000 ]> XML-Tiny-2.07/t/w3c/not-wf/sa/076.xml000644 000765 000024 00000000027 11612551241 017064 0ustar00davidstaff000000 000000 XML-Tiny-2.07/t/w3c/not-wf/sa/077.xml000644 000765 000024 00000000103 11612551241 017060 0ustar00davidstaff000000 000000 ]> XML-Tiny-2.07/t/w3c/not-wf/sa/078.xml000644 000765 000024 00000000134 11612551241 017065 0ustar00davidstaff000000 000000 ]> XML-Tiny-2.07/t/w3c/not-wf/sa/079.xml000644 000765 000024 00000000232 11612551241 017065 0ustar00davidstaff000000 000000 ]> XML-Tiny-2.07/t/w3c/not-wf/sa/080.xml000644 000765 000024 00000000241 11612551241 017055 0ustar00davidstaff000000 000000 ]> XML-Tiny-2.07/t/w3c/not-wf/sa/081.xml000644 000765 000024 00000000104 11612551241 017054 0ustar00davidstaff000000 000000 ]> XML-Tiny-2.07/t/w3c/not-wf/sa/082.xml000644 000765 000024 00000000164 11612551241 017063 0ustar00davidstaff000000 000000 ]> XML-Tiny-2.07/t/w3c/not-wf/sa/083.xml000644 000765 000024 00000000107 11612551241 017061 0ustar00davidstaff000000 000000 ]> &e; XML-Tiny-2.07/t/w3c/not-wf/sa/084.xml000644 000765 000024 00000000174 11612551241 017066 0ustar00davidstaff000000 000000 ]> XML-Tiny-2.07/t/w3c/not-wf/sa/085.xml000644 000765 000024 00000000063 11612551241 017064 0ustar00davidstaff000000 000000 XML-Tiny-2.07/t/w3c/not-wf/sa/086.xml000644 000765 000024 00000000107 11612551241 017064 0ustar00davidstaff000000 000000 ]> XML-Tiny-2.07/t/w3c/not-wf/sa/087.xml000644 000765 000024 00000000111 11612551241 017060 0ustar00davidstaff000000 000000 ]> XML-Tiny-2.07/t/w3c/not-wf/sa/088.xml000644 000765 000024 00000000165 11612551241 017072 0ustar00davidstaff000000 000000 ]> ]> XML-Tiny-2.07/t/w3c/not-wf/sa/090.xml000644 000765 000024 00000000112 11612551241 017053 0ustar00davidstaff000000 000000 "> ]> &e; XML-Tiny-2.07/t/w3c/not-wf/sa/091.xml000644 000765 000024 00000000146 11612551241 017063 0ustar00davidstaff000000 000000 ]> XML-Tiny-2.07/t/w3c/not-wf/sa/092.xml000644 000765 000024 00000000112 11612551241 017055 0ustar00davidstaff000000 000000 "> ]> &e; XML-Tiny-2.07/t/w3c/not-wf/sa/093.xml000644 000765 000024 00000000023 11612551241 017057 0ustar00davidstaff000000 000000 X XML-Tiny-2.07/t/w3c/not-wf/sa/103.xml000644 000765 000024 00000000076 11612551241 017057 0ustar00davidstaff000000 000000 "> ]> &e; XML-Tiny-2.07/t/w3c/not-wf/sa/104.xml000644 000765 000024 00000000100 11612551241 017044 0ustar00davidstaff000000 000000 "> ]> &e; XML-Tiny-2.07/t/w3c/not-wf/sa/106.xml000644 000765 000024 00000000037 11612551241 017057 0ustar00davidstaff000000 000000 XML-Tiny-2.07/t/w3c/not-wf/sa/107.xml000644 000765 000024 00000000060 11612551241 017054 0ustar00davidstaff000000 000000 ]> XML-Tiny-2.07/t/w3c/not-wf/sa/108.xml000644 000765 000024 00000000040 11612551241 017053 0ustar00davidstaff000000 000000 XML-Tiny-2.07/t/w3c/not-wf/sa/109.xml000644 000765 000024 00000000065 11612551241 017063 0ustar00davidstaff000000 000000 "> ]> &e; XML-Tiny-2.07/t/w3c/not-wf/sa/110.xml000644 000765 000024 00000000067 11612551241 017055 0ustar00davidstaff000000 000000 ]> &e; XML-Tiny-2.07/t/w3c/not-wf/sa/111.xml000644 000765 000024 00000000077 11612551241 017057 0ustar00davidstaff000000 000000 ]> XML-Tiny-2.07/t/w3c/not-wf/sa/112.xml000644 000765 000024 00000000041 11612551241 017047 0ustar00davidstaff000000 000000 XML-Tiny-2.07/t/w3c/not-wf/sa/113.xml000644 000765 000024 00000000067 11612551241 017060 0ustar00davidstaff000000 000000 ]> XML-Tiny-2.07/t/w3c/not-wf/sa/114.xml000644 000765 000024 00000000065 11612551241 017057 0ustar00davidstaff000000 000000 ]> XML-Tiny-2.07/t/w3c/not-wf/sa/115.xml000644 000765 000024 00000000077 11612551241 017063 0ustar00davidstaff000000 000000 ]> XML-Tiny-2.07/t/w3c/not-wf/sa/116.xml000644 000765 000024 00000000076 11612551241 017063 0ustar00davidstaff000000 000000 ]> &e;7; XML-Tiny-2.07/t/w3c/not-wf/sa/117.xml000644 000765 000024 00000000076 11612551241 017064 0ustar00davidstaff000000 000000 ]> &e;#97; XML-Tiny-2.07/t/w3c/not-wf/sa/118.xml000644 000765 000024 00000000072 11612551241 017061 0ustar00davidstaff000000 000000 ]> &&e;97; XML-Tiny-2.07/t/w3c/not-wf/sa/119.xml000644 000765 000024 00000000102 11612551241 017054 0ustar00davidstaff000000 000000 ]> &e;#38; XML-Tiny-2.07/t/w3c/not-wf/sa/120.xml000644 000765 000024 00000000076 11612551241 017056 0ustar00davidstaff000000 000000 ]> &e; XML-Tiny-2.07/t/w3c/not-wf/sa/121.xml000644 000765 000024 00000000100 11612551241 017043 0ustar00davidstaff000000 000000 ]> XML-Tiny-2.07/t/w3c/not-wf/sa/122.xml000644 000765 000024 00000000100 11612551241 017044 0ustar00davidstaff000000 000000 ]> XML-Tiny-2.07/t/w3c/not-wf/sa/123.xml000644 000765 000024 00000000074 11612551241 017057 0ustar00davidstaff000000 000000 ]> XML-Tiny-2.07/t/w3c/not-wf/sa/124.xml000644 000765 000024 00000000101 11612551241 017047 0ustar00davidstaff000000 000000 ]> XML-Tiny-2.07/t/w3c/not-wf/sa/125.xml000644 000765 000024 00000000076 11612551241 017063 0ustar00davidstaff000000 000000 ]> XML-Tiny-2.07/t/w3c/not-wf/sa/126.xml000644 000765 000024 00000000075 11612551241 017063 0ustar00davidstaff000000 000000 ]> XML-Tiny-2.07/t/w3c/not-wf/sa/127.xml000644 000765 000024 00000000075 11612551241 017064 0ustar00davidstaff000000 000000 ]> XML-Tiny-2.07/t/w3c/not-wf/sa/128.xml000644 000765 000024 00000000070 11612551241 017060 0ustar00davidstaff000000 000000 ]> XML-Tiny-2.07/t/w3c/not-wf/sa/129.xml000644 000765 000024 00000000100 11612551241 017053 0ustar00davidstaff000000 000000 ]> XML-Tiny-2.07/t/w3c/not-wf/sa/130.xml000644 000765 000024 00000000100 11612551241 017043 0ustar00davidstaff000000 000000 ]> XML-Tiny-2.07/t/w3c/not-wf/sa/131.xml000644 000765 000024 00000000100 11612551241 017044 0ustar00davidstaff000000 000000 ]> XML-Tiny-2.07/t/w3c/not-wf/sa/132.xml000644 000765 000024 00000000120 11612551241 017047 0ustar00davidstaff000000 000000 ]> XML-Tiny-2.07/t/w3c/not-wf/sa/133.xml000644 000765 000024 00000000070 11612551241 017054 0ustar00davidstaff000000 000000 ]> XML-Tiny-2.07/t/w3c/not-wf/sa/134.xml000644 000765 000024 00000000070 11612551241 017055 0ustar00davidstaff000000 000000 ]> XML-Tiny-2.07/t/w3c/not-wf/sa/135.xml000644 000765 000024 00000000073 11612551241 017061 0ustar00davidstaff000000 000000 ]> XML-Tiny-2.07/t/w3c/not-wf/sa/136.xml000644 000765 000024 00000000100 11612551241 017051 0ustar00davidstaff000000 000000 ]> XML-Tiny-2.07/t/w3c/not-wf/sa/137.xml000644 000765 000024 00000000073 11612551241 017063 0ustar00davidstaff000000 000000 ]> XML-Tiny-2.07/t/w3c/not-wf/sa/138.xml000644 000765 000024 00000000072 11612551241 017063 0ustar00davidstaff000000 000000 ]> XML-Tiny-2.07/t/w3c/not-wf/sa/139.xml000644 000765 000024 00000000065 11612551241 017066 0ustar00davidstaff000000 000000 ]> XML-Tiny-2.07/t/w3c/not-wf/sa/140.xml000644 000765 000024 00000000112 11612551241 017047 0ustar00davidstaff000000 000000 "> ]> &e; XML-Tiny-2.07/t/w3c/not-wf/sa/141.xml000644 000765 000024 00000000112 11612551241 017050 0ustar00davidstaff000000 000000 "> ]> &e; XML-Tiny-2.07/t/w3c/not-wf/sa/142.xml000644 000765 000024 00000000100 11612551241 017046 0ustar00davidstaff000000 000000 ]> XML-Tiny-2.07/t/w3c/not-wf/sa/143.xml000644 000765 000024 00000000101 11612551241 017050 0ustar00davidstaff000000 000000 ]>  XML-Tiny-2.07/t/w3c/not-wf/sa/144.xml000644 000765 000024 00000000104 11612551241 017054 0ustar00davidstaff000000 000000 ]> ￿ XML-Tiny-2.07/t/w3c/not-wf/sa/145.xml000644 000765 000024 00000000104 11612551241 017055 0ustar00davidstaff000000 000000 ]> XML-Tiny-2.07/t/w3c/not-wf/sa/146.xml000644 000765 000024 00000000106 11612551241 017060 0ustar00davidstaff000000 000000 ]> XML-Tiny-2.07/t/w3c/not-wf/sa/149.xml000644 000765 000024 00000000123 11612551241 017062 0ustar00davidstaff000000 000000 ]> XML-Tiny-2.07/t/w3c/not-wf/sa/153.xml000644 000765 000024 00000000147 11612551241 017063 0ustar00davidstaff000000 000000 "> ]> &e; XML-Tiny-2.07/t/w3c/not-wf/sa/158.xml000644 000765 000024 00000000217 11612551241 017066 0ustar00davidstaff000000 000000 ]> XML-Tiny-2.07/t/w3c/not-wf/sa/159.xml000644 000765 000024 00000000150 11612551241 017063 0ustar00davidstaff000000 000000 "> ]> &e; XML-Tiny-2.07/t/w3c/not-wf/sa/160.xml000644 000765 000024 00000000143 11612551241 017055 0ustar00davidstaff000000 000000 ]> XML-Tiny-2.07/t/w3c/not-wf/sa/161.xml000644 000765 000024 00000000121 11612551241 017052 0ustar00davidstaff000000 000000 ]> XML-Tiny-2.07/t/w3c/not-wf/sa/162.xml000644 000765 000024 00000000146 11612551241 017062 0ustar00davidstaff000000 000000 ]> XML-Tiny-2.07/t/w3c/not-wf/sa/163.xml000644 000765 000024 00000000123 11612551241 017056 0ustar00davidstaff000000 000000 ]> %e; XML-Tiny-2.07/t/w3c/not-wf/sa/164.xml000644 000765 000024 00000000123 11612551241 017057 0ustar00davidstaff000000 000000 ] %e; > XML-Tiny-2.07/t/w3c/not-wf/sa/165.xml000644 000765 000024 00000000115 11612551241 017061 0ustar00davidstaff000000 000000 ]> XML-Tiny-2.07/t/w3c/not-wf/sa/175.xml000644 000765 000024 00000000121 11612551241 017057 0ustar00davidstaff000000 000000 ]> XML-Tiny-2.07/t/w3c/not-wf/sa/176.xml000644 000765 000024 00000000062 11612551241 017064 0ustar00davidstaff000000 000000 ]> XML-Tiny-2.07/t/w3c/not-wf/sa/177.xml000644 000765 000024 00000000100 11612551241 017056 0ustar00davidstaff000000 000000 ]> Aï¿¿ XML-Tiny-2.07/t/w3c/not-wf/sa/178.xml000644 000765 000024 00000000146 11612551241 017071 0ustar00davidstaff000000 000000 ]> ]> XML-Tiny-2.07/t/w3c/not-wf/sa/180.xml000644 000765 000024 00000000153 11612551241 017060 0ustar00davidstaff000000 000000 ]> XML-Tiny-2.07/t/w3c/not-wf/sa/181.xml000644 000765 000024 00000000137 11612551241 017063 0ustar00davidstaff000000 000000 ]> &e;]]> XML-Tiny-2.07/t/w3c/not-wf/sa/182.xml000644 000765 000024 00000000132 11612551241 017057 0ustar00davidstaff000000 000000 ]> &e;--> XML-Tiny-2.07/t/w3c/not-wf/sa/183.xml000644 000765 000024 00000000133 11612551241 017061 0ustar00davidstaff000000 000000 ]> XML-Tiny-2.07/t/w3c/not-wf/sa/184.xml000644 000765 000024 00000000136 11612551241 017065 0ustar00davidstaff000000 000000 ]> XML-Tiny-2.07/t/w3c/not-wf/sa/185.ent000644 000765 000024 00000000032 11612551241 017047 0ustar00davidstaff000000 000000 XML-Tiny-2.07/t/w3c/not-wf/sa/185.xml000644 000765 000024 00000000131 11612551241 017061 0ustar00davidstaff000000 000000 &e; XML-Tiny-2.07/t/w3c/not-wf/sa/186.xml000644 000765 000024 00000000150 11612551241 017063 0ustar00davidstaff000000 000000 ]> XML-Tiny-2.07/t/w3c/not-wf/sa/null.ent000644 000765 000024 00000000000 11612551241 017477 0ustar00davidstaff000000 000000 XML-Tiny-2.07/t/w3c/not-wf/not-sa/001.ent000644 000765 000024 00000000055 11612551241 017635 0ustar00davidstaff000000 000000 ]> XML-Tiny-2.07/t/w3c/not-wf/not-sa/001.xml000644 000765 000024 00000000056 11612551241 017650 0ustar00davidstaff000000 000000 XML-Tiny-2.07/t/w3c/not-wf/not-sa/002.xml000644 000765 000024 00000000167 11612551241 017654 0ustar00davidstaff000000 000000 "> %e; ]> XML-Tiny-2.07/t/w3c/not-wf/not-sa/003.ent000644 000765 000024 00000000050 11612551241 017632 0ustar00davidstaff000000 000000 XML-Tiny-2.07/t/w3c/not-wf/not-sa/004.ent000644 000765 000024 00000000051 11612551241 017634 0ustar00davidstaff000000 000000 XML-Tiny-2.07/t/w3c/not-wf/not-sa/005.ent000644 000765 000024 00000000037 11612551241 017641 0ustar00davidstaff000000 000000 %e; XML-Tiny-2.07/t/w3c/not-wf/not-sa/005.xml000644 000765 000024 00000000056 11612551241 017654 0ustar00davidstaff000000 000000 XML-Tiny-2.07/t/w3c/not-wf/not-sa/006.ent000644 000765 000024 00000000053 11612551241 017640 0ustar00davidstaff000000 000000 ]]> XML-Tiny-2.07/t/w3c/not-wf/not-sa/006.xml000644 000765 000024 00000000056 11612551241 017655 0ustar00davidstaff000000 000000 XML-Tiny-2.07/t/w3c/not-wf/not-sa/007.ent000644 000765 000024 00000000057 11612551241 017645 0ustar00davidstaff000000 000000 ]> XML-Tiny-2.07/t/w3c/not-wf/not-sa/007.xml000644 000765 000024 00000000056 11612551241 017656 0ustar00davidstaff000000 000000 XML-Tiny-2.07/t/w3c/not-wf/not-sa/008.ent000644 000765 000024 00000000050 11612551241 017637 0ustar00davidstaff000000 000000 XML-Tiny-2.07/t/w3c/not-wf/not-sa/008.xml000644 000765 000024 00000000056 11612551241 017657 0ustar00davidstaff000000 000000 XML-Tiny-2.07/t/w3c/not-wf/not-sa/009.ent000644 000765 000024 00000000065 11612551241 017646 0ustar00davidstaff000000 000000 %e; --> XML-Tiny-2.07/t/w3c/not-wf/not-sa/009.xml000644 000765 000024 00000000056 11612551241 017660 0ustar00davidstaff000000 000000 XML-Tiny-2.07/t/w3c/not-wf/not-sa/010.ent000644 000765 000024 00000000060 11612551241 017631 0ustar00davidstaff000000 000000 %e; doc (#PCDATA)> XML-Tiny-2.07/t/w3c/not-wf/not-sa/010.xml000644 000765 000024 00000000056 11612551241 017650 0ustar00davidstaff000000 000000 XML-Tiny-2.07/t/w3c/not-wf/not-sa/011.ent000644 000765 000024 00000000112 11612551241 017630 0ustar00davidstaff000000 000000 "> %e1; doc (#PCDATA) %e2; XML-Tiny-2.07/t/w3c/not-wf/not-sa/011.xml000644 000765 000024 00000000056 11612551241 017651 0ustar00davidstaff000000 000000 XML-Tiny-2.07/t/w3c/not-wf/ext-sa/001.ent000644 000765 000024 00000000003 11612551241 017626 0ustar00davidstaff000000 000000 &e;XML-Tiny-2.07/t/w3c/not-wf/ext-sa/001.xml000644 000765 000024 00000000103 11612551241 017641 0ustar00davidstaff000000 000000 ]> &e; XML-Tiny-2.07/t/w3c/not-wf/ext-sa/002.ent000644 000765 000024 00000000060 11612551241 017632 0ustar00davidstaff000000 000000 data XML-Tiny-2.07/t/w3c/not-wf/ext-sa/002.xml000644 000765 000024 00000000135 11612551241 017647 0ustar00davidstaff000000 000000 ]> &e; XML-Tiny-2.07/t/w3c/not-wf/ext-sa/003.ent000644 000765 000024 00000000124 11612551241 017634 0ustar00davidstaff000000 000000 data XML-Tiny-2.07/t/w3c/not-wf/ext-sa/003.xml000644 000765 000024 00000000135 11612551241 017650 0ustar00davidstaff000000 000000 ]> &e; XML-Tiny-2.07/lib/XML/000755 000765 000024 00000000000 13145401437 014465 5ustar00davidstaff000000 000000 XML-Tiny-2.07/lib/XML/Tiny.pm000644 000765 000024 00000036530 13145400203 015743 0ustar00davidstaff000000 000000 package XML::Tiny; use strict; require Exporter; use vars qw($VERSION @EXPORT_OK @ISA); $VERSION = '2.07'; @EXPORT_OK = qw(parsefile); @ISA = qw(Exporter); # localising prevents the warningness leaking out of this module local $^W = 1; # can't use warnings as that's a 5.6-ism =head1 NAME XML::Tiny - simple lightweight parser for a subset of XML =head1 DESCRIPTION XML::Tiny is a simple lightweight parser for a subset of XML =head1 SYNOPSIS use XML::Tiny qw(parsefile); open($xmlfile, 'something.xml); my $document = parsefile($xmlfile); This will leave C<$document> looking something like this: [ { type => 'e', attrib => { ... }, name => 'rootelementname', content => [ ... more elements and text content ... ] } ] =head1 FUNCTIONS The C function is optionally exported. By default nothing is exported. There is no objecty interface. =head2 parsefile This takes at least one parameter, optionally more. The compulsory parameter may be: =over 4 =item a filename in which case the file is read and parsed; =item a string of XML in which case it is read and parsed. How do we tell if we've got a string or a filename? If it begins with C<_TINY_XML_STRING_> then it's a string. That prefix is, of course, ignored when it comes to actually parsing the data. This is intended primarily for use by wrappers which want to retain compatibility with Ye Aunciente Perl. Normal users who want to pass in a string would be expected to use L. =item a glob-ref or IO::Handle object in which case again, the file is read and parsed. =back The former case is for compatibility with older perls, but makes no attempt to properly deal with character sets. If you open a file in a character-set-friendly way and then pass in a handle / object, then the method should Do The Right Thing as it only ever works with character data. The remaining parameters are a list of key/value pairs to make a hash of options: =over 4 =item fatal_declarations If set to true, E!ENTITY...E and E!DOCTYPE...E declarations in the document are fatal errors - otherwise they are *ignored*. =item no_entity_parsing If set to true, the five built-in entities are passed through unparsed. Note that special characters in CDATA and attributes may have been turned into C<&>, C<<> and friends. =item strict_entity_parsing If set to true, any unrecognised entities (ie, those outside the core five plus numeric entities) cause a fatal error. If you set both this and C (but why would you do that?) then the latter takes precedence. Obviously, if you want to maximise compliance with the XML spec, you should turn on fatal_declarations and strict_entity_parsing. =back The function returns a structure describing the document. This contains one or more nodes, each being either an 'element' node or a 'text' mode. The structure is an arrayref which contains a single 'element' node which represents the document entity. The arrayref is redundant, but exists for compatibility with L. Element nodes are hashrefs with the following keys: =over 4 =item type The node's type, represented by the letter 'e'. =item name The element's name. =item attrib A hashref containing the element's attributes, as key/value pairs where the key is the attribute name. =item content An arrayref of the element's contents. The array's contents is a list of nodes, in the order they were encountered in the document. =back Text nodes are hashrefs with the following keys: =over 4 =item type The node's type, represented by the letter 't'. =item content A scalar piece of text. =back If you prefer a DOMmish interface, then look at L on the CPAN. =cut my %regexps = ( name => '[:_a-z][\\w:\\.-]*' ); my $strict_entity_parsing; # mmm, global. don't worry, parsefile sets it # explicitly every time sub parsefile { my($arg, %params) = @_; my($file, $elem) = ('', { content => [] }); local $/; # sluuuuurp $strict_entity_parsing = $params{strict_entity_parsing}; if(ref($arg) eq '') { # we were passed a filename or a string if($arg =~ /^_TINY_XML_STRING_/) { # it's a string $file = substr($arg, 17); } else { local *FH; open(FH, $arg) || die(__PACKAGE__."::parsefile: Can't open $arg\n"); $file = ; close(FH); } } else { $file = <$arg>; } # strip any BOM $file =~ s/^(\xff\xfe(\x00\x00)?|(\x00\x00)?\xfe\xff|\xef\xbb\xbf)//; die("No elements\n") if (!defined($file) || $file =~ /^\s*$/); # illegal low-ASCII chars die("Not well-formed (Illegal low-ASCII chars found)\n") if($file =~ /[\x00-\x08\x0b\x0c\x0e-\x1f]/); # turn CDATA into PCDATA $file =~ s{}{ $_ = $1.chr(0); # this makes sure that empty CDATAs become s/([&<>'"])/ # the empty string and aren't just thrown away. $1 eq '&' ? '&' : $1 eq '<' ? '<' : $1 eq '"' ? '"' : $1 eq "'" ? ''' : '>' /eg; $_; }egs; die("Not well-formed (CDATA not delimited or bad comment)\n") if( $file =~ /]]>/ || # ]]> not delimiting CDATA $file =~ //s || # ---> can't end a comment grep { $_ && /--/ } ($file =~ /^\s+||\s+$/gs) # -- in comm ); # strip leading/trailing whitespace and comments (which don't nest - phew!) $file =~ s/^\s+||\s+$//gs; # turn quoted > in attribs into > # double- and single-quoted attrib values get done seperately while($file =~ s/($regexps{name}\s*=\s*"[^"]*)>([^"]*")/$1>$2/gsi) {} while($file =~ s/($regexps{name}\s*=\s*'[^']*)>([^']*')/$1>$2/gsi) {} if($params{fatal_declarations} && $file =~ /]+>)/, $file)) { if( $token =~ /<\?$regexps{name}.*?\?>/is || # PI $token =~ /^!i) { # close tag die("Not well-formed\n\tat $token\n") if($elem->{name} ne $1); $elem = delete $elem->{parent}; } elsif($token =~ /^<$regexps{name}(\s[^>]*)*(\s*\/)?>/is) { # open tag my($tagname, $attribs_raw) = ($token =~ m!<(\S*)(.*?)(\s*/)?>!s); # first make attribs into a list so we can spot duplicate keys my $attrib = [ # do double- and single- quoted attribs seperately $attribs_raw =~ /\s($regexps{name})\s*=\s*"([^"]*?)"/gi, $attribs_raw =~ /\s($regexps{name})\s*=\s*'([^']*?)'/gi ]; if(@{$attrib} == 2 * keys %{{@{$attrib}}}) { $attrib = { @{$attrib} } } else { die("Not well-formed - duplicate attribute\n"); } # now trash any attribs that we *did* manage to parse and see # if there's anything left $attribs_raw =~ s/\s($regexps{name})\s*=\s*"([^"]*?)"//gi; $attribs_raw =~ s/\s($regexps{name})\s*=\s*'([^']*?)'//gi; die("Not well-formed\n$attribs_raw") if($attribs_raw =~ /\S/ || grep { /{$key} = _fixentities($attrib->{$key})) =~ s/\x00//g; # get rid of CDATA marker } } $elem = { content => [], name => $tagname, type => 'e', attrib => $attrib, parent => $elem }; push @{$elem->{parent}->{content}}, $elem; # now handle self-closing tags if($token =~ /\s*\/>$/) { $elem->{name} =~ s/\/$//; $elem = delete $elem->{parent}; } } elsif($token =~ /^{content}}, { content => $token, type => 't' }; } } die("Not well-formed (Duplicated parent)\n") if(exists($elem->{parent})); die("Junk after end of document\n") if($#{$elem->{content}} > 0); die("No elements\n") if( $#{$elem->{content}} == -1 || $elem->{content}->[0]->{type} ne 'e' ); return $elem->{content}; } sub _fixentities { my $thingy = shift; my $junk = ($strict_entity_parsing) ? '|.*' : ''; $thingy =~ s/&((#(\d+|x[a-fA-F0-9]+);)|lt;|gt;|quot;|apos;|amp;$junk)/ $3 ? ( substr($3, 0, 1) eq 'x' ? # using a =~ match here clobbers $3 chr(hex(substr($3, 1))) : # so don't "fix" it! chr($3) ) : $1 eq 'lt;' ? '<' : $1 eq 'gt;' ? '>' : $1 eq 'apos;' ? "'" : $1 eq 'quot;' ? '"' : $1 eq 'amp;' ? '&' : die("Illegal ampersand or entity\n\tat $1\n") /ge; $thingy; } =head1 COMPATIBILITY =head2 With other modules The C function is so named because it is intended to work in a similar fashion to L with the L style. Instead of saying this: use XML::Parser; use XML::Parser::EasyTree; $XML::Parser::EasyTree::Noempty=1; my $p=new XML::Parser(Style=>'EasyTree'); my $tree=$p->parsefile('something.xml'); you would say: use XML::Tiny; my $tree = XML::Tiny::parsefile('something.xml'); Any valid document that can be parsed like that using XML::Tiny should produce identical results if you use the above example of how to use L. If you find a document where that is not the case, please report it as a bug. =head2 With perl 5.004 The module is intended to be fully compatible with every version of perl back to and including 5.004, and may be compatible with even older versions of perl 5. The lack of Unicode and friends in older perls means that XML::Tiny does nothing with character sets. If you have a document with a funny character set, then you will need to open the file in an appropriate mode using a character-set-friendly perl and pass the resulting file handle to the module. BOMs are ignored. =head2 The subset of XML that we understand =over 4 =item Element tags and attributes Including "self-closing" tags like Epie type = 'steak n kidney' /E; =item Comments Which are ignored; =item The five "core" entities ie C<&>, C<<>, C<>>, C<'> and C<">; =item Numeric entities eg C<A> and C<A>; =item CDATA This is simply turned into PCDATA before parsing. Note how this may interact with the various entity-handling options; =back The following parts of the XML standard are handled incorrectly or not at all - this is not an exhaustive list: =over 4 =item Namespaces While documents that use namespaces will be parsed just fine, there's no special treatment of them. Their names are preserved in element and attribute names like 'rdf:RDF'. =item DTDs and Schemas This is not a validating parser. declarations are ignored if you've not made them fatal. =item Entities and references declarations are ignored if you've not made them fatal. Unrecognised entities are ignored by default, as are naked & characters. This means that if entity parsing is enabled you won't be able to tell the difference between C<&nbsp;> and C< >. If your document might use any non-core entities then please consider using the C option, and then use something like L. =item Processing instructions These are ignored. =item Whitespace We do not guarantee to correctly handle leading and trailing whitespace. =item Character sets This is not practical with older versions of perl =back =head1 PHILOSOPHY and JUSTIFICATION While feedback from real users about this module has been uniformly positive and helpful, some people seem to take issue with this module because it doesn't implement every last jot and tittle of the XML standard and merely implements a useful subset. A very useful subset, as it happens, which can cope with common light-weight XML-ish tasks such as parsing the results of queries to the Amazon Web Services. Many, perhaps most, users of XML do not in fact need a full implementation of the standard, and are understandably reluctant to install large complex pieces of software which have many dependencies. In fact, when they realise what installing and using a full implementation entails, they quite often don't *want* it. Another class of users, people distributing applications, often can not rely on users being able to install modules from the CPAN, or even having tools like make or a shell available. XML::Tiny exists for those people. =head1 BUGS and FEEDBACK I welcome feedback about my code, including constructive criticism. Bug reports should be made using L or by email, and should include the smallest possible chunk of code, along with any necessary XML data, which demonstrates the bug. Ideally, this will be in the form of a file which I can drop in to the module's test suite. Please note that such files must work in perl 5.004. =head1 SEE ALSO =over 4 =item For more capable XML parsers: L L L =item The requirements for a module to be Tiny L =back =head1 AUTHOR, COPYRIGHT and LICENCE David Cantrell EFE Thanks to David Romano for some compatibility patches for Ye Aunciente Perl; to Matt Knecht and David Romano for prodding me to support attributes, and to Matt for providing code to implement it in a quick n dirty minimal kind of way; to the people on L and elsewhere who have been kind enough to point out ways it could be improved; to Sergio Fanchiotti for pointing out a bug in handling self-closing tags, for reporting another bug that I introduced when fixing the first one, and for providing a patch to improve error reporting; to 'Corion' for finding a bug with localised filehandles and providing a fix; to Diab Jerius for spotting that element and attribute names can begin with an underscore; to Nick Dumas for finding a bug when attribs have their quoting character in CDATA, and providing a patch; to Mathieu Longtin for pointing out that BOMs exist. Copyright 2007-2010 David Cantrell Edavid@cantrell.org.ukE This software is free-as-in-speech software, and may be used, distributed, and modified under the terms of either the GNU General Public Licence version 2 or the Artistic Licence. It's up to you which one you use. The full text of the licences can be found in the files GPL2.txt and ARTISTIC.txt, respectively. =head1 CONSPIRACY This module is also free-as-in-mason software. =cut 'zero';