Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
home:Tomcat42
perl-XML-TreeBuilder
perl-XML-TreeBuilder.spec
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File perl-XML-TreeBuilder.spec of Package perl-XML-TreeBuilder
# # spec file for package perl-XML-TreeBuilder # # Copyright (c) 2015 SUSE LINUX GmbH, Nuernberg, Germany. # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed # upon. The license for this file, and modifications and additions to the # file, is the same license as for the pristine package itself (unless the # license for the pristine package is not an Open Source License, in which # case the license is the MIT License). An "Open Source License" is a # license that conforms to the Open Source Definition (Version 1.9) # published by the Open Source Initiative. # Please submit bugfixes or comments via http://bugs.opensuse.org/ # Name: perl-XML-TreeBuilder Version: 5.4 Release: 0 %define cpan_name XML-TreeBuilder Summary: Parser that builds a tree of XML::Element objects License: Artistic-1.0 or GPL-1.0+ Group: Development/Libraries/Perl Url: http://search.cpan.org/dist/XML-TreeBuilder/ Source0: http://www.cpan.org/authors/id/J/JF/JFEARN/%{cpan_name}-%{version}.tar.gz Source1: cpanspec.yml BuildArch: noarch BuildRoot: %{_tmppath}/%{name}-%{version}-build BuildRequires: perl BuildRequires: perl-macros BuildRequires: perl(HTML::Element) >= 4.1 BuildRequires: perl(HTML::Tagset) >= 3.02 BuildRequires: perl(Module::Build) BuildRequires: perl(XML::Catalog) >= 1.02 BuildRequires: perl(XML::Parser) Requires: perl(HTML::Element) >= 4.1 Requires: perl(HTML::Tagset) >= 3.02 Requires: perl(XML::Catalog) >= 1.02 Requires: perl(XML::Parser) %{perl_requires} %description This module uses XML::Parser to make XML document trees constructed of XML::Element objects (and XML::Element is a subclass of HTML::Element adapted for XML). XML::TreeBuilder is meant particularly for people who are used to the HTML::TreeBuilder / HTML::Element interface to document trees, and who don't want to learn some other document interface like XML::Twig or XML::DOM. The way to use this class is to: 1. start a new (empty) XML::TreeBuilder object. 2. set any of the "store" options you want. 3. then parse the document from a source by calling '$x->parsefile(...)' or '$x->parse(...)' (See the XML::Parser manpage docs for the options that these two methods take) 4. do whatever you need to do with the syntax tree, presumably involving traversing it looking for some bit of information in it, 5. and finally, when you're done with the tree, call $tree->delete to erase the contents of the tree from memory. This kind of thing usually isn't necessary with most Perl objects, but it's necessary for TreeBuilder objects. See the HTML::Element manpage for a more verbose explanation of why this is the case. %prep %setup -q -n %{cpan_name}-%{version} find . -type f -print0 | xargs -0 chmod 644 %build %{__perl} Build.PL installdirs=vendor ./Build build flags=%{?_smp_mflags} %check ./Build test %install ./Build install destdir=%{buildroot} create_packlist=0 %perl_gen_filelist %files -f %{name}.files %defattr(-,root,root,755) %doc Changes README %changelog
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor