nokogiri-1.8.2/0000755000004100000410000000000013235345655013406 5ustar www-datawww-datanokogiri-1.8.2/Rakefile0000644000004100000410000002331513235345655015057 0ustar www-datawww-data# -*- ruby -*- require 'rubygems' require 'shellwords' gem 'hoe' require 'hoe' Hoe.plugin :debugging Hoe.plugin :git Hoe.plugin :gemspec Hoe.plugin :bundler GENERATED_PARSER = "lib/nokogiri/css/parser.rb" GENERATED_TOKENIZER = "lib/nokogiri/css/tokenizer.rb" def java? /java/ === RUBY_PLATFORM end ENV['LANG'] = "en_US.UTF-8" # UBUNTU 10.04, Y U NO DEFAULT TO UTF-8? CrossRuby = Struct.new(:version, :host) { def ver @ver ||= version[/\A[^-]+/] end def minor_ver @minor_ver ||= ver[/\A\d\.\d(?=\.)/] end def api_ver_suffix case minor_ver when nil raise "unsupported version: #{ver}" else minor_ver.delete('.') << '0' end end def platform @platform ||= case host when /\Ax86_64-/ 'x64-mingw32' when /\Ai[3-6]86-/ 'x86-mingw32' else raise "unsupported host: #{host}" end end def tool(name) (@binutils_prefix ||= case platform when 'x64-mingw32' 'x86_64-w64-mingw32-' when 'x86-mingw32' 'i686-w64-mingw32-' end) + name end def target case platform when 'x64-mingw32' 'pei-x86-64' when 'x86-mingw32' 'pei-i386' end end def libruby_dll case platform when 'x64-mingw32' "x64-msvcrt-ruby#{api_ver_suffix}.dll" when 'x86-mingw32' "msvcrt-ruby#{api_ver_suffix}.dll" end end def dlls [ 'kernel32.dll', 'msvcrt.dll', 'ws2_32.dll', *(case when ver >= '2.0.0' 'user32.dll' end), libruby_dll ] end } CROSS_RUBIES = File.read('.cross_rubies').lines.flat_map { |line| case line when /\A([^#]+):([^#]+)/ CrossRuby.new($1, $2) else [] end } ENV['RUBY_CC_VERSION'] ||= CROSS_RUBIES.map(&:ver).uniq.join(":") HOE = Hoe.spec 'nokogiri' do developer 'Aaron Patterson', 'aaronp@rubyforge.org' developer 'Mike Dalessio', 'mike.dalessio@gmail.com' developer 'Yoko Harada', 'yokolet@gmail.com' developer 'Tim Elliott', 'tle@holymonkey.com' developer 'Akinori MUSHA', 'knu@idaemons.org' license "MIT" self.readme_file = "README.md" self.history_file = "CHANGELOG.md" self.extra_rdoc_files = FileList['*.rdoc','ext/nokogiri/*.c'] self.clean_globs += [ 'nokogiri.gemspec', 'lib/nokogiri/nokogiri.{bundle,jar,rb,so}', 'lib/nokogiri/[0-9].[0-9]' ] self.clean_globs += Dir.glob("ports/*").reject { |d| d =~ %r{/archives$} } unless java? self.extra_deps += [ ["mini_portile2", "~> 2.3.0"], # keep version in sync with extconf.rb ] end self.extra_dev_deps += [ ["hoe-bundler", "~> 1.2"], ["hoe-debugging", "~> 1.4"], ["hoe-gemspec", "~> 1.0"], ["hoe-git", "~> 1.6"], ["minitest", "~> 5.8.4"], ["rake", "~> 12.0"], ["rake-compiler", "~> 1.0.3"], ["rake-compiler-dock", "~> 0.6.2"], ["racc", "~> 1.4.14"], ["rexical", "~> 1.0.5"], ["concourse", "~> 0.15"], ] if java? self.spec_extras = { :platform => 'java', :required_ruby_version => '>= 1.9.3' # JRuby >= 1.7 } else self.spec_extras = { :extensions => ["ext/nokogiri/extconf.rb"], :required_ruby_version => '>= 2.1.0' } end self.testlib = :minitest end # ---------------------------------------- def add_file_to_gem relative_path target_path = File.join gem_build_path, relative_path target_dir = File.dirname(target_path) mkdir_p target_dir unless File.directory?(target_dir) rm_f target_path safe_ln relative_path, target_path HOE.spec.files += [relative_path] end def gem_build_path File.join 'pkg', HOE.spec.full_name end if java? # TODO: clean this section up. require "rake/javaextensiontask" Rake::JavaExtensionTask.new("nokogiri", HOE.spec) do |ext| jruby_home = RbConfig::CONFIG['prefix'] ext.ext_dir = 'ext/java' ext.lib_dir = 'lib/nokogiri' ext.source_version = '1.6' ext.target_version = '1.6' jars = ["#{jruby_home}/lib/jruby.jar"] + FileList['lib/*.jar'] ext.classpath = jars.map { |x| File.expand_path x }.join ':' ext.debug = true if ENV['JAVA_DEBUG'] end task gem_build_path => [:compile] do add_file_to_gem 'lib/nokogiri/nokogiri.jar' end else begin require 'rake/extensioncompiler' # Ensure mingw compiler is installed Rake::ExtensionCompiler.mingw_host mingw_available = true rescue mingw_available = false end require "rake/extensiontask" HOE.spec.files.reject! { |f| f =~ %r{\.(java|jar)$} } dependencies = YAML.load_file("dependencies.yml") task gem_build_path do %w[libxml2 libxslt].each do |lib| version = dependencies[lib]["version"] archive = File.join("ports", "archives", "#{lib}-#{version}.tar.gz") add_file_to_gem archive patchesdir = File.join("patches", lib) patches = `#{['git', 'ls-files', patchesdir].shelljoin}`.split("\n").grep(/\.patch\z/) patches.each { |patch| add_file_to_gem patch } (untracked = Dir[File.join(patchesdir, '*.patch')] - patches).empty? or at_exit { untracked.each { |patch| puts "** WARNING: untracked patch file not added to gem: #{patch}" } } end end Rake::ExtensionTask.new("nokogiri", HOE.spec) do |ext| ext.lib_dir = File.join(*['lib', 'nokogiri', ENV['FAT_DIR']].compact) ext.config_options << ENV['EXTOPTS'] if mingw_available ext.cross_compile = true ext.cross_platform = CROSS_RUBIES.map(&:platform).uniq ext.cross_config_options << "--enable-cross-build" ext.cross_compiling do |spec| libs = dependencies.map { |name, dep| "#{name}-#{dep["version"]}" }.join(', ') spec.post_install_message = <<-EOS Nokogiri is built with the packaged libraries: #{libs}. EOS spec.files.reject! { |path| File.fnmatch?('ports/*', path) } end end end end # ---------------------------------------- desc "Generate css/parser.rb and css/tokenizer.rex" task 'generate' => [GENERATED_PARSER, GENERATED_TOKENIZER] task 'gem:spec' => 'generate' if Rake::Task.task_defined?("gem:spec") # This is a big hack to make sure that the racc and rexical # dependencies in the Gemfile are constrainted to ruby platforms # (i.e. MRI and Rubinius). There's no way to do that through hoe, # and any solution will require changing hoe and hoe-bundler. old_gemfile_task = Rake::Task['bundler:gemfile'] rescue nil task 'bundler:gemfile' do old_gemfile_task.invoke if old_gemfile_task lines = File.open('Gemfile', 'r') { |f| f.readlines }.map do |line| line =~ /racc|rexical/ ? "#{line.strip}, :platform => [:ruby, :mingw, :x64_mingw]" : line end File.open('Gemfile', 'w') { |f| lines.each { |line| f.puts line } } end file GENERATED_PARSER => "lib/nokogiri/css/parser.y" do |t| sh "racc -l -o #{t.name} #{t.prerequisites.first}" end file GENERATED_TOKENIZER => "lib/nokogiri/css/tokenizer.rex" do |t| sh "rex --independent -o #{t.name} #{t.prerequisites.first}" end [:compile, :check_manifest].each do |task_name| Rake::Task[task_name].prerequisites << GENERATED_PARSER Rake::Task[task_name].prerequisites << GENERATED_TOKENIZER end # ---------------------------------------- desc "set environment variables to build and/or test with debug options" task :debug do ENV['NOKOGIRI_DEBUG'] = "true" ENV['CFLAGS'] ||= "" ENV['CFLAGS'] += " -DDEBUG" end require File.join File.dirname(__FILE__), 'tasks/test' task :java_debug do ENV['JRUBY_OPTS'] = "#{ENV['JRUBY_OPTS']} --debug --dev" ENV['JAVA_OPTS'] = '-Xdebug -Xrunjdwp:transport=dt_socket,address=8000,server=y,suspend=y' if ENV['JAVA_DEBUG'] end if java? task :test_19 => :test task :test_20 do ENV['JRUBY_OPTS'] = "--2.0" Rake::Task["test"].invoke end end Rake::Task[:test].prerequisites << :compile Rake::Task[:test].prerequisites << :java_debug Rake::Task[:test].prerequisites << :check_extra_deps unless java? if Hoe.plugins.include?(:debugging) ['valgrind', 'valgrind:mem', 'valgrind:mem0'].each do |task_name| Rake::Task["test:#{task_name}"].prerequisites << :compile end end require 'concourse' Concourse.new("nokogiri").create_tasks! # ---------------------------------------- def verify_dll(dll, cross_ruby) dll_imports = cross_ruby.dlls dump = `#{['env', 'LANG=C', cross_ruby.tool('objdump'), '-p', dll].shelljoin}` raise "unexpected file format for generated dll #{dll}" unless /file format #{Regexp.quote(cross_ruby.target)}\s/ === dump raise "export function Init_nokogiri not in dll #{dll}" unless /Table.*\sInit_nokogiri\s/mi === dump # Verify that the expected DLL dependencies match the actual dependencies # and that no further dependencies exist. dll_imports_is = dump.scan(/DLL Name: (.*)$/).map(&:first).map(&:downcase).uniq if dll_imports_is.sort != dll_imports.sort raise "unexpected dll imports #{dll_imports_is.inspect} in #{dll}" end puts "#{dll}: Looks good!" end task :cross do rake_compiler_config_path = File.expand_path("~/.rake-compiler/config.yml") unless File.exists? rake_compiler_config_path raise "rake-compiler has not installed any cross rubies. Use rake-compiler-dock or 'rake gem:windows' for building binary windows gems." end CROSS_RUBIES.each do |cross_ruby| task "tmp/#{cross_ruby.platform}/nokogiri/#{cross_ruby.ver}/nokogiri.so" do |t| # To reduce the gem file size strip mingw32 dlls before packaging sh [cross_ruby.tool('strip'), '-S', t.name].shelljoin verify_dll t.name, cross_ruby end end end desc "build a windows gem without all the ceremony." task "gem:windows" do require "rake_compiler_dock" RakeCompilerDock.sh "bundle && rake cross native gem MAKE='nice make -j`nproc`' RUBY_CC_VERSION=#{ENV['RUBY_CC_VERSION']}" end # vim: syntax=Ruby nokogiri-1.8.2/.cross_rubies0000644000004100000410000000030013235345655016102 0ustar www-datawww-data2.5.0:i686-w64-mingw32 2.5.0:x86_64-w64-mingw32 2.4.0:i686-w64-mingw32 2.4.0:x86_64-w64-mingw32 2.3.0:i686-w64-mingw32 2.3.0:x86_64-w64-mingw32 2.2.2:i686-w64-mingw32 2.2.2:x86_64-w64-mingw32 nokogiri-1.8.2/.gemtest0000644000004100000410000000000013235345655015045 0ustar www-datawww-datanokogiri-1.8.2/bin/0000755000004100000410000000000013235345655014156 5ustar www-datawww-datanokogiri-1.8.2/bin/nokogiri0000755000004100000410000000517413235345655015734 0ustar www-datawww-data#!/usr/bin/env ruby require 'optparse' require 'open-uri' require 'uri' require 'rubygems' require 'nokogiri' autoload :IRB, 'irb' parse_class = Nokogiri encoding = nil # This module provides some tunables with the nokogiri CLI for use in # your ~/.nokogirirc. module Nokogiri::CLI class << self # Specify the console engine, defaulted to IRB. # # call-seq: # require 'pry' # Nokogiri::CLI.console = Pry attr_writer :console def console case @console when Symbol Kernel.const_get(@console) else @console end end attr_accessor :rcfile end self.rcfile = File.expand_path('~/.nokogirirc') self.console = :IRB end opts = OptionParser.new do |opts| opts.banner = "Nokogiri: an HTML, XML, SAX, and Reader parser" opts.define_head "Usage: nokogiri [options]" opts.separator "" opts.separator "Examples:" opts.separator " nokogiri https://www.ruby-lang.org/" opts.separator " nokogiri ./public/index.html" opts.separator " curl -s http://www.nokogiri.org | nokogiri -e'p $_.css(\"h1\").length'" opts.separator "" opts.separator "Options:" opts.on("--type type", "Parse as type: xml or html (default: auto)", [:xml, :html]) do |v| parse_class = {:xml => Nokogiri::XML, :html => Nokogiri::HTML}[v] end opts.on("-C file", "Specifies initialization file to load (default #{Nokogiri::CLI.rcfile})") do |v| Nokogiri::CLI.rcfile = v end opts.on("-E", "--encoding encoding", "Read as encoding (default: #{encoding || 'none'})") do |v| encoding = v end opts.on("-e command", "Specifies script from command-line.") do |v| @script = v end opts.on("--rng ", "Validate using this rng file.") do |v| @rng = open(v) {|f| Nokogiri::XML::RelaxNG(f)} end opts.on_tail("-?", "--help", "Show this message") do puts opts exit end opts.on_tail("-v", "--version", "Show version") do puts Nokogiri::VersionInfo.instance.to_markdown exit end end opts.parse! url = ARGV.shift if url.to_s.strip.empty? && $stdin.tty? puts opts exit 1 end if File.file?(Nokogiri::CLI.rcfile) load Nokogiri::CLI.rcfile end if url || $stdin.tty? case uri = (URI(url) rescue url) when URI::HTTP @doc = parse_class.parse(uri.read, url, encoding) else @doc = parse_class.parse(open(url).read, nil, encoding) end else @doc = parse_class.parse($stdin, nil, encoding) end $_ = @doc if @rng @rng.validate(@doc).each do |error| puts error.message end else if @script eval @script, binding, '
' else puts "Your document is stored in @doc..." Nokogiri::CLI.console.start end end nokogiri-1.8.2/Manifest.txt0000644000004100000410000003006713235345655015723 0ustar www-datawww-data.autotest .cross_rubies .editorconfig .gemtest .travis.yml CHANGELOG.md CONTRIBUTING.md C_CODING_STYLE.rdoc Gemfile Gemfile-libxml-ruby LICENSE-DEPENDENCIES.md LICENSE.md Manifest.txt README.md ROADMAP.md Rakefile STANDARD_RESPONSES.md Y_U_NO_GEMSPEC.md appveyor.yml bin/nokogiri build_all dependencies.yml ext/java/nokogiri/EncodingHandler.java ext/java/nokogiri/HtmlDocument.java ext/java/nokogiri/HtmlElementDescription.java ext/java/nokogiri/HtmlEntityLookup.java ext/java/nokogiri/HtmlSaxParserContext.java ext/java/nokogiri/HtmlSaxPushParser.java ext/java/nokogiri/NokogiriService.java ext/java/nokogiri/XmlAttr.java ext/java/nokogiri/XmlAttributeDecl.java ext/java/nokogiri/XmlCdata.java ext/java/nokogiri/XmlComment.java ext/java/nokogiri/XmlDocument.java ext/java/nokogiri/XmlDocumentFragment.java ext/java/nokogiri/XmlDtd.java ext/java/nokogiri/XmlElement.java ext/java/nokogiri/XmlElementContent.java ext/java/nokogiri/XmlElementDecl.java ext/java/nokogiri/XmlEntityDecl.java ext/java/nokogiri/XmlEntityReference.java ext/java/nokogiri/XmlNamespace.java ext/java/nokogiri/XmlNode.java ext/java/nokogiri/XmlNodeSet.java ext/java/nokogiri/XmlProcessingInstruction.java ext/java/nokogiri/XmlReader.java ext/java/nokogiri/XmlRelaxng.java ext/java/nokogiri/XmlSaxParserContext.java ext/java/nokogiri/XmlSaxPushParser.java ext/java/nokogiri/XmlSchema.java ext/java/nokogiri/XmlSyntaxError.java ext/java/nokogiri/XmlText.java ext/java/nokogiri/XmlXpathContext.java ext/java/nokogiri/XsltStylesheet.java ext/java/nokogiri/internals/ClosedStreamException.java ext/java/nokogiri/internals/HtmlDomParserContext.java ext/java/nokogiri/internals/IgnoreSchemaErrorsErrorHandler.java ext/java/nokogiri/internals/NokogiriBlockingQueueInputStream.java ext/java/nokogiri/internals/NokogiriDomParser.java ext/java/nokogiri/internals/NokogiriEncodingReaderWrapper.java ext/java/nokogiri/internals/NokogiriEntityResolver.java ext/java/nokogiri/internals/NokogiriErrorHandler.java ext/java/nokogiri/internals/NokogiriHandler.java ext/java/nokogiri/internals/NokogiriHelpers.java ext/java/nokogiri/internals/NokogiriNamespaceCache.java ext/java/nokogiri/internals/NokogiriNamespaceContext.java ext/java/nokogiri/internals/NokogiriNonStrictErrorHandler.java ext/java/nokogiri/internals/NokogiriNonStrictErrorHandler4NekoHtml.java ext/java/nokogiri/internals/NokogiriStrictErrorHandler.java ext/java/nokogiri/internals/NokogiriXPathFunction.java ext/java/nokogiri/internals/NokogiriXPathFunctionResolver.java ext/java/nokogiri/internals/NokogiriXPathVariableResolver.java ext/java/nokogiri/internals/NokogiriXsltErrorListener.java ext/java/nokogiri/internals/ParserContext.java ext/java/nokogiri/internals/ReaderNode.java ext/java/nokogiri/internals/SaveContextVisitor.java ext/java/nokogiri/internals/SchemaErrorHandler.java ext/java/nokogiri/internals/UncloseableInputStream.java ext/java/nokogiri/internals/XalanDTMManagerPatch.java ext/java/nokogiri/internals/XmlDeclHandler.java ext/java/nokogiri/internals/XmlDomParserContext.java ext/java/nokogiri/internals/XmlSaxParser.java ext/java/nokogiri/internals/c14n/AttrCompare.java ext/java/nokogiri/internals/c14n/C14nHelper.java ext/java/nokogiri/internals/c14n/CanonicalFilter.java ext/java/nokogiri/internals/c14n/CanonicalizationException.java ext/java/nokogiri/internals/c14n/Canonicalizer.java ext/java/nokogiri/internals/c14n/Canonicalizer11.java ext/java/nokogiri/internals/c14n/Canonicalizer11_OmitComments.java ext/java/nokogiri/internals/c14n/Canonicalizer11_WithComments.java ext/java/nokogiri/internals/c14n/Canonicalizer20010315.java ext/java/nokogiri/internals/c14n/Canonicalizer20010315Excl.java ext/java/nokogiri/internals/c14n/Canonicalizer20010315ExclOmitComments.java ext/java/nokogiri/internals/c14n/Canonicalizer20010315ExclWithComments.java ext/java/nokogiri/internals/c14n/Canonicalizer20010315OmitComments.java ext/java/nokogiri/internals/c14n/Canonicalizer20010315WithComments.java ext/java/nokogiri/internals/c14n/CanonicalizerBase.java ext/java/nokogiri/internals/c14n/CanonicalizerPhysical.java ext/java/nokogiri/internals/c14n/CanonicalizerSpi.java ext/java/nokogiri/internals/c14n/Constants.java ext/java/nokogiri/internals/c14n/ElementProxy.java ext/java/nokogiri/internals/c14n/HelperNodeList.java ext/java/nokogiri/internals/c14n/IgnoreAllErrorHandler.java ext/java/nokogiri/internals/c14n/InclusiveNamespaces.java ext/java/nokogiri/internals/c14n/InvalidCanonicalizerException.java ext/java/nokogiri/internals/c14n/NameSpaceSymbTable.java ext/java/nokogiri/internals/c14n/NodeFilter.java ext/java/nokogiri/internals/c14n/UtfHelpper.java ext/java/nokogiri/internals/c14n/XMLUtils.java ext/java/org/apache/xml/dtm/ref/dom2dtm/DOM2DTMExt.java ext/nokogiri/depend ext/nokogiri/extconf.rb ext/nokogiri/html_document.c ext/nokogiri/html_document.h ext/nokogiri/html_element_description.c ext/nokogiri/html_element_description.h ext/nokogiri/html_entity_lookup.c ext/nokogiri/html_entity_lookup.h ext/nokogiri/html_sax_parser_context.c ext/nokogiri/html_sax_parser_context.h ext/nokogiri/html_sax_push_parser.c ext/nokogiri/html_sax_push_parser.h ext/nokogiri/nokogiri.c ext/nokogiri/nokogiri.h ext/nokogiri/xml_attr.c ext/nokogiri/xml_attr.h ext/nokogiri/xml_attribute_decl.c ext/nokogiri/xml_attribute_decl.h ext/nokogiri/xml_cdata.c ext/nokogiri/xml_cdata.h ext/nokogiri/xml_comment.c ext/nokogiri/xml_comment.h ext/nokogiri/xml_document.c ext/nokogiri/xml_document.h ext/nokogiri/xml_document_fragment.c ext/nokogiri/xml_document_fragment.h ext/nokogiri/xml_dtd.c ext/nokogiri/xml_dtd.h ext/nokogiri/xml_element_content.c ext/nokogiri/xml_element_content.h ext/nokogiri/xml_element_decl.c ext/nokogiri/xml_element_decl.h ext/nokogiri/xml_encoding_handler.c ext/nokogiri/xml_encoding_handler.h ext/nokogiri/xml_entity_decl.c ext/nokogiri/xml_entity_decl.h ext/nokogiri/xml_entity_reference.c ext/nokogiri/xml_entity_reference.h ext/nokogiri/xml_io.c ext/nokogiri/xml_io.h ext/nokogiri/xml_libxml2_hacks.c ext/nokogiri/xml_libxml2_hacks.h ext/nokogiri/xml_namespace.c ext/nokogiri/xml_namespace.h ext/nokogiri/xml_node.c ext/nokogiri/xml_node.h ext/nokogiri/xml_node_set.c ext/nokogiri/xml_node_set.h ext/nokogiri/xml_processing_instruction.c ext/nokogiri/xml_processing_instruction.h ext/nokogiri/xml_reader.c ext/nokogiri/xml_reader.h ext/nokogiri/xml_relax_ng.c ext/nokogiri/xml_relax_ng.h ext/nokogiri/xml_sax_parser.c ext/nokogiri/xml_sax_parser.h ext/nokogiri/xml_sax_parser_context.c ext/nokogiri/xml_sax_parser_context.h ext/nokogiri/xml_sax_push_parser.c ext/nokogiri/xml_sax_push_parser.h ext/nokogiri/xml_schema.c ext/nokogiri/xml_schema.h ext/nokogiri/xml_syntax_error.c ext/nokogiri/xml_syntax_error.h ext/nokogiri/xml_text.c ext/nokogiri/xml_text.h ext/nokogiri/xml_xpath_context.c ext/nokogiri/xml_xpath_context.h ext/nokogiri/xslt_stylesheet.c ext/nokogiri/xslt_stylesheet.h lib/isorelax.jar lib/jing.jar lib/nekodtd.jar lib/nekohtml.jar lib/nokogiri.rb lib/nokogiri/css.rb lib/nokogiri/css/node.rb lib/nokogiri/css/parser.rb lib/nokogiri/css/parser.y lib/nokogiri/css/parser_extras.rb lib/nokogiri/css/syntax_error.rb lib/nokogiri/css/tokenizer.rb lib/nokogiri/css/tokenizer.rex lib/nokogiri/css/xpath_visitor.rb lib/nokogiri/decorators/slop.rb lib/nokogiri/html.rb lib/nokogiri/html/builder.rb lib/nokogiri/html/document.rb lib/nokogiri/html/document_fragment.rb lib/nokogiri/html/element_description.rb lib/nokogiri/html/element_description_defaults.rb lib/nokogiri/html/entity_lookup.rb lib/nokogiri/html/sax/parser.rb lib/nokogiri/html/sax/parser_context.rb lib/nokogiri/html/sax/push_parser.rb lib/nokogiri/syntax_error.rb lib/nokogiri/version.rb lib/nokogiri/xml.rb lib/nokogiri/xml/attr.rb lib/nokogiri/xml/attribute_decl.rb lib/nokogiri/xml/builder.rb lib/nokogiri/xml/cdata.rb lib/nokogiri/xml/character_data.rb lib/nokogiri/xml/document.rb lib/nokogiri/xml/document_fragment.rb lib/nokogiri/xml/dtd.rb lib/nokogiri/xml/element_content.rb lib/nokogiri/xml/element_decl.rb lib/nokogiri/xml/entity_decl.rb lib/nokogiri/xml/entity_reference.rb lib/nokogiri/xml/namespace.rb lib/nokogiri/xml/node.rb lib/nokogiri/xml/node/save_options.rb lib/nokogiri/xml/node_set.rb lib/nokogiri/xml/notation.rb lib/nokogiri/xml/parse_options.rb lib/nokogiri/xml/pp.rb lib/nokogiri/xml/pp/character_data.rb lib/nokogiri/xml/pp/node.rb lib/nokogiri/xml/processing_instruction.rb lib/nokogiri/xml/reader.rb lib/nokogiri/xml/relax_ng.rb lib/nokogiri/xml/sax.rb lib/nokogiri/xml/sax/document.rb lib/nokogiri/xml/sax/parser.rb lib/nokogiri/xml/sax/parser_context.rb lib/nokogiri/xml/sax/push_parser.rb lib/nokogiri/xml/schema.rb lib/nokogiri/xml/searchable.rb lib/nokogiri/xml/syntax_error.rb lib/nokogiri/xml/text.rb lib/nokogiri/xml/xpath.rb lib/nokogiri/xml/xpath/syntax_error.rb lib/nokogiri/xml/xpath_context.rb lib/nokogiri/xslt.rb lib/nokogiri/xslt/stylesheet.rb lib/serializer.jar lib/xalan.jar lib/xercesImpl.jar lib/xml-apis.jar lib/xsd/xmlparser/nokogiri.rb patches/sort-patches-by-date suppressions/README.txt suppressions/nokogiri_ruby-2.supp tasks/test.rb test/css/test_nthiness.rb test/css/test_parser.rb test/css/test_tokenizer.rb test/css/test_xpath_visitor.rb test/decorators/test_slop.rb test/files/2ch.html test/files/GH_1042.html test/files/address_book.rlx test/files/address_book.xml test/files/atom.xml test/files/bar/bar.xsd test/files/bogus.xml test/files/dont_hurt_em_why.xml test/files/encoding.html test/files/encoding.xhtml test/files/exslt.xml test/files/exslt.xslt test/files/foo/foo.xsd test/files/metacharset.html test/files/namespace_pressure_test.xml test/files/noencoding.html test/files/po.xml test/files/po.xsd test/files/saml/saml20assertion_schema.xsd test/files/saml/saml20protocol_schema.xsd test/files/saml/xenc_schema.xsd test/files/saml/xmldsig_schema.xsd test/files/shift_jis.html test/files/shift_jis.xml test/files/shift_jis_no_charset.html test/files/slow-xpath.xml test/files/snuggles.xml test/files/staff.dtd test/files/staff.xml test/files/staff.xslt test/files/test_document_url/bar.xml test/files/test_document_url/document.dtd test/files/test_document_url/document.xml test/files/tlm.html test/files/to_be_xincluded.xml test/files/valid_bar.xml test/files/xinclude.xml test/helper.rb test/html/sax/test_parser.rb test/html/sax/test_parser_context.rb test/html/sax/test_parser_text.rb test/html/sax/test_push_parser.rb test/html/test_builder.rb test/html/test_document.rb test/html/test_document_encoding.rb test/html/test_document_fragment.rb test/html/test_element_description.rb test/html/test_named_characters.rb test/html/test_node.rb test/html/test_node_encoding.rb test/namespaces/test_additional_namespaces_in_builder_doc.rb test/namespaces/test_namespaces_aliased_default.rb test/namespaces/test_namespaces_in_builder_doc.rb test/namespaces/test_namespaces_in_cloned_doc.rb test/namespaces/test_namespaces_in_created_doc.rb test/namespaces/test_namespaces_in_parsed_doc.rb test/namespaces/test_namespaces_preservation.rb test/test_convert_xpath.rb test/test_css_cache.rb test/test_encoding_handler.rb test/test_memory_leak.rb test/test_nokogiri.rb test/test_soap4r_sax.rb test/test_xslt_transforms.rb test/xml/node/test_save_options.rb test/xml/node/test_subclass.rb test/xml/sax/test_parser.rb test/xml/sax/test_parser_context.rb test/xml/sax/test_parser_text.rb test/xml/sax/test_push_parser.rb test/xml/test_attr.rb test/xml/test_attribute_decl.rb test/xml/test_builder.rb test/xml/test_c14n.rb test/xml/test_cdata.rb test/xml/test_comment.rb test/xml/test_document.rb test/xml/test_document_encoding.rb test/xml/test_document_fragment.rb test/xml/test_dtd.rb test/xml/test_dtd_encoding.rb test/xml/test_element_content.rb test/xml/test_element_decl.rb test/xml/test_entity_decl.rb test/xml/test_entity_reference.rb test/xml/test_namespace.rb test/xml/test_node.rb test/xml/test_node_attributes.rb test/xml/test_node_encoding.rb test/xml/test_node_inheritance.rb test/xml/test_node_reparenting.rb test/xml/test_node_set.rb test/xml/test_parse_options.rb test/xml/test_processing_instruction.rb test/xml/test_reader.rb test/xml/test_reader_encoding.rb test/xml/test_relax_ng.rb test/xml/test_schema.rb test/xml/test_syntax_error.rb test/xml/test_text.rb test/xml/test_unparented_node.rb test/xml/test_xinclude.rb test/xml/test_xpath.rb test/xslt/test_custom_functions.rb test/xslt/test_exception_handling.rb nokogiri-1.8.2/Gemfile0000644000004100000410000000200513235345655014676 0ustar www-datawww-data# -*- ruby -*- # DO NOT EDIT THIS FILE. Instead, edit Rakefile, and run `rake bundler:gemfile`. source "https://rubygems.org/" gem "mini_portile2", "~>2.3.0" gem "hoe-bundler", "~>1.2", :group => [:development, :test] gem "hoe-debugging", "~>1.4", :group => [:development, :test] gem "hoe-gemspec", "~>1.0", :group => [:development, :test] gem "hoe-git", "~>1.6", :group => [:development, :test] gem "minitest", "~>5.8.4", :group => [:development, :test] gem "rake", "~>12.0", :group => [:development, :test] gem "rake-compiler", "~>1.0.3", :group => [:development, :test] gem "rake-compiler-dock", "~>0.6.2", :group => [:development, :test] gem "racc", "~>1.4.14", :group => [:development, :test], :platform => [:ruby, :mingw, :x64_mingw] gem "rexical", "~>1.0.5", :group => [:development, :test], :platform => [:ruby, :mingw, :x64_mingw] gem "concourse", "~>0.15", :group => [:development, :test] gem "rdoc", "~>4.0", :group => [:development, :test] gem "hoe", "~>3.16", :group => [:development, :test] # vim: syntax=ruby nokogiri-1.8.2/.autotest0000644000004100000410000000060013235345655015253 0ustar www-datawww-data# -*- ruby -*- begin require 'autotest/fsevent' rescue LoadError end Autotest.add_hook :initialize do |at| at.add_exception /bundle$/ at.add_exception /\.git/ end Autotest.add_hook :run_command do |at| at.unit_diff = 'cat' system "rake compile" end Autotest.add_hook :ran_command do |at| File.open('/tmp/autotest.txt', 'wb') { |f| f.write(at.results.join) } end nokogiri-1.8.2/.editorconfig0000644000004100000410000000031513235345655016062 0ustar www-datawww-dataroot = true [**] end_of_line = lf insert_final_newline = true [**.rb] indent_style = space indent_size = 2 [**.[ch]] indent_style = space indent_size = 2 [**.java] indent_style = space indent_size = 4 nokogiri-1.8.2/patches/0000755000004100000410000000000013235345655015035 5ustar www-datawww-datanokogiri-1.8.2/patches/sort-patches-by-date0000755000004100000410000000120413235345655020717 0ustar www-datawww-data#! /usr/bin/env ruby require "date" dir = ARGV[0] || raise("ERROR: arg1 must be dir") Dir.chdir dir files_and_times = {} Dir["*.patch"].sort.each do |filename| dateline = `cat #{filename} | grep "Date:"` datestr = dateline.split("Date:").last.strip time = DateTime.parse datestr files_and_times[filename] = time end count = 0 files_and_times.sort_by {|k,v| v}.each do |filename, time| count += 1 _, patch_name = filename.split("-", 2) new_filename = sprintf("%4.4d-%s", count, patch_name) printf "mv -f %s %s # %s\n", filename, new_filename, time end STDERR.print "\n**\n** REMEMBER TO UPDATE THE Manifest.txt FILE\n**\n" nokogiri-1.8.2/appveyor.yml0000644000004100000410000000137213235345655016001 0ustar www-datawww-datainstall: - SET PATH=C:\ruby%ruby_version%\bin;%PATH% - ps: | if ($env:ruby_version -like "*head*") { $(new-object net.webclient).DownloadFile("https://github.com/oneclick/rubyinstaller2/releases/download/rubyinstaller-head/rubyinstaller-$env:ruby_version.exe", "$pwd/ruby-setup.exe") cmd /c ruby-setup.exe /verysilent /dir=C:/Ruby$env:ruby_version } - ruby --version - gem --version - gem install bundler --conservative - bundle install build: off test_script: - bundle exec rake -rdevkit environment: matrix: - ruby_version: head-x64 - ruby_version: 24 - ruby_version: 23-x64 - ruby_version: 22 - ruby_version: 21-x64 - ruby_version: 200 matrix: allow_failures: - ruby_version: head nokogiri-1.8.2/STANDARD_RESPONSES.md0000644000004100000410000000250513235345655016573 0ustar www-datawww-data# Standard Responses to Requests These responses are needed often enough that I figured, let's just check them in for future reference and use. # Not enough information to help Hello! Thanks for asking this question! However, without more information, Team Nokogiri cannot reproduce your issue, and so we cannot offer much help. Please provide us with: * A self-contained script (one that we can run without modification, and preferably without making external network connections). * Please note that you need to include the XML/HTML that you are operating on. * The output of `nokogiri -v`, which will provide details about your platform and versions of ruby, libxml2 and nokogiri. For more information about requesting help or reporting bugs, please take a look at http://bit.ly/nokohelp Thank you so much! # Not a bug Hello! Thanks for asking this question! Your request for assistance using Nokogiri will not go unanswered! However, Nokogiri's Github Issues is reserved for reporting bugs or submitting patches. If you ask your question on the mailing list, Team Nokogiri promises someone will provide you with an answer in a timely manner. If you'd like to read up on Team Nokogiri's rationale for this policy, please go to http://bit.ly/nokohelp. Thank you so much for understanding! And thank you for using Nokogiri. nokogiri-1.8.2/suppressions/0000755000004100000410000000000013235345655016163 5ustar www-datawww-datanokogiri-1.8.2/suppressions/nokogiri_ruby-2.supp0000644000004100000410000000025313235345655022115 0ustar www-datawww-data{ Memcheck:Free fun:free fun:__libc_freeres fun:_vgnU_freeres fun:__run_exit_handlers fun:exit fun:(below main) } nokogiri-1.8.2/suppressions/README.txt0000644000004100000410000000012713235345655017661 0ustar www-datawww-dataThis directory contains valgrind suppression files generated by the hoe-debugging gem. nokogiri-1.8.2/dependencies.yml0000644000004100000410000000643613235345655016570 0ustar www-datawww-datalibxml2: version: "2.9.7" sha256: "f63c5e7d30362ed28b38bfa1ac6313f9a80230720b7fb6c80575eeab3ff5900c" # manually verified checksum: # # $ gpg --verify libxml2-2.9.7.tar.gz.asc libxml2-2.9.7.tar.gz # gpg: Signature made Thu 02 Nov 2017 04:17:54 PM EDT using RSA key ID 596BEA5D # gpg: Good signature from "Daniel Veillard (Red Hat work email) " # gpg: aka "Daniel Veillard " # gpg: WARNING: This key is not certified with a trusted signature! # gpg: There is no indication that the signature belongs to the owner. # Primary key fingerprint: C744 15BA 7C9C 7F78 F02E 1DC3 4606 B8A5 DE95 BC1F # Subkey fingerprint: DB46 681B B91A DCEA 170F A2D4 1558 8B26 596B EA5D # # using this pgp signature: # -----BEGIN PGP SIGNATURE----- # # iQEcBAABAgAGBQJZ+31yAAoJEBVYiyZZa+pd+MMH/RTsPCo8CegAHsSUlNCae2Ay # HpM6J7sNWs0b2xwaYRtwhewJ5z/rsCcM5nn7MeGiU8dX7W5MKF69uGXUywufRxzO # GFoQSxO0a1z5mtGu7jC/W6DTYHFBeOJcEfMa3zUZjZ0RXqrENRhX55okse4pJPmG # dWQphbu9G3qoCuWD7QpyI7Mjhjemmyi4Ai/4vJPO8WtB7VDfdtpuZFVCRLG2cp0X # 90SZde+0oWJcN8oIG3FaTd7O4OuJPAceqNhTvF90dLvqSqRBd0RqZNnjYNYZ6uRy # FQSlQBVCxdLY0AI7Yooq79TJD+0vcqiQNwQwH7L+hBWgvPos4DKN1M9LaJc/RTk= # =5Qzo # -----END PGP SIGNATURE----- # libxslt: version: "1.1.32" sha256: "526ecd0abaf4a7789041622c3950c0e7f2c4c8835471515fd77eec684a355460" # manually verified checksum: # # $ gpg --verify libxslt-1.1.32.tar.gz.asc libxslt-1.1.32.tar.gz # gpg: Signature made Thu 02 Nov 2017 04:35:04 PM EDT using RSA key ID 596BEA5D # gpg: Good signature from "Daniel Veillard (Red Hat work email) " # gpg: aka "Daniel Veillard " # gpg: WARNING: This key is not certified with a trusted signature! # gpg: There is no indication that the signature belongs to the owner. # Primary key fingerprint: C744 15BA 7C9C 7F78 F02E 1DC3 4606 B8A5 DE95 BC1F # Subkey fingerprint: DB46 681B B91A DCEA 170F A2D4 1558 8B26 596B EA5D # # using this pgp signature: # # -----BEGIN PGP SIGNATURE----- # # iQEcBAABAgAGBQJZ+4F4AAoJEBVYiyZZa+pdy1IIAMX1DpzYGdnv6GCPSKeZ0woD # sHmSkygJep0/sUQD1cYunNsNZnGDgWhnsLAvHOn3opJgsiaZhmhJ8Uo7QNlT+ni1 # AvRFgQoSXLWSF5kkun4u7RvnpDI6jYfCuYSwb9SO4EAYFAQQJXQaKCeFq71gad+p # XGHJFAy2TqUVLNZ5I1mQz/oBeDsJ7RzHpYqaBxsLDqrCzRQ9ai23q+dFGS3jvLBr # 0gXw0MK73ceOwW12L5aLj4erNbATWmMFMDYZZwftysv3bgx2YfiOoZUTzufrB/Bc # MG8hP76aYBwIKNbhiDFGa2qdHGZGF7YQ4mi1/ZDX1K1G2tKKeEYxscM13JwiGb8= # =NuQO # -----END PGP SIGNATURE----- # zlib: version: "1.2.11" sha256: "c3e5e9fdd5004dcb542feda5ee4f0ff0744628baf8ed2dd5d66f8ca1197cb1a1" # SHA-256 hash provided on http://zlib.net/ libiconv: version: "1.15" sha256: "ccf536620a45458d26ba83887a983b96827001e92a13847b45e4925cc8913178" # gpg: Signature made Fri Feb 3 00:38:12 2017 CET # gpg: using RSA key 4F494A942E4616C2 # gpg: Good signature from "Bruno Haible (Open Source Development) " [unknown] # gpg: WARNING: This key is not certified with a trusted signature! # gpg: There is no indication that the signature belongs to the owner. # Primary key fingerprint: 68D9 4D8A AEEA D48A E7DC 5B90 4F49 4A94 2E46 16C2 nokogiri-1.8.2/LICENSE.md0000644000004100000410000000261213235345655015013 0ustar www-datawww-data(The MIT License) Copyright (c) 2008 - 2017: * [Aaron Patterson](http://tenderlovemaking.com) * [Mike Dalessio](http://mike.daless.io) * [Charles Nutter](http://blog.headius.com) * [Sergio Arbeo](http://www.serabe.com) * [Patrick Mahoney](http://polycrystal.org) * [Yoko Harada](http://yokolet.blogspot.com) * [Akinori MUSHA](https://akinori.org) * [John Shahid](https://github.com/jvshahid) Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the 'Software'), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. nokogiri-1.8.2/.travis.yml0000644000004100000410000000226313235345655015522 0ustar www-datawww-datalanguage: ruby dist: trusty group: beta sudo: required matrix: include: - os: linux rvm: 2.0 - os: osx rvm: 2.0 - os: linux rvm: 2.1 - os: osx rvm: 2.1 - os: linux rvm: 2.2.5 - os: osx rvm: 2.2.5 - os: linux rvm: 2.3.1 - os: osx rvm: 2.3.1 - os: linux rvm: 2.4.0 env: - RUBYOPT="--enable-frozen-string-literal --debug=frozen-string-literal" - os: osx rvm: 2.4.0 env: - RUBYOPT="--enable-frozen-string-literal --debug=frozen-string-literal" - os: linux rvm: ruby-head env: - RUBYOPT="--enable-frozen-string-literal --debug=frozen-string-literal" - os: osx rvm: ruby-head env: - RUBYOPT="--enable-frozen-string-literal --debug=frozen-string-literal" - os: linux rvm: jruby-1.7 - os: linux rvm: jruby-9.1.5.0 - os: linux rvm: rbx-3 allow_failures: - rvm: ruby-head fast_finish: true notifications: irc: channels: - "chat.freenode.net#nokogiri" on_success: always on_failure: always template: - "%{repository} (%{branch}:%{commit} by %{author}): %{message} (%{build_url})" skip_join: true addons: apt: packages: - haveged nokogiri-1.8.2/lib/0000755000004100000410000000000013235345655014154 5ustar www-datawww-datanokogiri-1.8.2/lib/nokogiri.rb0000644000004100000410000001046213235345655016325 0ustar www-datawww-data# -*- coding: utf-8 -*- # Modify the PATH on windows so that the external DLLs will get loaded. require 'rbconfig' if defined?(RUBY_ENGINE) && RUBY_ENGINE == "jruby" # The line below caused a problem on non-GAE rack environment. # unless defined?(JRuby::Rack::VERSION) || defined?(AppEngine::ApiProxy) # # However, simply cutting defined?(JRuby::Rack::VERSION) off resulted in # an unable-to-load-nokogiri problem. Thus, now, Nokogiri checks the presense # of appengine-rack.jar in $LOAD_PATH. If Nokogiri is on GAE, Nokogiri # should skip loading xml jars. This is because those are in WEB-INF/lib and # already set in the classpath. unless $LOAD_PATH.to_s.include?("appengine-rack") require 'stringio' require 'isorelax.jar' require 'jing.jar' require 'nekohtml.jar' require 'nekodtd.jar' require 'xercesImpl.jar' require 'serializer.jar' require 'xalan.jar' require 'xml-apis.jar' end end begin RUBY_VERSION =~ /(\d+\.\d+)/ require "nokogiri/#{$1}/nokogiri" rescue LoadError require 'nokogiri/nokogiri' end require 'nokogiri/version' require 'nokogiri/syntax_error' require 'nokogiri/xml' require 'nokogiri/xslt' require 'nokogiri/html' require 'nokogiri/decorators/slop' require 'nokogiri/css' require 'nokogiri/html/builder' # Nokogiri parses and searches XML/HTML very quickly, and also has # correctly implemented CSS3 selector support as well as XPath 1.0 # support. # # Parsing a document returns either a Nokogiri::XML::Document, or a # Nokogiri::HTML::Document depending on the kind of document you parse. # # Here is an example: # # require 'nokogiri' # require 'open-uri' # # # Get a Nokogiri::HTML:Document for the page we’re interested in... # # doc = Nokogiri::HTML(open('http://www.google.com/search?q=tenderlove')) # # # Do funky things with it using Nokogiri::XML::Node methods... # # #### # # Search for nodes by css # doc.css('h3.r a.l').each do |link| # puts link.content # end # # See Nokogiri::XML::Searchable#css for more information about CSS searching. # See Nokogiri::XML::Searchable#xpath for more information about XPath searching. module Nokogiri class << self ### # Parse an HTML or XML document. +string+ contains the document. def parse string, url = nil, encoding = nil, options = nil if string.respond_to?(:read) || /^\s*<(?:!DOCTYPE\s+)?html[\s>]/i === string[0, 512] # Expect an HTML indicator to appear within the first 512 # characters of a document. ( + # shouldn't be that long) Nokogiri.HTML(string, url, encoding, options || XML::ParseOptions::DEFAULT_HTML) else Nokogiri.XML(string, url, encoding, options || XML::ParseOptions::DEFAULT_XML) end.tap { |doc| yield doc if block_given? } end ### # Create a new Nokogiri::XML::DocumentFragment def make input = nil, opts = {}, &blk if input Nokogiri::HTML.fragment(input).children.first else Nokogiri(&blk) end end ### # Parse a document and add the Slop decorator. The Slop decorator # implements method_missing such that methods may be used instead of CSS # or XPath. For example: # # doc = Nokogiri::Slop(<<-eohtml) # # #

first

#

second

# # # eohtml # assert_equal('second', doc.html.body.p[1].text) # def Slop(*args, &block) Nokogiri(*args, &block).slop! end def install_default_aliases # Make sure to support some popular encoding aliases not known by # all iconv implementations. { 'Windows-31J' => 'CP932', # Windows-31J is the IANA registered name of CP932. }.each { |alias_name, name| EncodingHandler.alias(name, alias_name) if EncodingHandler[alias_name].nil? } end end Nokogiri.install_default_aliases end ### # Parser a document contained in +args+. Nokogiri will try to guess what # type of document you are attempting to parse. For more information, see # Nokogiri.parse # # To specify the type of document, use Nokogiri.XML or Nokogiri.HTML. def Nokogiri(*args, &block) if block_given? Nokogiri::HTML::Builder.new(&block).doc.root else Nokogiri.parse(*args) end end nokogiri-1.8.2/lib/xsd/0000755000004100000410000000000013235345655014752 5ustar www-datawww-datanokogiri-1.8.2/lib/xsd/xmlparser/0000755000004100000410000000000013235345655016767 5ustar www-datawww-datanokogiri-1.8.2/lib/xsd/xmlparser/nokogiri.rb0000644000004100000410000000573213235345655021144 0ustar www-datawww-datarequire 'nokogiri' module XSD # :nodoc: module XMLParser # :nodoc: ### # Nokogiri XML parser for soap4r. # # Nokogiri may be used as the XML parser in soap4r. Simply require # 'xsd/xmlparser/nokogiri' in your soap4r applications, and soap4r # will use Nokogiri as it's XML parser. No other changes should be # required to use Nokogiri as the XML parser. # # Example (using UW ITS Web Services): # # require 'rubygems' # require 'nokogiri' # gem 'soap4r' # require 'defaultDriver' # require 'xsd/xmlparser/nokogiri' # # obj = AvlPortType.new # obj.getLatestByRoute(obj.getAgencies.first, 8).each do |bus| # p "#{bus.routeID}, #{bus.longitude}, #{bus.latitude}" # end # class Nokogiri < XSD::XMLParser::Parser ### # Create a new XSD parser with +host+ and +opt+ def initialize host, opt = {} super @parser = ::Nokogiri::XML::SAX::Parser.new(self, @charset || 'UTF-8') end ### # Start parsing +string_or_readable+ def do_parse string_or_readable @parser.parse(string_or_readable) end ### # Handle the start_element event with +name+ and +attrs+ def start_element name, attrs = [] super(name, Hash[*attrs.flatten]) end ### # Handle the end_element event with +name+ def end_element name super end ### # Handle errors with message +msg+ def error msg raise ParseError.new(msg) end alias :warning :error ### # Handle cdata_blocks containing +string+ def cdata_block string characters string end ### # Called at the beginning of an element # +name+ is the element name # +attrs+ is a list of attributes # +prefix+ is the namespace prefix for the element # +uri+ is the associated namespace URI # +ns+ is a hash of namespace prefix:urls associated with the element def start_element_namespace name, attrs = [], prefix = nil, uri = nil, ns = [] ### # Deal with SAX v1 interface name = [prefix, name].compact.join(':') attributes = ns.map { |ns_prefix,ns_uri| [['xmlns', ns_prefix].compact.join(':'), ns_uri] } + attrs.map { |attr| [[attr.prefix, attr.localname].compact.join(':'), attr.value] }.flatten start_element name, attributes end ### # Called at the end of an element # +name+ is the element's name # +prefix+ is the namespace prefix associated with the element # +uri+ is the associated namespace URI def end_element_namespace name, prefix = nil, uri = nil ### # Deal with SAX v1 interface end_element [prefix, name].compact.join(':') end %w{ xmldecl start_document end_document comment }.each do |name| class_eval %{ def #{name}(*args); end } end add_factory(self) end end end nokogiri-1.8.2/lib/nokogiri/0000755000004100000410000000000013235345655015775 5ustar www-datawww-datanokogiri-1.8.2/lib/nokogiri/html/0000755000004100000410000000000013235345655016741 5ustar www-datawww-datanokogiri-1.8.2/lib/nokogiri/html/element_description.rb0000644000004100000410000000063513235345655023326 0ustar www-datawww-datamodule Nokogiri module HTML class ElementDescription ### # Is this element a block element? def block? !inline? end ### # Convert this description to a string def to_s "#{name}: #{description}" end ### # Inspection information def inspect "#<#{self.class.name}: #{name} #{description}>" end end end end nokogiri-1.8.2/lib/nokogiri/html/element_description_defaults.rb0000644000004100000410000006271313235345655025222 0ustar www-datawww-datamodule Nokogiri module HTML class ElementDescription # Methods are defined protected by method_defined? because at # this point the C-library or Java library is already loaded, # and we don't want to clobber any methods that have been # defined there. Desc = Struct.new("HTMLElementDescription", :name, :startTag, :endTag, :saveEndTag, :empty, :depr, :dtd, :isinline, :desc, :subelts, :defaultsubelt, :attrs_opt, :attrs_depr, :attrs_req) # This is filled in down below. DefaultDescriptions = Hash.new() def default_desc DefaultDescriptions[name.downcase] end private :default_desc unless method_defined? :implied_start_tag? def implied_start_tag? d = default_desc d ? d.startTag : nil end end unless method_defined? :implied_end_tag? def implied_end_tag? d = default_desc d ? d.endTag : nil end end unless method_defined? :save_end_tag? def save_end_tag? d = default_desc d ? d.saveEndTag : nil end end unless method_defined? :deprecated? def deprecated? d = default_desc d ? d.depr : nil end end unless method_defined? :description def description d = default_desc d ? d.desc : nil end end unless method_defined? :default_sub_element def default_sub_element d = default_desc d ? d.defaultsubelt : nil end end unless method_defined? :optional_attributes def optional_attributes d = default_desc d ? d.attrs_opt : [] end end unless method_defined? :deprecated_attributes def deprecated_attributes d = default_desc d ? d.attrs_depr : [] end end unless method_defined? :required_attributes def required_attributes d = default_desc d ? d.attrs_req : [] end end ### # Default Element Descriptions (HTML 4.0) copied from # libxml2/HTMLparser.c and libxml2/include/libxml/HTMLparser.h # # The copyright notice for those files and the following list of # element and attribute descriptions is reproduced here: # # Except where otherwise noted in the source code (e.g. the # files hash.c, list.c and the trio files, which are covered by # a similar licence but with different Copyright notices) all # the files are: # # Copyright (C) 1998-2003 Daniel Veillard. All Rights Reserved. # # Permission is hereby granted, free of charge, to any person # obtaining a copy of this software and associated documentation # files (the "Software"), to deal in the Software without # restriction, including without limitation the rights to use, # copy, modify, merge, publish, distribute, sublicense, and/or # sell copies of the Software, and to permit persons to whom the # Software is fur- nished to do so, subject to the following # conditions: # The above copyright notice and this permission notice shall be # included in all copies or substantial portions of the # Software. # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY # KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE # WARRANTIES OF MERCHANTABILITY, FIT- NESS FOR A PARTICULAR # PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE DANIEL # VEILLARD BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, # WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING # FROM, OUT OF OR IN CON- NECTION WITH THE SOFTWARE OR THE USE # OR OTHER DEALINGS IN THE SOFTWARE. # Except as contained in this notice, the name of Daniel # Veillard shall not be used in advertising or otherwise to # promote the sale, use or other deal- ings in this Software # without prior written authorization from him. # Attributes defined and categorized FONTSTYLE = ["tt", "i", "b", "u", "s", "strike", "big", "small"] PHRASE = ['em', 'strong', 'dfn', 'code', 'samp', 'kbd', 'var', 'cite', 'abbr', 'acronym'] SPECIAL = ['a', 'img', 'applet', 'embed', 'object', 'font','basefont', 'br', 'script', 'map', 'q', 'sub', 'sup', 'span', 'bdo', 'iframe'] PCDATA = [] HEADING = ['h1', 'h2', 'h3', 'h4', 'h5', 'h6'] LIST = ['ul', 'ol', 'dir', 'menu'] FORMCTRL = ['input', 'select', 'textarea', 'label', 'button'] BLOCK = [HEADING, LIST, 'pre', 'p', 'dl', 'div', 'center', 'noscript', 'noframes', 'blockquote', 'form', 'isindex', 'hr', 'table', 'fieldset', 'address'] INLINE = [PCDATA, FONTSTYLE, PHRASE, SPECIAL, FORMCTRL] FLOW = [BLOCK, INLINE] MODIFIER = [] EMPTY = [] HTML_FLOW = FLOW HTML_INLINE = INLINE HTML_PCDATA = PCDATA HTML_CDATA = HTML_PCDATA COREATTRS = ['id', 'class', 'style', 'title'] I18N = ['lang', 'dir'] EVENTS = ['onclick', 'ondblclick', 'onmousedown', 'onmouseup', 'onmouseover', 'onmouseout', 'onkeypress', 'onkeydown', 'onkeyup'] ATTRS = [COREATTRS, I18N,EVENTS] CELLHALIGN = ['align', 'char', 'charoff'] CELLVALIGN = ['valign'] HTML_ATTRS = ATTRS CORE_I18N_ATTRS = [COREATTRS, I18N] CORE_ATTRS = COREATTRS I18N_ATTRS = I18N A_ATTRS = [ATTRS, 'charset', 'type', 'name', 'href', 'hreflang', 'rel', 'rev', 'accesskey', 'shape', 'coords', 'tabindex', 'onfocus', 'onblur'] TARGET_ATTR = ['target'] ROWS_COLS_ATTR = ['rows', 'cols'] ALT_ATTR = ['alt'] SRC_ALT_ATTRS = ['src', 'alt'] HREF_ATTRS = ['href'] CLEAR_ATTRS = ['clear'] INLINE_P = [INLINE, 'p'] FLOW_PARAM = [FLOW, 'param'] APPLET_ATTRS = [COREATTRS , 'codebase', 'archive', 'alt', 'name', 'height', 'width', 'align', 'hspace', 'vspace'] AREA_ATTRS = ['shape', 'coords', 'href', 'nohref', 'tabindex', 'accesskey', 'onfocus', 'onblur'] BASEFONT_ATTRS = ['id', 'size', 'color', 'face'] QUOTE_ATTRS = [ATTRS, 'cite'] BODY_CONTENTS = [FLOW, 'ins', 'del'] BODY_ATTRS = [ATTRS, 'onload', 'onunload'] BODY_DEPR = ['background', 'bgcolor', 'text', 'link', 'vlink', 'alink'] BUTTON_ATTRS = [ATTRS, 'name', 'value', 'type', 'disabled', 'tabindex', 'accesskey', 'onfocus', 'onblur'] COL_ATTRS = [ATTRS, 'span', 'width', CELLHALIGN, CELLVALIGN] COL_ELT = ['col'] EDIT_ATTRS = [ATTRS, 'datetime', 'cite'] COMPACT_ATTRS = [ATTRS, 'compact'] DL_CONTENTS = ['dt', 'dd'] COMPACT_ATTR = ['compact'] LABEL_ATTR = ['label'] FIELDSET_CONTENTS = [FLOW, 'legend' ] FONT_ATTRS = [COREATTRS, I18N, 'size', 'color', 'face' ] FORM_CONTENTS = [HEADING, LIST, INLINE, 'pre', 'p', 'div', 'center', 'noscript', 'noframes', 'blockquote', 'isindex', 'hr', 'table', 'fieldset', 'address'] FORM_ATTRS = [ATTRS, 'method', 'enctype', 'accept', 'name', 'onsubmit', 'onreset', 'accept-charset'] FRAME_ATTRS = [COREATTRS, 'longdesc', 'name', 'src', 'frameborder', 'marginwidth', 'marginheight', 'noresize', 'scrolling' ] FRAMESET_ATTRS = [COREATTRS, 'rows', 'cols', 'onload', 'onunload'] FRAMESET_CONTENTS = ['frameset', 'frame', 'noframes'] HEAD_ATTRS = [I18N, 'profile'] HEAD_CONTENTS = ['title', 'isindex', 'base', 'script', 'style', 'meta', 'link', 'object'] HR_DEPR = ['align', 'noshade', 'size', 'width'] VERSION_ATTR = ['version'] HTML_CONTENT = ['head', 'body', 'frameset'] IFRAME_ATTRS = [COREATTRS, 'longdesc', 'name', 'src', 'frameborder', 'marginwidth', 'marginheight', 'scrolling', 'align', 'height', 'width'] IMG_ATTRS = [ATTRS, 'longdesc', 'name', 'height', 'width', 'usemap', 'ismap'] EMBED_ATTRS = [COREATTRS, 'align', 'alt', 'border', 'code', 'codebase', 'frameborder', 'height', 'hidden', 'hspace', 'name', 'palette', 'pluginspace', 'pluginurl', 'src', 'type', 'units', 'vspace', 'width'] INPUT_ATTRS = [ATTRS, 'type', 'name', 'value', 'checked', 'disabled', 'readonly', 'size', 'maxlength', 'src', 'alt', 'usemap', 'ismap', 'tabindex', 'accesskey', 'onfocus', 'onblur', 'onselect', 'onchange', 'accept'] PROMPT_ATTRS = [COREATTRS, I18N, 'prompt'] LABEL_ATTRS = [ATTRS, 'for', 'accesskey', 'onfocus', 'onblur'] LEGEND_ATTRS = [ATTRS, 'accesskey'] ALIGN_ATTR = ['align'] LINK_ATTRS = [ATTRS, 'charset', 'href', 'hreflang', 'type', 'rel', 'rev', 'media'] MAP_CONTENTS = [BLOCK, 'area'] NAME_ATTR = ['name'] ACTION_ATTR = ['action'] BLOCKLI_ELT = [BLOCK, 'li'] META_ATTRS = [I18N, 'http-equiv', 'name', 'scheme'] CONTENT_ATTR = ['content'] TYPE_ATTR = ['type'] NOFRAMES_CONTENT = ['body', FLOW, MODIFIER] OBJECT_CONTENTS = [FLOW, 'param'] OBJECT_ATTRS = [ATTRS, 'declare', 'classid', 'codebase', 'data', 'type', 'codetype', 'archive', 'standby', 'height', 'width', 'usemap', 'name', 'tabindex'] OBJECT_DEPR = ['align', 'border', 'hspace', 'vspace'] OL_ATTRS = ['type', 'compact', 'start'] OPTION_ELT = ['option'] OPTGROUP_ATTRS = [ATTRS, 'disabled'] OPTION_ATTRS = [ATTRS, 'disabled', 'label', 'selected', 'value'] PARAM_ATTRS = ['id', 'value', 'valuetype', 'type'] WIDTH_ATTR = ['width'] PRE_CONTENT = [PHRASE, 'tt', 'i', 'b', 'u', 's', 'strike', 'a', 'br', 'script', 'map', 'q', 'span', 'bdo', 'iframe'] SCRIPT_ATTRS = ['charset', 'src', 'defer', 'event', 'for'] LANGUAGE_ATTR = ['language'] SELECT_CONTENT = ['optgroup', 'option'] SELECT_ATTRS = [ATTRS, 'name', 'size', 'multiple', 'disabled', 'tabindex', 'onfocus', 'onblur', 'onchange'] STYLE_ATTRS = [I18N, 'media', 'title'] TABLE_ATTRS = [ATTRS, 'summary', 'width', 'border', 'frame', 'rules', 'cellspacing', 'cellpadding', 'datapagesize'] TABLE_DEPR = ['align', 'bgcolor'] TABLE_CONTENTS = ['caption', 'col', 'colgroup', 'thead', 'tfoot', 'tbody', 'tr'] TR_ELT = ['tr'] TALIGN_ATTRS = [ATTRS, CELLHALIGN, CELLVALIGN] TH_TD_DEPR = ['nowrap', 'bgcolor', 'width', 'height'] TH_TD_ATTR = [ATTRS, 'abbr', 'axis', 'headers', 'scope', 'rowspan', 'colspan', CELLHALIGN, CELLVALIGN] TEXTAREA_ATTRS = [ATTRS, 'name', 'disabled', 'readonly', 'tabindex', 'accesskey', 'onfocus', 'onblur', 'onselect', 'onchange'] TR_CONTENTS = ['th', 'td'] BGCOLOR_ATTR = ['bgcolor'] LI_ELT = ['li'] UL_DEPR = ['type', 'compact'] DIR_ATTR = ['dir'] [ ['a', false, false, false, false, false, :any, true, 'anchor ', HTML_INLINE, nil, A_ATTRS, TARGET_ATTR, [] ], ['abbr', false, false, false, false, false, :any, true, 'abbreviated form', HTML_INLINE, nil, HTML_ATTRS, [], [] ], ['acronym', false, false, false, false, false, :any, true, '', HTML_INLINE, nil, HTML_ATTRS, [], [] ], ['address', false, false, false, false, false, :any, false, 'information on author', INLINE_P , nil, HTML_ATTRS, [], [] ], ['applet', false, false, false, false, true, :loose, true, 'java applet ', FLOW_PARAM, nil, [], APPLET_ATTRS, [] ], ['area', false, true, true, true, false, :any, false, 'client-side image map area ', EMPTY, nil, AREA_ATTRS, TARGET_ATTR, ALT_ATTR ], ['b', false, true, false, false, false, :any, true, 'bold text style', HTML_INLINE, nil, HTML_ATTRS, [], [] ], ['base', false, true, true, true, false, :any, false, 'document base uri ', EMPTY, nil, [], TARGET_ATTR, HREF_ATTRS ], ['basefont', false, true, true, true, true, :loose, true, 'base font size ', EMPTY, nil, [], BASEFONT_ATTRS, [] ], ['bdo', false, false, false, false, false, :any, true, 'i18n bidi over-ride ', HTML_INLINE, nil, CORE_I18N_ATTRS, [], DIR_ATTR ], ['big', false, true, false, false, false, :any, true, 'large text style', HTML_INLINE, nil, HTML_ATTRS, [], [] ], ['blockquote', false, false, false, false, false, :any, false, 'long quotation ', HTML_FLOW, nil, QUOTE_ATTRS, [], [] ], ['body', true, true, false, false, false, :any, false, 'document body ', BODY_CONTENTS, 'div', BODY_ATTRS, BODY_DEPR, [] ], ['br', false, true, true, true, false, :any, true, 'forced line break ', EMPTY, nil, CORE_ATTRS, CLEAR_ATTRS, [] ], ['button', false, false, false, false, false, :any, true, 'push button ', [HTML_FLOW, MODIFIER], nil, BUTTON_ATTRS, [], [] ], ['caption', false, false, false, false, false, :any, false, 'table caption ', HTML_INLINE, nil, HTML_ATTRS, [], [] ], ['center', false, true, false, false, true, :loose, false, 'shorthand for div align=center ', HTML_FLOW, nil, [], HTML_ATTRS, [] ], ['cite', false, false, false, false, false, :any, true, 'citation', HTML_INLINE, nil, HTML_ATTRS, [], [] ], ['code', false, false, false, false, false, :any, true, 'computer code fragment', HTML_INLINE, nil, HTML_ATTRS, [], [] ], ['col', false, true, true, true, false, :any, false, 'table column ', EMPTY, nil, COL_ATTRS, [], [] ], ['colgroup', false, true, false, false, false, :any, false, 'table column group ', COL_ELT, 'col', COL_ATTRS, [], [] ], ['dd', false, true, false, false, false, :any, false, 'definition description ', HTML_FLOW, nil, HTML_ATTRS, [], [] ], ['del', false, false, false, false, false, :any, true, 'deleted text ', HTML_FLOW, nil, EDIT_ATTRS, [], [] ], ['dfn', false, false, false, false, false, :any, true, 'instance definition', HTML_INLINE, nil, HTML_ATTRS, [], [] ], ['dir', false, false, false, false, true, :loose, false, 'directory list', BLOCKLI_ELT, 'li', [], COMPACT_ATTRS, [] ], ['div', false, false, false, false, false, :any, false, 'generic language/style container', HTML_FLOW, nil, HTML_ATTRS, ALIGN_ATTR, [] ], ['dl', false, false, false, false, false, :any, false, 'definition list ', DL_CONTENTS, 'dd', HTML_ATTRS, COMPACT_ATTR, [] ], ['dt', false, true, false, false, false, :any, false, 'definition term ', HTML_INLINE, nil, HTML_ATTRS, [], [] ], ['em', false, true, false, false, false, :any, true, 'emphasis', HTML_INLINE, nil, HTML_ATTRS, [], [] ], ['embed', false, true, false, false, true, :loose, true, 'generic embedded object ', EMPTY, nil, EMBED_ATTRS, [], [] ], ['fieldset', false, false, false, false, false, :any, false, 'form control group ', FIELDSET_CONTENTS, nil, HTML_ATTRS, [], [] ], ['font', false, true, false, false, true, :loose, true, 'local change to font ', HTML_INLINE, nil, [], FONT_ATTRS, [] ], ['form', false, false, false, false, false, :any, false, 'interactive form ', FORM_CONTENTS, 'fieldset', FORM_ATTRS, TARGET_ATTR, ACTION_ATTR ], ['frame', false, true, true, true, false, :frameset, false, 'subwindow ', EMPTY, nil, [], FRAME_ATTRS, [] ], ['frameset', false, false, false, false, false, :frameset, false, 'window subdivision', FRAMESET_CONTENTS, 'noframes', [], FRAMESET_ATTRS, [] ], ['htrue', false, false, false, false, false, :any, false, 'heading ', HTML_INLINE, nil, HTML_ATTRS, ALIGN_ATTR, [] ], ['htrue', false, false, false, false, false, :any, false, 'heading ', HTML_INLINE, nil, HTML_ATTRS, ALIGN_ATTR, [] ], ['htrue', false, false, false, false, false, :any, false, 'heading ', HTML_INLINE, nil, HTML_ATTRS, ALIGN_ATTR, [] ], ['h4', false, false, false, false, false, :any, false, 'heading ', HTML_INLINE, nil, HTML_ATTRS, ALIGN_ATTR, [] ], ['h5', false, false, false, false, false, :any, false, 'heading ', HTML_INLINE, nil, HTML_ATTRS, ALIGN_ATTR, [] ], ['h6', false, false, false, false, false, :any, false, 'heading ', HTML_INLINE, nil, HTML_ATTRS, ALIGN_ATTR, [] ], ['head', true, true, false, false, false, :any, false, 'document head ', HEAD_CONTENTS, nil, HEAD_ATTRS, [], [] ], ['hr', false, true, true, true, false, :any, false, 'horizontal rule ', EMPTY, nil, HTML_ATTRS, HR_DEPR, [] ], ['html', true, true, false, false, false, :any, false, 'document root element ', HTML_CONTENT, nil, I18N_ATTRS, VERSION_ATTR, [] ], ['i', false, true, false, false, false, :any, true, 'italic text style', HTML_INLINE, nil, HTML_ATTRS, [], [] ], ['iframe', false, false, false, false, false, :any, true, 'inline subwindow ', HTML_FLOW, nil, [], IFRAME_ATTRS, [] ], ['img', false, true, true, true, false, :any, true, 'embedded image ', EMPTY, nil, IMG_ATTRS, ALIGN_ATTR, SRC_ALT_ATTRS ], ['input', false, true, true, true, false, :any, true, 'form control ', EMPTY, nil, INPUT_ATTRS, ALIGN_ATTR, [] ], ['ins', false, false, false, false, false, :any, true, 'inserted text', HTML_FLOW, nil, EDIT_ATTRS, [], [] ], ['isindex', false, true, true, true, true, :loose, false, 'single line prompt ', EMPTY, nil, [], PROMPT_ATTRS, [] ], ['kbd', false, false, false, false, false, :any, true, 'text to be entered by the user', HTML_INLINE, nil, HTML_ATTRS, [], [] ], ['label', false, false, false, false, false, :any, true, 'form field label text ', [HTML_INLINE, MODIFIER], nil, LABEL_ATTRS, [], [] ], ['legend', false, false, false, false, false, :any, false, 'fieldset legend ', HTML_INLINE, nil, LEGEND_ATTRS, ALIGN_ATTR, [] ], ['li', false, true, true, false, false, :any, false, 'list item ', HTML_FLOW, nil, HTML_ATTRS, [], [] ], ['link', false, true, true, true, false, :any, false, 'a media-independent link ', EMPTY, nil, LINK_ATTRS, TARGET_ATTR, [] ], ['map', false, false, false, false, false, :any, true, 'client-side image map ', MAP_CONTENTS, nil, HTML_ATTRS, [], NAME_ATTR ], ['menu', false, false, false, false, true, :loose, false, 'menu list ', BLOCKLI_ELT, nil, [], COMPACT_ATTRS, [] ], ['meta', false, true, true, true, false, :any, false, 'generic metainformation ', EMPTY, nil, META_ATTRS, [], CONTENT_ATTR ], ['noframes', false, false, false, false, false, :frameset, false, 'alternate content container for non frame-based rendering ', NOFRAMES_CONTENT, 'body', HTML_ATTRS, [], [] ], ['noscript', false, false, false, false, false, :any, false, 'alternate content container for non script-based rendering ', HTML_FLOW, 'div', HTML_ATTRS, [], [] ], ['object', false, false, false, false, false, :any, true, 'generic embedded object ', OBJECT_CONTENTS, 'div', OBJECT_ATTRS, OBJECT_DEPR, [] ], ['ol', false, false, false, false, false, :any, false, 'ordered list ', LI_ELT, 'li', HTML_ATTRS, OL_ATTRS, [] ], ['optgroup', false, false, false, false, false, :any, false, 'option group ', OPTION_ELT, 'option', OPTGROUP_ATTRS, [], LABEL_ATTR ], ['option', false, true, false, false, false, :any, false, 'selectable choice ', HTML_PCDATA, nil, OPTION_ATTRS, [], [] ], ['p', false, true, false, false, false, :any, false, 'paragraph ', HTML_INLINE, nil, HTML_ATTRS, ALIGN_ATTR, [] ], ['param', false, true, true, true, false, :any, false, 'named property value ', EMPTY, nil, PARAM_ATTRS, [], NAME_ATTR ], ['pre', false, false, false, false, false, :any, false, 'preformatted text ', PRE_CONTENT, nil, HTML_ATTRS, WIDTH_ATTR, [] ], ['q', false, false, false, false, false, :any, true, 'short inline quotation ', HTML_INLINE, nil, QUOTE_ATTRS, [], [] ], ['s', false, true, false, false, true, :loose, true, 'strike-through text style', HTML_INLINE, nil, [], HTML_ATTRS, [] ], ['samp', false, false, false, false, false, :any, true, 'sample program output, scripts, etc.', HTML_INLINE, nil, HTML_ATTRS, [], [] ], ['script', false, false, false, false, false, :any, true, 'script statements ', HTML_CDATA, nil, SCRIPT_ATTRS, LANGUAGE_ATTR, TYPE_ATTR ], ['select', false, false, false, false, false, :any, true, 'option selector ', SELECT_CONTENT, nil, SELECT_ATTRS, [], [] ], ['small', false, true, false, false, false, :any, true, 'small text style', HTML_INLINE, nil, HTML_ATTRS, [], [] ], ['span', false, false, false, false, false, :any, true, 'generic language/style container ', HTML_INLINE, nil, HTML_ATTRS, [], [] ], ['strike', false, true, false, false, true, :loose, true, 'strike-through text', HTML_INLINE, nil, [], HTML_ATTRS, [] ], ['strong', false, true, false, false, false, :any, true, 'strong emphasis', HTML_INLINE, nil, HTML_ATTRS, [], [] ], ['style', false, false, false, false, false, :any, false, 'style info ', HTML_CDATA, nil, STYLE_ATTRS, [], TYPE_ATTR ], ['sub', false, true, false, false, false, :any, true, 'subscript', HTML_INLINE, nil, HTML_ATTRS, [], [] ], ['sup', false, true, false, false, false, :any, true, 'superscript ', HTML_INLINE, nil, HTML_ATTRS, [], [] ], ['table', false, false, false, false, false, :any, false, '', TABLE_CONTENTS, 'tr', TABLE_ATTRS, TABLE_DEPR, [] ], ['tbody', true, false, false, false, false, :any, false, 'table body ', TR_ELT, 'tr', TALIGN_ATTRS, [], [] ], ['td', false, false, false, false, false, :any, false, 'table data cell', HTML_FLOW, nil, TH_TD_ATTR, TH_TD_DEPR, [] ], ['textarea', false, false, false, false, false, :any, true, 'multi-line text field ', HTML_PCDATA, nil, TEXTAREA_ATTRS, [], ROWS_COLS_ATTR ], ['tfoot', false, true, false, false, false, :any, false, 'table footer ', TR_ELT, 'tr', TALIGN_ATTRS, [], [] ], ['th', false, true, false, false, false, :any, false, 'table header cell', HTML_FLOW, nil, TH_TD_ATTR, TH_TD_DEPR, [] ], ['thead', false, true, false, false, false, :any, false, 'table header ', TR_ELT, 'tr', TALIGN_ATTRS, [], [] ], ['title', false, false, false, false, false, :any, false, 'document title ', HTML_PCDATA, nil, I18N_ATTRS, [], [] ], ['tr', false, false, false, false, false, :any, false, 'table row ', TR_CONTENTS, 'td', TALIGN_ATTRS, BGCOLOR_ATTR, [] ], ['tt', false, true, false, false, false, :any, true, 'teletype or monospaced text style', HTML_INLINE, nil, HTML_ATTRS, [], [] ], ['u', false, true, false, false, true, :loose, true, 'underlined text style', HTML_INLINE, nil, [], HTML_ATTRS, [] ], ['ul', false, false, false, false, false, :any, false, 'unordered list ', LI_ELT, 'li', HTML_ATTRS, UL_DEPR, [] ], ['var', false, false, false, false, false, :any, true, 'instance of a variable or program argument', HTML_INLINE, nil, HTML_ATTRS, [], [] ] ].each do |descriptor| name = descriptor[0] begin d = Desc.new(*descriptor) # flatten all the attribute lists (Ruby1.9, *[a,b,c] can be # used to flatten a literal list, but not in Ruby1.8). d[:subelts] = d[:subelts].flatten d[:attrs_opt] = d[:attrs_opt].flatten d[:attrs_depr] = d[:attrs_depr].flatten d[:attrs_req] = d[:attrs_req].flatten rescue => e p name raise e end DefaultDescriptions[name] = d end end end end nokogiri-1.8.2/lib/nokogiri/html/document.rb0000644000004100000410000002574713235345655021123 0ustar www-datawww-datamodule Nokogiri module HTML class Document < Nokogiri::XML::Document ### # Get the meta tag encoding for this document. If there is no meta tag, # then nil is returned. def meta_encoding case when meta = at('//meta[@charset]') meta[:charset] when meta = meta_content_type meta['content'][/charset\s*=\s*([\w-]+)/i, 1] end end ### # Set the meta tag encoding for this document. # # If an meta encoding tag is already present, its content is # replaced with the given text. # # Otherwise, this method tries to create one at an appropriate # place supplying head and/or html elements as necessary, which # is inside a head element if any, and before any text node or # content element (typically ) if any. # # The result when trying to set an encoding that is different # from the document encoding is undefined. # # Beware in CRuby, that libxml2 automatically inserts a meta tag # into a head element. def meta_encoding= encoding case when meta = meta_content_type meta['content'] = 'text/html; charset=%s' % encoding encoding when meta = at('//meta[@charset]') meta['charset'] = encoding else meta = XML::Node.new('meta', self) if dtd = internal_subset and dtd.html5_dtd? meta['charset'] = encoding else meta['http-equiv'] = 'Content-Type' meta['content'] = 'text/html; charset=%s' % encoding end case when head = at('//head') head.prepend_child(meta) else set_metadata_element(meta) end encoding end end def meta_content_type xpath('//meta[@http-equiv and boolean(@content)]').find { |node| node['http-equiv'] =~ /\AContent-Type\z/i } end private :meta_content_type ### # Get the title string of this document. Return nil if there is # no title tag. def title title = at('//title') and title.inner_text end ### # Set the title string of this document. # # If a title element is already present, its content is replaced # with the given text. # # Otherwise, this method tries to create one at an appropriate # place supplying head and/or html elements as necessary, which # is inside a head element if any, right after a meta # encoding/charset tag if any, and before any text node or # content element (typically ) if any. def title=(text) tnode = XML::Text.new(text, self) if title = at('//title') title.children = tnode return text end title = XML::Node.new('title', self) << tnode case when head = at('//head') head << title when meta = at('//meta[@charset]') || meta_content_type # better put after charset declaration meta.add_next_sibling(title) else set_metadata_element(title) end text end def set_metadata_element(element) case when head = at('//head') head << element when html = at('//html') head = html.prepend_child(XML::Node.new('head', self)) head.prepend_child(element) when first = children.find { |node| case node when XML::Element, XML::Text true end } # We reach here only if the underlying document model # allows / elements to be omitted and does not # automatically supply them. first.add_previous_sibling(element) else html = add_child(XML::Node.new('html', self)) head = html.add_child(XML::Node.new('head', self)) head.prepend_child(element) end end private :set_metadata_element #### # Serialize Node using +options+. Save options can also be set using a # block. See SaveOptions. # # These two statements are equivalent: # # node.serialize(:encoding => 'UTF-8', :save_with => FORMAT | AS_XML) # # or # # node.serialize(:encoding => 'UTF-8') do |config| # config.format.as_xml # end # def serialize options = {} options[:save_with] ||= XML::Node::SaveOptions::DEFAULT_HTML super end #### # Create a Nokogiri::XML::DocumentFragment from +tags+ def fragment tags = nil DocumentFragment.new(self, tags, self.root) end class << self ### # Parse HTML. +string_or_io+ may be a String, or any object that # responds to _read_ and _close_ such as an IO, or StringIO. # +url+ is resource where this document is located. +encoding+ is the # encoding that should be used when processing the document. +options+ # is a number that sets options in the parser, such as # Nokogiri::XML::ParseOptions::RECOVER. See the constants in # Nokogiri::XML::ParseOptions. def parse string_or_io, url = nil, encoding = nil, options = XML::ParseOptions::DEFAULT_HTML options = Nokogiri::XML::ParseOptions.new(options) if Integer === options # Give the options to the user yield options if block_given? if string_or_io.respond_to?(:encoding) unless string_or_io.encoding.name == "ASCII-8BIT" encoding ||= string_or_io.encoding.name end end if string_or_io.respond_to?(:read) url ||= string_or_io.respond_to?(:path) ? string_or_io.path : nil unless encoding # Libxml2's parser has poor support for encoding # detection. First, it does not recognize the HTML5 # style meta charset declaration. Secondly, even if it # successfully detects an encoding hint, it does not # re-decode or re-parse the preceding part which may be # garbled. # # EncodingReader aims to perform advanced encoding # detection beyond what Libxml2 does, and to emulate # rewinding of a stream and make Libxml2 redo parsing # from the start when an encoding hint is found. string_or_io = EncodingReader.new(string_or_io) begin return read_io(string_or_io, url, encoding, options.to_i) rescue EncodingFound => e encoding = e.found_encoding end end return read_io(string_or_io, url, encoding, options.to_i) end # read_memory pukes on empty docs if string_or_io.nil? or string_or_io.empty? return encoding ? new.tap { |i| i.encoding = encoding } : new end encoding ||= EncodingReader.detect_encoding(string_or_io) read_memory(string_or_io, url, encoding, options.to_i) end end class EncodingFound < StandardError # :nodoc: attr_reader :found_encoding def initialize(encoding) @found_encoding = encoding super("encoding found: %s" % encoding) end end class EncodingReader # :nodoc: class SAXHandler < Nokogiri::XML::SAX::Document # :nodoc: attr_reader :encoding def initialize @encoding = nil super() end def start_element(name, attrs = []) return unless name == 'meta' attr = Hash[attrs] charset = attr['charset'] and @encoding = charset http_equiv = attr['http-equiv'] and http_equiv.match(/\AContent-Type\z/i) and content = attr['content'] and m = content.match(/;\s*charset\s*=\s*([\w-]+)/) and @encoding = m[1] end end class JumpSAXHandler < SAXHandler def initialize(jumptag) @jumptag = jumptag super() end def start_element(name, attrs = []) super throw @jumptag, @encoding if @encoding throw @jumptag, nil if name =~ /\A(?:div|h1|img|p|br)\z/ end end def self.detect_encoding(chunk) if Nokogiri.jruby? && EncodingReader.is_jruby_without_fix? return EncodingReader.detect_encoding_for_jruby_without_fix(chunk) end m = chunk.match(/\A(<\?xml[ \t\r\n]+[^>]*>)/) and return Nokogiri.XML(m[1]).encoding if Nokogiri.jruby? m = chunk.match(/(]*>)/) and return Nokogiri.XML(m[1]).encoding m = chunk.match(/( 0 rest = @io.read(len) and ret << rest end if ret.empty? nil else ret end end end end end end nokogiri-1.8.2/lib/nokogiri/html/sax/0000755000004100000410000000000013235345655017534 5ustar www-datawww-datanokogiri-1.8.2/lib/nokogiri/html/sax/push_parser.rb0000644000004100000410000000203013235345655022407 0ustar www-datawww-datamodule Nokogiri module HTML module SAX class PushParser # The Nokogiri::HTML::SAX::Document on which the PushParser will be # operating attr_accessor :document def initialize(doc = HTML::SAX::Document.new, file_name = nil, encoding = 'UTF-8') @document = doc @encoding = encoding @sax_parser = HTML::SAX::Parser.new(doc, @encoding) ## Create our push parser context initialize_native(@sax_parser, file_name, encoding) end ### # Write a +chunk+ of HTML to the PushParser. Any callback methods # that can be called will be called immediately. def write chunk, last_chunk = false native_write(chunk, last_chunk) end alias :<< :write ### # Finish the parsing. This method is only necessary for # Nokogiri::HTML::SAX::Document#end_document to be called. def finish write '', true end end end end end nokogiri-1.8.2/lib/nokogiri/html/sax/parser.rb0000644000004100000410000000364413235345655021364 0ustar www-datawww-datamodule Nokogiri module HTML ### # Nokogiri lets you write a SAX parser to process HTML but get HTML # correction features. # # See Nokogiri::HTML::SAX::Parser for a basic example of using a # SAX parser with HTML. # # For more information on SAX parsers, see Nokogiri::XML::SAX module SAX ### # This class lets you perform SAX style parsing on HTML with HTML # error correction. # # Here is a basic usage example: # # class MyDoc < Nokogiri::XML::SAX::Document # def start_element name, attributes = [] # puts "found a #{name}" # end # end # # parser = Nokogiri::HTML::SAX::Parser.new(MyDoc.new) # parser.parse(File.read(ARGV[0], mode: 'rb')) # # For more information on SAX parsers, see Nokogiri::XML::SAX class Parser < Nokogiri::XML::SAX::Parser ### # Parse html stored in +data+ using +encoding+ def parse_memory data, encoding = 'UTF-8' raise ArgumentError unless data return unless data.length > 0 ctx = ParserContext.memory(data, encoding) yield ctx if block_given? ctx.parse_with self end ### # Parse given +io+ def parse_io io, encoding = 'UTF-8' check_encoding(encoding) @encoding = encoding ctx = ParserContext.io(io, ENCODINGS[encoding]) yield ctx if block_given? ctx.parse_with self end ### # Parse a file with +filename+ def parse_file filename, encoding = 'UTF-8' raise ArgumentError unless filename raise Errno::ENOENT unless File.exist?(filename) raise Errno::EISDIR if File.directory?(filename) ctx = ParserContext.file(filename, encoding) yield ctx if block_given? ctx.parse_with self end end end end end nokogiri-1.8.2/lib/nokogiri/html/sax/parser_context.rb0000644000004100000410000000074113235345655023123 0ustar www-datawww-datamodule Nokogiri module HTML module SAX ### # Context for HTML SAX parsers. This class is usually not instantiated # by the user. Instead, you should be looking at # Nokogiri::HTML::SAX::Parser class ParserContext < Nokogiri::XML::SAX::ParserContext def self.new thing, encoding = 'UTF-8' [:read, :close].all? { |x| thing.respond_to?(x) } ? super : memory(thing, encoding) end end end end end nokogiri-1.8.2/lib/nokogiri/html/entity_lookup.rb0000644000004100000410000000040313235345655022170 0ustar www-datawww-datamodule Nokogiri module HTML class EntityDescription < Struct.new(:value, :name, :description); end class EntityLookup ### # Look up entity with +name+ def [] name (val = get(name)) && val.value end end end end nokogiri-1.8.2/lib/nokogiri/html/document_fragment.rb0000644000004100000410000000230613235345655022770 0ustar www-datawww-datamodule Nokogiri module HTML class DocumentFragment < Nokogiri::XML::DocumentFragment #### # Create a Nokogiri::XML::DocumentFragment from +tags+, using +encoding+ def self.parse tags, encoding = nil doc = HTML::Document.new encoding ||= tags.respond_to?(:encoding) ? tags.encoding.name : 'UTF-8' doc.encoding = encoding new(doc, tags) end def initialize document, tags = nil, ctx = nil return self unless tags if ctx preexisting_errors = document.errors.dup node_set = ctx.parse("
#{tags}
") node_set.first.children.each { |child| child.parent = self } unless node_set.empty? self.errors = document.errors - preexisting_errors else # This is a horrible hack, but I don't care if tags.strip =~ /^#{tags}", nil, document.encoding temp_doc.xpath(path).each { |child| child.parent = self } self.errors = temp_doc.errors end children end end end end nokogiri-1.8.2/lib/nokogiri/html/builder.rb0000644000004100000410000000201013235345655020705 0ustar www-datawww-datamodule Nokogiri module HTML ### # Nokogiri HTML builder is used for building HTML documents. It is very # similar to the Nokogiri::XML::Builder. In fact, you should go read the # documentation for Nokogiri::XML::Builder before reading this # documentation. # # == Synopsis: # # Create an HTML document with a body that has an onload attribute, and a # span tag with a class of "bold" that has content of "Hello world". # # builder = Nokogiri::HTML::Builder.new do |doc| # doc.html { # doc.body(:onload => 'some_func();') { # doc.span.bold { # doc.text "Hello world" # } # } # } # end # puts builder.to_html # # The HTML builder inherits from the XML builder, so make sure to read the # Nokogiri::XML::Builder documentation. class Builder < Nokogiri::XML::Builder ### # Convert the builder to HTML def to_html @doc.to_html end end end end nokogiri-1.8.2/lib/nokogiri/css/0000755000004100000410000000000013235345655016565 5ustar www-datawww-datanokogiri-1.8.2/lib/nokogiri/css/syntax_error.rb0000644000004100000410000000017713235345655021656 0ustar www-datawww-datarequire 'nokogiri/syntax_error' module Nokogiri module CSS class SyntaxError < ::Nokogiri::SyntaxError end end end nokogiri-1.8.2/lib/nokogiri/css/parser.rb0000644000004100000410000004342213235345655020413 0ustar www-datawww-data# # DO NOT MODIFY!!!! # This file is automatically generated by Racc 1.4.12 # from Racc grammer file "". # require 'racc/parser.rb' require 'nokogiri/css/parser_extras' module Nokogiri module CSS class Parser < Racc::Parser def unescape_css_identifier(identifier) identifier.gsub(/\\(?:([^0-9a-fA-F])|([0-9a-fA-F]{1,6})\s?)/){ |m| $1 || [$2.hex].pack('U') } end ##### State transition tables begin ### racc_action_table = [ 24, 93, 56, 57, 33, 55, 94, 23, 24, 22, 12, 93, 33, 27, 35, 52, 88, 22, -23, 25, 92, 98, 23, 33, 26, 18, 20, 25, 27, 86, 23, 24, 26, 18, 20, 33, 27, 11, 39, 24, 22, 23, 89, 33, 18, 101, 100, 27, 22, 12, 25, 24, 95, 23, 90, 26, 18, 20, 25, 27, 66, 23, 24, 26, 18, 20, 33, 27, 91, 90, 51, 22, 96, 85, 33, 26, 33, -23, 33, 56, 87, 25, 60, 99, 23, 74, 26, 18, 20, 39, 27, 39, 23, 39, 23, 18, 23, 18, 27, 18, 27, 33, 27, 33, 56, 87, 22, 60, 56, 87, 102, 60, 56, 87, 33, 60, 39, 24, 39, 23, 103, 23, 18, 20, 18, 27, 46, 27, 49, 39, 93, 44, 23, 105, 33, 18, 51, 45, 27, 33, -23, 26, 108, 56, 58, 109, 60, nil, nil, 39, nil, nil, 23, nil, 39, 18, nil, 23, 27, nil, 18, 20, nil, 27, 82, 83, nil, nil, nil, 82, 83, nil, nil, nil, nil, 78, 79, 80, nil, 81, 78, 79, 80, 77, 81, 4, 5, 10, 77, 4, 5, 43, nil, nil, nil, 6, nil, 8, 7, 6, nil, 8, 7, 4, 5, 10, nil, nil, nil, nil, nil, nil, nil, 6, nil, 8, 7 ] racc_action_check = [ 42, 58, 24, 24, 42, 24, 57, 15, 43, 42, 64, 57, 43, 15, 11, 24, 53, 43, 58, 42, 56, 64, 42, 14, 42, 42, 42, 43, 42, 50, 43, 3, 43, 43, 43, 3, 43, 1, 14, 9, 3, 14, 54, 9, 14, 76, 76, 14, 9, 1, 3, 27, 59, 3, 60, 3, 3, 3, 9, 3, 27, 9, 12, 9, 9, 9, 12, 9, 55, 55, 27, 12, 61, 49, 28, 27, 62, 46, 30, 92, 92, 12, 92, 75, 12, 45, 12, 12, 12, 28, 12, 62, 28, 30, 62, 28, 30, 62, 28, 30, 62, 39, 30, 32, 90, 90, 39, 90, 51, 51, 84, 51, 93, 93, 31, 93, 39, 23, 32, 39, 86, 32, 39, 39, 32, 39, 23, 32, 23, 31, 87, 18, 31, 91, 29, 31, 23, 21, 31, 25, 22, 23, 94, 25, 25, 105, 25, nil, nil, 29, nil, nil, 29, nil, 25, 29, nil, 25, 29, nil, 25, 25, nil, 25, 48, 48, nil, nil, nil, 47, 47, nil, nil, nil, nil, 48, 48, 48, nil, 48, 47, 47, 47, 48, 47, 0, 0, 0, 47, 17, 17, 17, nil, nil, nil, 0, nil, 0, 0, 17, nil, 17, 17, 26, 26, 26, nil, nil, nil, nil, nil, nil, nil, 26, nil, 26, 26 ] racc_action_pointer = [ 178, 37, nil, 29, nil, nil, nil, nil, nil, 37, nil, 14, 60, nil, 17, -17, nil, 182, 120, nil, nil, 108, 111, 115, -8, 133, 196, 49, 68, 128, 72, 108, 97, nil, nil, nil, nil, nil, nil, 95, nil, nil, -2, 6, nil, 74, 48, 166, 161, 48, 0, 98, nil, -7, 19, 57, 8, -1, -11, 29, 42, 49, 70, nil, -2, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, 58, 35, nil, nil, nil, nil, nil, nil, nil, 85, nil, 109, 118, nil, nil, 94, 126, 69, 102, 129, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, 132, nil, nil, nil, nil ] racc_action_default = [ -74, -75, -2, -24, -4, -5, -6, -7, -8, -24, -73, -75, -24, -3, -47, -10, -13, -17, -75, -19, -20, -75, -22, -24, -75, -24, -74, -75, -53, -54, -55, -56, -57, -58, -14, 110, -1, -9, -46, -24, -11, -12, -24, -24, -18, -75, -29, -61, -61, -75, -75, -75, -30, -75, -75, -38, -39, -40, -22, -75, -38, -75, -70, -72, -75, -44, -45, -48, -49, -50, -51, -52, -15, -16, -21, -75, -75, -62, -63, -64, -65, -66, -67, -68, -75, -27, -75, -40, -31, -32, -75, -43, -75, -75, -75, -33, -69, -71, -34, -25, -59, -60, -26, -28, -35, -75, -36, -37, -42, -41 ] racc_goto_table = [ 53, 38, 13, 1, 41, 48, 62, 40, 34, 65, 50, 36, 63, 75, 84, 67, 68, 69, 70, 71, 62, 47, 37, 42, 54, nil, 63, nil, nil, 64, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, 72, 73, nil, nil, nil, nil, nil, nil, 97, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, 104, nil, 106, 107 ] racc_goto_check = [ 18, 12, 2, 1, 11, 9, 7, 10, 2, 9, 15, 2, 12, 17, 17, 12, 12, 12, 12, 12, 7, 16, 8, 5, 19, nil, 12, nil, nil, 1, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, 2, 2, nil, nil, nil, nil, nil, nil, 12, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, 18, nil, 18, 18 ] racc_goto_pointer = [ nil, 3, -1, nil, nil, 6, nil, -19, 8, -18, -8, -11, -13, nil, nil, -13, -2, -34, -24, 0, nil, nil, nil, nil ] racc_goto_default = [ nil, nil, nil, 2, 3, 9, 17, 14, nil, 15, 31, 30, 16, 29, 19, 21, nil, nil, 59, nil, 28, 32, 76, 61 ] racc_reduce_table = [ 0, 0, :racc_error, 3, 32, :_reduce_1, 1, 32, :_reduce_2, 2, 32, :_reduce_3, 1, 36, :_reduce_4, 1, 36, :_reduce_5, 1, 36, :_reduce_6, 1, 36, :_reduce_7, 1, 36, :_reduce_8, 2, 37, :_reduce_9, 1, 37, :_reduce_none, 2, 37, :_reduce_11, 2, 37, :_reduce_12, 1, 37, :_reduce_13, 2, 34, :_reduce_14, 3, 33, :_reduce_15, 3, 33, :_reduce_16, 1, 33, :_reduce_none, 2, 44, :_reduce_18, 1, 38, :_reduce_none, 1, 38, :_reduce_20, 3, 45, :_reduce_21, 1, 45, :_reduce_22, 1, 46, :_reduce_23, 0, 46, :_reduce_none, 4, 42, :_reduce_25, 4, 42, :_reduce_26, 3, 42, :_reduce_27, 3, 47, :_reduce_28, 1, 47, :_reduce_29, 2, 40, :_reduce_30, 3, 40, :_reduce_31, 3, 40, :_reduce_32, 3, 40, :_reduce_33, 3, 40, :_reduce_34, 3, 49, :_reduce_35, 3, 49, :_reduce_36, 3, 49, :_reduce_37, 1, 49, :_reduce_none, 1, 49, :_reduce_none, 1, 49, :_reduce_40, 4, 50, :_reduce_41, 3, 50, :_reduce_42, 2, 50, :_reduce_43, 2, 41, :_reduce_44, 2, 41, :_reduce_45, 1, 39, :_reduce_none, 0, 39, :_reduce_none, 2, 43, :_reduce_48, 2, 43, :_reduce_49, 2, 43, :_reduce_50, 2, 43, :_reduce_51, 2, 43, :_reduce_52, 1, 43, :_reduce_none, 1, 43, :_reduce_none, 1, 43, :_reduce_none, 1, 43, :_reduce_none, 1, 43, :_reduce_none, 1, 51, :_reduce_58, 2, 48, :_reduce_59, 2, 48, :_reduce_60, 0, 48, :_reduce_none, 1, 53, :_reduce_62, 1, 53, :_reduce_63, 1, 53, :_reduce_64, 1, 53, :_reduce_65, 1, 53, :_reduce_66, 1, 53, :_reduce_67, 1, 53, :_reduce_68, 3, 52, :_reduce_69, 1, 54, :_reduce_none, 2, 54, :_reduce_none, 1, 54, :_reduce_none, 1, 35, :_reduce_none, 0, 35, :_reduce_none ] racc_reduce_n = 75 racc_shift_n = 110 racc_token_table = { false => 0, :error => 1, :FUNCTION => 2, :INCLUDES => 3, :DASHMATCH => 4, :LBRACE => 5, :HASH => 6, :PLUS => 7, :GREATER => 8, :S => 9, :STRING => 10, :IDENT => 11, :COMMA => 12, :NUMBER => 13, :PREFIXMATCH => 14, :SUFFIXMATCH => 15, :SUBSTRINGMATCH => 16, :TILDE => 17, :NOT_EQUAL => 18, :SLASH => 19, :DOUBLESLASH => 20, :NOT => 21, :EQUAL => 22, :RPAREN => 23, :LSQUARE => 24, :RSQUARE => 25, :HAS => 26, "." => 27, "*" => 28, "|" => 29, ":" => 30 } racc_nt_base = 31 racc_use_result_var = true Racc_arg = [ racc_action_table, racc_action_check, racc_action_default, racc_action_pointer, racc_goto_table, racc_goto_check, racc_goto_default, racc_goto_pointer, racc_nt_base, racc_reduce_table, racc_token_table, racc_shift_n, racc_reduce_n, racc_use_result_var ] Racc_token_to_s_table = [ "$end", "error", "FUNCTION", "INCLUDES", "DASHMATCH", "LBRACE", "HASH", "PLUS", "GREATER", "S", "STRING", "IDENT", "COMMA", "NUMBER", "PREFIXMATCH", "SUFFIXMATCH", "SUBSTRINGMATCH", "TILDE", "NOT_EQUAL", "SLASH", "DOUBLESLASH", "NOT", "EQUAL", "RPAREN", "LSQUARE", "RSQUARE", "HAS", "\".\"", "\"*\"", "\"|\"", "\":\"", "$start", "selector", "simple_selector_1toN", "prefixless_combinator_selector", "optional_S", "combinator", "simple_selector", "element_name", "hcap_0toN", "function", "pseudo", "attrib", "hcap_1toN", "class", "namespaced_ident", "namespace", "attrib_name", "attrib_val_0or1", "expr", "nth", "attribute_id", "negation", "eql_incl_dash", "negation_arg" ] Racc_debug_parser = false ##### State transition tables end ##### # reduce 0 omitted def _reduce_1(val, _values, result) result = [val.first, val.last].flatten result end def _reduce_2(val, _values, result) result = val.flatten result end def _reduce_3(val, _values, result) result = [val.last].flatten result end def _reduce_4(val, _values, result) result = :DIRECT_ADJACENT_SELECTOR result end def _reduce_5(val, _values, result) result = :CHILD_SELECTOR result end def _reduce_6(val, _values, result) result = :FOLLOWING_SELECTOR result end def _reduce_7(val, _values, result) result = :DESCENDANT_SELECTOR result end def _reduce_8(val, _values, result) result = :CHILD_SELECTOR result end def _reduce_9(val, _values, result) result = if val[1].nil? val.first else Node.new(:CONDITIONAL_SELECTOR, [val.first, val[1]]) end result end # reduce 10 omitted def _reduce_11(val, _values, result) result = Node.new(:CONDITIONAL_SELECTOR, val) result end def _reduce_12(val, _values, result) result = Node.new(:CONDITIONAL_SELECTOR, val) result end def _reduce_13(val, _values, result) result = Node.new(:CONDITIONAL_SELECTOR, [Node.new(:ELEMENT_NAME, ['*']), val.first] ) result end def _reduce_14(val, _values, result) result = Node.new(val.first, [nil, val.last]) result end def _reduce_15(val, _values, result) result = Node.new(val[1], [val.first, val.last]) result end def _reduce_16(val, _values, result) result = Node.new(:DESCENDANT_SELECTOR, [val.first, val.last]) result end # reduce 17 omitted def _reduce_18(val, _values, result) result = Node.new(:CLASS_CONDITION, [unescape_css_identifier(val[1])]) result end # reduce 19 omitted def _reduce_20(val, _values, result) result = Node.new(:ELEMENT_NAME, val) result end def _reduce_21(val, _values, result) result = Node.new(:ELEMENT_NAME, [[val.first, val.last].compact.join(':')] ) result end def _reduce_22(val, _values, result) name = @namespaces.key?('xmlns') ? "xmlns:#{val.first}" : val.first result = Node.new(:ELEMENT_NAME, [name]) result end def _reduce_23(val, _values, result) result = val[0] result end # reduce 24 omitted def _reduce_25(val, _values, result) result = Node.new(:ATTRIBUTE_CONDITION, [val[1]] + (val[2] || []) ) result end def _reduce_26(val, _values, result) result = Node.new(:ATTRIBUTE_CONDITION, [val[1]] + (val[2] || []) ) result end def _reduce_27(val, _values, result) # Non standard, but hpricot supports it. result = Node.new(:PSEUDO_CLASS, [Node.new(:FUNCTION, ['nth-child(', val[1]])] ) result end def _reduce_28(val, _values, result) result = Node.new(:ELEMENT_NAME, [[val.first, val.last].compact.join(':')] ) result end def _reduce_29(val, _values, result) # Default namespace is not applied to attributes. # So we don't add prefix "xmlns:" as in namespaced_ident. result = Node.new(:ELEMENT_NAME, [val.first]) result end def _reduce_30(val, _values, result) result = Node.new(:FUNCTION, [val.first.strip]) result end def _reduce_31(val, _values, result) result = Node.new(:FUNCTION, [val.first.strip, val[1]].flatten) result end def _reduce_32(val, _values, result) result = Node.new(:FUNCTION, [val.first.strip, val[1]].flatten) result end def _reduce_33(val, _values, result) result = Node.new(:FUNCTION, [val.first.strip, val[1]].flatten) result end def _reduce_34(val, _values, result) result = Node.new(:FUNCTION, [val.first.strip, val[1]].flatten) result end def _reduce_35(val, _values, result) result = [val.first, val.last] result end def _reduce_36(val, _values, result) result = [val.first, val.last] result end def _reduce_37(val, _values, result) result = [val.first, val.last] result end # reduce 38 omitted # reduce 39 omitted def _reduce_40(val, _values, result) case val[0] when 'even' result = Node.new(:NTH, ['2','n','+','0']) when 'odd' result = Node.new(:NTH, ['2','n','+','1']) when 'n' result = Node.new(:NTH, ['1','n','+','0']) else # This is not CSS standard. It allows us to support this: # assert_xpath("//a[foo(., @href)]", @parser.parse('a:foo(@href)')) # assert_xpath("//a[foo(., @a, b)]", @parser.parse('a:foo(@a, b)')) # assert_xpath("//a[foo(., a, 10)]", @parser.parse('a:foo(a, 10)')) result = val end result end def _reduce_41(val, _values, result) if val[1] == 'n' result = Node.new(:NTH, val) else raise Racc::ParseError, "parse error on IDENT '#{val[1]}'" end result end def _reduce_42(val, _values, result) # n+3, -n+3 if val[0] == 'n' val.unshift("1") result = Node.new(:NTH, val) elsif val[0] == '-n' val[0] = 'n' val.unshift("-1") result = Node.new(:NTH, val) else raise Racc::ParseError, "parse error on IDENT '#{val[1]}'" end result end def _reduce_43(val, _values, result) # 5n, -5n, 10n-1 n = val[1] if n[0, 2] == 'n-' val[1] = 'n' val << "-" # b is contained in n as n is the string "n-b" val << n[2, n.size] result = Node.new(:NTH, val) elsif n == 'n' val << "+" val << "0" result = Node.new(:NTH, val) else raise Racc::ParseError, "parse error on IDENT '#{val[1]}'" end result end def _reduce_44(val, _values, result) result = Node.new(:PSEUDO_CLASS, [val[1]]) result end def _reduce_45(val, _values, result) result = Node.new(:PSEUDO_CLASS, [val[1]]) result end # reduce 46 omitted # reduce 47 omitted def _reduce_48(val, _values, result) result = Node.new(:COMBINATOR, val) result end def _reduce_49(val, _values, result) result = Node.new(:COMBINATOR, val) result end def _reduce_50(val, _values, result) result = Node.new(:COMBINATOR, val) result end def _reduce_51(val, _values, result) result = Node.new(:COMBINATOR, val) result end def _reduce_52(val, _values, result) result = Node.new(:COMBINATOR, val) result end # reduce 53 omitted # reduce 54 omitted # reduce 55 omitted # reduce 56 omitted # reduce 57 omitted def _reduce_58(val, _values, result) result = Node.new(:ID, [unescape_css_identifier(val.first)]) result end def _reduce_59(val, _values, result) result = [val.first, val[1]] result end def _reduce_60(val, _values, result) result = [val.first, val[1]] result end # reduce 61 omitted def _reduce_62(val, _values, result) result = :equal result end def _reduce_63(val, _values, result) result = :prefix_match result end def _reduce_64(val, _values, result) result = :suffix_match result end def _reduce_65(val, _values, result) result = :substring_match result end def _reduce_66(val, _values, result) result = :not_equal result end def _reduce_67(val, _values, result) result = :includes result end def _reduce_68(val, _values, result) result = :dash_match result end def _reduce_69(val, _values, result) result = Node.new(:NOT, [val[1]]) result end # reduce 70 omitted # reduce 71 omitted # reduce 72 omitted # reduce 73 omitted # reduce 74 omitted def _reduce_none(val, _values, result) val[0] end end # class Parser end # module CSS end # module Nokogiri nokogiri-1.8.2/lib/nokogiri/css/parser.y0000644000004100000410000001632513235345655020262 0ustar www-datawww-dataclass Nokogiri::CSS::Parser token FUNCTION INCLUDES DASHMATCH LBRACE HASH PLUS GREATER S STRING IDENT token COMMA NUMBER PREFIXMATCH SUFFIXMATCH SUBSTRINGMATCH TILDE NOT_EQUAL token SLASH DOUBLESLASH NOT EQUAL RPAREN LSQUARE RSQUARE HAS rule selector : selector COMMA simple_selector_1toN { result = [val.first, val.last].flatten } | prefixless_combinator_selector { result = val.flatten } | optional_S simple_selector_1toN { result = [val.last].flatten } ; combinator : PLUS { result = :DIRECT_ADJACENT_SELECTOR } | GREATER { result = :CHILD_SELECTOR } | TILDE { result = :FOLLOWING_SELECTOR } | DOUBLESLASH { result = :DESCENDANT_SELECTOR } | SLASH { result = :CHILD_SELECTOR } ; simple_selector : element_name hcap_0toN { result = if val[1].nil? val.first else Node.new(:CONDITIONAL_SELECTOR, [val.first, val[1]]) end } | function | function pseudo { result = Node.new(:CONDITIONAL_SELECTOR, val) } | function attrib { result = Node.new(:CONDITIONAL_SELECTOR, val) } | hcap_1toN { result = Node.new(:CONDITIONAL_SELECTOR, [Node.new(:ELEMENT_NAME, ['*']), val.first] ) } ; prefixless_combinator_selector : combinator simple_selector_1toN { result = Node.new(val.first, [nil, val.last]) } ; simple_selector_1toN : simple_selector combinator simple_selector_1toN { result = Node.new(val[1], [val.first, val.last]) } | simple_selector S simple_selector_1toN { result = Node.new(:DESCENDANT_SELECTOR, [val.first, val.last]) } | simple_selector ; class : '.' IDENT { result = Node.new(:CLASS_CONDITION, [unescape_css_identifier(val[1])]) } ; element_name : namespaced_ident | '*' { result = Node.new(:ELEMENT_NAME, val) } ; namespaced_ident : namespace '|' IDENT { result = Node.new(:ELEMENT_NAME, [[val.first, val.last].compact.join(':')] ) } | IDENT { name = @namespaces.key?('xmlns') ? "xmlns:#{val.first}" : val.first result = Node.new(:ELEMENT_NAME, [name]) } ; namespace : IDENT { result = val[0] } | ; attrib : LSQUARE attrib_name attrib_val_0or1 RSQUARE { result = Node.new(:ATTRIBUTE_CONDITION, [val[1]] + (val[2] || []) ) } | LSQUARE function attrib_val_0or1 RSQUARE { result = Node.new(:ATTRIBUTE_CONDITION, [val[1]] + (val[2] || []) ) } | LSQUARE NUMBER RSQUARE { # Non standard, but hpricot supports it. result = Node.new(:PSEUDO_CLASS, [Node.new(:FUNCTION, ['nth-child(', val[1]])] ) } ; attrib_name : namespace '|' IDENT { result = Node.new(:ELEMENT_NAME, [[val.first, val.last].compact.join(':')] ) } | IDENT { # Default namespace is not applied to attributes. # So we don't add prefix "xmlns:" as in namespaced_ident. result = Node.new(:ELEMENT_NAME, [val.first]) } ; function : FUNCTION RPAREN { result = Node.new(:FUNCTION, [val.first.strip]) } | FUNCTION expr RPAREN { result = Node.new(:FUNCTION, [val.first.strip, val[1]].flatten) } | FUNCTION nth RPAREN { result = Node.new(:FUNCTION, [val.first.strip, val[1]].flatten) } | NOT expr RPAREN { result = Node.new(:FUNCTION, [val.first.strip, val[1]].flatten) } | HAS selector RPAREN { result = Node.new(:FUNCTION, [val.first.strip, val[1]].flatten) } ; expr : NUMBER COMMA expr { result = [val.first, val.last] } | STRING COMMA expr { result = [val.first, val.last] } | IDENT COMMA expr { result = [val.first, val.last] } | NUMBER | STRING | IDENT # even, odd { case val[0] when 'even' result = Node.new(:NTH, ['2','n','+','0']) when 'odd' result = Node.new(:NTH, ['2','n','+','1']) when 'n' result = Node.new(:NTH, ['1','n','+','0']) else # This is not CSS standard. It allows us to support this: # assert_xpath("//a[foo(., @href)]", @parser.parse('a:foo(@href)')) # assert_xpath("//a[foo(., @a, b)]", @parser.parse('a:foo(@a, b)')) # assert_xpath("//a[foo(., a, 10)]", @parser.parse('a:foo(a, 10)')) result = val end } ; nth : NUMBER IDENT PLUS NUMBER # 5n+3 -5n+3 { if val[1] == 'n' result = Node.new(:NTH, val) else raise Racc::ParseError, "parse error on IDENT '#{val[1]}'" end } | IDENT PLUS NUMBER { # n+3, -n+3 if val[0] == 'n' val.unshift("1") result = Node.new(:NTH, val) elsif val[0] == '-n' val[0] = 'n' val.unshift("-1") result = Node.new(:NTH, val) else raise Racc::ParseError, "parse error on IDENT '#{val[1]}'" end } | NUMBER IDENT { # 5n, -5n, 10n-1 n = val[1] if n[0, 2] == 'n-' val[1] = 'n' val << "-" # b is contained in n as n is the string "n-b" val << n[2, n.size] result = Node.new(:NTH, val) elsif n == 'n' val << "+" val << "0" result = Node.new(:NTH, val) else raise Racc::ParseError, "parse error on IDENT '#{val[1]}'" end } ; pseudo : ':' function { result = Node.new(:PSEUDO_CLASS, [val[1]]) } | ':' IDENT { result = Node.new(:PSEUDO_CLASS, [val[1]]) } ; hcap_0toN : hcap_1toN | ; hcap_1toN : attribute_id hcap_1toN { result = Node.new(:COMBINATOR, val) } | class hcap_1toN { result = Node.new(:COMBINATOR, val) } | attrib hcap_1toN { result = Node.new(:COMBINATOR, val) } | pseudo hcap_1toN { result = Node.new(:COMBINATOR, val) } | negation hcap_1toN { result = Node.new(:COMBINATOR, val) } | attribute_id | class | attrib | pseudo | negation ; attribute_id : HASH { result = Node.new(:ID, [unescape_css_identifier(val.first)]) } ; attrib_val_0or1 : eql_incl_dash IDENT { result = [val.first, val[1]] } | eql_incl_dash STRING { result = [val.first, val[1]] } | ; eql_incl_dash : EQUAL { result = :equal } | PREFIXMATCH { result = :prefix_match } | SUFFIXMATCH { result = :suffix_match } | SUBSTRINGMATCH { result = :substring_match } | NOT_EQUAL { result = :not_equal } | INCLUDES { result = :includes } | DASHMATCH { result = :dash_match } ; negation : NOT negation_arg RPAREN { result = Node.new(:NOT, [val[1]]) } ; negation_arg : element_name | element_name hcap_1toN | hcap_1toN ; optional_S : S | ; end ---- header require 'nokogiri/css/parser_extras' ---- inner def unescape_css_identifier(identifier) identifier.gsub(/\\(?:([^0-9a-fA-F])|([0-9a-fA-F]{1,6})\s?)/){ |m| $1 || [$2.hex].pack('U') } end nokogiri-1.8.2/lib/nokogiri/css/parser_extras.rb0000644000004100000410000000456613235345655022007 0ustar www-datawww-datarequire 'thread' module Nokogiri module CSS class Parser < Racc::Parser @cache_on = true @cache = {} @mutex = Mutex.new class << self # Turn on CSS parse caching attr_accessor :cache_on alias :cache_on? :cache_on alias :set_cache :cache_on= # Get the css selector in +string+ from the cache def [] string return unless @cache_on @mutex.synchronize { @cache[string] } end # Set the css selector in +string+ in the cache to +value+ def []= string, value return value unless @cache_on @mutex.synchronize { @cache[string] = value } end # Clear the cache def clear_cache @mutex.synchronize { @cache = {} } end # Execute +block+ without cache def without_cache &block tmp = @cache_on @cache_on = false block.call @cache_on = tmp end ### # Parse this CSS selector in +selector+. Returns an AST. def parse selector @warned ||= false unless @warned $stderr.puts('Nokogiri::CSS::Parser.parse is deprecated, call Nokogiri::CSS.parse(), this will be removed August 1st or version 1.4.0 (whichever is first)') @warned = true end new.parse selector end end # Create a new CSS parser with respect to +namespaces+ def initialize namespaces = {} @tokenizer = Tokenizer.new @namespaces = namespaces super() end def parse string @tokenizer.scan_setup string do_parse end def next_token @tokenizer.next_token end # Get the xpath for +string+ using +options+ def xpath_for string, options={} key = "#{string}#{options[:ns]}#{options[:prefix]}" v = self.class[key] return v if v args = [ options[:prefix] || '//', options[:visitor] || XPathVisitor.new ] self.class[key] = parse(string).map { |ast| ast.to_xpath(*args) } end # On CSS parser error, raise an exception def on_error error_token_id, error_value, value_stack after = value_stack.compact.last raise SyntaxError.new("unexpected '#{error_value}' after '#{after}'") end end end end nokogiri-1.8.2/lib/nokogiri/css/tokenizer.rb0000644000004100000410000000760713235345655021136 0ustar www-datawww-data#-- # DO NOT MODIFY!!!! # This file is automatically generated by rex 1.0.5 # from lexical definition file "lib/nokogiri/css/tokenizer.rex". #++ module Nokogiri module CSS class Tokenizer # :nodoc: require 'strscan' class ScanError < StandardError ; end attr_reader :lineno attr_reader :filename attr_accessor :state def scan_setup(str) @ss = StringScanner.new(str) @lineno = 1 @state = nil end def action yield end def scan_str(str) scan_setup(str) do_parse end alias :scan :scan_str def load_file( filename ) @filename = filename open(filename, "r") do |f| scan_setup(f.read) end end def scan_file( filename ) load_file(filename) do_parse end def next_token return if @ss.eos? # skips empty actions until token = _next_token or @ss.eos?; end token end def _next_token text = @ss.peek(1) @lineno += 1 if text == "\n" token = case @state when nil case when (text = @ss.scan(/has\([\s]*/)) action { [:HAS, text] } when (text = @ss.scan(/[-@]?([_A-Za-z]|[^\0-\177]|\\[0-9A-Fa-f]{1,6}(\r\n|[\s])?|\\[^\n\r\f0-9A-Fa-f])([_A-Za-z0-9-]|[^\0-\177]|\\[0-9A-Fa-f]{1,6}(\r\n|[\s])?|\\[^\n\r\f0-9A-Fa-f])*\([\s]*/)) action { [:FUNCTION, text] } when (text = @ss.scan(/[-@]?([_A-Za-z]|[^\0-\177]|\\[0-9A-Fa-f]{1,6}(\r\n|[\s])?|\\[^\n\r\f0-9A-Fa-f])([_A-Za-z0-9-]|[^\0-\177]|\\[0-9A-Fa-f]{1,6}(\r\n|[\s])?|\\[^\n\r\f0-9A-Fa-f])*/)) action { [:IDENT, text] } when (text = @ss.scan(/\#([_A-Za-z0-9-]|[^\0-\177]|\\[0-9A-Fa-f]{1,6}(\r\n|[\s])?|\\[^\n\r\f0-9A-Fa-f])+/)) action { [:HASH, text] } when (text = @ss.scan(/[\s]*~=[\s]*/)) action { [:INCLUDES, text] } when (text = @ss.scan(/[\s]*\|=[\s]*/)) action { [:DASHMATCH, text] } when (text = @ss.scan(/[\s]*\^=[\s]*/)) action { [:PREFIXMATCH, text] } when (text = @ss.scan(/[\s]*\$=[\s]*/)) action { [:SUFFIXMATCH, text] } when (text = @ss.scan(/[\s]*\*=[\s]*/)) action { [:SUBSTRINGMATCH, text] } when (text = @ss.scan(/[\s]*!=[\s]*/)) action { [:NOT_EQUAL, text] } when (text = @ss.scan(/[\s]*=[\s]*/)) action { [:EQUAL, text] } when (text = @ss.scan(/[\s]*\)/)) action { [:RPAREN, text] } when (text = @ss.scan(/\[[\s]*/)) action { [:LSQUARE, text] } when (text = @ss.scan(/[\s]*\]/)) action { [:RSQUARE, text] } when (text = @ss.scan(/[\s]*\+[\s]*/)) action { [:PLUS, text] } when (text = @ss.scan(/[\s]*>[\s]*/)) action { [:GREATER, text] } when (text = @ss.scan(/[\s]*,[\s]*/)) action { [:COMMA, text] } when (text = @ss.scan(/[\s]*~[\s]*/)) action { [:TILDE, text] } when (text = @ss.scan(/\:not\([\s]*/)) action { [:NOT, text] } when (text = @ss.scan(/-?([0-9]+|[0-9]*\.[0-9]+)/)) action { [:NUMBER, text] } when (text = @ss.scan(/[\s]*\/\/[\s]*/)) action { [:DOUBLESLASH, text] } when (text = @ss.scan(/[\s]*\/[\s]*/)) action { [:SLASH, text] } when (text = @ss.scan(/U\+[0-9a-f?]{1,6}(-[0-9a-f]{1,6})?/)) action {[:UNICODE_RANGE, text] } when (text = @ss.scan(/[\s]+/)) action { [:S, text] } when (text = @ss.scan(/"([^\n\r\f"]|\n|\r\n|\r|\f|[^\0-\177]|\\[0-9A-Fa-f]{1,6}(\r\n|[\s])?|\\[^\n\r\f0-9A-Fa-f])*"|'([^\n\r\f']|\n|\r\n|\r|\f|[^\0-\177]|\\[0-9A-Fa-f]{1,6}(\r\n|[\s])?|\\[^\n\r\f0-9A-Fa-f])*'/)) action { [:STRING, text] } when (text = @ss.scan(/./)) action { [text, text] } else text = @ss.string[@ss.pos .. -1] raise ScanError, "can not match: '" + text + "'" end # if else raise ScanError, "undefined state: '" + state.to_s + "'" end # case state token end # def _next_token end # class end end nokogiri-1.8.2/lib/nokogiri/css/tokenizer.rex0000644000004100000410000000361313235345655021322 0ustar www-datawww-datamodule Nokogiri module CSS class Tokenizer # :nodoc: macro nl \n|\r\n|\r|\f w [\s]* nonascii [^\0-\177] num -?([0-9]+|[0-9]*\.[0-9]+) unicode \\[0-9A-Fa-f]{1,6}(\r\n|[\s])? escape {unicode}|\\[^\n\r\f0-9A-Fa-f] nmchar [_A-Za-z0-9-]|{nonascii}|{escape} nmstart [_A-Za-z]|{nonascii}|{escape} ident [-@]?({nmstart})({nmchar})* name ({nmchar})+ string1 "([^\n\r\f"]|{nl}|{nonascii}|{escape})*" string2 '([^\n\r\f']|{nl}|{nonascii}|{escape})*' string {string1}|{string2} rule # [:state] pattern [actions] has\({w} { [:HAS, text] } {ident}\({w} { [:FUNCTION, text] } {ident} { [:IDENT, text] } \#{name} { [:HASH, text] } {w}~={w} { [:INCLUDES, text] } {w}\|={w} { [:DASHMATCH, text] } {w}\^={w} { [:PREFIXMATCH, text] } {w}\$={w} { [:SUFFIXMATCH, text] } {w}\*={w} { [:SUBSTRINGMATCH, text] } {w}!={w} { [:NOT_EQUAL, text] } {w}={w} { [:EQUAL, text] } {w}\) { [:RPAREN, text] } \[{w} { [:LSQUARE, text] } {w}\] { [:RSQUARE, text] } {w}\+{w} { [:PLUS, text] } {w}>{w} { [:GREATER, text] } {w},{w} { [:COMMA, text] } {w}~{w} { [:TILDE, text] } \:not\({w} { [:NOT, text] } {num} { [:NUMBER, text] } {w}\/\/{w} { [:DOUBLESLASH, text] } {w}\/{w} { [:SLASH, text] } U\+[0-9a-f?]{1,6}(-[0-9a-f]{1,6})? {[:UNICODE_RANGE, text] } [\s]+ { [:S, text] } {string} { [:STRING, text] } . { [text, text] } end end end nokogiri-1.8.2/lib/nokogiri/css/xpath_visitor.rb0000644000004100000410000001637513235345655022031 0ustar www-datawww-datamodule Nokogiri module CSS class XPathVisitor # :nodoc: def visit_function node msg = :"visit_function_#{node.value.first.gsub(/[(]/, '')}" return self.send(msg, node) if self.respond_to?(msg) case node.value.first when /^text\(/ 'child::text()' when /^self\(/ "self::#{node.value[1]}" when /^eq\(/ "position() = #{node.value[1]}" when /^(nth|nth-of-type)\(/ if node.value[1].is_a?(Nokogiri::CSS::Node) and node.value[1].type == :NTH nth(node.value[1]) else "position() = #{node.value[1]}" end when /^nth-child\(/ if node.value[1].is_a?(Nokogiri::CSS::Node) and node.value[1].type == :NTH nth(node.value[1], :child => true) else "count(preceding-sibling::*) = #{node.value[1].to_i-1}" end when /^nth-last-of-type\(/ if node.value[1].is_a?(Nokogiri::CSS::Node) and node.value[1].type == :NTH nth(node.value[1], :last => true) else index = node.value[1].to_i - 1 index == 0 ? "position() = last()" : "position() = last() - #{index}" end when /^nth-last-child\(/ if node.value[1].is_a?(Nokogiri::CSS::Node) and node.value[1].type == :NTH nth(node.value[1], :last => true, :child => true) else "count(following-sibling::*) = #{node.value[1].to_i-1}" end when /^(first|first-of-type)\(/ "position() = 1" when /^(last|last-of-type)\(/ "position() = last()" when /^contains\(/ "contains(., #{node.value[1]})" when /^gt\(/ "position() > #{node.value[1]}" when /^only-child\(/ "last() = 1" when /^comment\(/ "comment()" when /^has\(/ node.value[1].accept(self) else args = ['.'] + node.value[1..-1] "#{node.value.first}#{args.join(', ')})" end end def visit_not node child = node.value.first if :ELEMENT_NAME == child.type "not(self::#{child.accept(self)})" else "not(#{child.accept(self)})" end end def visit_id node node.value.first =~ /^#(.*)$/ "@id = '#{$1}'" end def visit_attribute_condition node attribute = if (node.value.first.type == :FUNCTION) or (node.value.first.value.first =~ /::/) '' else '@' end attribute += node.value.first.accept(self) # Support non-standard css attribute.gsub!(/^@@/, '@') return attribute unless node.value.length == 3 value = node.value.last value = "'#{value}'" if value !~ /^['"]/ case node.value[1] when :equal attribute + " = " + "#{value}" when :not_equal attribute + " != " + "#{value}" when :substring_match "contains(#{attribute}, #{value})" when :prefix_match "starts-with(#{attribute}, #{value})" when :dash_match "#{attribute} = #{value} or starts-with(#{attribute}, concat(#{value}, '-'))" when :includes "contains(concat(\" \", #{attribute}, \" \"),concat(\" \", #{value}, \" \"))" when :suffix_match "substring(#{attribute}, string-length(#{attribute}) - " + "string-length(#{value}) + 1, string-length(#{value})) = #{value}" else attribute + " #{node.value[1]} " + "#{value}" end end def visit_pseudo_class node if node.value.first.is_a?(Nokogiri::CSS::Node) and node.value.first.type == :FUNCTION node.value.first.accept(self) else msg = :"visit_pseudo_class_#{node.value.first.gsub(/[(]/, '')}" return self.send(msg, node) if self.respond_to?(msg) case node.value.first when "first" then "position() = 1" when "first-child" then "count(preceding-sibling::*) = 0" when "last" then "position() = last()" when "last-child" then "count(following-sibling::*) = 0" when "first-of-type" then "position() = 1" when "last-of-type" then "position() = last()" when "only-child" then "count(preceding-sibling::*) = 0 and count(following-sibling::*) = 0" when "only-of-type" then "last() = 1" when "empty" then "not(node())" when "parent" then "node()" when "root" then "not(parent::*)" else node.value.first + "(.)" end end end def visit_class_condition node "contains(concat(' ', normalize-space(@class), ' '), ' #{node.value.first} ')" end def visit_combinator node if is_of_type_pseudo_class?(node.value.last) "#{node.value.first.accept(self) if node.value.first}][#{node.value.last.accept(self)}" else "#{node.value.first.accept(self) if node.value.first} and #{node.value.last.accept(self)}" end end { 'direct_adjacent_selector' => "/following-sibling::*[1]/self::", 'following_selector' => "/following-sibling::", 'descendant_selector' => '//', 'child_selector' => '/', }.each do |k,v| class_eval %{ def visit_#{k} node "\#{node.value.first.accept(self) if node.value.first}#{v}\#{node.value.last.accept(self)}" end } end def visit_conditional_selector node node.value.first.accept(self) + '[' + node.value.last.accept(self) + ']' end def visit_element_name node node.value.first end def accept node node.accept(self) end private def nth node, options={} raise ArgumentError, "expected an+b node to contain 4 tokens, but is #{node.value.inspect}" unless node.value.size == 4 a, b = read_a_and_positive_b node.value position = if options[:child] options[:last] ? "(count(following-sibling::*) + 1)" : "(count(preceding-sibling::*) + 1)" else options[:last] ? "(last()-position()+1)" : "position()" end if b.zero? "(#{position} mod #{a}) = 0" else compare = a < 0 ? "<=" : ">=" if a.abs == 1 "#{position} #{compare} #{b}" else "(#{position} #{compare} #{b}) and (((#{position}-#{b}) mod #{a.abs}) = 0)" end end end def read_a_and_positive_b values op = values[2] if op == "+" a = values[0].to_i b = values[3].to_i elsif op == "-" a = values[0].to_i b = a - (values[3].to_i % a) else raise ArgumentError, "expected an+b node to have either + or - as the operator, but is #{op.inspect}" end [a, b] end def is_of_type_pseudo_class? node if node.type==:PSEUDO_CLASS if node.value[0].is_a?(Nokogiri::CSS::Node) and node.value[0].type == :FUNCTION node.value[0].value[0] else node.value[0] end =~ /(nth|first|last|only)-of-type(\()?/ end end end end end nokogiri-1.8.2/lib/nokogiri/css/node.rb0000644000004100000410000000253113235345655020040 0ustar www-datawww-datamodule Nokogiri module CSS class Node ALLOW_COMBINATOR_ON_SELF = [:DIRECT_ADJACENT_SELECTOR, :FOLLOWING_SELECTOR, :CHILD_SELECTOR] # Get the type of this node attr_accessor :type # Get the value of this node attr_accessor :value # Create a new Node with +type+ and +value+ def initialize type, value @type = type @value = value end # Accept +visitor+ def accept visitor visitor.send(:"visit_#{type.to_s.downcase}", self) end ### # Convert this CSS node to xpath with +prefix+ using +visitor+ def to_xpath prefix = '//', visitor = XPathVisitor.new prefix = '.' if ALLOW_COMBINATOR_ON_SELF.include?(type) && value.first.nil? prefix + visitor.accept(self) end # Find a node by type using +types+ def find_by_type types matches = [] matches << self if to_type == types @value.each do |v| matches += v.find_by_type(types) if v.respond_to?(:find_by_type) end matches end # Convert to_type def to_type [@type] + @value.map { |n| n.to_type if n.respond_to?(:to_type) }.compact end # Convert to array def to_a [@type] + @value.map { |n| n.respond_to?(:to_a) ? n.to_a : [n] } end end end end nokogiri-1.8.2/lib/nokogiri/xml.rb0000644000004100000410000000465713235345655017136 0ustar www-datawww-datarequire 'nokogiri/xml/pp' require 'nokogiri/xml/parse_options' require 'nokogiri/xml/sax' require 'nokogiri/xml/searchable' require 'nokogiri/xml/node' require 'nokogiri/xml/attribute_decl' require 'nokogiri/xml/element_decl' require 'nokogiri/xml/element_content' require 'nokogiri/xml/character_data' require 'nokogiri/xml/namespace' require 'nokogiri/xml/attr' require 'nokogiri/xml/dtd' require 'nokogiri/xml/cdata' require 'nokogiri/xml/text' require 'nokogiri/xml/document' require 'nokogiri/xml/document_fragment' require 'nokogiri/xml/processing_instruction' require 'nokogiri/xml/node_set' require 'nokogiri/xml/syntax_error' require 'nokogiri/xml/xpath' require 'nokogiri/xml/xpath_context' require 'nokogiri/xml/builder' require 'nokogiri/xml/reader' require 'nokogiri/xml/notation' require 'nokogiri/xml/entity_decl' require 'nokogiri/xml/entity_reference' require 'nokogiri/xml/schema' require 'nokogiri/xml/relax_ng' module Nokogiri class << self ### # Parse XML. Convenience method for Nokogiri::XML::Document.parse def XML thing, url = nil, encoding = nil, options = XML::ParseOptions::DEFAULT_XML, &block Nokogiri::XML::Document.parse(thing, url, encoding, options, &block) end end module XML # Original C14N 1.0 spec canonicalization XML_C14N_1_0 = 0 # Exclusive C14N 1.0 spec canonicalization XML_C14N_EXCLUSIVE_1_0 = 1 # C14N 1.1 spec canonicalization XML_C14N_1_1 = 2 class << self ### # Parse an XML document using the Nokogiri::XML::Reader API. See # Nokogiri::XML::Reader for mor information def Reader string_or_io, url = nil, encoding = nil, options = ParseOptions::STRICT options = Nokogiri::XML::ParseOptions.new(options) if Integer === options # Give the options to the user yield options if block_given? if string_or_io.respond_to? :read return Reader.from_io(string_or_io, url, encoding, options.to_i) end Reader.from_memory(string_or_io, url, encoding, options.to_i) end ### # Parse XML. Convenience method for Nokogiri::XML::Document.parse def parse thing, url = nil, encoding = nil, options = ParseOptions::DEFAULT_XML, &block Document.parse(thing, url, encoding, options, &block) end #### # Parse a fragment from +string+ in to a NodeSet. def fragment string XML::DocumentFragment.parse(string) end end end end nokogiri-1.8.2/lib/nokogiri/syntax_error.rb0000644000004100000410000000010013235345655021050 0ustar www-datawww-datamodule Nokogiri class SyntaxError < ::StandardError end end nokogiri-1.8.2/lib/nokogiri/css.rb0000644000004100000410000000107113235345655017111 0ustar www-datawww-datarequire 'nokogiri/css/node' require 'nokogiri/css/xpath_visitor' x = $-w $-w = false require 'nokogiri/css/parser' $-w = x require 'nokogiri/css/tokenizer' require 'nokogiri/css/syntax_error' module Nokogiri module CSS class << self ### # Parse this CSS selector in +selector+. Returns an AST. def parse selector Parser.new.parse selector end ### # Get the XPath for +selector+. def xpath_for selector, options={} Parser.new(options[:ns] || {}).xpath_for selector, options end end end end nokogiri-1.8.2/lib/nokogiri/version.rb0000644000004100000410000000574213235345655020017 0ustar www-datawww-datamodule Nokogiri # The version of Nokogiri you are using VERSION = '1.8.2' class VersionInfo # :nodoc: def jruby? ::JRUBY_VERSION if RUBY_PLATFORM == "java" end def engine defined?(RUBY_ENGINE) ? RUBY_ENGINE : 'mri' end def loaded_parser_version LIBXML_PARSER_VERSION. scan(/^(\d+)(\d\d)(\d\d)(?!\d)/).first. collect(&:to_i). join(".") end def compiled_parser_version LIBXML_VERSION end def libxml2? defined?(LIBXML_VERSION) end def libxml2_using_system? ! libxml2_using_packaged? end def libxml2_using_packaged? NOKOGIRI_USE_PACKAGED_LIBRARIES end def warnings return [] unless libxml2? if compiled_parser_version != loaded_parser_version ["Nokogiri was built against LibXML version #{compiled_parser_version}, but has dynamically loaded #{loaded_parser_version}"] else [] end end def to_hash hash_info = {} hash_info['warnings'] = [] hash_info['nokogiri'] = Nokogiri::VERSION hash_info['ruby'] = {} hash_info['ruby']['version'] = ::RUBY_VERSION hash_info['ruby']['platform'] = ::RUBY_PLATFORM hash_info['ruby']['description'] = ::RUBY_DESCRIPTION hash_info['ruby']['engine'] = engine hash_info['ruby']['jruby'] = jruby? if jruby? if libxml2? hash_info['libxml'] = {} hash_info['libxml']['binding'] = 'extension' if libxml2_using_packaged? hash_info['libxml']['source'] = "packaged" hash_info['libxml']['libxml2_path'] = NOKOGIRI_LIBXML2_PATH hash_info['libxml']['libxslt_path'] = NOKOGIRI_LIBXSLT_PATH hash_info['libxml']['libxml2_patches'] = NOKOGIRI_LIBXML2_PATCHES hash_info['libxml']['libxslt_patches'] = NOKOGIRI_LIBXSLT_PATCHES else hash_info['libxml']['source'] = "system" end hash_info['libxml']['compiled'] = compiled_parser_version hash_info['libxml']['loaded'] = loaded_parser_version hash_info['warnings'] = warnings elsif jruby? hash_info['xerces'] = Nokogiri::XERCES_VERSION hash_info['nekohtml'] = Nokogiri::NEKO_VERSION end hash_info end def to_markdown begin require 'psych' rescue LoadError end require 'yaml' "# Nokogiri (#{Nokogiri::VERSION})\n" + YAML.dump(to_hash).each_line.map { |line| " #{line}" }.join end # FIXME: maybe switch to singleton? @@instance = new @@instance.warnings.each do |warning| warn "WARNING: #{warning}" end def self.instance; @@instance; end end # More complete version information about libxml VERSION_INFO = VersionInfo.instance.to_hash def self.uses_libxml? # :nodoc: VersionInfo.instance.libxml2? end def self.jruby? # :nodoc: VersionInfo.instance.jruby? end end nokogiri-1.8.2/lib/nokogiri/xslt/0000755000004100000410000000000013235345655016767 5ustar www-datawww-datanokogiri-1.8.2/lib/nokogiri/xslt/stylesheet.rb0000644000004100000410000000143713235345655021512 0ustar www-datawww-datamodule Nokogiri module XSLT ### # A Stylesheet represents an XSLT Stylesheet object. Stylesheet creation # is done through Nokogiri.XSLT. Here is an example of transforming # an XML::Document with a Stylesheet: # # doc = Nokogiri::XML(File.read('some_file.xml')) # xslt = Nokogiri::XSLT(File.read('some_transformer.xslt')) # # puts xslt.transform(doc) # # See Nokogiri::XSLT::Stylesheet#transform for more transformation # information. class Stylesheet ### # Apply an XSLT stylesheet to an XML::Document. # +params+ is an array of strings used as XSLT parameters. # returns serialized document def apply_to document, params = [] serialize(transform(document, params)) end end end end nokogiri-1.8.2/lib/nokogiri/xml/0000755000004100000410000000000013235345655016575 5ustar www-datawww-datanokogiri-1.8.2/lib/nokogiri/xml/xpath/0000755000004100000410000000000013235345655017721 5ustar www-datawww-datanokogiri-1.8.2/lib/nokogiri/xml/xpath/syntax_error.rb0000644000004100000410000000030213235345655023000 0ustar www-datawww-datamodule Nokogiri module XML class XPath class SyntaxError < XML::SyntaxError def to_s [super.chomp, str1].compact.join(': ') end end end end end nokogiri-1.8.2/lib/nokogiri/xml/namespace.rb0000644000004100000410000000032413235345655021055 0ustar www-datawww-datamodule Nokogiri module XML class Namespace include Nokogiri::XML::PP::Node attr_reader :document private def inspect_attributes [:prefix, :href] end end end end nokogiri-1.8.2/lib/nokogiri/xml/entity_reference.rb0000644000004100000410000000076313235345655022462 0ustar www-datawww-datamodule Nokogiri module XML class EntityReference < Nokogiri::XML::Node def children # libxml2 will create a malformed child node for predefined # entities. because any use of that child is likely to cause a # segfault, we shall pretend that it doesn't exist. # # see https://github.com/sparklemotion/nokogiri/issues/1238 for details NodeSet.new(document) end def inspect_attributes [:name] end end end end nokogiri-1.8.2/lib/nokogiri/xml/element_decl.rb0000644000004100000410000000050113235345655021536 0ustar www-datawww-datamodule Nokogiri module XML class ElementDecl < Nokogiri::XML::Node undef_method :namespace undef_method :namespace_definitions undef_method :line if method_defined?(:line) def inspect "#<#{self.class.name}:#{sprintf("0x%x", object_id)} #{to_s.inspect}>" end end end end nokogiri-1.8.2/lib/nokogiri/xml/cdata.rb0000644000004100000410000000027113235345655020176 0ustar www-datawww-datamodule Nokogiri module XML class CDATA < Nokogiri::XML::Text ### # Get the name of this CDATA node def name '#cdata-section' end end end end nokogiri-1.8.2/lib/nokogiri/xml/schema.rb0000644000004100000410000000337013235345655020365 0ustar www-datawww-datamodule Nokogiri module XML class << self ### # Create a new Nokogiri::XML::Schema object using a +string_or_io+ # object. def Schema string_or_io Schema.new(string_or_io) end end ### # Nokogiri::XML::Schema is used for validating XML against a schema # (usually from an xsd file). # # == Synopsis # # Validate an XML document against a Schema. Loop over the errors that # are returned and print them out: # # xsd = Nokogiri::XML::Schema(File.read(PO_SCHEMA_FILE)) # doc = Nokogiri::XML(File.read(PO_XML_FILE)) # # xsd.validate(doc).each do |error| # puts error.message # end # # The list of errors are Nokogiri::XML::SyntaxError objects. class Schema # Errors while parsing the schema file attr_accessor :errors ### # Create a new Nokogiri::XML::Schema object using a +string_or_io+ # object. def self.new string_or_io from_document Nokogiri::XML(string_or_io) end ### # Validate +thing+ against this schema. +thing+ can be a # Nokogiri::XML::Document object, or a filename. An Array of # Nokogiri::XML::SyntaxError objects found while validating the # +thing+ is returned. def validate thing if thing.is_a?(Nokogiri::XML::Document) validate_document(thing) elsif File.file?(thing) validate_file(thing) else raise ArgumentError, "Must provide Nokogiri::Xml::Document or the name of an existing file" end end ### # Returns true if +thing+ is a valid Nokogiri::XML::Document or # file. def valid? thing validate(thing).length == 0 end end end end nokogiri-1.8.2/lib/nokogiri/xml/syntax_error.rb0000644000004100000410000000266113235345655021666 0ustar www-datawww-datamodule Nokogiri module XML ### # This class provides information about XML SyntaxErrors. These # exceptions are typically stored on Nokogiri::XML::Document#errors. class SyntaxError < ::Nokogiri::SyntaxError attr_reader :domain attr_reader :code attr_reader :level attr_reader :file attr_reader :line attr_reader :str1 attr_reader :str2 attr_reader :str3 attr_reader :int1 attr_reader :column ### # return true if this is a non error def none? level == 0 end ### # return true if this is a warning def warning? level == 1 end ### # return true if this is an error def error? level == 2 end ### # return true if this error is fatal def fatal? level == 3 end def to_s message = super.chomp [location_to_s, level_to_s, message]. compact.join(": "). force_encoding(message.encoding) end private def level_to_s case level when 3 then "FATAL" when 2 then "ERROR" when 1 then "WARNING" else nil end end def nil_or_zero?(attribute) attribute.nil? || attribute.zero? end def location_to_s return nil if nil_or_zero?(line) && nil_or_zero?(column) "#{line}:#{column}" end end end end nokogiri-1.8.2/lib/nokogiri/xml/text.rb0000644000004100000410000000025413235345655020107 0ustar www-datawww-datamodule Nokogiri module XML class Text < Nokogiri::XML::CharacterData def content=(string) self.native_content = string.to_s end end end end nokogiri-1.8.2/lib/nokogiri/xml/element_content.rb0000644000004100000410000000152613235345655022311 0ustar www-datawww-datamodule Nokogiri module XML ### # Represents the allowed content in an Element Declaration inside a DTD: # # # # ]> # # # ElementContent represents the tree inside the tag shown above # that lists the possible content for the div1 tag. class ElementContent # Possible definitions of type PCDATA = 1 ELEMENT = 2 SEQ = 3 OR = 4 # Possible content occurrences ONCE = 1 OPT = 2 MULT = 3 PLUS = 4 attr_reader :document ### # Get the children of this ElementContent node def children [c1, c2].compact end end end end nokogiri-1.8.2/lib/nokogiri/xml/sax.rb0000644000004100000410000000022713235345655017716 0ustar www-datawww-datarequire 'nokogiri/xml/sax/document' require 'nokogiri/xml/sax/parser_context' require 'nokogiri/xml/sax/parser' require 'nokogiri/xml/sax/push_parser' nokogiri-1.8.2/lib/nokogiri/xml/document.rb0000644000004100000410000002227113235345655020744 0ustar www-datawww-datamodule Nokogiri module XML ## # Nokogiri::XML::Document is the main entry point for dealing with # XML documents. The Document is created by parsing an XML document. # See Nokogiri::XML::Document.parse() for more information on parsing. # # For searching a Document, see Nokogiri::XML::Searchable#css and # Nokogiri::XML::Searchable#xpath # class Document < Nokogiri::XML::Node # I'm ignoring unicode characters here. # See http://www.w3.org/TR/REC-xml-names/#ns-decl for more details. NCNAME_START_CHAR = "A-Za-z_" NCNAME_CHAR = NCNAME_START_CHAR + "\\-.0-9" NCNAME_RE = /^xmlns(:[#{NCNAME_START_CHAR}][#{NCNAME_CHAR}]*)?$/ ## # Parse an XML file. # # +string_or_io+ may be a String, or any object that responds to # _read_ and _close_ such as an IO, or StringIO. # # +url+ (optional) is the URI where this document is located. # # +encoding+ (optional) is the encoding that should be used when processing # the document. # # +options+ (optional) is a configuration object that sets options during # parsing, such as Nokogiri::XML::ParseOptions::RECOVER. See the # Nokogiri::XML::ParseOptions for more information. # # +block+ (optional) is passed a configuration object on which # parse options may be set. # # By default, Nokogiri treats documents as untrusted, and so # does not attempt to load DTDs or access the network. See # Nokogiri::XML::ParseOptions for a complete list of options; # and that module's DEFAULT_XML constant for what's set (and not # set) by default. # # Nokogiri.XML() is a convenience method which will call this method. # def self.parse string_or_io, url = nil, encoding = nil, options = ParseOptions::DEFAULT_XML, &block options = Nokogiri::XML::ParseOptions.new(options) if Integer === options # Give the options to the user yield options if block_given? if empty_doc?(string_or_io) if options.strict? raise Nokogiri::XML::SyntaxError.new("Empty document") else return encoding ? new.tap { |i| i.encoding = encoding } : new end end doc = if string_or_io.respond_to?(:read) url ||= string_or_io.respond_to?(:path) ? string_or_io.path : nil read_io(string_or_io, url, encoding, options.to_i) else # read_memory pukes on empty docs read_memory(string_or_io, url, encoding, options.to_i) end # do xinclude processing doc.do_xinclude(options) if options.xinclude? return doc end # A list of Nokogiri::XML::SyntaxError found when parsing a document attr_accessor :errors def initialize *args # :nodoc: @errors = [] @decorators = nil end ## # Create an element with +name+, and optionally setting the content and attributes. # # doc.create_element "div" #
# doc.create_element "div", :class => "container" #
# doc.create_element "div", "contents" #
contents
# doc.create_element "div", "contents", :class => "container" #
contents
# doc.create_element "div" { |node| node['class'] = "container" } #
# def create_element name, *args, &block elm = Nokogiri::XML::Element.new(name, self, &block) args.each do |arg| case arg when Hash arg.each { |k,v| key = k.to_s if key =~ NCNAME_RE ns_name = key.split(":", 2)[1] elm.add_namespace_definition ns_name, v else elm[k.to_s] = v.to_s end } else elm.content = arg end end if ns = elm.namespace_definitions.find { |n| n.prefix.nil? or n.prefix == '' } elm.namespace = ns end elm end # Create a Text Node with +string+ def create_text_node string, &block Nokogiri::XML::Text.new string.to_s, self, &block end # Create a CDATA Node containing +string+ def create_cdata string, &block Nokogiri::XML::CDATA.new self, string.to_s, &block end # Create a Comment Node containing +string+ def create_comment string, &block Nokogiri::XML::Comment.new self, string.to_s, &block end # The name of this document. Always returns "document" def name 'document' end # A reference to +self+ def document self end ## # Recursively get all namespaces from this node and its subtree and # return them as a hash. # # For example, given this document: # # # # # # This method will return: # # { 'xmlns:foo' => 'bar', 'xmlns:hello' => 'world' } # # WARNING: this method will clobber duplicate names in the keys. # For example, given this document: # # # # # # The hash returned will look like this: { 'xmlns:foo' => 'bar' } # # Non-prefixed default namespaces (as in "xmlns=") are not included # in the hash. # # Note that this method does an xpath lookup for nodes with # namespaces, and as a result the order may be dependent on the # implementation of the underlying XML library. # def collect_namespaces xpath("//namespace::*").inject({}) do |hash, ns| hash[["xmlns",ns.prefix].compact.join(":")] = ns.href if ns.prefix != "xml" hash end end # Get the list of decorators given +key+ def decorators key @decorators ||= Hash.new @decorators[key] ||= [] end ## # Validate this Document against it's DTD. Returns a list of errors on # the document or +nil+ when there is no DTD. def validate return nil unless internal_subset internal_subset.validate self end ## # Explore a document with shortcut methods. See Nokogiri::Slop for details. # # Note that any nodes that have been instantiated before #slop! # is called will not be decorated with sloppy behavior. So, if you're in # irb, the preferred idiom is: # # irb> doc = Nokogiri::Slop my_markup # # and not # # irb> doc = Nokogiri::HTML my_markup # ... followed by irb's implicit inspect (and therefore instantiation of every node) ... # irb> doc.slop! # ... which does absolutely nothing. # def slop! unless decorators(XML::Node).include? Nokogiri::Decorators::Slop decorators(XML::Node) << Nokogiri::Decorators::Slop decorate! end self end ## # Apply any decorators to +node+ def decorate node return unless @decorators @decorators.each { |klass,list| next unless node.is_a?(klass) list.each { |moodule| node.extend(moodule) } } end alias :to_xml :serialize alias :clone :dup # Get the hash of namespaces on the root Nokogiri::XML::Node def namespaces root ? root.namespaces : {} end ## # Create a Nokogiri::XML::DocumentFragment from +tags+ # Returns an empty fragment if +tags+ is nil. def fragment tags = nil DocumentFragment.new(self, tags, self.root) end undef_method :swap, :parent, :namespace, :default_namespace= undef_method :add_namespace_definition, :attributes undef_method :namespace_definitions, :line, :add_namespace def add_child node_or_tags raise "A document may not have multiple root nodes." if (root && root.name != 'nokogiri_text_wrapper') && !(node_or_tags.comment? || node_or_tags.processing_instruction?) node_or_tags = coerce(node_or_tags) if node_or_tags.is_a?(XML::NodeSet) raise "A document may not have multiple root nodes." if node_or_tags.size > 1 super(node_or_tags.first) else super end end alias :<< :add_child ## # +JRuby+ # Wraps Java's org.w3c.dom.document and returns Nokogiri::XML::Document def self.wrap document raise "JRuby only method" unless Nokogiri.jruby? return wrapJavaDocument(document) end ## # +JRuby+ # Returns Java's org.w3c.dom.document of this Document. def to_java raise "JRuby only method" unless Nokogiri.jruby? return toJavaDocument() end private def self.empty_doc? string_or_io string_or_io.nil? || (string_or_io.respond_to?(:empty?) && string_or_io.empty?) || (string_or_io.respond_to?(:eof?) && string_or_io.eof?) end # @private IMPLIED_XPATH_CONTEXTS = [ '//'.freeze ].freeze # :nodoc: def inspect_attributes [:name, :children] end end end end nokogiri-1.8.2/lib/nokogiri/xml/sax/0000755000004100000410000000000013235345655017370 5ustar www-datawww-datanokogiri-1.8.2/lib/nokogiri/xml/sax/push_parser.rb0000644000004100000410000000351113235345655022250 0ustar www-datawww-datamodule Nokogiri module XML module SAX ### # PushParser can parse a document that is fed to it manually. It # must be given a SAX::Document object which will be called with # SAX events as the document is being parsed. # # Calling PushParser#<< writes XML to the parser, calling any SAX # callbacks it can. # # PushParser#finish tells the parser that the document is finished # and calls the end_document SAX method. # # Example: # # parser = PushParser.new(Class.new(XML::SAX::Document) { # def start_document # puts "start document called" # end # }.new) # parser << "
hello<" # parser << "/div>" # parser.finish class PushParser # The Nokogiri::XML::SAX::Document on which the PushParser will be # operating attr_accessor :document ### # Create a new PushParser with +doc+ as the SAX Document, providing # an optional +file_name+ and +encoding+ def initialize(doc = XML::SAX::Document.new, file_name = nil, encoding = 'UTF-8') @document = doc @encoding = encoding @sax_parser = XML::SAX::Parser.new(doc) ## Create our push parser context initialize_native(@sax_parser, file_name) end ### # Write a +chunk+ of XML to the PushParser. Any callback methods # that can be called will be called immediately. def write chunk, last_chunk = false native_write(chunk, last_chunk) end alias :<< :write ### # Finish the parsing. This method is only necessary for # Nokogiri::XML::SAX::Document#end_document to be called. def finish write '', true end end end end end nokogiri-1.8.2/lib/nokogiri/xml/sax/parser.rb0000644000004100000410000001007313235345655021212 0ustar www-datawww-datamodule Nokogiri module XML module SAX ### # This parser is a SAX style parser that reads it's input as it # deems necessary. The parser takes a Nokogiri::XML::SAX::Document, # an optional encoding, then given an XML input, sends messages to # the Nokogiri::XML::SAX::Document. # # Here is an example of using this parser: # # # Create a subclass of Nokogiri::XML::SAX::Document and implement # # the events we care about: # class MyDoc < Nokogiri::XML::SAX::Document # def start_element name, attrs = [] # puts "starting: #{name}" # end # # def end_element name # puts "ending: #{name}" # end # end # # # Create our parser # parser = Nokogiri::XML::SAX::Parser.new(MyDoc.new) # # # Send some XML to the parser # parser.parse(File.open(ARGV[0])) # # For more information about SAX parsers, see Nokogiri::XML::SAX. Also # see Nokogiri::XML::SAX::Document for the available events. class Parser class Attribute < Struct.new(:localname, :prefix, :uri, :value) end # Encodinds this parser supports ENCODINGS = { 'NONE' => 0, # No char encoding detected 'UTF-8' => 1, # UTF-8 'UTF16LE' => 2, # UTF-16 little endian 'UTF16BE' => 3, # UTF-16 big endian 'UCS4LE' => 4, # UCS-4 little endian 'UCS4BE' => 5, # UCS-4 big endian 'EBCDIC' => 6, # EBCDIC uh! 'UCS4-2143' => 7, # UCS-4 unusual ordering 'UCS4-3412' => 8, # UCS-4 unusual ordering 'UCS2' => 9, # UCS-2 'ISO-8859-1' => 10, # ISO-8859-1 ISO Latin 1 'ISO-8859-2' => 11, # ISO-8859-2 ISO Latin 2 'ISO-8859-3' => 12, # ISO-8859-3 'ISO-8859-4' => 13, # ISO-8859-4 'ISO-8859-5' => 14, # ISO-8859-5 'ISO-8859-6' => 15, # ISO-8859-6 'ISO-8859-7' => 16, # ISO-8859-7 'ISO-8859-8' => 17, # ISO-8859-8 'ISO-8859-9' => 18, # ISO-8859-9 'ISO-2022-JP' => 19, # ISO-2022-JP 'SHIFT-JIS' => 20, # Shift_JIS 'EUC-JP' => 21, # EUC-JP 'ASCII' => 22, # pure ASCII } # The Nokogiri::XML::SAX::Document where events will be sent. attr_accessor :document # The encoding beings used for this document. attr_accessor :encoding # Create a new Parser with +doc+ and +encoding+ def initialize doc = Nokogiri::XML::SAX::Document.new, encoding = 'UTF-8' @encoding = check_encoding(encoding) @document = doc @warned = false end ### # Parse given +thing+ which may be a string containing xml, or an # IO object. def parse thing, &block if thing.respond_to?(:read) && thing.respond_to?(:close) parse_io(thing, &block) else parse_memory(thing, &block) end end ### # Parse given +io+ def parse_io io, encoding = 'ASCII' @encoding = check_encoding(encoding) ctx = ParserContext.io(io, ENCODINGS[@encoding]) yield ctx if block_given? ctx.parse_with self end ### # Parse a file with +filename+ def parse_file filename raise ArgumentError unless filename raise Errno::ENOENT unless File.exist?(filename) raise Errno::EISDIR if File.directory?(filename) ctx = ParserContext.file filename yield ctx if block_given? ctx.parse_with self end def parse_memory data ctx = ParserContext.memory data yield ctx if block_given? ctx.parse_with self end private def check_encoding(encoding) encoding.upcase.tap do |enc| raise ArgumentError.new("'#{enc}' is not a valid encoding") unless ENCODINGS[enc] end end end end end end nokogiri-1.8.2/lib/nokogiri/xml/sax/document.rb0000644000004100000410000001341113235345655021533 0ustar www-datawww-datamodule Nokogiri module XML ### # SAX Parsers are event driven parsers. Nokogiri provides two different # event based parsers when dealing with XML. If you want to do SAX style # parsing using HTML, check out Nokogiri::HTML::SAX. # # The basic way a SAX style parser works is by creating a parser, # telling the parser about the events we're interested in, then giving # the parser some XML to process. The parser will notify you when # it encounters events you said you would like to know about. # # To register for events, you simply subclass Nokogiri::XML::SAX::Document, # and implement the methods for which you would like notification. # # For example, if I want to be notified when a document ends, and when an # element starts, I would write a class like this: # # class MyDocument < Nokogiri::XML::SAX::Document # def end_document # puts "the document has ended" # end # # def start_element name, attributes = [] # puts "#{name} started" # end # end # # Then I would instantiate a SAX parser with this document, and feed the # parser some XML # # # Create a new parser # parser = Nokogiri::XML::SAX::Parser.new(MyDocument.new) # # # Feed the parser some XML # parser.parse(File.open(ARGV[0])) # # Now my document handler will be called when each node starts, and when # then document ends. To see what kinds of events are available, take # a look at Nokogiri::XML::SAX::Document. # # Two SAX parsers for XML are available, a parser that reads from a string # or IO object as it feels necessary, and a parser that lets you spoon # feed it XML. If you want to let Nokogiri deal with reading your XML, # use the Nokogiri::XML::SAX::Parser. If you want to have fine grain # control over the XML input, use the Nokogiri::XML::SAX::PushParser. module SAX ### # This class is used for registering types of events you are interested # in handling. All of the methods on this class are available as # possible events while parsing an XML document. To register for any # particular event, just subclass this class and implement the methods # you are interested in knowing about. # # To only be notified about start and end element events, write a class # like this: # # class MyDocument < Nokogiri::XML::SAX::Document # def start_element name, attrs = [] # puts "#{name} started!" # end # # def end_element name # puts "#{name} ended" # end # end # # You can use this event handler for any SAX style parser included with # Nokogiri. See Nokogiri::XML::SAX, and Nokogiri::HTML::SAX. class Document ### # Called when an XML declaration is parsed def xmldecl version, encoding, standalone end ### # Called when document starts parsing def start_document end ### # Called when document ends parsing def end_document end ### # Called at the beginning of an element # * +name+ is the name of the tag # * +attrs+ are an assoc list of namespaces and attributes, e.g.: # [ ["xmlns:foo", "http://sample.net"], ["size", "large"] ] def start_element name, attrs = [] end ### # Called at the end of an element # +name+ is the tag name def end_element name end ### # Called at the beginning of an element # +name+ is the element name # +attrs+ is a list of attributes # +prefix+ is the namespace prefix for the element # +uri+ is the associated namespace URI # +ns+ is a hash of namespace prefix:urls associated with the element def start_element_namespace name, attrs = [], prefix = nil, uri = nil, ns = [] ### # Deal with SAX v1 interface name = [prefix, name].compact.join(':') attributes = ns.map { |ns_prefix,ns_uri| [['xmlns', ns_prefix].compact.join(':'), ns_uri] } + attrs.map { |attr| [[attr.prefix, attr.localname].compact.join(':'), attr.value] } start_element name, attributes end ### # Called at the end of an element # +name+ is the element's name # +prefix+ is the namespace prefix associated with the element # +uri+ is the associated namespace URI def end_element_namespace name, prefix = nil, uri = nil ### # Deal with SAX v1 interface end_element [prefix, name].compact.join(':') end ### # Characters read between a tag. This method might be called multiple # times given one contiguous string of characters. # # +string+ contains the character data def characters string end ### # Called when comments are encountered # +string+ contains the comment data def comment string end ### # Called on document warnings # +string+ contains the warning def warning string end ### # Called on document errors # +string+ contains the error def error string end ### # Called when cdata blocks are found # +string+ contains the cdata content def cdata_block string end ### # Called when processing instructions are found # +name+ is the target of the instruction # +content+ is the value of the instruction def processing_instruction name, content end end end end end nokogiri-1.8.2/lib/nokogiri/xml/sax/parser_context.rb0000644000004100000410000000072013235345655022754 0ustar www-datawww-datamodule Nokogiri module XML module SAX ### # Context for XML SAX parsers. This class is usually not instantiated # by the user. Instead, you should be looking at # Nokogiri::XML::SAX::Parser class ParserContext def self.new thing, encoding = 'UTF-8' [:read, :close].all? { |x| thing.respond_to?(x) } ? io(thing, Parser::ENCODINGS[encoding]) : memory(thing) end end end end end nokogiri-1.8.2/lib/nokogiri/xml/xpath_context.rb0000644000004100000410000000047713235345655022022 0ustar www-datawww-datamodule Nokogiri module XML class XPathContext ### # Register namespaces in +namespaces+ def register_namespaces(namespaces) namespaces.each do |k, v| k = k.to_s.gsub(/.*:/,'') # strip off 'xmlns:' or 'xml:' register_ns(k, v) end end end end end nokogiri-1.8.2/lib/nokogiri/xml/parse_options.rb0000644000004100000410000001040613235345655022010 0ustar www-datawww-datamodule Nokogiri module XML ### # Parse options for passing to Nokogiri.XML or Nokogiri.HTML # # == Building combinations of parse options # You can build your own combinations of these parse options by using any of the following methods: # *Note*: All examples attempt to set the +RECOVER+ & +NOENT+ options. All examples use Ruby 2 optional parameter syntax. # [Ruby's bitwise operators] You can use the Ruby bitwise operators to set various combinations. # Nokogiri.XML('Chapter 1Chapter 1Chapter 1no{option} method in lowercase. You can call these methods on an instance of +ParseOptions+ to remove the option. # Note that this is not available for +STRICT+. # # # Setting the RECOVER & NOENT options... # options = Nokogiri::XML::ParseOptions.new.recover.noent # # later... # options.norecover # Removes the Nokogiri::XML::ParseOptions::RECOVER option # options.nonoent # Removes the Nokogiri::XML::ParseOptions::NOENT option # class ParseOptions # Strict parsing STRICT = 0 # Recover from errors RECOVER = 1 << 0 # Substitute entities NOENT = 1 << 1 # Load external subsets DTDLOAD = 1 << 2 # Default DTD attributes DTDATTR = 1 << 3 # validate with the DTD DTDVALID = 1 << 4 # suppress error reports NOERROR = 1 << 5 # suppress warning reports NOWARNING = 1 << 6 # pedantic error reporting PEDANTIC = 1 << 7 # remove blank nodes NOBLANKS = 1 << 8 # use the SAX1 interface internally SAX1 = 1 << 9 # Implement XInclude substitution XINCLUDE = 1 << 10 # Forbid network access. Recommended for dealing with untrusted documents. NONET = 1 << 11 # Do not reuse the context dictionary NODICT = 1 << 12 # remove redundant namespaces declarations NSCLEAN = 1 << 13 # merge CDATA as text nodes NOCDATA = 1 << 14 # do not generate XINCLUDE START/END nodes NOXINCNODE = 1 << 15 # compact small text nodes; no modification of the tree allowed afterwards (will possibly crash if you try to modify the tree) COMPACT = 1 << 16 # parse using XML-1.0 before update 5 OLD10 = 1 << 17 # do not fixup XINCLUDE xml:base uris NOBASEFIX = 1 << 18 # relax any hardcoded limit from the parser HUGE = 1 << 19 # the default options used for parsing XML documents DEFAULT_XML = RECOVER | NONET # the default options used for parsing HTML documents DEFAULT_HTML = RECOVER | NOERROR | NOWARNING | NONET attr_accessor :options def initialize options = STRICT @options = options end constants.each do |constant| next if constant.to_sym == :STRICT class_eval %{ def #{constant.downcase} @options |= #{constant} self end def no#{constant.downcase} @options &= ~#{constant} self end def #{constant.downcase}? #{constant} & @options == #{constant} end } end def strict @options &= ~RECOVER self end def strict? @options & RECOVER == STRICT end alias :to_i :options def inspect options = [] self.class.constants.each do |k| options << k.downcase if send(:"#{k.downcase}?") end super.sub(/>$/, " " + options.join(', ') + ">") end end end end nokogiri-1.8.2/lib/nokogiri/xml/dtd.rb0000644000004100000410000000123513235345655017676 0ustar www-datawww-datamodule Nokogiri module XML class DTD < Nokogiri::XML::Node undef_method :attribute_nodes undef_method :values undef_method :content undef_method :namespace undef_method :namespace_definitions undef_method :line if method_defined?(:line) def keys attributes.keys end def each attributes.each do |key, value| yield([key, value]) end end def html_dtd? name.casecmp('html').zero? end def html5_dtd? html_dtd? && external_id.nil? && (system_id.nil? || system_id == 'about:legacy-compat') end end end end nokogiri-1.8.2/lib/nokogiri/xml/relax_ng.rb0000644000004100000410000000155613235345655020730 0ustar www-datawww-datamodule Nokogiri module XML class << self ### # Create a new Nokogiri::XML::RelaxNG document from +string_or_io+. # See Nokogiri::XML::RelaxNG for an example. def RelaxNG string_or_io RelaxNG.new(string_or_io) end end ### # Nokogiri::XML::RelaxNG is used for validating XML against a # RelaxNG schema. # # == Synopsis # # Validate an XML document against a RelaxNG schema. Loop over the errors # that are returned and print them out: # # schema = Nokogiri::XML::RelaxNG(File.open(ADDRESS_SCHEMA_FILE)) # doc = Nokogiri::XML(File.open(ADDRESS_XML_FILE)) # # schema.validate(doc).each do |error| # puts error.message # end # # The list of errors are Nokogiri::XML::SyntaxError objects. class RelaxNG < Nokogiri::XML::Schema end end end nokogiri-1.8.2/lib/nokogiri/xml/xpath.rb0000644000004100000410000000031013235345655020240 0ustar www-datawww-datarequire 'nokogiri/xml/xpath/syntax_error' module Nokogiri module XML class XPath # The Nokogiri::XML::Document tied to this XPath instance attr_accessor :document end end end nokogiri-1.8.2/lib/nokogiri/xml/processing_instruction.rb0000644000004100000410000000021513235345655023735 0ustar www-datawww-datamodule Nokogiri module XML class ProcessingInstruction < Node def initialize document, name, content end end end end nokogiri-1.8.2/lib/nokogiri/xml/node_set.rb0000644000004100000410000002121013235345655020716 0ustar www-datawww-datamodule Nokogiri module XML #### # A NodeSet contains a list of Nokogiri::XML::Node objects. Typically # a NodeSet is return as a result of searching a Document via # Nokogiri::XML::Searchable#css or Nokogiri::XML::Searchable#xpath class NodeSet include Nokogiri::XML::Searchable include Enumerable # The Document this NodeSet is associated with attr_accessor :document alias :clone :dup # Create a NodeSet with +document+ defaulting to +list+ def initialize document, list = [] @document = document document.decorate(self) list.each { |x| self << x } yield self if block_given? end ### # Get the first element of the NodeSet. def first n = nil return self[0] unless n list = [] [n, length].min.times { |i| list << self[i] } list end ### # Get the last element of the NodeSet. def last self[-1] end ### # Is this NodeSet empty? def empty? length == 0 end ### # Returns the index of the first node in self that is == to +node+. Returns nil if no match is found. def index(node) each_with_index { |member, j| return j if member == node } nil end ### # Insert +datum+ before the first Node in this NodeSet def before datum first.before datum end ### # Insert +datum+ after the last Node in this NodeSet def after datum last.after datum end alias :<< :push alias :remove :unlink ### # call-seq: css *rules, [namespace-bindings, custom-pseudo-class] # # Search this node set for CSS +rules+. +rules+ must be one or more CSS # selectors. For example: # # For more information see Nokogiri::XML::Searchable#css def css *args rules, handler, ns, _ = extract_params(args) paths = css_rules_to_xpath(rules, ns) inject(NodeSet.new(document)) do |set, node| set + xpath_internal(node, paths, handler, ns, nil) end end ### # call-seq: xpath *paths, [namespace-bindings, variable-bindings, custom-handler-class] # # Search this node set for XPath +paths+. +paths+ must be one or more XPath # queries. # # For more information see Nokogiri::XML::Searchable#xpath def xpath *args paths, handler, ns, binds = extract_params(args) inject(NodeSet.new(document)) do |set, node| set + xpath_internal(node, paths, handler, ns, binds) end end ### # Search this NodeSet's nodes' immediate children using CSS selector +selector+ def > selector ns = document.root.namespaces xpath CSS.xpath_for(selector, :prefix => "./", :ns => ns).first end ### # call-seq: search *paths, [namespace-bindings, xpath-variable-bindings, custom-handler-class] # # Search this object for +paths+, and return only the first # result. +paths+ must be one or more XPath or CSS queries. # # See Searchable#search for more information. # # Or, if passed an integer, index into the NodeSet: # # node_set.at(3) # same as node_set[3] # def at *args if args.length == 1 && args.first.is_a?(Numeric) return self[args.first] end super(*args) end alias :% :at ### # Filter this list for nodes that match +expr+ def filter expr find_all { |node| node.matches?(expr) } end ### # Append the class attribute +name+ to all Node objects in the NodeSet. def add_class name each do |el| classes = el['class'].to_s.split(/\s+/) el['class'] = classes.push(name).uniq.join " " end self end ### # Remove the class attribute +name+ from all Node objects in the NodeSet. # If +name+ is nil, remove the class attribute from all Nodes in the # NodeSet. def remove_class name = nil each do |el| if name classes = el['class'].to_s.split(/\s+/) if classes.empty? el.delete 'class' else el['class'] = (classes - [name]).uniq.join " " end else el.delete "class" end end self end ### # Set the attribute +key+ to +value+ or the return value of +blk+ # on all Node objects in the NodeSet. def attr key, value = nil, &blk unless Hash === key || key && (value || blk) return first.attribute(key) end hash = key.is_a?(Hash) ? key : { key => value } hash.each { |k,v| each { |el| el[k] = v || blk[el] } } self end alias :set :attr alias :attribute :attr ### # Remove the attributed named +name+ from all Node objects in the NodeSet def remove_attr name each { |el| el.delete name } self end ### # Iterate over each node, yielding to +block+ def each(&block) 0.upto(length - 1) do |x| yield self[x] end end ### # Get the inner text of all contained Node objects # # Note: This joins the text of all Node objects in the NodeSet: # # doc = Nokogiri::XML('foobar') # doc.css('d').text # => "foobar" # # Instead, if you want to return the text of all nodes in the NodeSet: # # doc.css('d').map(&:text) # => ["foo", "bar"] # # See Nokogiri::XML::Node#content for more information. def inner_text collect(&:inner_text).join('') end alias :text :inner_text ### # Get the inner html of all contained Node objects def inner_html *args collect{|j| j.inner_html(*args) }.join('') end ### # Wrap this NodeSet with +html+ or the results of the builder in +blk+ def wrap(html, &blk) each do |j| new_parent = document.parse(html).first j.add_next_sibling(new_parent) new_parent.add_child(j) end self end ### # Convert this NodeSet to a string. def to_s map(&:to_s).join end ### # Convert this NodeSet to HTML def to_html *args if Nokogiri.jruby? options = args.first.is_a?(Hash) ? args.shift : {} if !options[:save_with] options[:save_with] = Node::SaveOptions::NO_DECLARATION | Node::SaveOptions::NO_EMPTY_TAGS | Node::SaveOptions::AS_HTML end args.insert(0, options) end map { |x| x.to_html(*args) }.join end ### # Convert this NodeSet to XHTML def to_xhtml *args map { |x| x.to_xhtml(*args) }.join end ### # Convert this NodeSet to XML def to_xml *args map { |x| x.to_xml(*args) }.join end alias :size :length alias :to_ary :to_a ### # Removes the last element from set and returns it, or +nil+ if # the set is empty def pop return nil if length == 0 delete last end ### # Returns the first element of the NodeSet and removes it. Returns # +nil+ if the set is empty. def shift return nil if length == 0 delete first end ### # Equality -- Two NodeSets are equal if the contain the same number # of elements and if each element is equal to the corresponding # element in the other NodeSet def == other return false unless other.is_a?(Nokogiri::XML::NodeSet) return false unless length == other.length each_with_index do |node, i| return false unless node == other[i] end true end ### # Returns a new NodeSet containing all the children of all the nodes in # the NodeSet def children node_set = NodeSet.new(document) each do |node| node.children.each { |n| node_set.push(n) } end node_set end ### # Returns a new NodeSet containing all the nodes in the NodeSet # in reverse order def reverse node_set = NodeSet.new(document) (length - 1).downto(0) do |x| node_set.push self[x] end node_set end ### # Return a nicely formated string representation def inspect "[#{map(&:inspect).join ', '}]" end alias :+ :| # @private IMPLIED_XPATH_CONTEXTS = [ './/'.freeze, 'self::'.freeze ].freeze # :nodoc: end end end nokogiri-1.8.2/lib/nokogiri/xml/character_data.rb0000644000004100000410000000021413235345655022044 0ustar www-datawww-datamodule Nokogiri module XML class CharacterData < Nokogiri::XML::Node include Nokogiri::XML::PP::CharacterData end end end nokogiri-1.8.2/lib/nokogiri/xml/searchable.rb0000644000004100000410000001771713235345655021230 0ustar www-datawww-datamodule Nokogiri module XML # # The Searchable module declares the interface used for searching your DOM. # # It implements the public methods `search`, `css`, and `xpath`, # as well as allowing specific implementations to specialize some # of the important behaviors. # module Searchable # Regular expression used by Searchable#search to determine if a query # string is CSS or XPath LOOKS_LIKE_XPATH = /^(\.\/|\/|\.\.|\.$)/ ### # call-seq: search *paths, [namespace-bindings, xpath-variable-bindings, custom-handler-class] # # Search this object for +paths+. +paths+ must be one or more XPath or CSS queries: # # node.search("div.employee", ".//title") # # A hash of namespace bindings may be appended: # # node.search('.//bike:tire', {'bike' => 'http://schwinn.com/'}) # node.search('bike|tire', {'bike' => 'http://schwinn.com/'}) # # For XPath queries, a hash of variable bindings may also be # appended to the namespace bindings. For example: # # node.search('.//address[@domestic=$value]', nil, {:value => 'Yes'}) # # Custom XPath functions and CSS pseudo-selectors may also be # defined. To define custom functions create a class and # implement the function you want to define. The first argument # to the method will be the current matching NodeSet. Any other # arguments are ones that you pass in. Note that this class may # appear anywhere in the argument list. For example: # # node.search('.//title[regex(., "\w+")]', 'div.employee:regex("[0-9]+")' # Class.new { # def regex node_set, regex # node_set.find_all { |node| node['some_attribute'] =~ /#{regex}/ } # end # }.new # ) # # See Searchable#xpath and Searchable#css for further usage help. def search *args paths, handler, ns, binds = extract_params(args) xpaths = paths.map(&:to_s).map do |path| (path =~ LOOKS_LIKE_XPATH) ? path : xpath_query_from_css_rule(path, ns) end.flatten.uniq xpath(*(xpaths + [ns, handler, binds].compact)) end alias :/ :search ### # call-seq: search *paths, [namespace-bindings, xpath-variable-bindings, custom-handler-class] # # Search this object for +paths+, and return only the first # result. +paths+ must be one or more XPath or CSS queries. # # See Searchable#search for more information. def at *args search(*args).first end alias :% :at ### # call-seq: css *rules, [namespace-bindings, custom-pseudo-class] # # Search this object for CSS +rules+. +rules+ must be one or more CSS # selectors. For example: # # node.css('title') # node.css('body h1.bold') # node.css('div + p.green', 'div#one') # # A hash of namespace bindings may be appended. For example: # # node.css('bike|tire', {'bike' => 'http://schwinn.com/'}) # # Custom CSS pseudo classes may also be defined. To define # custom pseudo classes, create a class and implement the custom # pseudo class you want defined. The first argument to the # method will be the current matching NodeSet. Any other # arguments are ones that you pass in. For example: # # node.css('title:regex("\w+")', Class.new { # def regex node_set, regex # node_set.find_all { |node| node['some_attribute'] =~ /#{regex}/ } # end # }.new) # # Note that the CSS query string is case-sensitive with regards # to your document type. That is, if you're looking for "H1" in # an HTML document, you'll never find anything, since HTML tags # will match only lowercase CSS queries. However, "H1" might be # found in an XML document, where tags names are case-sensitive # (e.g., "H1" is distinct from "h1"). # def css *args rules, handler, ns, _ = extract_params(args) css_internal self, rules, handler, ns end ## # call-seq: css *rules, [namespace-bindings, custom-pseudo-class] # # Search this object for CSS +rules+, and return only the first # match. +rules+ must be one or more CSS selectors. # # See Searchable#css for more information. def at_css *args css(*args).first end ### # call-seq: xpath *paths, [namespace-bindings, variable-bindings, custom-handler-class] # # Search this node for XPath +paths+. +paths+ must be one or more XPath # queries. # # node.xpath('.//title') # # A hash of namespace bindings may be appended. For example: # # node.xpath('.//foo:name', {'foo' => 'http://example.org/'}) # node.xpath('.//xmlns:name', node.root.namespaces) # # A hash of variable bindings may also be appended to the namespace bindings. For example: # # node.xpath('.//address[@domestic=$value]', nil, {:value => 'Yes'}) # # Custom XPath functions may also be defined. To define custom # functions create a class and implement the function you want # to define. The first argument to the method will be the # current matching NodeSet. Any other arguments are ones that # you pass in. Note that this class may appear anywhere in the # argument list. For example: # # node.xpath('.//title[regex(., "\w+")]', Class.new { # def regex node_set, regex # node_set.find_all { |node| node['some_attribute'] =~ /#{regex}/ } # end # }.new) # def xpath *args paths, handler, ns, binds = extract_params(args) xpath_internal self, paths, handler, ns, binds end ## # call-seq: xpath *paths, [namespace-bindings, variable-bindings, custom-handler-class] # # Search this node for XPath +paths+, and return only the first # match. +paths+ must be one or more XPath queries. # # See Searchable#xpath for more information. def at_xpath *args xpath(*args).first end private def css_internal node, rules, handler, ns xpath_internal node, css_rules_to_xpath(rules, ns), handler, ns, nil end def xpath_internal node, paths, handler, ns, binds document = node.document return NodeSet.new(document) unless document if paths.length == 1 return xpath_impl(node, paths.first, handler, ns, binds) end NodeSet.new(document) do |combined| paths.each do |path| xpath_impl(node, path, handler, ns, binds).each { |set| combined << set } end end end def xpath_impl node, path, handler, ns, binds ctx = XPathContext.new(node) ctx.register_namespaces(ns) path = path.gsub(/xmlns:/, ' :') unless Nokogiri.uses_libxml? binds.each do |key,value| ctx.register_variable key.to_s, value end if binds ctx.evaluate(path, handler) end def css_rules_to_xpath(rules, ns) rules.map { |rule| xpath_query_from_css_rule(rule, ns) } end def xpath_query_from_css_rule rule, ns self.class::IMPLIED_XPATH_CONTEXTS.map do |implied_xpath_context| CSS.xpath_for(rule.to_s, :prefix => implied_xpath_context, :ns => ns) end.join(' | ') end def extract_params params # :nodoc: handler = params.find do |param| ![Hash, String, Symbol].include?(param.class) end params -= [handler] if handler hashes = [] while Hash === params.last || params.last.nil? hashes << params.pop break if params.empty? end ns, binds = hashes.reverse ns ||= document.root ? document.root.namespaces : {} [params, handler, ns, binds] end end end end nokogiri-1.8.2/lib/nokogiri/xml/attribute_decl.rb0000644000004100000410000000073513235345655022121 0ustar www-datawww-datamodule Nokogiri module XML ### # Represents an attribute declaration in a DTD class AttributeDecl < Nokogiri::XML::Node undef_method :attribute_nodes undef_method :attributes undef_method :content undef_method :namespace undef_method :namespace_definitions undef_method :line if method_defined?(:line) def inspect "#<#{self.class.name}:#{sprintf("0x%x", object_id)} #{to_s.inspect}>" end end end end nokogiri-1.8.2/lib/nokogiri/xml/attr.rb0000644000004100000410000000036413235345655020077 0ustar www-datawww-datamodule Nokogiri module XML class Attr < Node alias :value :content alias :to_s :content alias :content= :value= private def inspect_attributes [:name, :namespace, :value] end end end end nokogiri-1.8.2/lib/nokogiri/xml/document_fragment.rb0000644000004100000410000001045713235345655022632 0ustar www-datawww-datamodule Nokogiri module XML class DocumentFragment < Nokogiri::XML::Node ## # Create a new DocumentFragment from +tags+. # # If +ctx+ is present, it is used as a context node for the # subtree created, e.g., namespaces will be resolved relative # to +ctx+. def initialize document, tags = nil, ctx = nil return self unless tags children = if ctx # Fix for issue#490 if Nokogiri.jruby? # fix for issue #770 ctx.parse("#{tags}").children else ctx.parse(tags) end else XML::Document.parse("#{tags}") \ .xpath("/root/node()") end children.each { |child| child.parent = self } end ### # return the name for DocumentFragment def name '#document-fragment' end ### # Convert this DocumentFragment to a string def to_s children.to_s end ### # Convert this DocumentFragment to html # See Nokogiri::XML::NodeSet#to_html def to_html *args if Nokogiri.jruby? options = args.first.is_a?(Hash) ? args.shift : {} if !options[:save_with] options[:save_with] = Node::SaveOptions::NO_DECLARATION | Node::SaveOptions::NO_EMPTY_TAGS | Node::SaveOptions::AS_HTML end args.insert(0, options) end children.to_html(*args) end ### # Convert this DocumentFragment to xhtml # See Nokogiri::XML::NodeSet#to_xhtml def to_xhtml *args if Nokogiri.jruby? options = args.first.is_a?(Hash) ? args.shift : {} if !options[:save_with] options[:save_with] = Node::SaveOptions::NO_DECLARATION | Node::SaveOptions::NO_EMPTY_TAGS | Node::SaveOptions::AS_XHTML end args.insert(0, options) end children.to_xhtml(*args) end ### # Convert this DocumentFragment to xml # See Nokogiri::XML::NodeSet#to_xml def to_xml *args children.to_xml(*args) end ### # call-seq: css *rules, [namespace-bindings, custom-pseudo-class] # # Search this fragment for CSS +rules+. +rules+ must be one or more CSS # selectors. For example: # # For more information see Nokogiri::XML::Searchable#css def css *args if children.any? children.css(*args) # 'children' is a smell here else NodeSet.new(document) end end # # NOTE that we don't delegate #xpath to children ... another smell. # def xpath ; end # ### # call-seq: search *paths, [namespace-bindings, xpath-variable-bindings, custom-handler-class] # # Search this fragment for +paths+. +paths+ must be one or more XPath or CSS queries. # # For more information see Nokogiri::XML::Searchable#search def search *rules rules, handler, ns, binds = extract_params(rules) rules.inject(NodeSet.new(document)) do |set, rule| set += if rule =~ Searchable::LOOKS_LIKE_XPATH xpath(*([rule, ns, handler, binds].compact)) else children.css(*([rule, ns, handler].compact)) # 'children' is a smell here end end end alias :serialize :to_s class << self #### # Create a Nokogiri::XML::DocumentFragment from +tags+ def parse tags self.new(XML::Document.new, tags) end end # A list of Nokogiri::XML::SyntaxError found when parsing a document def errors document.errors end def errors= things # :nodoc: document.errors = things end private # fix for issue 770 def namespace_declarations ctx ctx.namespace_scopes.map do |namespace| prefix = namespace.prefix.nil? ? "" : ":#{namespace.prefix}" %Q{xmlns#{prefix}="#{namespace.href}"} end.join ' ' end def coerce data return super unless String === data document.fragment(data).children end end end end nokogiri-1.8.2/lib/nokogiri/xml/node.rb0000644000004100000410000006657113235345655020066 0ustar www-datawww-data# encoding: UTF-8 require 'stringio' require 'nokogiri/xml/node/save_options' module Nokogiri module XML #### # Nokogiri::XML::Node is your window to the fun filled world of dealing # with XML and HTML tags. A Nokogiri::XML::Node may be treated similarly # to a hash with regard to attributes. For example (from irb): # # irb(main):004:0> node # => link # irb(main):005:0> node['href'] # => "#foo" # irb(main):006:0> node.keys # => ["href", "id"] # irb(main):007:0> node.values # => ["#foo", "link"] # irb(main):008:0> node['class'] = 'green' # => "green" # irb(main):009:0> node # => link # irb(main):010:0> # # See Nokogiri::XML::Node#[] and Nokogiri::XML#[]= for more information. # # Nokogiri::XML::Node also has methods that let you move around your # tree. For navigating your tree, see: # # * Nokogiri::XML::Node#parent # * Nokogiri::XML::Node#children # * Nokogiri::XML::Node#next # * Nokogiri::XML::Node#previous # # # When printing or otherwise emitting a document or a node (and # its subtree), there are a few methods you might want to use: # # * content, text, inner_text, to_str: emit plaintext # # These methods will all emit the plaintext version of your # document, meaning that entities will be replaced (e.g., "<" # will be replaced with "<"), meaning that any sanitizing will # likely be un-done in the output. # # * to_s, to_xml, to_html, inner_html: emit well-formed markup # # These methods will all emit properly-escaped markup, meaning # that it's suitable for consumption by browsers, parsers, etc. # # You may search this node's subtree using Searchable#xpath and Searchable#css class Node include Nokogiri::XML::PP::Node include Nokogiri::XML::Searchable include Enumerable # Element node type, see Nokogiri::XML::Node#element? ELEMENT_NODE = 1 # Attribute node type ATTRIBUTE_NODE = 2 # Text node type, see Nokogiri::XML::Node#text? TEXT_NODE = 3 # CDATA node type, see Nokogiri::XML::Node#cdata? CDATA_SECTION_NODE = 4 # Entity reference node type ENTITY_REF_NODE = 5 # Entity node type ENTITY_NODE = 6 # PI node type PI_NODE = 7 # Comment node type, see Nokogiri::XML::Node#comment? COMMENT_NODE = 8 # Document node type, see Nokogiri::XML::Node#xml? DOCUMENT_NODE = 9 # Document type node type DOCUMENT_TYPE_NODE = 10 # Document fragment node type DOCUMENT_FRAG_NODE = 11 # Notation node type NOTATION_NODE = 12 # HTML document node type, see Nokogiri::XML::Node#html? HTML_DOCUMENT_NODE = 13 # DTD node type DTD_NODE = 14 # Element declaration type ELEMENT_DECL = 15 # Attribute declaration type ATTRIBUTE_DECL = 16 # Entity declaration type ENTITY_DECL = 17 # Namespace declaration type NAMESPACE_DECL = 18 # XInclude start type XINCLUDE_START = 19 # XInclude end type XINCLUDE_END = 20 # DOCB document node type DOCB_DOCUMENT_NODE = 21 def initialize name, document # :nodoc: # ... Ya. This is empty on purpose. end ### # Decorate this node with the decorators set up in this node's Document def decorate! document.decorate(self) end ### # Search this node's immediate children using CSS selector +selector+ def > selector ns = document.root.namespaces xpath CSS.xpath_for(selector, :prefix => "./", :ns => ns).first end ### # Get the attribute value for the attribute +name+ def [] name get(name.to_s) end ### # Set the attribute value for the attribute +name+ to +value+ def []= name, value set name.to_s, value.to_s end ### # Add +node_or_tags+ as a child of this Node. # +node_or_tags+ can be a Nokogiri::XML::Node, a ::DocumentFragment, a ::NodeSet, or a string containing markup. # # Returns the reparented node (if +node_or_tags+ is a Node), or NodeSet (if +node_or_tags+ is a DocumentFragment, NodeSet, or string). # # Also see related method +<<+. def add_child node_or_tags node_or_tags = coerce(node_or_tags) if node_or_tags.is_a?(XML::NodeSet) node_or_tags.each { |n| add_child_node_and_reparent_attrs n } else add_child_node_and_reparent_attrs node_or_tags end node_or_tags end ### # Add +node_or_tags+ as the first child of this Node. # +node_or_tags+ can be a Nokogiri::XML::Node, a ::DocumentFragment, a ::NodeSet, or a string containing markup. # # Returns the reparented node (if +node_or_tags+ is a Node), or NodeSet (if +node_or_tags+ is a DocumentFragment, NodeSet, or string). # # Also see related method +add_child+. def prepend_child node_or_tags if first = children.first # Mimic the error add_child would raise. raise RuntimeError, "Document already has a root node" if document? && !(node_or_tags.comment? || node_or_tags.processing_instruction?) first.__send__(:add_sibling, :previous, node_or_tags) else add_child(node_or_tags) end end ### # Add +node_or_tags+ as a child of this Node. # +node_or_tags+ can be a Nokogiri::XML::Node, a ::DocumentFragment, a ::NodeSet, or a string containing markup. # # Returns self, to support chaining of calls (e.g., root << child1 << child2) # # Also see related method +add_child+. def << node_or_tags add_child node_or_tags self end ### # Insert +node_or_tags+ before this Node (as a sibling). # +node_or_tags+ can be a Nokogiri::XML::Node, a ::DocumentFragment, a ::NodeSet, or a string containing markup. # # Returns the reparented node (if +node_or_tags+ is a Node), or NodeSet (if +node_or_tags+ is a DocumentFragment, NodeSet, or string). # # Also see related method +before+. def add_previous_sibling node_or_tags raise ArgumentError.new("A document may not have multiple root nodes.") if (parent && parent.document?) && !(node_or_tags.comment? || node_or_tags.processing_instruction?) add_sibling :previous, node_or_tags end ### # Insert +node_or_tags+ after this Node (as a sibling). # +node_or_tags+ can be a Nokogiri::XML::Node, a ::DocumentFragment, a ::NodeSet, or a string containing markup. # # Returns the reparented node (if +node_or_tags+ is a Node), or NodeSet (if +node_or_tags+ is a DocumentFragment, NodeSet, or string). # # Also see related method +after+. def add_next_sibling node_or_tags raise ArgumentError.new("A document may not have multiple root nodes.") if (parent && parent.document?) && !(node_or_tags.comment? || node_or_tags.processing_instruction?) add_sibling :next, node_or_tags end #### # Insert +node_or_tags+ before this node (as a sibling). # +node_or_tags+ can be a Nokogiri::XML::Node, a ::DocumentFragment, a ::NodeSet, or a string containing markup. # # Returns self, to support chaining of calls. # # Also see related method +add_previous_sibling+. def before node_or_tags add_previous_sibling node_or_tags self end #### # Insert +node_or_tags+ after this node (as a sibling). # +node_or_tags+ can be a Nokogiri::XML::Node, a Nokogiri::XML::DocumentFragment, or a string containing markup. # # Returns self, to support chaining of calls. # # Also see related method +add_next_sibling+. def after node_or_tags add_next_sibling node_or_tags self end #### # Set the inner html for this Node to +node_or_tags+ # +node_or_tags+ can be a Nokogiri::XML::Node, a Nokogiri::XML::DocumentFragment, or a string containing markup. # # Returns self. # # Also see related method +children=+ def inner_html= node_or_tags self.children = node_or_tags self end #### # Set the inner html for this Node +node_or_tags+ # +node_or_tags+ can be a Nokogiri::XML::Node, a Nokogiri::XML::DocumentFragment, or a string containing markup. # # Returns the reparented node (if +node_or_tags+ is a Node), or NodeSet (if +node_or_tags+ is a DocumentFragment, NodeSet, or string). # # Also see related method +inner_html=+ def children= node_or_tags node_or_tags = coerce(node_or_tags) children.unlink if node_or_tags.is_a?(XML::NodeSet) node_or_tags.each { |n| add_child_node_and_reparent_attrs n } else add_child_node_and_reparent_attrs node_or_tags end node_or_tags end #### # Replace this Node with +node_or_tags+. # +node_or_tags+ can be a Nokogiri::XML::Node, a ::DocumentFragment, a ::NodeSet, or a string containing markup. # # Returns the reparented node (if +node_or_tags+ is a Node), or NodeSet (if +node_or_tags+ is a DocumentFragment, NodeSet, or string). # # Also see related method +swap+. def replace node_or_tags # We cannot replace a text node directly, otherwise libxml will return # an internal error at parser.c:13031, I don't know exactly why # libxml is trying to find a parent node that is an element or document # so I can't tell if this is bug in libxml or not. issue #775. if text? replacee = Nokogiri::XML::Node.new 'dummy', document add_previous_sibling_node replacee unlink return replacee.replace node_or_tags end node_or_tags = coerce(node_or_tags) if node_or_tags.is_a?(XML::NodeSet) node_or_tags.each { |n| add_previous_sibling n } unlink else replace_node node_or_tags end node_or_tags end #### # Swap this Node for +node_or_tags+ # +node_or_tags+ can be a Nokogiri::XML::Node, a ::DocumentFragment, a ::NodeSet, or a string containing markup. # # Returns self, to support chaining of calls. # # Also see related method +replace+. def swap node_or_tags replace node_or_tags self end alias :next :next_sibling alias :previous :previous_sibling # :stopdoc: # HACK: This is to work around an RDoc bug alias :next= :add_next_sibling # :startdoc: alias :previous= :add_previous_sibling alias :remove :unlink alias :get_attribute :[] alias :attr :[] alias :set_attribute :[]= alias :text :content alias :inner_text :content alias :has_attribute? :key? alias :name :node_name alias :name= :node_name= alias :type :node_type alias :to_str :text alias :clone :dup alias :elements :element_children #### # Returns a hash containing the node's attributes. The key is # the attribute name without any namespace, the value is a Nokogiri::XML::Attr # representing the attribute. # If you need to distinguish attributes with the same name, with different namespaces # use #attribute_nodes instead. def attributes Hash[attribute_nodes.map { |node| [node.node_name, node] }] end ### # Get the attribute values for this Node. def values attribute_nodes.map(&:value) end ### # Get the attribute names for this Node. def keys attribute_nodes.map(&:node_name) end ### # Iterate over each attribute name and value pair for this Node. def each attribute_nodes.each { |node| yield [node.node_name, node.value] } end ### # Remove the attribute named +name+ def remove_attribute name attr = attributes[name].remove if key? name clear_xpath_context if Nokogiri.jruby? attr end alias :delete :remove_attribute ### # Returns true if this Node matches +selector+ def matches? selector ancestors.last.search(selector).include?(self) end ### # Create a DocumentFragment containing +tags+ that is relative to _this_ # context node. def fragment tags type = document.html? ? Nokogiri::HTML : Nokogiri::XML type::DocumentFragment.new(document, tags, self) end ### # Parse +string_or_io+ as a document fragment within the context of # *this* node. Returns a XML::NodeSet containing the nodes parsed from # +string_or_io+. def parse string_or_io, options = nil ## # When the current node is unparented and not an element node, use the # document as the parsing context instead. Otherwise, the in-context # parser cannot find an element or a document node. # Document Fragments are also not usable by the in-context parser. if !element? && !document? && (!parent || parent.fragment?) return document.parse(string_or_io, options) end options ||= (document.html? ? ParseOptions::DEFAULT_HTML : ParseOptions::DEFAULT_XML) if Integer === options options = Nokogiri::XML::ParseOptions.new(options) end # Give the options to the user yield options if block_given? contents = string_or_io.respond_to?(:read) ? string_or_io.read : string_or_io return Nokogiri::XML::NodeSet.new(document) if contents.empty? ## # This is a horrible hack, but I don't care. See #313 for background. error_count = document.errors.length node_set = in_context(contents, options.to_i) if node_set.empty? and document.errors.length > error_count and options.recover? fragment = Nokogiri::HTML::DocumentFragment.parse contents node_set = fragment.children end node_set end #### # Set the Node's content to a Text node containing +string+. The string gets XML escaped, not interpreted as markup. def content= string self.native_content = encode_special_chars(string.to_s) end ### # Set the parent Node for this Node def parent= parent_node parent_node.add_child(self) parent_node end ### # Returns a Hash of {prefix => value} for all namespaces on this # node and its ancestors. # # This method returns the same namespaces as #namespace_scopes. # # Returns namespaces in scope for self -- those defined on self # element directly or any ancestor node -- as a Hash of # attribute-name/value pairs. Note that the keys in this hash # XML attributes that would be used to define this namespace, # such as "xmlns:prefix", not just the prefix. Default namespace # set on self will be included with key "xmlns". However, # default namespaces set on ancestor will NOT be, even if self # has no explicit default namespace. def namespaces Hash[namespace_scopes.map { |nd| key = ['xmlns', nd.prefix].compact.join(':') [key, nd.href] }] end # Returns true if this is a Comment def comment? type == COMMENT_NODE end # Returns true if this is a CDATA def cdata? type == CDATA_SECTION_NODE end # Returns true if this is an XML::Document node def xml? type == DOCUMENT_NODE end # Returns true if this is an HTML::Document node def html? type == HTML_DOCUMENT_NODE end # Returns true if this is a Document def document? is_a? XML::Document end # Returns true if this is a ProcessingInstruction node def processing_instruction? type == PI_NODE end # Returns true if this is a Text node def text? type == TEXT_NODE end # Returns true if this is a DocumentFragment def fragment? type == DOCUMENT_FRAG_NODE end ### # Fetch the Nokogiri::HTML::ElementDescription for this node. Returns # nil on XML documents and on unknown tags. def description return nil if document.xml? Nokogiri::HTML::ElementDescription[name] end ### # Is this a read only node? def read_only? # According to gdome2, these are read-only node types [NOTATION_NODE, ENTITY_NODE, ENTITY_DECL].include?(type) end # Returns true if this is an Element node def element? type == ELEMENT_NODE end alias :elem? :element? ### # Turn this node in to a string. If the document is HTML, this method # returns html. If the document is XML, this method returns XML. def to_s document.xml? ? to_xml : to_html end # Get the inner_html for this node's Node#children def inner_html *args children.map { |x| x.to_html(*args) }.join end # Get the path to this node as a CSS expression def css_path path.split(/\//).map { |part| part.length == 0 ? nil : part.gsub(/\[(\d+)\]/, ':nth-of-type(\1)') }.compact.join(' > ') end ### # Get a list of ancestor Node for this Node. If +selector+ is given, # the ancestors must match +selector+ def ancestors selector = nil return NodeSet.new(document) unless respond_to?(:parent) return NodeSet.new(document) unless parent parents = [parent] while parents.last.respond_to?(:parent) break unless ctx_parent = parents.last.parent parents << ctx_parent end return NodeSet.new(document, parents) unless selector root = parents.last search_results = root.search(selector) NodeSet.new(document, parents.find_all { |parent| search_results.include?(parent) }) end ### # Adds a default namespace supplied as a string +url+ href, to self. # The consequence is as an xmlns attribute with supplied argument were # present in parsed XML. A default namespace set with this method will # now show up in #attributes, but when this node is serialized to XML an # "xmlns" attribute will appear. See also #namespace and #namespace= def default_namespace= url add_namespace_definition(nil, url) end alias :add_namespace :add_namespace_definition ### # Set the default namespace on this node (as would be defined with an # "xmlns=" attribute in XML source), as a Namespace object +ns+. Note that # a Namespace added this way will NOT be serialized as an xmlns attribute # for this node. You probably want #default_namespace= instead, or perhaps # #add_namespace_definition with a nil prefix argument. def namespace= ns return set_namespace(ns) unless ns unless Nokogiri::XML::Namespace === ns raise TypeError, "#{ns.class} can't be coerced into Nokogiri::XML::Namespace" end if ns.document != document raise ArgumentError, 'namespace must be declared on the same document' end set_namespace ns end #### # Yields self and all children to +block+ recursively. def traverse &block children.each{|j| j.traverse(&block) } block.call(self) end ### # Accept a visitor. This method calls "visit" on +visitor+ with self. def accept visitor visitor.visit(self) end ### # Test to see if this Node is equal to +other+ def == other return false unless other return false unless other.respond_to?(:pointer_id) pointer_id == other.pointer_id end ### # Serialize Node using +options+. Save options can also be set using a # block. See SaveOptions. # # These two statements are equivalent: # # node.serialize(:encoding => 'UTF-8', :save_with => FORMAT | AS_XML) # # or # # node.serialize(:encoding => 'UTF-8') do |config| # config.format.as_xml # end # def serialize *args, &block options = args.first.is_a?(Hash) ? args.shift : { :encoding => args[0], :save_with => args[1] } encoding = options[:encoding] || document.encoding options[:encoding] = encoding outstring = String.new outstring.force_encoding(Encoding.find(encoding || 'utf-8')) io = StringIO.new(outstring) write_to io, options, &block io.string end ### # Serialize this Node to HTML # # doc.to_html # # See Node#write_to for a list of +options+. For formatted output, # use Node#to_xhtml instead. def to_html options = {} to_format SaveOptions::DEFAULT_HTML, options end ### # Serialize this Node to XML using +options+ # # doc.to_xml(:indent => 5, :encoding => 'UTF-8') # # See Node#write_to for a list of +options+ def to_xml options = {} options[:save_with] ||= SaveOptions::DEFAULT_XML serialize(options) end ### # Serialize this Node to XHTML using +options+ # # doc.to_xhtml(:indent => 5, :encoding => 'UTF-8') # # See Node#write_to for a list of +options+ def to_xhtml options = {} to_format SaveOptions::DEFAULT_XHTML, options end ### # Write Node to +io+ with +options+. +options+ modify the output of # this method. Valid options are: # # * +:encoding+ for changing the encoding # * +:indent_text+ the indentation text, defaults to one space # * +:indent+ the number of +:indent_text+ to use, defaults to 2 # * +:save_with+ a combination of SaveOptions constants. # # To save with UTF-8 indented twice: # # node.write_to(io, :encoding => 'UTF-8', :indent => 2) # # To save indented with two dashes: # # node.write_to(io, :indent_text => '-', :indent => 2) # def write_to io, *options options = options.first.is_a?(Hash) ? options.shift : {} encoding = options[:encoding] || options[0] if Nokogiri.jruby? save_options = options[:save_with] || options[1] indent_times = options[:indent] || 0 else save_options = options[:save_with] || options[1] || SaveOptions::FORMAT indent_times = options[:indent] || 2 end indent_text = options[:indent_text] || ' ' config = SaveOptions.new(save_options.to_i) yield config if block_given? native_write_to(io, encoding, indent_text * indent_times, config.options) end ### # Write Node as HTML to +io+ with +options+ # # See Node#write_to for a list of +options+ def write_html_to io, options = {} write_format_to SaveOptions::DEFAULT_HTML, io, options end ### # Write Node as XHTML to +io+ with +options+ # # See Node#write_to for a list of +options+ def write_xhtml_to io, options = {} write_format_to SaveOptions::DEFAULT_XHTML, io, options end ### # Write Node as XML to +io+ with +options+ # # doc.write_xml_to io, :encoding => 'UTF-8' # # See Node#write_to for a list of options def write_xml_to io, options = {} options[:save_with] ||= SaveOptions::DEFAULT_XML write_to io, options end ### # Compare two Node objects with respect to their Document. Nodes from # different documents cannot be compared. def <=> other return nil unless other.is_a?(Nokogiri::XML::Node) return nil unless document == other.document compare other end ### # Do xinclude substitution on the subtree below node. If given a block, a # Nokogiri::XML::ParseOptions object initialized from +options+, will be # passed to it, allowing more convenient modification of the parser options. def do_xinclude options = XML::ParseOptions::DEFAULT_XML, &block options = Nokogiri::XML::ParseOptions.new(options) if Integer === options # give options to user yield options if block_given? # call c extension process_xincludes(options.to_i) end def canonicalize(mode=XML::XML_C14N_1_0,inclusive_namespaces=nil,with_comments=false) c14n_root = self document.canonicalize(mode, inclusive_namespaces, with_comments) do |node, parent| tn = node.is_a?(XML::Node) ? node : parent tn == c14n_root || tn.ancestors.include?(c14n_root) end end private def add_sibling next_or_previous, node_or_tags impl = (next_or_previous == :next) ? :add_next_sibling_node : :add_previous_sibling_node iter = (next_or_previous == :next) ? :reverse_each : :each node_or_tags = coerce node_or_tags if node_or_tags.is_a?(XML::NodeSet) if text? pivot = Nokogiri::XML::Node.new 'dummy', document send impl, pivot else pivot = self end node_or_tags.send(iter) { |n| pivot.send impl, n } pivot.unlink if text? else send impl, node_or_tags end node_or_tags end def to_format save_option, options # FIXME: this is a hack around broken libxml versions return dump_html if Nokogiri.uses_libxml? && %w[2 6] === LIBXML_VERSION.split('.')[0..1] options[:save_with] = save_option unless options[:save_with] serialize(options) end def write_format_to save_option, io, options # FIXME: this is a hack around broken libxml versions return (io << dump_html) if Nokogiri.uses_libxml? && %w[2 6] === LIBXML_VERSION.split('.')[0..1] options[:save_with] ||= save_option write_to io, options end def inspect_attributes [:name, :namespace, :attribute_nodes, :children] end def coerce data # :nodoc: case data when XML::NodeSet return data when XML::DocumentFragment return data.children when String return fragment(data).children when Document, XML::Attr # unacceptable when XML::Node return data end raise ArgumentError, <<-EOERR Requires a Node, NodeSet or String argument, and cannot accept a #{data.class}. (You probably want to select a node from the Document with at() or search(), or create a new Node via Node.new().) EOERR end # @private IMPLIED_XPATH_CONTEXTS = [ './/'.freeze ].freeze # :nodoc: def add_child_node_and_reparent_attrs node # :nodoc: add_child_node node node.attribute_nodes.find_all { |a| a.name =~ /:/ }.each do |attr_node| attr_node.remove node[attr_node.name] = attr_node.value end end end end end nokogiri-1.8.2/lib/nokogiri/xml/pp.rb0000644000004100000410000000011013235345655017531 0ustar www-datawww-datarequire 'nokogiri/xml/pp/node' require 'nokogiri/xml/pp/character_data' nokogiri-1.8.2/lib/nokogiri/xml/entity_decl.rb0000644000004100000410000000073113235345655021426 0ustar www-datawww-datamodule Nokogiri module XML class EntityDecl < Nokogiri::XML::Node undef_method :attribute_nodes undef_method :attributes undef_method :namespace undef_method :namespace_definitions undef_method :line if method_defined?(:line) def self.new name, doc, *args doc.create_entity(name, *args) end def inspect "#<#{self.class.name}:#{sprintf("0x%x", object_id)} #{to_s.inspect}>" end end end end nokogiri-1.8.2/lib/nokogiri/xml/builder.rb0000644000004100000410000003000113235345655020542 0ustar www-datawww-datamodule Nokogiri module XML ### # Nokogiri builder can be used for building XML and HTML documents. # # == Synopsis: # # builder = Nokogiri::XML::Builder.new do |xml| # xml.root { # xml.products { # xml.widget { # xml.id_ "10" # xml.name "Awesome widget" # } # } # } # end # puts builder.to_xml # # Will output: # # # # # # 10 # Awesome widget # # # # # # === Builder scope # # The builder allows two forms. When the builder is supplied with a block # that has a parameter, the outside scope is maintained. This means you # can access variables that are outside your builder. If you don't need # outside scope, you can use the builder without the "xml" prefix like # this: # # builder = Nokogiri::XML::Builder.new do # root { # products { # widget { # id_ "10" # name "Awesome widget" # } # } # } # end # # == Special Tags # # The builder works by taking advantage of method_missing. Unfortunately # some methods are defined in ruby that are difficult or dangerous to # remove. You may want to create tags with the name "type", "class", and # "id" for example. In that case, you can use an underscore to # disambiguate your tag name from the method call. # # Here is an example of using the underscore to disambiguate tag names from # ruby methods: # # @objects = [Object.new, Object.new, Object.new] # # builder = Nokogiri::XML::Builder.new do |xml| # xml.root { # xml.objects { # @objects.each do |o| # xml.object { # xml.type_ o.type # xml.class_ o.class.name # xml.id_ o.id # } # end # } # } # end # puts builder.to_xml # # The underscore may be used with any tag name, and the last underscore # will just be removed. This code will output the following XML: # # # # # # Object # Object # 48390 # # # Object # Object # 48380 # # # Object # Object # 48370 # # # # # == Tag Attributes # # Tag attributes may be supplied as method arguments. Here is our # previous example, but using attributes rather than tags: # # @objects = [Object.new, Object.new, Object.new] # # builder = Nokogiri::XML::Builder.new do |xml| # xml.root { # xml.objects { # @objects.each do |o| # xml.object(:type => o.type, :class => o.class, :id => o.id) # end # } # } # end # puts builder.to_xml # # === Tag Attribute Short Cuts # # A couple attribute short cuts are available when building tags. The # short cuts are available by special method calls when building a tag. # # This example builds an "object" tag with the class attribute "classy" # and the id of "thing": # # builder = Nokogiri::XML::Builder.new do |xml| # xml.root { # xml.objects { # xml.object.classy.thing! # } # } # end # puts builder.to_xml # # Which will output: # # # # # # # # # All other options are still supported with this syntax, including # blocks and extra tag attributes. # # == Namespaces # # Namespaces are added similarly to attributes. Nokogiri::XML::Builder # assumes that when an attribute starts with "xmlns", it is meant to be # a namespace: # # builder = Nokogiri::XML::Builder.new { |xml| # xml.root('xmlns' => 'default', 'xmlns:foo' => 'bar') do # xml.tenderlove # end # } # puts builder.to_xml # # Will output XML like this: # # # # # # # === Referencing declared namespaces # # Tags that reference non-default namespaces (i.e. a tag "foo:bar") can be # built by using the Nokogiri::XML::Builder#[] method. # # For example: # # builder = Nokogiri::XML::Builder.new do |xml| # xml.root('xmlns:foo' => 'bar') { # xml.objects { # xml['foo'].object.classy.thing! # } # } # end # puts builder.to_xml # # Will output this XML: # # # # # # # # # Note the "foo:object" tag. # # == Document Types # # To create a document type (DTD), access use the Builder#doc method to get # the current context document. Then call Node#create_internal_subset to # create the DTD node. # # For example, this Ruby: # # builder = Nokogiri::XML::Builder.new do |xml| # xml.doc.create_internal_subset( # 'html', # "-//W3C//DTD HTML 4.01 Transitional//EN", # "http://www.w3.org/TR/html4/loose.dtd" # ) # xml.root do # xml.foo # end # end # # puts builder.to_xml # # Will output this xml: # # # # # # # class Builder # The current Document object being built attr_accessor :doc # The parent of the current node being built attr_accessor :parent # A context object for use when the block has no arguments attr_accessor :context attr_accessor :arity # :nodoc: ### # Create a builder with an existing root object. This is for use when # you have an existing document that you would like to augment with # builder methods. The builder context created will start with the # given +root+ node. # # For example: # # doc = Nokogiri::XML(open('somedoc.xml')) # Nokogiri::XML::Builder.with(doc.at('some_tag')) do |xml| # # ... Use normal builder methods here ... # xml.awesome # add the "awesome" tag below "some_tag" # end # def self.with root, &block new({}, root, &block) end ### # Create a new Builder object. +options+ are sent to the top level # Document that is being built. # # Building a document with a particular encoding for example: # # Nokogiri::XML::Builder.new(:encoding => 'UTF-8') do |xml| # ... # end def initialize options = {}, root = nil, &block if root @doc = root.document @parent = root else namespace = self.class.name.split('::') namespace[-1] = 'Document' @doc = eval(namespace.join('::')).new @parent = @doc end @context = nil @arity = nil @ns = nil options.each do |k,v| @doc.send(:"#{k}=", v) end return unless block_given? @arity = block.arity if @arity <= 0 @context = eval('self', block.binding) instance_eval(&block) else yield self end @parent = @doc end ### # Create a Text Node with content of +string+ def text string insert @doc.create_text_node(string) end ### # Create a CDATA Node with content of +string+ def cdata string insert doc.create_cdata(string) end ### # Create a Comment Node with content of +string+ def comment string insert doc.create_comment(string) end ### # Build a tag that is associated with namespace +ns+. Raises an # ArgumentError if +ns+ has not been defined higher in the tree. def [] ns if @parent != @doc @ns = @parent.namespace_definitions.find { |x| x.prefix == ns.to_s } end return self if @ns @parent.ancestors.each do |a| next if a == doc @ns = a.namespace_definitions.find { |x| x.prefix == ns.to_s } return self if @ns end @ns = { :pending => ns.to_s } return self end ### # Convert this Builder object to XML def to_xml(*args) if Nokogiri.jruby? options = args.first.is_a?(Hash) ? args.shift : {} if !options[:save_with] options[:save_with] = Node::SaveOptions::AS_BUILDER end args.insert(0, options) end @doc.to_xml(*args) end ### # Append the given raw XML +string+ to the document def << string @doc.fragment(string).children.each { |x| insert(x) } end def method_missing method, *args, &block # :nodoc: if @context && @context.respond_to?(method) @context.send(method, *args, &block) else node = @doc.create_element(method.to_s.sub(/[_!]$/, ''),*args) { |n| # Set up the namespace if @ns.is_a? Nokogiri::XML::Namespace n.namespace = @ns @ns = nil end } if @ns.is_a? Hash node.namespace = node.namespace_definitions.find { |x| x.prefix == @ns[:pending] } if node.namespace.nil? raise ArgumentError, "Namespace #{@ns[:pending]} has not been defined" end @ns = nil end insert(node, &block) end end private ### # Insert +node+ as a child of the current Node def insert(node, &block) node = @parent.add_child(node) if block_given? old_parent = @parent @parent = node @arity ||= block.arity if @arity <= 0 instance_eval(&block) else block.call(self) end @parent = old_parent end NodeBuilder.new(node, self) end class NodeBuilder # :nodoc: def initialize node, doc_builder @node = node @doc_builder = doc_builder end def []= k, v @node[k] = v end def [] k @node[k] end def method_missing(method, *args, &block) opts = args.last.is_a?(Hash) ? args.pop : {} case method.to_s when /^(.*)!$/ @node['id'] = $1 @node.content = args.first if args.first when /^(.*)=/ @node[$1] = args.first else @node['class'] = ((@node['class'] || '').split(/\s/) + [method.to_s]).join(' ') @node.content = args.first if args.first end # Assign any extra options opts.each do |k,v| @node[k.to_s] = ((@node[k.to_s] || '').split(/\s/) + [v]).join(' ') end if block_given? old_parent = @doc_builder.parent @doc_builder.parent = @node value = @doc_builder.instance_eval(&block) @doc_builder.parent = old_parent return value end self end end end end end nokogiri-1.8.2/lib/nokogiri/xml/node/0000755000004100000410000000000013235345655017522 5ustar www-datawww-datanokogiri-1.8.2/lib/nokogiri/xml/node/save_options.rb0000644000004100000410000000335113235345655022562 0ustar www-datawww-datamodule Nokogiri module XML class Node ### # Save options for serializing nodes class SaveOptions # Format serialized xml FORMAT = 1 # Do not include declarations NO_DECLARATION = 2 # Do not include empty tags NO_EMPTY_TAGS = 4 # Do not save XHTML NO_XHTML = 8 # Save as XHTML AS_XHTML = 16 # Save as XML AS_XML = 32 # Save as HTML AS_HTML = 64 if Nokogiri.jruby? # Save builder created document AS_BUILDER = 128 # the default for XML documents DEFAULT_XML = AS_XML # https://github.com/sparklemotion/nokogiri/issues/#issue/415 # the default for HTML document DEFAULT_HTML = NO_DECLARATION | NO_EMPTY_TAGS | AS_HTML else # the default for XML documents DEFAULT_XML = FORMAT | AS_XML # the default for HTML document DEFAULT_HTML = FORMAT | NO_DECLARATION | NO_EMPTY_TAGS | AS_HTML end # the default for XHTML document DEFAULT_XHTML = FORMAT | NO_DECLARATION | NO_EMPTY_TAGS | AS_XHTML # Integer representation of the SaveOptions attr_reader :options # Create a new SaveOptions object with +options+ def initialize options = 0; @options = options; end constants.each do |constant| class_eval %{ def #{constant.downcase} @options |= #{constant} self end def #{constant.downcase}? #{constant} & @options == #{constant} end } end alias :to_i :options end end end end nokogiri-1.8.2/lib/nokogiri/xml/reader.rb0000644000004100000410000000577613235345655020403 0ustar www-datawww-datamodule Nokogiri module XML ### # Nokogiri::XML::Reader parses an XML document similar to the way a cursor # would move. The Reader is given an XML document, and yields nodes # to an each block. # # Here is an example of usage: # # reader = Nokogiri::XML::Reader(<<-eoxml) # # snuggles! # # eoxml # # reader.each do |node| # # # node is an instance of Nokogiri::XML::Reader # puts node.name # # end # # Note that Nokogiri::XML::Reader#each can only be called once!! Once # the cursor moves through the entire document, you must parse the # document again. So make sure that you capture any information you # need during the first iteration. # # The Reader parser is good for when you need the speed of a SAX parser, # but do not want to write a Document handler. class Reader include Enumerable TYPE_NONE = 0 # Element node type TYPE_ELEMENT = 1 # Attribute node type TYPE_ATTRIBUTE = 2 # Text node type TYPE_TEXT = 3 # CDATA node type TYPE_CDATA = 4 # Entity Reference node type TYPE_ENTITY_REFERENCE = 5 # Entity node type TYPE_ENTITY = 6 # PI node type TYPE_PROCESSING_INSTRUCTION = 7 # Comment node type TYPE_COMMENT = 8 # Document node type TYPE_DOCUMENT = 9 # Document Type node type TYPE_DOCUMENT_TYPE = 10 # Document Fragment node type TYPE_DOCUMENT_FRAGMENT = 11 # Notation node type TYPE_NOTATION = 12 # Whitespace node type TYPE_WHITESPACE = 13 # Significant Whitespace node type TYPE_SIGNIFICANT_WHITESPACE = 14 # Element end node type TYPE_END_ELEMENT = 15 # Entity end node type TYPE_END_ENTITY = 16 # XML Declaration node type TYPE_XML_DECLARATION = 17 # A list of errors encountered while parsing attr_accessor :errors # The encoding for the document attr_reader :encoding # The XML source attr_reader :source alias :self_closing? :empty_element? def initialize source, url = nil, encoding = nil # :nodoc: @source = source @errors = [] @encoding = encoding end private :initialize ### # Get a list of attributes for the current node. def attributes Hash[attribute_nodes.map { |node| [node.name, node.to_s] }].merge(namespaces || {}) end ### # Get a list of attributes for the current node def attribute_nodes nodes = attr_nodes nodes.each { |v| v.instance_variable_set(:@_r, self) } nodes end ### # Move the cursor through the document yielding the cursor to the block def each while cursor = self.read yield cursor end end end end end nokogiri-1.8.2/lib/nokogiri/xml/pp/0000755000004100000410000000000013235345655017214 5ustar www-datawww-datanokogiri-1.8.2/lib/nokogiri/xml/pp/character_data.rb0000644000004100000410000000063313235345655022470 0ustar www-datawww-datamodule Nokogiri module XML module PP module CharacterData def pretty_print pp # :nodoc: nice_name = self.class.name.split('::').last pp.group(2, "#(#{nice_name} ", ')') do pp.pp text end end def inspect # :nodoc: "#<#{self.class.name}:#{sprintf("0x%x",object_id)} #{text.inspect}>" end end end end end nokogiri-1.8.2/lib/nokogiri/xml/pp/node.rb0000644000004100000410000000315613235345655020473 0ustar www-datawww-datamodule Nokogiri module XML module PP module Node def inspect # :nodoc: attributes = inspect_attributes.reject { |x| begin attribute = send x !attribute || (attribute.respond_to?(:empty?) && attribute.empty?) rescue NoMethodError true end }.map { |attribute| "#{attribute.to_s.sub(/_\w+/, 's')}=#{send(attribute).inspect}" }.join ' ' "#<#{self.class.name}:#{sprintf("0x%x", object_id)} #{attributes}>" end def pretty_print pp # :nodoc: nice_name = self.class.name.split('::').last pp.group(2, "#(#{nice_name}:#{sprintf("0x%x", object_id)} {", '})') do pp.breakable attrs = inspect_attributes.map { |t| [t, send(t)] if respond_to?(t) }.compact.find_all { |x| if x.last if [:attribute_nodes, :children].include? x.first !x.last.empty? else true end end } pp.seplist(attrs) do |v| if [:attribute_nodes, :children].include? v.first pp.group(2, "#{v.first.to_s.sub(/_\w+$/, 's')} = [", "]") do pp.breakable pp.seplist(v.last) do |item| pp.pp item end end else pp.text "#{v.first} = " pp.pp v.last end end pp.breakable end end end end end end nokogiri-1.8.2/lib/nokogiri/xml/notation.rb0000644000004100000410000000015613235345655020757 0ustar www-datawww-datamodule Nokogiri module XML class Notation < Struct.new(:name, :public_id, :system_id) end end end nokogiri-1.8.2/lib/nokogiri/xslt.rb0000644000004100000410000000252413235345655017317 0ustar www-datawww-datarequire 'nokogiri/xslt/stylesheet' module Nokogiri class << self ### # Create a Nokogiri::XSLT::Stylesheet with +stylesheet+. # # Example: # # xslt = Nokogiri::XSLT(File.read(ARGV[0])) # def XSLT stylesheet, modules = {} XSLT.parse(stylesheet, modules) end end ### # See Nokogiri::XSLT::Stylesheet for creating and manipulating # Stylesheet object. module XSLT class << self ### # Parse the stylesheet in +string+, register any +modules+ def parse string, modules = {} modules.each do |url, klass| XSLT.register url, klass end if Nokogiri.jruby? Stylesheet.parse_stylesheet_doc(XML.parse(string), string) else Stylesheet.parse_stylesheet_doc(XML.parse(string)) end end ### # Quote parameters in +params+ for stylesheet safety def quote_params params parray = (params.instance_of?(Hash) ? params.to_a.flatten : params).dup parray.each_with_index do |v,i| if i % 2 > 0 parray[i]= if v =~ /'/ "concat('#{ v.gsub(/'/, %q{', "'", '}) }')" else "'#{v}'"; end else parray[i] = v.to_s end end parray.flatten end end end end nokogiri-1.8.2/lib/nokogiri/decorators/0000755000004100000410000000000013235345655020142 5ustar www-datawww-datanokogiri-1.8.2/lib/nokogiri/decorators/slop.rb0000644000004100000410000000230513235345655021444 0ustar www-datawww-datamodule Nokogiri module Decorators ### # The Slop decorator implements method missing such that a methods may be # used instead of XPath or CSS. See Nokogiri.Slop module Slop # The default XPath search context for Slop XPATH_PREFIX = "./" ### # look for node with +name+. See Nokogiri.Slop def method_missing name, *args, &block if args.empty? list = xpath("#{XPATH_PREFIX}#{name.to_s.sub(/^_/, '')}") elsif args.first.is_a? Hash hash = args.first if hash[:css] list = css("#{name}#{hash[:css]}") elsif hash[:xpath] conds = Array(hash[:xpath]).join(' and ') list = xpath("#{XPATH_PREFIX}#{name}[#{conds}]") end else CSS::Parser.without_cache do list = xpath( *CSS.xpath_for("#{name}#{args.first}", :prefix => XPATH_PREFIX) ) end end super if list.empty? list.length == 1 ? list.first : list end def respond_to_missing? name, include_private = false list = xpath("#{XPATH_PREFIX}#{name.to_s.sub(/^_/, '')}") !list.empty? end end end end nokogiri-1.8.2/lib/nokogiri/html.rb0000644000004100000410000000225613235345655017273 0ustar www-datawww-datarequire 'nokogiri/html/entity_lookup' require 'nokogiri/html/document' require 'nokogiri/html/document_fragment' require 'nokogiri/html/sax/parser_context' require 'nokogiri/html/sax/parser' require 'nokogiri/html/sax/push_parser' require 'nokogiri/html/element_description' require 'nokogiri/html/element_description_defaults' module Nokogiri class << self ### # Parse HTML. Convenience method for Nokogiri::HTML::Document.parse def HTML thing, url = nil, encoding = nil, options = XML::ParseOptions::DEFAULT_HTML, &block Nokogiri::HTML::Document.parse(thing, url, encoding, options, &block) end end module HTML class << self ### # Parse HTML. Convenience method for Nokogiri::HTML::Document.parse def parse thing, url = nil, encoding = nil, options = XML::ParseOptions::DEFAULT_HTML, &block Document.parse(thing, url, encoding, options, &block) end #### # Parse a fragment from +string+ in to a NodeSet. def fragment string, encoding = nil HTML::DocumentFragment.parse string, encoding end end # Instance of Nokogiri::HTML::EntityLookup NamedCharacters = EntityLookup.new end end nokogiri-1.8.2/Gemfile-libxml-ruby0000644000004100000410000000025213235345655017144 0ustar www-datawww-dataENV['TEST_NOKOGIRI_WITH_LIBXML_RUBY'] = "1" gem "libxml-ruby", :platform => :mri, :require => false eval_gemfile File.join(File.dirname(ENV['BUNDLE_GEMFILE']),"Gemfile") nokogiri-1.8.2/test/0000755000004100000410000000000013235345655014365 5ustar www-datawww-datanokogiri-1.8.2/test/test_memory_leak.rb0000644000004100000410000000711313235345655020257 0ustar www-datawww-datarequire "helper" class TestMemoryLeak < Nokogiri::TestCase def setup super @str = <
EOF end if ENV['NOKOGIRI_GC'] # turning these off by default for now def test_dont_hurt_em_why content = File.open("#{File.dirname(__FILE__)}/files/dont_hurt_em_why.xml").read ndoc = Nokogiri::XML(content) 2.times do ndoc.search('status text').first.inner_text ndoc.search('user name').first.inner_text GC.start end end class BadIO def read(*args) raise 'hell' end def write(*args) raise 'chickens' end end def test_for_mem_leak_on_io_callbacks io = File.open SNUGGLES_FILE Nokogiri::XML.parse(io) loop do Nokogiri::XML.parse(BadIO.new) rescue nil doc.write BadIO.new rescue nil end end def test_for_memory_leak begin # we don't use Dike in any tests, but requiring it has side effects # that can create memory leaks, and that's what we're testing for. require 'rubygems' require 'dike' # do not remove! count_start = count_object_space_documents xml_data = <<-EOS abc 1234 Zzz EOS 20.times do doc = Nokogiri::XML(xml_data) doc.xpath("//item") end 2.times { GC.start } count_end = count_object_space_documents assert((count_end - count_start) <= 2, "memory leak detected") rescue LoadError puts "\ndike is not installed, skipping memory leak test" end end def test_node_set_namespace_mem_leak xml = Nokogiri::XML "" ctx = Nokogiri::XML::XPathContext.new(xml) loop do ctx.evaluate("//namespace::*") end end def test_leak_on_node_replace loop do doc = Nokogiri.XML("") n = Nokogiri::XML::CDATA.new(doc, "bar") pivot = doc.root.children[0] pivot.replace(n) end end def test_sax_parser_context io = StringIO.new(@str) loop do Nokogiri::XML::SAX::ParserContext.new(@str) Nokogiri::XML::SAX::ParserContext.new(io) io.rewind Nokogiri::HTML::SAX::ParserContext.new(@str) Nokogiri::HTML::SAX::ParserContext.new(io) io.rewind end end class JumpingSaxHandler < Nokogiri::XML::SAX::Document def initialize(jumptag) @jumptag = jumptag super() end def start_element(name, attrs = []) throw @jumptag end end def test_jumping_sax_handler doc = JumpingSaxHandler.new(:foo) loop do catch(:foo) do Nokogiri::HTML::SAX::Parser.new(doc).parse(@str) end end end def test_in_context_parser_leak loop do doc = Nokogiri::XML::Document.new fragment1 = Nokogiri::XML::DocumentFragment.new(doc, '') node = fragment1.children[0] node.parse('') end end def test_in_context_parser_leak_ii loop { Nokogiri::XML('').root.parse('') } end def test_leak_on_xpath_string_function doc = Nokogiri::XML(@str) loop do doc.xpath('name(//node())') end end end # if NOKOGIRI_GC private def count_object_space_documents count = 0 ObjectSpace.each_object {|j| count += 1 if j.is_a?(Nokogiri::XML::Document) } count end end nokogiri-1.8.2/test/html/0000755000004100000410000000000013235345655015331 5ustar www-datawww-datanokogiri-1.8.2/test/html/test_named_characters.rb0000644000004100000410000000052413235345655022201 0ustar www-datawww-datarequire "helper" module Nokogiri module HTML class TestNamedCharacters < Nokogiri::TestCase def test_named_character copy = NamedCharacters.get('copy') assert_equal 169, NamedCharacters['copy'] assert_equal copy.value, NamedCharacters['copy'] assert copy.description end end end end nokogiri-1.8.2/test/html/test_element_description.rb0000644000004100000410000000537313235345655022761 0ustar www-datawww-datarequire "helper" module Nokogiri module HTML class TestElementDescription < Nokogiri::TestCase def test_fetch_nonexistent assert_nil ElementDescription['foo'] end def test_fetch_element_description assert desc = ElementDescription['a'] assert_instance_of ElementDescription, desc end def test_name assert_equal 'a', ElementDescription['a'].name end def test_implied_start_tag? assert !ElementDescription['a'].implied_start_tag? end def test_implied_end_tag? assert !ElementDescription['a'].implied_end_tag? assert ElementDescription['p'].implied_end_tag? end def test_save_end_tag? assert !ElementDescription['a'].save_end_tag? assert ElementDescription['br'].save_end_tag? end def test_empty? assert ElementDescription['br'].empty? assert !ElementDescription['a'].empty? end def test_deprecated? assert ElementDescription['applet'].deprecated? assert !ElementDescription['br'].deprecated? end def test_inline? assert ElementDescription['a'].inline? assert !ElementDescription['div'].inline? end def test_block? element = ElementDescription['a'] assert_equal(!element.inline?, element.block?) end def test_description assert ElementDescription['a'].description end def test_subelements sub_elements = ElementDescription['body'].sub_elements if Nokogiri.uses_libxml? && Nokogiri::LIBXML_VERSION >= '2.7.7' assert_equal 65, sub_elements.length elsif Nokogiri.uses_libxml? assert_equal 61, sub_elements.length else assert sub_elements.length > 0 end end def test_default_sub_element assert_equal 'div', ElementDescription['body'].default_sub_element end def test_null_default_sub_element doc = Nokogiri::HTML('foo') doc.root.description.default_sub_element end def test_optional_attributes attrs = ElementDescription['table'].optional_attributes assert attrs end def test_deprecated_attributes attrs = ElementDescription['table'].deprecated_attributes assert attrs assert_equal 2, attrs.length end def test_required_attributes attrs = ElementDescription['table'].required_attributes assert attrs assert_equal 0, attrs.length end def test_inspect desc = ElementDescription['input'] assert_match desc.name, desc.inspect end def test_to_s desc = ElementDescription['input'] assert_match desc.name, desc.to_s end end end end nokogiri-1.8.2/test/html/test_document_encoding.rb0000644000004100000410000001140113235345655022376 0ustar www-datawww-data# -*- coding: utf-8 -*- require "helper" module Nokogiri module HTML class TestDocumentEncoding < Nokogiri::TestCase def test_encoding doc = Nokogiri::HTML File.open(SHIFT_JIS_HTML, 'rb') hello = "こんにちは" assert_match doc.encoding, doc.to_html assert_match hello.encode('Shift_JIS'), doc.to_html assert_equal 'Shift_JIS', doc.to_html.encoding.name assert_match hello, doc.to_html(:encoding => 'UTF-8') assert_match 'UTF-8', doc.to_html(:encoding => 'UTF-8') assert_match 'UTF-8', doc.to_html(:encoding => 'UTF-8').encoding.name end def test_encoding_without_charset doc = Nokogiri::HTML File.open(SHIFT_JIS_NO_CHARSET, 'r:cp932:cp932').read hello = "こんにちは" assert_match hello, doc.content assert_match hello, doc.to_html(:encoding => 'UTF-8') assert_match 'UTF-8', doc.to_html(:encoding => 'UTF-8').encoding.name end def test_default_to_encoding_from_string bad_charset = <<-eohtml blah! eohtml doc = Nokogiri::HTML(bad_charset) assert_equal bad_charset.encoding.name, doc.encoding doc = Nokogiri.parse(bad_charset) assert_equal bad_charset.encoding.name, doc.encoding end def test_encoding_non_utf8 orig = '日本語が上手です' bin = Encoding::ASCII_8BIT [Encoding::Shift_JIS, Encoding::EUC_JP].each do |enc| html = <<-eohtml.encode(enc) #{orig} eohtml text = Nokogiri::HTML.parse(html).at('title').inner_text assert_equal( orig.encode(enc).force_encoding(bin), text.encode(enc).force_encoding(bin) ) end end def test_encoding_with_a_bad_name bad_charset = <<-eohtml blah! eohtml doc = Nokogiri::HTML(bad_charset, nil, 'askldjfhalsdfjhlkasdfjh') assert_equal ['http://tenderlovemaking.com/'], doc.css('a').map { |a| a['href'] } end def test_empty_doc_encoding encoding = 'US-ASCII' assert_equal encoding, Nokogiri::HTML.parse(nil, nil, encoding).encoding end end class TestDocumentEncodingDetection < Nokogiri::TestCase def binread(file) IO.binread(file) end def binopen(file) File.open(file, 'rb') end def test_document_html_noencoding from_stream = Nokogiri::HTML(binopen(NOENCODING_FILE)) from_string = Nokogiri::HTML(binread(NOENCODING_FILE)) assert_equal from_string.to_s.size, from_stream.to_s.size end def test_document_html_charset html = Nokogiri::HTML(binopen(METACHARSET_FILE)) assert_equal 'iso-2022-jp', html.encoding assert_equal 'たこ焼き仮面', html.title end def test_document_xhtml_enc [ENCODING_XHTML_FILE, ENCODING_HTML_FILE].each { |file| doc_from_string_enc = Nokogiri::HTML(binread(file), nil, 'Shift_JIS') ary_from_string_enc = doc_from_string_enc.xpath('//p/text()').map(&:text) doc_from_string = Nokogiri::HTML(binread(file)) ary_from_string = doc_from_string.xpath('//p/text()').map(&:text) doc_from_file_enc = Nokogiri::HTML(binopen(file), nil, 'Shift_JIS') ary_from_file_enc = doc_from_file_enc.xpath('//p/text()').map(&:text) doc_from_file = Nokogiri::HTML(binopen(file)) ary_from_file = doc_from_file.xpath('//p/text()').map(&:text) title = 'たこ焼き仮面' assert_equal(title, doc_from_string_enc.at('//title/text()').text) assert_equal(title, doc_from_string.at('//title/text()').text) assert_equal(title, doc_from_file_enc.at('//title/text()').text) assert_equal(title, doc_from_file.at('//title/text()').text) evil = (0..72).map { |i| '超' * i + '悪い事を構想中。' } assert_equal(evil, ary_from_string_enc) assert_equal(evil, ary_from_string) assert_equal(evil, ary_from_file_enc) assert_equal(evil, ary_from_file) } end end end end nokogiri-1.8.2/test/html/sax/0000755000004100000410000000000013235345655016124 5ustar www-datawww-datanokogiri-1.8.2/test/html/sax/test_push_parser.rb0000644000004100000410000000474313235345655022053 0ustar www-datawww-data# -*- coding: utf-8 -*- require "helper" module Nokogiri module HTML module SAX class TestPushParser < Nokogiri::SAX::TestCase def setup super @parser = HTML::SAX::PushParser.new(Doc.new) end def test_end_document_called @parser.<<(<<-eoxml)

Paragraph 1

eoxml assert ! @parser.document.end_document_called @parser.finish assert @parser.document.end_document_called end def test_start_element @parser.<<(<<-eoxml)

eoxml assert_equal [["html", []], ["head", []], ["body", []], ["p", [["id", "asdfasdf"]]]], @parser.document.start_elements @parser.<<(<<-eoxml) Paragraph 1

eoxml assert_equal [' This is a comment '], @parser.document.comments @parser.finish end def test_chevron_partial_html @parser.<<(<<-eoxml)

eoxml @parser.<<(<<-eoxml) Paragraph 1

eoxml assert_equal [' This is a comment '], @parser.document.comments @parser.finish end def test_chevron @parser.<<(<<-eoxml)

Paragraph 1

eoxml @parser.finish assert_equal [' This is a comment '], @parser.document.comments end def test_default_options assert_equal 0, @parser.options end def test_broken_encoding skip("ultra hard to fix for pure Java version") if Nokogiri.jruby? @parser.options |= XML::ParseOptions::RECOVER # This is ISO_8859-1: @parser.<< "Gau\337" @parser.finish assert(@parser.document.errors.size >= 1) assert_equal "Gau\337", @parser.document.data.join assert_equal [["r"], ["body"], ["html"]], @parser.document.end_elements end end end end end nokogiri-1.8.2/test/html/sax/test_parser_context.rb0000644000004100000410000000202113235345655022543 0ustar www-datawww-data# -*- coding: utf-8 -*- require "helper" module Nokogiri module HTML module SAX class TestParserContext < Nokogiri::SAX::TestCase def test_from_io ctx = ParserContext.new StringIO.new('fo'), 'UTF-8' assert ctx end def test_from_string ctx = ParserContext.new 'blah blah' assert ctx end def test_parse_with ctx = ParserContext.new 'blah' assert_raises ArgumentError do ctx.parse_with nil end end def test_parse_with_sax_parser # assert_nothing_raised do xml = "" ctx = ParserContext.new xml parser = Parser.new Doc.new ctx.parse_with parser # end end def test_from_file # assert_nothing_raised do ctx = ParserContext.file HTML_FILE, 'UTF-8' parser = Parser.new Doc.new ctx.parse_with parser # end end end end end end nokogiri-1.8.2/test/html/sax/test_parser_text.rb0000644000004100000410000000744613235345655022063 0ustar www-datawww-data# -*- coding: utf-8 -*- require "helper" module Nokogiri module HTML module SAX class TestParserText < Nokogiri::SAX::TestCase def setup super @doc = DocWithOrderedItems.new @parser = HTML::SAX::Parser.new @doc end def test_texts_order html = <<-eohtml text 0

text 1 text 2 text 3

text 4

eohtml @parser.parse html items = @doc.items.get_root_content "body" items = items.select_methods [ :start_element, :end_element, :characters, :comment ] items.strip_text! [:characters, :comment] assert_equal [ [:characters, 'text 0'], [:start_element, 'p', []], [:characters, 'text 1'], [:start_element, 'span', []], [:characters, 'text 2'], [:end_element, 'span'], [:characters, 'text 3'], [:end_element, 'p'], [:characters, 'text 4'], [:comment, 'text 5'], [:characters, ''], [:start_element, 'p', []], [:characters, ''], [:comment, 'text 6'], [:characters, ''], [:start_element, 'span', []], [:comment, 'text 7'], [:end_element, 'span'], [:characters, ''], [:comment, 'text 8'], [:characters, ''], [:end_element, 'p'], [:characters, ''], [:comment, 'text 9'], [:characters, ''] ], items nil end def text_whitespace html = <<-eohtml

eohtml @parser.parse html items = @doc.items.get_root_content "body" items = items.select_methods [ :start_element, :end_element, :characters, :comment ] items.strip_text! [:characters, :comment] assert_equal [ [:characters, ''], [:start_element, 'p', []], [:characters, ''], [:start_element, 'span', []], [:end_element, 'span'], [:characters, ''], [:start_element, 'span', []], [:characters, ''], [:end_element, 'span'], [:characters, ''], [:start_element, 'span', []], [:characters, ''], [:end_element, 'span'], [:characters, ''], [:end_element, 'p'], [:characters, ''], [:start_element, 'p', []], [:characters, ''], [:comment, ''], [:characters, ''], [:comment, ''], [:characters, ''], [:comment, ''], [:characters, ''], [:end_element, 'p'], [:characters, ''] ], items nil end end end end end nokogiri-1.8.2/test/html/sax/test_parser.rb0000644000004100000410000001117713235345655021013 0ustar www-datawww-data# -*- coding: utf-8 -*- require "helper" module Nokogiri module HTML module SAX class TestParser < Nokogiri::SAX::TestCase def setup super @parser = HTML::SAX::Parser.new(Doc.new) end def test_parse_empty_document # This caused a segfault in libxml 2.6.x assert_nil @parser.parse '' end def test_parse_empty_file # Make sure empty files don't break stuff empty_file_name = File.join(ASSETS_DIR, 'bogus.xml') # assert_nothing_raised do @parser.parse_file empty_file_name # end end def test_parse_file @parser.parse_file(HTML_FILE) # Take a look at the comment in test_parse_document to know # a possible reason to this difference. if Nokogiri.uses_libxml? assert_equal 1111, @parser.document.end_elements.length else assert_equal 1120, @parser.document.end_elements.length end end def test_parse_file_nil_argument assert_raises(ArgumentError) { @parser.parse_file(nil) } end def test_parse_file_non_existant assert_raise Errno::ENOENT do @parser.parse_file('there_is_no_reasonable_way_this_file_exists') end end def test_parse_file_with_dir assert_raise Errno::EISDIR do @parser.parse_file(File.dirname(__FILE__)) end end def test_parse_memory_nil assert_raise ArgumentError do @parser.parse_memory(nil) end end def test_parse_force_encoding @parser.parse_memory(<<-HTML, 'UTF-8') Информация HTML assert_equal("Информация", @parser.document.data.join.strip) end def test_parse_document @parser.parse_memory(<<-eoxml)

Paragraph 1

Paragraph 2

eoxml # JRuby version is different because of the internal implementation # JRuby version uses NekoHTML which inserts empty "head" elements. # # Currently following features are set: # "http://cyberneko.org/html/properties/names/elems" => "lower" # "http://cyberneko.org/html/properties/names/attrs" => "lower" if Nokogiri.uses_libxml? assert_equal([["html", []], ["body", []], ["p", []], ["p", []]], @parser.document.start_elements) else assert_equal([["html", []], ["head", []], ["body", []], ["p", []], ["p", []]], @parser.document.start_elements) end end def test_parser_attributes html = <<-eohtml hello
eohtml block_called = false @parser.parse(html) { |ctx| block_called = true ctx.replace_entities = true } assert block_called noshade_value = if Nokogiri.uses_libxml? && Nokogiri::VERSION_INFO['libxml']['loaded'] < '2.7.7' ['noshade', 'noshade'] else ['noshade', nil] end assert_equal [ ['html', []], ['head', []], ['title', []], ['body', []], ['img', [ ['src', 'face.jpg'], ['title', 'daddy & me'] ]], ['hr', [ noshade_value, ['size', '2'] ]] ], @parser.document.start_elements end HTML_WITH_BR_TAG = <<-EOF
hello
hello again
EOF def test_parsing_dom_error_from_string @parser.parse(HTML_WITH_BR_TAG) assert_equal 6, @parser.document.start_elements.length end def test_parsing_dom_error_from_io @parser.parse(StringIO.new(HTML_WITH_BR_TAG)) assert_equal 6, @parser.document.start_elements.length end def test_empty_processing_instruction @parser.parse_memory("this will segfault") end end end end end nokogiri-1.8.2/test/html/test_builder.rb0000644000004100000410000001103013235345655020336 0ustar www-datawww-datarequire "helper" module Nokogiri module HTML class TestBuilder < Nokogiri::TestCase def test_top_level_function_builds foo = nil Nokogiri() { |xml| foo = xml } assert_instance_of Nokogiri::HTML::Builder, foo end def test_builder_with_explicit_tags html_doc = Nokogiri::HTML::Builder.new { div.slide(:class => 'another_class') { node = Nokogiri::XML::Node.new("id", doc) node.content = "hello" insert(node) } }.doc assert_equal 1, html_doc.css('div.slide > id').length assert_equal 'hello', html_doc.at('div.slide > id').content end def test_hash_as_attributes_for_attribute_method html = Nokogiri::HTML::Builder.new { || div.slide(:class => 'another_class') { span 'Slide 1' } }.to_html assert_match 'class="slide another_class"', html end def test_hash_as_attributes builder = Nokogiri::HTML::Builder.new do div(:id => 'awesome') { h1 "america" } end assert_equal('

america

', builder.doc.root.to_html.gsub(/\n/, '').gsub(/>\s*<')) end def test_href_with_attributes uri = 'http://tenderlovemaking.com/' built = Nokogiri::XML::Builder.new { div { a('King Khan & The Shrines', :href => uri) } } assert_equal 'http://tenderlovemaking.com/', built.doc.at('a')[:href] end def test_tag_nesting builder = Nokogiri::HTML::Builder.new do body { span.left '' span.middle { div.icon '' } span.right '' } end assert node = builder.doc.css('span.right').first assert_equal 'middle', node.previous_sibling['class'] end def test_has_ampersand builder = Nokogiri::HTML::Builder.new do div.rad.thing! { text "" b "hello & world" } end assert_equal( '
<awe&some>hello & world
', builder.doc.root.to_html.gsub(/\n/, '')) end def test_multi_tags builder = Nokogiri::HTML::Builder.new do div.rad.thing! { text "" b "hello" } end assert_equal( '
<awesome>hello
', builder.doc.root.to_html.gsub(/\n/, '')) end def test_attributes_plus_block builder = Nokogiri::HTML::Builder.new do div.rad.thing! { text "" } end assert_equal('
<awesome>
', builder.doc.root.to_html.chomp) end def test_builder_adds_attributes builder = Nokogiri::HTML::Builder.new do div.rad.thing! "tender div" end assert_equal('
tender div
', builder.doc.root.to_html.chomp) end def test_bold_tag builder = Nokogiri::HTML::Builder.new do b "bold tag" end assert_equal('bold tag', builder.doc.root.to_html.chomp) end def test_html_then_body_tag builder = Nokogiri::HTML::Builder.new do html { body { b "bold tag" } } end assert_equal('bold tag', builder.doc.root.to_html.chomp.gsub(/>\s*<')) end def test_instance_eval_with_delegation_to_block_context class << self def foo "foo!" end end builder = Nokogiri::HTML::Builder.new { text foo } assert builder.to_html.include?("foo!") end def test_builder_with_param doc = Nokogiri::HTML::Builder.new { |html| html.body { html.p "hello world" } }.doc assert node = doc.xpath('//body/p').first assert_equal 'hello world', node.content end def test_builder_with_id text = "hello world" doc = Nokogiri::HTML::Builder.new { |html| html.body { html.id_ text } }.doc assert node = doc.xpath('//body/id').first assert_equal text, node.content end end end end nokogiri-1.8.2/test/html/test_node_encoding.rb0000644000004100000410000000464113235345655021515 0ustar www-datawww-data# -*- coding: utf-8 -*- require "helper" module Nokogiri module HTML class TestNodeEncoding < Nokogiri::TestCase def setup super @html = Nokogiri::HTML(File.open(NICH_FILE, "rb")) end def test_get_attribute node = @html.css('a').first assert_equal 'UTF-8', node['href'].encoding.name end def test_text_encoding_is_utf_8 assert_equal 'UTF-8', @html.text.encoding.name end def test_serialize_encoding_html assert_equal @html.encoding.downcase, @html.serialize.encoding.name.downcase @doc = Nokogiri::HTML(@html.serialize) assert_equal @html.serialize, @doc.serialize end def test_default_encoding doc = Nokogiri::HTML(nil) assert_nil doc.encoding assert_equal 'UTF-8', doc.serialize.encoding.name end def test_encode_special_chars foo = @html.css('a').first.encode_special_chars('foo') assert_equal 'UTF-8', foo.encoding.name end def test_content node = @html.css('a').first assert_equal 'UTF-8', node.content.encoding.name end def test_name node = @html.css('a').first assert_equal 'UTF-8', node.name.encoding.name end def test_path node = @html.css('a').first assert_equal 'UTF-8', node.path.encoding.name end def test_inner_html doc = Nokogiri::HTML File.open(SHIFT_JIS_HTML, 'rb') hello = "こんにちは" contents = doc.at('h2').inner_html assert_equal doc.encoding, contents.encoding.name assert_match hello.encode('Shift_JIS'), contents contents = doc.at('h2').inner_html(:encoding => 'UTF-8') assert_match hello, contents doc.encoding = 'UTF-8' contents = doc.at('h2').inner_html assert_match hello, contents end def test_encoding_GH_1113 doc = Nokogiri::HTML::Document.new hex = '

🍀

' decimal = '

🍀

' encoded = '

🍀

' doc.encoding = 'UTF-8' [hex, decimal, encoded].each do |document| assert_equal encoded, doc.fragment(document).to_s end doc.encoding = 'US-ASCII' expected = Nokogiri.jruby? ? hex : decimal [hex, decimal].each do |document| assert_equal expected, doc.fragment(document).to_s end end end end end nokogiri-1.8.2/test/html/test_document.rb0000644000004100000410000005035713235345655020545 0ustar www-datawww-datarequire "helper" module Nokogiri module HTML class TestDocument < Nokogiri::TestCase def setup super @html = Nokogiri::HTML.parse(File.read(HTML_FILE)) end def test_nil_css # Behavior is undefined but shouldn't break assert @html.css(nil) assert @html.xpath(nil) end def test_does_not_fail_with_illformatted_html doc = Nokogiri::HTML('"";'.dup.force_encoding(Encoding::BINARY)) assert_not_nil doc end def test_exceptions_remove_newlines errors = @html.errors assert errors.length > 0, 'has errors' errors.each do |error| assert_equal(error.to_s.chomp, error.to_s) end end def test_fragment fragment = @html.fragment assert_equal 0, fragment.children.length end def test_document_takes_config_block options = nil Nokogiri::HTML(File.read(HTML_FILE), HTML_FILE) do |cfg| options = cfg options.nonet.nowarning.dtdattr end assert options.nonet? assert options.nowarning? assert options.dtdattr? end def test_parse_takes_config_block options = nil Nokogiri::HTML.parse(File.read(HTML_FILE), HTML_FILE) do |cfg| options = cfg options.nonet.nowarning.dtdattr end assert options.nonet? assert options.nowarning? assert options.dtdattr? end def test_subclass klass = Class.new(Nokogiri::HTML::Document) doc = klass.new assert_instance_of klass, doc end def test_subclass_initialize klass = Class.new(Nokogiri::HTML::Document) do attr_accessor :initialized_with def initialize(*args) @initialized_with = args end end doc = klass.new("uri", "external_id", 1) assert_equal ["uri", "external_id", 1], doc.initialized_with end def test_subclass_dup klass = Class.new(Nokogiri::HTML::Document) doc = klass.new.dup assert_instance_of klass, doc end def test_subclass_parse klass = Class.new(Nokogiri::HTML::Document) doc = klass.parse(File.read(HTML_FILE)) assert_equal @html.to_s, doc.to_s assert_instance_of klass, doc end def test_document_parse_method html = Nokogiri::HTML::Document.parse(File.read(HTML_FILE)) assert_equal @html.to_s, html.to_s end def test_document_parse_method_with_url require 'open-uri' begin html = open('https://www.yahoo.com').read rescue Exception => e skip("This test needs the internet. Skips if no internet available. (#{e})") end doc = Nokogiri::HTML html ,"http:/foobar.foobar/", 'UTF-8' refute_empty doc.to_s, "Document should not be empty" end ### # Nokogiri::HTML returns an empty Document when given a blank string GH#11 def test_empty_string_returns_empty_doc doc = Nokogiri::HTML('') assert_instance_of Nokogiri::HTML::Document, doc assert_nil doc.root end unless Nokogiri.uses_libxml? && %w[2 6] === LIBXML_VERSION.split('.')[0..1] # FIXME: this is a hack around broken libxml versions def test_to_xhtml_with_indent doc = Nokogiri::HTML('foo') doc = Nokogiri::HTML(doc.to_xhtml(:indent => 2)) assert_indent 2, doc end def test_write_to_xhtml_with_indent io = StringIO.new doc = Nokogiri::HTML('foo') doc.write_xhtml_to io, :indent => 5 io.rewind doc = Nokogiri::HTML(io.read) assert_indent 5, doc end end def test_swap_should_not_exist assert_raises(NoMethodError) { @html.swap } end def test_namespace_should_not_exist assert_raises(NoMethodError) { @html.namespace } end def test_meta_encoding assert_equal 'UTF-8', @html.meta_encoding end def test_meta_encoding_is_strict_about_http_equiv doc = Nokogiri::HTML(<<-eohtml) foo eohtml assert_nil doc.meta_encoding end def test_meta_encoding_handles_malformed_content_charset doc = Nokogiri::HTML(< foo EOHTML assert_nil doc.meta_encoding end def test_meta_encoding_checks_charset doc = Nokogiri::HTML(<<-eohtml) foo eohtml assert_equal 'UTF-8', doc.meta_encoding end def test_meta_encoding= @html.meta_encoding = 'EUC-JP' assert_equal 'EUC-JP', @html.meta_encoding end def test_title assert_equal 'Tender Lovemaking ', @html.title doc = Nokogiri::HTML('foo') assert_nil doc.title end def test_title=() doc = Nokogiri::HTML(< old foo eohtml doc.title = 'new' assert_equal 1, doc.css('title').size assert_equal 'new', doc.title doc = Nokogiri::HTML(< foo eohtml doc.title = 'new' assert_equal 'new', doc.title title = doc.at('/html/head/title') assert_not_nil title assert_equal 'new', title.text assert_equal(-1, doc.at('meta[@http-equiv]') <=> title) doc = Nokogiri::HTML(< foo eohtml doc.title = 'new' assert_equal 'new', doc.title # may or may not be added title = doc.at('/html//title') assert_not_nil title assert_equal 'new', title.text assert_equal(-1, title <=> doc.at('body')) doc = Nokogiri::HTML(< foo eohtml doc.title = 'new' assert_equal 'new', doc.title assert_equal(-1, doc.at('meta[@charset]') <=> doc.at('title')) assert_equal(-1, doc.at('title') <=> doc.at('body')) doc = Nokogiri::HTML('

hello') doc.title = 'new' assert_equal 'new', doc.title assert_instance_of Nokogiri::XML::DTD, doc.children.first assert_equal(-1, doc.at('title') <=> doc.at('p')) doc = Nokogiri::HTML('') doc.title = 'new' assert_equal 'new', doc.title assert_equal 'new', doc.at('/html/head/title/text()').to_s end def test_meta_encoding_without_head encoding = 'EUC-JP' html = Nokogiri::HTML('foo', nil, encoding) assert_nil html.meta_encoding html.meta_encoding = encoding assert_equal encoding, html.meta_encoding meta = html.at('/html/head/meta[@http-equiv and boolean(@content)]') assert meta, 'meta is in head' assert meta.at('./parent::head/following-sibling::body'), 'meta is before body' end def test_html5_meta_encoding_without_head encoding = 'EUC-JP' html = Nokogiri::HTML('foo', nil, encoding) assert_nil html.meta_encoding html.meta_encoding = encoding assert_equal encoding, html.meta_encoding meta = html.at('/html/head/meta[@charset]') assert meta, 'meta is in head' assert meta.at('./parent::head/following-sibling::body'), 'meta is before body' end def test_meta_encoding_with_empty_content_type html = Nokogiri::HTML(<<-eohtml) foo eohtml assert_nil html.meta_encoding html = Nokogiri::HTML(<<-eohtml) foo eohtml assert_nil html.meta_encoding end def test_root_node_parent_is_document parent = @html.root.parent assert_equal @html, parent assert_instance_of Nokogiri::HTML::Document, parent end def test_parse_handles_nil_gracefully @doc = Nokogiri::HTML::Document.parse(nil) assert_instance_of Nokogiri::HTML::Document, @doc end def test_parse_empty_document doc = Nokogiri::HTML("\n") assert_equal 0, doc.css('a').length assert_equal 0, doc.xpath('//a').length assert_equal 0, doc.search('//a').length end def test_HTML_function html = Nokogiri::HTML(File.read(HTML_FILE)) assert html.html? end def test_parse_io assert File.open(HTML_FILE, 'rb') { |f| Document.read_io(f, nil, 'UTF-8', XML::ParseOptions::NOERROR | XML::ParseOptions::NOWARNING ) } end def test_parse_temp_file temp_html_file = Tempfile.new("TEMP_HTML_FILE") File.open(HTML_FILE, 'rb') { |f| temp_html_file.write f.read } temp_html_file.close temp_html_file.open assert_equal Nokogiri::HTML.parse(File.read(HTML_FILE)).xpath('//div/a').length, Nokogiri::HTML.parse(temp_html_file).xpath('//div/a').length end def test_to_xhtml assert_match 'XHTML', @html.to_xhtml assert_match 'XHTML', @html.to_xhtml(:encoding => 'UTF-8') assert_match 'UTF-8', @html.to_xhtml(:encoding => 'UTF-8') end def test_no_xml_header html = Nokogiri::HTML(<<-eohtml) eohtml assert html.to_html.length > 0, 'html length is too short' assert_no_match(/^<\?xml/, html.to_html) end def test_document_has_error html = Nokogiri::HTML(<<-eohtml)

Rainbow Dash

eohtml assert_equal "html", html.internal_subset.name assert_equal "-//W3C//DTD XHTML 1.1//EN", html.internal_subset.external_id assert_equal "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd", html.internal_subset.system_id assert_equal "", html.to_s[0,97] end def test_content_size html = Nokogiri::HTML("
\n
") assert_equal 1, html.content.size assert_equal 1, html.content.split("").size assert_equal "\n", html.content end def test_find_by_xpath found = @html.xpath('//div/a') assert_equal 3, found.length end def test_find_by_css found = @html.css('div > a') assert_equal 3, found.length end def test_find_by_css_with_square_brackets found = @html.css("div[@id='header'] > h1") found = @html.css("div[@id='header'] h1") # this blows up on commit 6fa0f6d329d9dbf1cc21c0ac72f7e627bb4c05fc assert_equal 1, found.length end def test_find_by_css_with_escaped_characters found_without_escape = @html.css("div[@id='abc.123']") found_by_id = @html.css('#abc\.123') found_by_class = @html.css('.special\.character') assert_equal 1, found_without_escape.length assert_equal found_by_id, found_without_escape assert_equal found_by_class, found_without_escape end def test_find_with_function assert @html.css("div:awesome() h1", Class.new { def awesome divs [divs.first] end }.new) end def test_dup_shallow found = @html.search('//div/a').first dup = found.dup(0) assert dup assert_equal '', dup.content end def test_search_can_handle_xpath_and_css found = @html.search('//div/a', 'div > p') length = @html.xpath('//div/a').length + @html.css('div > p').length assert_equal length, found.length end def test_dup_document assert dup = @html.dup assert_not_equal dup, @html assert @html.html? assert_instance_of Nokogiri::HTML::Document, dup assert dup.html?, 'duplicate should be html' assert_equal @html.to_s, dup.to_s end def test_dup_document_shallow assert dup = @html.dup(0) assert_not_equal dup, @html end def test_dup found = @html.search('//div/a').first dup = found.dup assert dup assert_equal found.content, dup.content assert_equal found.document, dup.document end def test_inner_html html = Nokogiri::HTML <<-EOHTML

Hello world!

EOHTML node = html.xpath("//div").first assert_equal("

Helloworld!

", node.inner_html.gsub(%r{\s}, "")) end def test_round_trip doc = Nokogiri::HTML(@html.inner_html) assert_equal @html.root.to_html, doc.root.to_html end def test_fragment_contains_text_node fragment = Nokogiri::HTML.fragment('fooo') assert_equal 1, fragment.children.length assert_equal 'fooo', fragment.inner_text end def test_fragment_includes_two_tags assert_equal 2, Nokogiri::HTML.fragment("

").children.length end def test_relative_css_finder doc = Nokogiri::HTML(<<-eohtml)

inside red

inside green

eohtml red_divs = doc.css('div.red') assert_equal 1, red_divs.length p_tags = red_divs.first.css('p') assert_equal 1, p_tags.length assert_equal 'inside red', p_tags.first.text.strip end def test_find_classes doc = Nokogiri::HTML(<<-eohtml)

RED

RED

GREEN

GREEN

eohtml list = doc.css('.red') assert_equal 2, list.length assert_equal %w{ RED RED }, list.map(&:text) end def test_parse_can_take_io html = nil File.open(HTML_FILE, 'rb') { |f| html = Nokogiri::HTML(f) } assert html.html? end def test_html? assert !@html.xml? assert @html.html? end def test_serialize assert @html.serialize assert @html.to_html end def test_empty_document # empty document should return "" #699 assert_equal "", Nokogiri::HTML.parse(nil).text assert_equal "", Nokogiri::HTML.parse("").text end def test_capturing_nonparse_errors_during_document_clone # see https://github.com/sparklemotion/nokogiri/issues/1196 for background original = Nokogiri::HTML.parse("
") original_errors = original.errors.dup copy = original.dup assert_equal original_errors, copy.errors end def test_capturing_nonparse_errors_during_node_copy_between_docs # Errors should be emitted while parsing only, and should not change when moving nodes. doc1 = Nokogiri::HTML("one") doc2 = Nokogiri::HTML("two") node1 = doc1.at_css("#unique") node2 = doc2.at_css("#unique") original_errors1 = doc1.errors.dup original_errors2 = doc2.errors.dup assert original_errors1.any?{|e| e.to_s =~ /Tag diva invalid/ }, "it should complain about the tag name" assert original_errors2.any?{|e| e.to_s =~ /Tag dive invalid/ }, "it should complain about the tag name" node1.add_child node2 assert_equal original_errors1, doc1.errors assert_equal original_errors2, doc2.errors end def test_silencing_nonparse_errors_during_attribute_insertion_1262 # see https://github.com/sparklemotion/nokogiri/issues/1262 # # libxml2 emits a warning when this happens; the JRuby # implementation does not. so rather than capture the error in # doc.errors in a platform-dependent way, I'm opting to have # the error silenced. # # So this test doesn't look meaningful, but we want to avoid # having `ID unique-issue-1262 already defined` emitted to # stderr when running the test suite. # doc = Nokogiri::HTML::Document.new Nokogiri::XML::Element.new("div", doc).set_attribute('id', 'unique-issue-1262') Nokogiri::XML::Element.new("div", doc).set_attribute('id', 'unique-issue-1262') assert_equal 0, doc.errors.length end it "skips encoding for script tags" do html = Nokogiri::HTML <<-EOHTML EOHTML node = html.xpath("//script").first assert_equal("var isGreater = 4 > 5;", node.inner_html) end it "skips encoding for style tags" do html = Nokogiri::HTML <<-EOHTML EOHTML node = html.xpath("//style").first assert_equal("tr > div { display:block; }", node.inner_html) end it "does not fail when converting to_html using explicit encoding" do html_fragment=<<-eos Inactive hide details for "User" ---19/05/2015 12:55:29---Provvediamo subito nell’integrare eos doc = Nokogiri::HTML(html_fragment, nil, 'ISO-8859-1') html = doc.to_html assert html.index("src=\"images/icon.gif\"") assert_equal 'ISO-8859-1', html.encoding.name end end end end nokogiri-1.8.2/test/html/test_node.rb0000644000004100000410000001461013235345655017644 0ustar www-datawww-datarequire "helper" require 'nkf' module Nokogiri module HTML class TestNode < Nokogiri::TestCase def setup super @html = Nokogiri::HTML(<<-eohtml) eohtml end def test_to_a assert_equal [['class', 'bar'], ['href', 'foo']],@html.at('a').to_a.sort end def test_attr node = @html.at('div.baz') assert_equal node['class'], node.attr('class') end def test_get_attribute element = @html.at('div') assert_equal 'baz', element.get_attribute('class') assert_equal 'baz', element['class'] element['href'] = "javascript:alert(\"AGGA-KA-BOO!\")" assert_match(/%22AGGA-KA-BOO!%22/, element.to_html) end # The HTML parser ignores namespaces, so even properly declared namespaces # are treated as as undeclared and have to be accessed via prefix:tagname def test_ns_attribute html = '' doc = Nokogiri::HTML(html) assert_equal 'baz', (doc%'i')['foo:bar'] end def test_css_path_round_trip doc = Nokogiri::HTML(File.read(HTML_FILE)) %w{ #header small div[2] div.post body }.each do |css_sel| ele = doc.at css_sel assert_equal ele, doc.at(ele.css_path), ele.css_path end end def test_path_round_trip doc = Nokogiri::HTML(File.read(HTML_FILE)) %w{ #header small div[2] div.post body }.each do |css_sel| ele = doc.at css_sel assert_equal ele, doc.at(ele.path), ele.path end end def test_append_with_document assert_raises(ArgumentError) do @html.root << Nokogiri::HTML::Document.new end end ### # Make sure a document that doesn't declare a meta encoding returns # nil. def test_meta_encoding assert_nil @html.meta_encoding end def test_description assert desc = @html.at('a.bar').description assert_equal 'a', desc.name end def test_ancestors_with_selector assert node = @html.at('a.bar').child assert list = node.ancestors('.baz') assert_equal 1, list.length assert_equal 'div', list.first.name end def test_matches_inside_fragment fragment = DocumentFragment.new @html fragment << XML::Node.new('a', @html) a = fragment.children.last assert a.matches?('a'), 'a should match' end def test_css_matches? assert node = @html.at('a.bar') assert node.matches?('a.bar') end def test_xpath_matches? assert node = @html.at('//a') assert node.matches?('//a') end def test_unlink_then_swap node = @html.at('a') node.unlink another_node = @html.at('div') assert another_node, 'should have a node' # This used to segv assert node.add_previous_sibling another_node end def test_swap @html.at('div').swap('bar') a_tag = @html.css('a').first assert_equal 'body', a_tag.parent.name assert_equal 0, @html.css('div').length end def test_swap_with_regex_characters @html.at('div').swap('ba)r') a_tag = @html.css('a').first assert_equal 'ba)r', a_tag.text end def test_attribute_decodes_entities node = @html.at('div') node['href'] = 'foo&bar' assert_equal 'foo&bar', node['href'] node['href'] += '&baz' assert_equal 'foo&bar&baz', node['href'] end def test_parse_config_option node = @html.at('div') options = nil node.parse("
") do |config| options = config end assert_equal Nokogiri::XML::ParseOptions::DEFAULT_HTML, options.to_i end def test_fragment_handler_does_not_regurge_on_invalid_attributes iframe = %Q{} assert @html.at('div').fragment(iframe) end def test_fragment fragment = @html.fragment(<<-eohtml) hello

bar

world eohtml assert_match(/^hello/, fragment.inner_html.strip) assert_equal 3, fragment.children.length assert p_tag = fragment.css('p').first assert_equal 'div', p_tag.parent.name assert_equal 'foo', p_tag.parent['class'] end def test_fragment_serialization fragment = Nokogiri::HTML.fragment("
foo
") assert_equal "
foo
", fragment.serialize.chomp assert_equal "
foo
", fragment.to_xml.chomp assert_equal "
foo
", fragment.inner_html assert_equal "
foo
", fragment.to_html assert_equal "
foo
", fragment.to_s end def test_to_html_does_not_contain_entities return unless defined?(NKF) # NKF is not implemented on Rubinius as of 2009-11-23 html = NKF.nkf("-e --msdos", <<-EOH)

test paragraph foo bar

EOH nokogiri = Nokogiri::HTML.parse(html) if RUBY_PLATFORM =~ /java/ # NKF linebreak modes are not supported as of jruby 1.2 # see http://jira.codehaus.org/browse/JRUBY-3602 for status assert_equal "

testparagraph\nfoobar

", nokogiri.at("p").to_html.gsub(/ /, '') else assert_equal "

testparagraph\r\nfoobar

", nokogiri.at("p").to_html.gsub(/ /, '') end end end def test_GH_1042 file = File.join(ASSETS_DIR, 'GH_1042.html'); html = Nokogiri::HTML(File.read(file)) table = html.xpath("//table")[1] trs = table.xpath("tr").drop(1) # the jruby inplementation of drop uses dup() on the IRubyObject (which # is NOT the same dup() method on the ruby Object) which produces a # shallow clone. a shallow of valid XMLNode triggers several # NullPointerException on inspect() since loads of invariants # are not set. the fix for GH1042 ensures a proper working clone. assert_nothing_raised do trs.inspect end end end end nokogiri-1.8.2/test/html/test_document_fragment.rb0000644000004100000410000002625513235345655022430 0ustar www-datawww-data# -*- coding: utf-8 -*- require "helper" module Nokogiri module HTML class TestDocumentFragment < Nokogiri::TestCase def setup super @html = Nokogiri::HTML.parse(File.read(HTML_FILE), HTML_FILE) end def test_inspect_encoding fragment = "
こんにちは!
".encode('EUC-JP') f = Nokogiri::HTML::DocumentFragment.parse fragment assert_equal "こんにちは!", f.content end def test_html_parse_encoding fragment = "
こんにちは!
".encode 'EUC-JP' f = Nokogiri::HTML.fragment fragment assert_equal 'EUC-JP', f.document.encoding assert_equal "こんにちは!", f.content end def test_unlink_empty_document frag = Nokogiri::HTML::DocumentFragment.parse('').unlink # must_not_raise assert_nil frag.parent end def test_colons_are_not_removed doc = Nokogiri::HTML::DocumentFragment.parse("3:30pm") assert_match(/3:30/, doc.to_s) end def test_parse_encoding fragment = "
hello world
" f = Nokogiri::HTML::DocumentFragment.parse fragment, 'ISO-8859-1' assert_equal 'ISO-8859-1', f.document.encoding assert_equal "hello world", f.content end def test_html_parse_with_encoding fragment = "
hello world
" f = Nokogiri::HTML.fragment fragment, 'ISO-8859-1' assert_equal 'ISO-8859-1', f.document.encoding assert_equal "hello world", f.content end def test_parse_in_context assert_equal('
', @html.root.parse('
').to_s) end def test_inner_html= fragment = Nokogiri::HTML.fragment '
' fragment.inner_html = "hello" assert_equal 'hello', fragment.inner_html end def test_ancestors_search html = %q{
  • foo
} fragment = Nokogiri::HTML.fragment html li = fragment.at('li') assert li.matches?('li') end def test_fun_encoding string = %Q(こんにちは) html = Nokogiri::HTML::DocumentFragment.parse( string ).to_html(:encoding => 'UTF-8') assert_equal string, html end def test_new assert Nokogiri::HTML::DocumentFragment.new(@html) end def test_body_fragment_should_contain_body fragment = Nokogiri::HTML::DocumentFragment.parse("
foo
") assert_match(/^/, fragment.to_s) end def test_nonbody_fragment_should_not_contain_body fragment = Nokogiri::HTML::DocumentFragment.parse("
foo
") assert_match(/^
/, fragment.to_s) end def test_fragment_should_have_document fragment = Nokogiri::HTML::DocumentFragment.new(@html) assert_equal @html, fragment.document end def test_empty_fragment_should_be_searchable_by_css fragment = Nokogiri::HTML.fragment("") assert_equal 0, fragment.css("a").size end def test_empty_fragment_should_be_searchable fragment = Nokogiri::HTML.fragment("") assert_equal 0, fragment.search("//a").size end def test_name fragment = Nokogiri::HTML::DocumentFragment.new(@html) assert_equal '#document-fragment', fragment.name end def test_static_method fragment = Nokogiri::HTML::DocumentFragment.parse("
a
") assert_instance_of Nokogiri::HTML::DocumentFragment, fragment end def test_many_fragments 100.times { Nokogiri::HTML::DocumentFragment.new(@html) } end def test_subclass klass = Class.new(Nokogiri::HTML::DocumentFragment) fragment = klass.new(@html, "
a
") assert_instance_of klass, fragment end def test_subclass_parse klass = Class.new(Nokogiri::HTML::DocumentFragment) doc = klass.parse("
a
") assert_instance_of klass, doc end def test_html_fragment fragment = Nokogiri::HTML.fragment("
a
") assert_equal "
a
", fragment.to_s end def test_html_fragment_has_outer_text doc = "a
b
c" fragment = Nokogiri::HTML::Document.new.fragment(doc) if Nokogiri.uses_libxml? && Nokogiri::VERSION_INFO['libxml']['loaded'] <= "2.6.16" assert_equal "a
b

c

", fragment.to_s else assert_equal "a
b
c", fragment.to_s end end def test_html_fragment_case_insensitivity doc = "
b
" fragment = Nokogiri::HTML::Document.new.fragment(doc) assert_equal "
b
", fragment.to_s end def test_html_fragment_with_leading_whitespace doc = "
b
" fragment = Nokogiri::HTML::Document.new.fragment(doc) assert_match %r%
b
*%, fragment.to_s end def test_html_fragment_with_leading_whitespace_and_newline doc = " \n
b
" fragment = Nokogiri::HTML::Document.new.fragment(doc) assert_match %r% \n
b
*%, fragment.to_s end def test_html_fragment_with_input_and_intermediate_whitespace doc = " span" fragment = Nokogiri::HTML::Document.new.fragment(doc) assert_equal " span", fragment.to_s end def test_html_fragment_with_leading_text_and_newline fragment = HTML::Document.new.fragment("First line\nSecond line
Broken line") assert_equal fragment.to_s, "First line\nSecond line
Broken line" end def test_html_fragment_with_leading_whitespace_and_text_and_newline fragment = HTML::Document.new.fragment(" First line\nSecond line
Broken line") assert_equal " First line\nSecond line
Broken line", fragment.to_s end def test_html_fragment_with_leading_entity failed = ""test
test"" fragment = Nokogiri::HTML::DocumentFragment.parse(failed) assert_equal '"test
test"', fragment.to_html end def test_to_s doc = "foo
bar" fragment = Nokogiri::HTML::Document.new.fragment(doc) assert_equal "foo
bar", fragment.to_s end def test_to_html doc = "foo
bar" fragment = Nokogiri::HTML::Document.new.fragment(doc) assert_equal "foo
bar", fragment.to_html end def test_to_xhtml doc = "foo
bar

" fragment = Nokogiri::HTML::Document.new.fragment(doc) if Nokogiri.jruby? || Nokogiri::VERSION_INFO['libxml']['loaded'] >= "2.7.0" assert_equal "foo
bar

", fragment.to_xhtml else # FIXME: why are we doing this ? this violates the spec, # see http://www.w3.org/TR/xhtml1/#C_2 assert_equal "foo
bar

", fragment.to_xhtml end end def test_to_xml doc = "foo
bar" fragment = Nokogiri::HTML::Document.new.fragment(doc) assert_equal "foo
bar", fragment.to_xml end def test_fragment_script_tag_with_cdata doc = HTML::Document.new fragment = doc.fragment("") assert_equal("", fragment.to_s) end def test_fragment_with_comment doc = HTML::Document.new fragment = doc.fragment("

hello

") assert_equal("

hello

", fragment.to_s) end def test_element_children_counts if Nokogiri.uses_libxml? && Nokogiri::VERSION_INFO['libxml']['loaded'] <= "2.9.1" skip "#elements doesn't work in 2.9.1, see 1793a5a for history" end doc = Nokogiri::HTML::DocumentFragment.parse("
\n ") assert_equal 1, doc.element_children.count end def test_malformed_fragment_is_corrected fragment = HTML::DocumentFragment.parse("
") assert_equal "
", fragment.to_s end def test_unclosed_script_tag # see GH#315 fragment = HTML::DocumentFragment.parse("foo ", fragment.to_html end def test_error_propagation_on_fragment_parse frag = Nokogiri::HTML::DocumentFragment.parse "oh, hello there." assert frag.errors.any?{|err| err.to_s =~ /Tag hello invalid/}, "errors should be copied to the fragment" end def test_error_propagation_on_fragment_parse_in_node_context doc = Nokogiri::HTML::Document.parse "
" context_node = doc.at_css "div" frag = Nokogiri::HTML::DocumentFragment.new doc, "oh, hello there.", context_node assert frag.errors.any?{|err| err.to_s =~ /Tag hello invalid/}, "errors should be on the context node's document" end def test_error_propagation_on_fragment_parse_in_node_context_should_not_include_preexisting_errors doc = Nokogiri::HTML::Document.parse "
" assert doc.errors.any?{|err| err.to_s =~ /jimmy/}, "assert on setup" context_node = doc.at_css "div" frag = Nokogiri::HTML::DocumentFragment.new doc, "oh, hello there.", context_node assert frag.errors.any?{|err| err.to_s =~ /Tag hello invalid/}, "errors should be on the context node's document" assert frag.errors.none?{|err| err.to_s =~ /jimmy/}, "errors should not include pre-existing document errors" end def test_capturing_nonparse_errors_during_fragment_clone # see https://github.com/sparklemotion/nokogiri/issues/1196 for background original = Nokogiri::HTML.fragment("
") original_errors = original.errors.dup copy = original.dup assert_equal original_errors, copy.errors end def test_capturing_nonparse_errors_during_node_copy_between_fragments # Errors should be emitted while parsing only, and should not change when moving nodes. frag1 = Nokogiri::HTML.fragment("one") frag2 = Nokogiri::HTML.fragment("two") node1 = frag1.at_css("#unique") node2 = frag2.at_css("#unique") original_errors1 = frag1.errors.dup original_errors2 = frag2.errors.dup assert original_errors1.any?{|e| e.to_s =~ /Tag diva invalid/ }, "it should complain about the tag name" assert original_errors2.any?{|e| e.to_s =~ /Tag dive invalid/ }, "it should complain about the tag name" node1.add_child node2 assert_equal original_errors1, frag1.errors assert_equal original_errors2, frag2.errors end end end end nokogiri-1.8.2/test/test_css_cache.rb0000644000004100000410000000206113235345655017663 0ustar www-datawww-datarequire "helper" class TestCssCache < Nokogiri::TestCase def setup super @css = "a1 > b2 > c3" @parse_result = Nokogiri::CSS.parse(@css) @to_xpath_result = @parse_result.map(&:to_xpath) Nokogiri::CSS::Parser.class_eval do class << @cache alias :old_bracket :[] attr_reader :count def [](key) @count ||= 0 @count += 1 old_bracket(key) end end end assert Nokogiri::CSS::Parser.cache_on? end def teardown Nokogiri::CSS::Parser.clear_cache Nokogiri::CSS::Parser.set_cache true end [ false, true ].each do |cache_setting| define_method "test_css_cache_#{cache_setting ? "true" : "false"}" do times = cache_setting ? 4 : nil Nokogiri::CSS::Parser.set_cache cache_setting Nokogiri::CSS.xpath_for(@css) Nokogiri::CSS.xpath_for(@css) Nokogiri::CSS::Parser.new.xpath_for(@css) Nokogiri::CSS::Parser.new.xpath_for(@css) assert_equal(times, Nokogiri::CSS::Parser.class_eval { @cache.count }) end end end nokogiri-1.8.2/test/helper.rb0000644000004100000410000001703413235345655016176 0ustar www-datawww-data#Process.setrlimit(Process::RLIMIT_CORE, Process::RLIM_INFINITY) unless RUBY_PLATFORM =~ /(java|mswin|mingw)/i $VERBOSE = true require 'minitest/autorun' require 'minitest/pride' require 'fileutils' require 'tempfile' require 'pp' require 'nokogiri' if ENV['TEST_NOKOGIRI_WITH_LIBXML_RUBY'] # # if you'd like to test with the libxml-ruby gem loaded, it's # recommended that you set # # BUNDLE_GEMFILE=Gemfile-libxml-ruby # # which will a) bundle that gem, and b) set the appropriate env var to # trigger this block # require 'libxml' warn "#{__FILE__}:#{__LINE__}: loaded libxml-ruby '#{LibXML::XML::VERSION}'" end warn "#{__FILE__}:#{__LINE__}: version info: #{Nokogiri::VERSION_INFO.inspect}" module Nokogiri class TestCase < MiniTest::Spec ASSETS_DIR = File.expand_path File.join(File.dirname(__FILE__), 'files') ADDRESS_SCHEMA_FILE = File.join(ASSETS_DIR, 'address_book.rlx') ADDRESS_XML_FILE = File.join(ASSETS_DIR, 'address_book.xml') ENCODING_HTML_FILE = File.join(ASSETS_DIR, 'encoding.html') ENCODING_XHTML_FILE = File.join(ASSETS_DIR, 'encoding.xhtml') EXML_FILE = File.join(ASSETS_DIR, 'exslt.xml') EXSLT_FILE = File.join(ASSETS_DIR, 'exslt.xslt') HTML_FILE = File.join(ASSETS_DIR, 'tlm.html') METACHARSET_FILE = File.join(ASSETS_DIR, 'metacharset.html') NICH_FILE = File.join(ASSETS_DIR, '2ch.html') NOENCODING_FILE = File.join(ASSETS_DIR, 'noencoding.html') PO_SCHEMA_FILE = File.join(ASSETS_DIR, 'po.xsd') PO_XML_FILE = File.join(ASSETS_DIR, 'po.xml') SHIFT_JIS_HTML = File.join(ASSETS_DIR, 'shift_jis.html') SHIFT_JIS_NO_CHARSET= File.join(ASSETS_DIR, 'shift_jis_no_charset.html') SHIFT_JIS_XML = File.join(ASSETS_DIR, 'shift_jis.xml') SNUGGLES_FILE = File.join(ASSETS_DIR, 'snuggles.xml') XML_FILE = File.join(ASSETS_DIR, 'staff.xml') XML_XINCLUDE_FILE = File.join(ASSETS_DIR, 'xinclude.xml') XML_ATOM_FILE = File.join(ASSETS_DIR, 'atom.xml') XSLT_FILE = File.join(ASSETS_DIR, 'staff.xslt') XPATH_FILE = File.join(ASSETS_DIR, 'slow-xpath.xml') def teardown if ENV['NOKOGIRI_GC'] STDOUT.putc '!' if RUBY_PLATFORM =~ /java/ require 'java' java.lang.System.gc else GC.start end end end def stress_memory_while &block # force the test to explicitly declare a skip raise "JRuby doesn't do GC" if Nokogiri.jruby? old_stress = GC.stress begin GC.stress = true yield ensure GC.stress = old_stress end end def assert_indent amount, doc, message = nil nodes = [] doc.traverse do |node| nodes << node if node.text? && node.blank? end assert nodes.length > 0 nodes.each do |node| len = node.content.gsub(/[\r\n]/, '').length assert_equal(0, len % amount, message) end end def util_decorate(document, decorator_module) document.decorators(XML::Node) << decorator_module document.decorators(XML::NodeSet) << decorator_module document.decorate! end # # Test::Unit backwards compatibility section # alias :assert_no_match :refute_match alias :assert_not_nil :refute_nil alias :assert_raise :assert_raises alias :assert_not_equal :refute_equal def assert_not_send send_ary, m = nil recv, msg, *args = send_ary m = message(m) { "Expected #{mu_pp(recv)}.#{msg}(*#{mu_pp(args)}) to return false" } assert !recv.__send__(msg, *args), m end unless method_defined?(:assert_not_send) end module SAX class TestCase < Nokogiri::TestCase class Doc < XML::SAX::Document attr_reader :start_elements, :start_document_called attr_reader :end_elements, :end_document_called attr_reader :data, :comments, :cdata_blocks, :start_elements_namespace attr_reader :errors, :warnings, :end_elements_namespace attr_reader :xmldecls attr_reader :processing_instructions def xmldecl version, encoding, standalone @xmldecls = [version, encoding, standalone].compact super end def start_document @start_document_called = true super end def end_document @end_document_called = true super end def error error (@errors ||= []) << error super end def warning warning (@warning ||= []) << warning super end def start_element *args (@start_elements ||= []) << args super end def start_element_namespace *args (@start_elements_namespace ||= []) << args super end def end_element *args (@end_elements ||= []) << args super end def end_element_namespace *args (@end_elements_namespace ||= []) << args super end def characters string @data ||= [] @data += [string] super end def comment string @comments ||= [] @comments += [string] super end def cdata_block string @cdata_blocks ||= [] @cdata_blocks += [string] super end def processing_instruction name, content @processing_instructions ||= [] @processing_instructions << [name, content] end end # This document will help us to test the strict order of items. class DocWithOrderedItems < XML::SAX::Document attr_reader :items def initialize # [ # [ :method_1, argument_1, ... ], # [ :method_2, argument_2, ... ], # ... # ] @items = Items.new end [ :xmldecl, :start_document, :end_document, :start_element, :end_element, :start_element_namespace, :end_element_namespace, :characters, :comment, :cdata_block, :processing_instruction, :error, :warning ] .each do |name| define_method name do |*arguments| @items << [name, *arguments] super *arguments end end class Items < Array def get_root_content root_name items = clone is_inside_root = false items.select! do |item| method_name = item[0] element_name = item[1] case method_name when :start_element, :start_element_namespace if element_name == root_name is_inside_root = true next false end when :end_element, :end_element_namespace is_inside_root = false if element_name == root_name and is_inside_root end is_inside_root end items end def select_methods(names) items = clone items.select! do |item| name = item[0] names.include? name end items end def strip_text! method_names each do |item| method_name = item[0] text = item[1] text.strip! if method_names.include? method_name end nil end end end end end end nokogiri-1.8.2/test/css/0000755000004100000410000000000013235345655015155 5ustar www-datawww-datanokogiri-1.8.2/test/css/test_nthiness.rb0000644000004100000410000001632513235345655020403 0ustar www-datawww-datarequire "helper" module Nokogiri module CSS class TestNthiness < Nokogiri::TestCase def setup super doc = <
row1
row2
row3
row4
row5
row6
row7
row8
row9
row10
row11
row12
row13
row14
bold1 italic1 bold2 emphasis1 italic2

para1

bold3
italic3 emphasis2 italic4 emphasis3 italic5 italic6 italic7

para2

para3

para4

header1

header2

header3

header4

EOF @parser = Nokogiri.HTML doc end def test_even assert_result_rows [2,4,6,8,10,12,14], @parser.search("table/tr:nth(even)") end def test_odd assert_result_rows [1,3,5,7,9,11,13], @parser.search("table/tr:nth(odd)") end def test_n assert_result_rows((1..14).to_a, @parser.search("table/tr:nth(n)")) end def test_2n assert_equal @parser.search("table/tr:nth(even)").inner_text, @parser.search("table/tr:nth(2n)").inner_text end def test_2np1 assert_equal @parser.search("table/tr:nth(odd)").inner_text, @parser.search("table/tr:nth(2n+1)").inner_text end def test_4np3 assert_result_rows [3,7,11], @parser.search("table/tr:nth(4n+3)") end def test_3np4 assert_result_rows [4,7,10,13], @parser.search("table/tr:nth(3n+4)") end def test_mnp3 assert_result_rows [1,2,3], @parser.search("table/tr:nth(-n+3)") end def test_4nm1 assert_result_rows [3,7,11], @parser.search("table/tr:nth(4n-1)") end def test_np3 assert_result_rows [3,4,5,6,7,8,9,10,11,12,13,14], @parser.search("table/tr:nth(n+3)") end def test_first assert_result_rows [1], @parser.search("table/tr:first") assert_result_rows [1], @parser.search("table/tr:first()") end def test_last assert_result_rows [14], @parser.search("table/tr:last") assert_result_rows [14], @parser.search("table/tr:last()") end def test_first_child assert_result_rows [1], @parser.search("div/b:first-child"), "bold" assert_result_rows [1], @parser.search("table/tr:first-child") assert_result_rows [2,4], @parser.search("div/h1.c:first-child"), "header" end def test_last_child assert_result_rows [3], @parser.search("div/b:last-child"), "bold" assert_result_rows [14], @parser.search("table/tr:last-child") assert_result_rows [3,4], @parser.search("div/h1.c:last-child"), "header" end def test_nth_child assert_result_rows [2], @parser.search("div/b:nth-child(3)"), "bold" assert_result_rows [5], @parser.search("table/tr:nth-child(5)") assert_result_rows [1,3], @parser.search("div/h1.c:nth-child(2)"), "header" assert_result_rows [3,4], @parser.search("div/i.b:nth-child(2n+1)"), "italic" end def test_first_of_type assert_result_rows [1], @parser.search("table/tr:first-of-type") assert_result_rows [1], @parser.search("div/b:first-of-type"), "bold" assert_result_rows [2], @parser.search("div/b.a:first-of-type"), "bold" assert_result_rows [3], @parser.search("div/i.b:first-of-type"), "italic" end def test_last_of_type assert_result_rows [14], @parser.search("table/tr:last-of-type") assert_result_rows [3], @parser.search("div/b:last-of-type"), "bold" assert_result_rows [2,7], @parser.search("div/i:last-of-type"), "italic" assert_result_rows [2,6,7], @parser.search("div i:last-of-type"), "italic" assert_result_rows [4], @parser.search("div/i.b:last-of-type"), "italic" end def test_nth_of_type assert_result_rows [1], @parser.search("div/b:nth-of-type(1)"), "bold" assert_result_rows [2], @parser.search("div/b:nth-of-type(2)"), "bold" assert_result_rows [2], @parser.search("div/.a:nth-of-type(1)"), "bold" assert_result_rows [2,4,7], @parser.search("div i:nth-of-type(2n)"), "italic" assert_result_rows [1,3,5,6], @parser.search("div i:nth-of-type(2n+1)"), "italic" assert_result_rows [1], @parser.search("div .a:nth-of-type(2n)"), "emphasis" assert_result_rows [2,3], @parser.search("div .a:nth-of-type(2n+1)"), "bold" end def test_nth_last_of_type assert_result_rows [14], @parser.search("table/tr:nth-last-of-type(1)") assert_result_rows [12], @parser.search("table/tr:nth-last-of-type(3)") assert_result_rows [2,6,7], @parser.search("div i:nth-last-of-type(1)"), "italic" assert_result_rows [1,5], @parser.search("div i:nth-last-of-type(2)"), "italic" assert_result_rows [4], @parser.search("div/i.b:nth-last-of-type(1)"), "italic" assert_result_rows [3], @parser.search("div/i.b:nth-last-of-type(2)"), "italic" end def test_only_of_type assert_result_rows [1,4], @parser.search("div/p:only-of-type"), "para" assert_result_rows [5], @parser.search("div/i.c:only-of-type"), "italic" end def test_only_child assert_result_rows [4], @parser.search("div/p:only-child"), "para" assert_result_rows [4], @parser.search("div/h1.c:only-child"), "header" end def test_empty result = @parser.search("p:empty") assert_equal 1, result.size, "unexpected number of rows returned: '#{result.inner_text}'" assert_equal 'empty', result.first['class'] end def test_parent result = @parser.search("p:parent") assert_equal 5, result.size 0.upto(3) do |j| assert_equal "para#{j+1} ", result[j].inner_text end assert_equal "not-empty", result[4]['class'] end def test_siblings doc = <<-EOF

p1

p2

p3

p4

p5

EOF parser = Nokogiri.HTML doc assert_equal 2, parser.search("#3 ~ p").size assert_equal "p4 p5 ", parser.search("#3 ~ p").inner_text assert_equal 0, parser.search("#5 ~ p").size assert_equal 1, parser.search("#3 + p").size assert_equal "p4 ", parser.search("#3 + p").inner_text assert_equal 0, parser.search("#5 + p").size end def assert_result_rows intarray, result, word="row" assert_equal intarray.size, result.size, "unexpected number of rows returned: '#{result.inner_text}'" assert_equal intarray.map{|j| "#{word}#{j}"}.join(' '), result.inner_text.strip, result.inner_text end end end end nokogiri-1.8.2/test/css/test_xpath_visitor.rb0000644000004100000410000000610313235345655021444 0ustar www-datawww-datarequire "helper" module Nokogiri module CSS class TestXPathVisitor < Nokogiri::TestCase def setup super @parser = Nokogiri::CSS::Parser.new end def test_not_simple_selector assert_xpath('//ol/*[not(self::li)]', @parser.parse('ol > *:not(li)')) end def test_not_last_child assert_xpath('//ol/*[not(count(following-sibling::*) = 0)]', @parser.parse('ol > *:not(:last-child)')) end def test_not_only_child assert_xpath('//ol/*[not(count(preceding-sibling::*) = 0 and count(following-sibling::*) = 0)]', @parser.parse('ol > *:not(:only-child)')) end def test_function_calls_allow_at_params assert_xpath("//a[foo(., @href)]", @parser.parse('a:foo(@href)')) assert_xpath("//a[foo(., @a, b)]", @parser.parse('a:foo(@a, b)')) assert_xpath("//a[foo(., a, 10)]", @parser.parse('a:foo(a, 10)')) end def test_namespace_conversion assert_xpath("//aaron:a", @parser.parse('aaron|a')) assert_xpath("//a", @parser.parse('|a')) end def test_namespaced_attribute_conversion assert_xpath("//a[@flavorjones:href]", @parser.parse('a[flavorjones|href]')) assert_xpath("//a[@href]", @parser.parse('a[|href]')) assert_xpath("//*[@flavorjones:href]", @parser.parse('*[flavorjones|href]')) end def test_unknown_psuedo_classes_get_pushed_down assert_xpath("//a[aaron(.)]", @parser.parse('a:aaron')) end def test_unknown_functions_get_dot_plus_args assert_xpath("//a[aaron(.)]", @parser.parse('a:aaron()')) assert_xpath("//a[aaron(., 12)]", @parser.parse('a:aaron(12)')) assert_xpath("//a[aaron(., 12, 1)]", @parser.parse('a:aaron(12, 1)')) end def test_class_selectors assert_xpath "//*[contains(concat(' ', normalize-space(@class), ' '), ' red ')]", @parser.parse(".red") end def test_pipe assert_xpath "//a[@id = 'Boing' or starts-with(@id, concat('Boing', '-'))]", @parser.parse("a[id|='Boing']") end def test_custom_functions visitor = Class.new(XPathVisitor) do attr_accessor :awesome def visit_function_aaron node @awesome = true 'aaron() = 1' end end.new ast = @parser.parse('a:aaron()').first assert_equal 'a[aaron() = 1]', visitor.accept(ast) assert visitor.awesome end def test_custom_psuedo_classes visitor = Class.new(XPathVisitor) do attr_accessor :awesome def visit_pseudo_class_aaron node @awesome = true 'aaron() = 1' end end.new ast = @parser.parse('a:aaron').first assert_equal 'a[aaron() = 1]', visitor.accept(ast) assert visitor.awesome end def assert_xpath expecteds, asts expecteds = [expecteds].flatten expecteds.zip(asts).each do |expected, actual| assert_equal expected, actual.to_xpath end end end end end nokogiri-1.8.2/test/css/test_tokenizer.rb0000644000004100000410000001375713235345655020570 0ustar www-datawww-data# -*- coding: utf-8 -*- require "helper" module Nokogiri module CSS class Tokenizer alias :scan :scan_setup end end end module Nokogiri module CSS class TestTokenizer < Nokogiri::TestCase def setup super @scanner = Nokogiri::CSS::Tokenizer.new end def test_has @scanner.scan("a:has(b)") assert_tokens( [[:IDENT, "a"], [":", ":"], [:HAS, "has("], [:IDENT, "b"], [:RPAREN, ")"]], @scanner) end def test_unicode @scanner.scan("a日本語") assert_tokens([[:IDENT, 'a日本語']], @scanner) end def test_tokenize_bad_single_quote @scanner.scan("'") assert_tokens([["'", "'"]], @scanner) end def test_not_equal @scanner.scan("h1[a!='Tender Lovemaking']") assert_tokens([ [:IDENT, 'h1'], [:LSQUARE, '['], [:IDENT, 'a'], [:NOT_EQUAL, '!='], [:STRING, "'Tender Lovemaking'"], [:RSQUARE, ']'], ], @scanner) end def test_negation @scanner.scan("p:not(.a)") assert_tokens([ [:IDENT, 'p'], [:NOT, ':not('], ['.', '.'], [:IDENT, 'a'], [:RPAREN, ')'], ], @scanner) end def test_function @scanner.scan("script comment()") assert_tokens([ [:IDENT, 'script'], [:S, ' '], [:FUNCTION, 'comment('], [:RPAREN, ')'], ], @scanner) end def test_preceding_selector @scanner.scan("E ~ F") assert_tokens([ [:IDENT, 'E'], [:TILDE, ' ~ '], [:IDENT, 'F'], ], @scanner) end def test_scan_attribute_string @scanner.scan("h1[a='Tender Lovemaking']") assert_tokens([ [:IDENT, 'h1'], [:LSQUARE, '['], [:IDENT, 'a'], [:EQUAL, '='], [:STRING, "'Tender Lovemaking'"], [:RSQUARE, ']'], ], @scanner) @scanner.scan('h1[a="Tender Lovemaking"]') assert_tokens([ [:IDENT, 'h1'], [:LSQUARE, '['], [:IDENT, 'a'], [:EQUAL, '='], [:STRING, '"Tender Lovemaking"'], [:RSQUARE, ']'], ], @scanner) end def test_scan_id @scanner.scan('#foo') assert_tokens([ [:HASH, '#foo'] ], @scanner) end def test_scan_pseudo @scanner.scan('a:visited') assert_tokens([ [:IDENT, 'a'], [':', ':'], [:IDENT, 'visited'] ], @scanner) end def test_scan_star @scanner.scan('*') assert_tokens([ ['*', '*'], ], @scanner) end def test_scan_class @scanner.scan('x.awesome') assert_tokens([ [:IDENT, 'x'], ['.', '.'], [:IDENT, 'awesome'], ], @scanner) end def test_scan_greater @scanner.scan('x > y') assert_tokens([ [:IDENT, 'x'], [:GREATER, ' > '], [:IDENT, 'y'] ], @scanner) end def test_scan_slash @scanner.scan('x/y') assert_tokens([ [:IDENT, 'x'], [:SLASH, '/'], [:IDENT, 'y'] ], @scanner) end def test_scan_doubleslash @scanner.scan('x//y') assert_tokens([ [:IDENT, 'x'], [:DOUBLESLASH, '//'], [:IDENT, 'y'] ], @scanner) end def test_scan_function_selector @scanner.scan('x:eq(0)') assert_tokens([ [:IDENT, 'x'], [':', ':'], [:FUNCTION, 'eq('], [:NUMBER, "0"], [:RPAREN, ')'], ], @scanner) end def test_scan_nth @scanner.scan('x:nth-child(5n+3)') assert_tokens([ [:IDENT, 'x'], [':', ':'], [:FUNCTION, 'nth-child('], [:NUMBER, '5'], [:IDENT, 'n'], [:PLUS, '+'], [:NUMBER, '3'], [:RPAREN, ')'], ], @scanner) @scanner.scan('x:nth-child(-1n+3)') assert_tokens([ [:IDENT, 'x'], [':', ':'], [:FUNCTION, 'nth-child('], [:NUMBER, '-1'], [:IDENT, 'n'], [:PLUS, '+'], [:NUMBER, '3'], [:RPAREN, ')'], ], @scanner) @scanner.scan('x:nth-child(-n+3)') assert_tokens([ [:IDENT, 'x'], [':', ':'], [:FUNCTION, 'nth-child('], [:IDENT, '-n'], [:PLUS, '+'], [:NUMBER, '3'], [:RPAREN, ')'], ], @scanner) end def test_significant_space @scanner.scan('x :first-child [a] [b]') assert_tokens([ [:IDENT, 'x'], [:S, ' '], [':', ':'], [:IDENT, 'first-child'], [:S, ' '], [:LSQUARE, '['], [:IDENT, 'a'], [:RSQUARE, ']'], [:S, ' '], [:LSQUARE, '['], [:IDENT, 'b'], [:RSQUARE, ']'], ], @scanner) end def assert_tokens(tokens, scanner) toks = [] while tok = @scanner.next_token toks << tok end assert_equal(tokens, toks) end end end end nokogiri-1.8.2/test/css/test_parser.rb0000644000004100000410000004016013235345655020036 0ustar www-datawww-datarequire "helper" module Nokogiri module CSS class TestParser < Nokogiri::TestCase def setup super @parser = Nokogiri::CSS::Parser.new @parser_with_ns = Nokogiri::CSS::Parser.new({ "xmlns" => "http://default.example.com/", "hoge" => "http://hoge.example.com/", }) end def test_extra_single_quote assert_raises(CSS::SyntaxError) { @parser.parse("'") } end def test_syntax_error_raised assert_raises(CSS::SyntaxError) { @parser.parse("a[x=]") } end def test_function_and_pseudo assert_xpath '//child::text()[position() = 99]', @parser.parse('text():nth-of-type(99)') end def test_find_by_type ast = @parser.parse("a:nth-child(2)").first matches = ast.find_by_type( [:CONDITIONAL_SELECTOR, [:ELEMENT_NAME], [:PSEUDO_CLASS, [:FUNCTION] ] ] ) assert_equal(1, matches.length) assert_equal(ast, matches.first) end def test_to_type ast = @parser.parse("a:nth-child(2)").first assert_equal( [:CONDITIONAL_SELECTOR, [:ELEMENT_NAME], [:PSEUDO_CLASS, [:FUNCTION] ] ], ast.to_type ) end def test_to_a asts = @parser.parse("a:nth-child(2)") assert_equal( [:CONDITIONAL_SELECTOR, [:ELEMENT_NAME, ["a"]], [:PSEUDO_CLASS, [:FUNCTION, ["nth-child("], ["2"]] ] ], asts.first.to_a ) end def test_has assert_xpath "//a[b]", @parser.parse("a:has(b)") assert_xpath "//a[b/c]", @parser.parse("a:has(b > c)") end def test_dashmatch assert_xpath "//a[@class = 'bar' or starts-with(@class, concat('bar', '-'))]", @parser.parse("a[@class|='bar']") assert_xpath "//a[@class = 'bar' or starts-with(@class, concat('bar', '-'))]", @parser.parse("a[@class |= 'bar']") end def test_includes assert_xpath "//a[contains(concat(\" \", @class, \" \"),concat(\" \", 'bar', \" \"))]", @parser.parse("a[@class~='bar']") assert_xpath "//a[contains(concat(\" \", @class, \" \"),concat(\" \", 'bar', \" \"))]", @parser.parse("a[@class ~= 'bar']") end def test_function_with_arguments assert_xpath "//a[count(preceding-sibling::*) = 1]", @parser.parse("a[2]") assert_xpath "//a[count(preceding-sibling::*) = 1]", @parser.parse("a:nth-child(2)") end def test_carrot assert_xpath "//a[starts-with(@id, 'Boing')]", @parser.parse("a[id^='Boing']") assert_xpath "//a[starts-with(@id, 'Boing')]", @parser.parse("a[id ^= 'Boing']") end def test_suffix_match assert_xpath "//a[substring(@id, string-length(@id) - string-length('Boing') + 1, string-length('Boing')) = 'Boing']", @parser.parse("a[id$='Boing']") assert_xpath "//a[substring(@id, string-length(@id) - string-length('Boing') + 1, string-length('Boing')) = 'Boing']", @parser.parse("a[id $= 'Boing']") end def test_attributes_with_at ## This is non standard CSS assert_xpath "//a[@id = 'Boing']", @parser.parse("a[@id='Boing']") assert_xpath "//a[@id = 'Boing']", @parser.parse("a[@id = 'Boing']") end def test_attributes_with_at_and_stuff ## This is non standard CSS assert_xpath "//a[@id = 'Boing']//div", @parser.parse("a[@id='Boing'] div") end def test_not_equal ## This is non standard CSS assert_xpath "//a[child::text() != 'Boing']", @parser.parse("a[text()!='Boing']") assert_xpath "//a[child::text() != 'Boing']", @parser.parse("a[text() != 'Boing']") end def test_function ## This is non standard CSS assert_xpath "//a[child::text()]", @parser.parse("a[text()]") ## This is non standard CSS assert_xpath "//child::text()", @parser.parse("text()") ## This is non standard CSS assert_xpath "//a[contains(child::text(), 'Boing')]", @parser.parse("a[text()*='Boing']") assert_xpath "//a[contains(child::text(), 'Boing')]", @parser.parse("a[text() *= 'Boing']") ## This is non standard CSS assert_xpath "//script//comment()", @parser.parse("script comment()") end def test_nonstandard_nth_selectors ## These are non standard CSS assert_xpath '//a[position() = 1]', @parser.parse('a:first()') assert_xpath '//a[position() = 1]', @parser.parse('a:first') # no parens assert_xpath '//a[position() = 99]', @parser.parse('a:eq(99)') assert_xpath '//a[position() = 99]', @parser.parse('a:nth(99)') assert_xpath '//a[position() = last()]', @parser.parse('a:last()') assert_xpath '//a[position() = last()]', @parser.parse('a:last') # no parens assert_xpath '//a[node()]', @parser.parse('a:parent') end def test_standard_nth_selectors assert_xpath '//a[position() = 1]', @parser.parse('a:first-of-type()') assert_xpath '//a[position() = 1]', @parser.parse('a:first-of-type') # no parens assert_xpath "//a[contains(concat(' ', normalize-space(@class), ' '), ' b ')][position() = 1]", @parser.parse('a.b:first-of-type') # no parens assert_xpath '//a[position() = 99]', @parser.parse('a:nth-of-type(99)') assert_xpath "//a[contains(concat(' ', normalize-space(@class), ' '), ' b ')][position() = 99]", @parser.parse('a.b:nth-of-type(99)') assert_xpath '//a[position() = last()]', @parser.parse('a:last-of-type()') assert_xpath '//a[position() = last()]', @parser.parse('a:last-of-type') # no parens assert_xpath "//a[contains(concat(' ', normalize-space(@class), ' '), ' b ')][position() = last()]", @parser.parse('a.b:last-of-type') # no parens assert_xpath '//a[position() = last()]', @parser.parse('a:nth-last-of-type(1)') assert_xpath '//a[position() = last() - 98]', @parser.parse('a:nth-last-of-type(99)') assert_xpath "//a[contains(concat(' ', normalize-space(@class), ' '), ' b ')][position() = last() - 98]", @parser.parse('a.b:nth-last-of-type(99)') end def test_nth_child_selectors assert_xpath '//a[count(preceding-sibling::*) = 0]', @parser.parse('a:first-child') assert_xpath '//a[count(preceding-sibling::*) = 98]', @parser.parse('a:nth-child(99)') assert_xpath '//a[count(following-sibling::*) = 0]', @parser.parse('a:last-child') assert_xpath '//a[count(following-sibling::*) = 0]', @parser.parse('a:nth-last-child(1)') assert_xpath '//a[count(following-sibling::*) = 98]', @parser.parse('a:nth-last-child(99)') end def test_miscellaneous_selectors assert_xpath '//a[count(preceding-sibling::*) = 0 and count(following-sibling::*) = 0]', @parser.parse('a:only-child') assert_xpath '//a[last() = 1]', @parser.parse('a:only-of-type') assert_xpath '//a[not(node())]', @parser.parse('a:empty') end def test_nth_a_n_plus_b assert_xpath '//a[(position() mod 2) = 0]', @parser.parse('a:nth-of-type(2n)') assert_xpath '//a[(position() >= 1) and (((position()-1) mod 2) = 0)]', @parser.parse('a:nth-of-type(2n+1)') assert_xpath '//a[(position() mod 2) = 0]', @parser.parse('a:nth-of-type(even)') assert_xpath '//a[(position() >= 1) and (((position()-1) mod 2) = 0)]', @parser.parse('a:nth-of-type(odd)') assert_xpath '//a[(position() >= 3) and (((position()-3) mod 4) = 0)]', @parser.parse('a:nth-of-type(4n+3)') assert_xpath '//a[position() <= 3]', @parser.parse('a:nth-of-type(-1n+3)') assert_xpath '//a[position() <= 3]', @parser.parse('a:nth-of-type(-n+3)') assert_xpath '//a[position() >= 3]', @parser.parse('a:nth-of-type(1n+3)') assert_xpath '//a[position() >= 3]', @parser.parse('a:nth-of-type(n+3)') assert_xpath '//a[((last()-position()+1) mod 2) = 0]', @parser.parse('a:nth-last-of-type(2n)') assert_xpath '//a[((last()-position()+1) >= 1) and ((((last()-position()+1)-1) mod 2) = 0)]', @parser.parse('a:nth-last-of-type(2n+1)') assert_xpath '//a[((last()-position()+1) mod 2) = 0]', @parser.parse('a:nth-last-of-type(even)') assert_xpath '//a[((last()-position()+1) >= 1) and ((((last()-position()+1)-1) mod 2) = 0)]', @parser.parse('a:nth-last-of-type(odd)') assert_xpath '//a[((last()-position()+1) >= 3) and ((((last()-position()+1)-3) mod 4) = 0)]', @parser.parse('a:nth-last-of-type(4n+3)') assert_xpath '//a[(last()-position()+1) <= 3]', @parser.parse('a:nth-last-of-type(-1n+3)') assert_xpath '//a[(last()-position()+1) <= 3]', @parser.parse('a:nth-last-of-type(-n+3)') assert_xpath '//a[(last()-position()+1) >= 3]', @parser.parse('a:nth-last-of-type(1n+3)') assert_xpath '//a[(last()-position()+1) >= 3]', @parser.parse('a:nth-last-of-type(n+3)') end def test_preceding_selector assert_xpath "//E/following-sibling::F", @parser.parse("E ~ F") assert_xpath "//E/following-sibling::F//G", @parser.parse("E ~ F G") end def test_direct_preceding_selector assert_xpath "//E/following-sibling::*[1]/self::F", @parser.parse("E + F") assert_xpath "//E/following-sibling::*[1]/self::F//G", @parser.parse("E + F G") end def test_child_selector assert_xpath("//a//b/i", @parser.parse('a b>i')) assert_xpath("//a//b/i", @parser.parse('a b > i')) assert_xpath("//a/b/i", @parser.parse('a > b > i')) end def test_prefixless_child_selector assert_xpath("./a", @parser.parse('>a')) assert_xpath("./a", @parser.parse('> a')) assert_xpath("./a//b/i", @parser.parse('>a b>i')) assert_xpath("./a/b/i", @parser.parse('> a > b > i')) end def test_prefixless_preceding_sibling_selector assert_xpath("./following-sibling::a", @parser.parse('~a')) assert_xpath("./following-sibling::a", @parser.parse('~ a')) assert_xpath("./following-sibling::a//b/following-sibling::i", @parser.parse('~a b~i')) assert_xpath("./following-sibling::a//b/following-sibling::i", @parser.parse('~ a b ~ i')) end def test_prefixless_direct_adjacent_selector assert_xpath("./following-sibling::*[1]/self::a", @parser.parse('+a')) assert_xpath("./following-sibling::*[1]/self::a", @parser.parse('+ a')) assert_xpath("./following-sibling::*[1]/self::a/following-sibling::*[1]/self::b", @parser.parse('+a+b')) assert_xpath("./following-sibling::*[1]/self::a/following-sibling::*[1]/self::b", @parser.parse('+ a + b')) end def test_attribute assert_xpath "//h1[@a = 'Tender Lovemaking']", @parser.parse("h1[a='Tender Lovemaking']") end def test_id assert_xpath "//*[@id = 'foo']", @parser.parse('#foo') assert_xpath "//*[@id = 'escape:needed,']", @parser.parse('#escape\:needed\,') assert_xpath "//*[@id = 'escape:needed,']", @parser.parse('#escape\3Aneeded\,') assert_xpath "//*[@id = 'escape:needed,']", @parser.parse('#escape\3A needed\2C') assert_xpath "//*[@id = 'escape:needed']", @parser.parse('#escape\00003Aneeded') end def test_pseudo_class_no_ident assert_xpath "//*[link(.)]", @parser.parse(':link') end def test_pseudo_class assert_xpath "//a[link(.)]", @parser.parse('a:link') assert_xpath "//a[visited(.)]", @parser.parse('a:visited') assert_xpath "//a[hover(.)]", @parser.parse('a:hover') assert_xpath "//a[active(.)]", @parser.parse('a:active') assert_xpath "//a[active(.) and contains(concat(' ', normalize-space(@class), ' '), ' foo ')]", @parser.parse('a:active.foo') end def test_significant_space assert_xpath "//x//*[count(preceding-sibling::*) = 0]//*[@a]//*[@b]", @parser.parse("x :first-child [a] [b]") assert_xpath "//*[@a]//*[@b]", @parser.parse(" [a] [b]") end def test_star assert_xpath "//*", @parser.parse('*') assert_xpath "//*[contains(concat(' ', normalize-space(@class), ' '), ' pastoral ')]", @parser.parse('*.pastoral') end def test_class assert_xpath "//*[contains(concat(' ', normalize-space(@class), ' '), ' a ') and contains(concat(' ', normalize-space(@class), ' '), ' b ')]", @parser.parse('.a.b') assert_xpath "//*[contains(concat(' ', normalize-space(@class), ' '), ' awesome ')]", @parser.parse('.awesome') assert_xpath "//foo[contains(concat(' ', normalize-space(@class), ' '), ' awesome ')]", @parser.parse('foo.awesome') assert_xpath "//foo//*[contains(concat(' ', normalize-space(@class), ' '), ' awesome ')]", @parser.parse('foo .awesome') assert_xpath "//foo//*[contains(concat(' ', normalize-space(@class), ' '), ' awe.some ')]", @parser.parse('foo .awe\.some') end def test_bare_not assert_xpath "//*[not(contains(concat(' ', normalize-space(@class), ' '), ' a '))]", @parser.parse(':not(.a)') end def test_not_so_simple_not assert_xpath "//*[@id = 'p' and not(contains(concat(' ', normalize-space(@class), ' '), ' a '))]", @parser.parse('#p:not(.a)') assert_xpath "//p[contains(concat(' ', normalize-space(@class), ' '), ' a ') and not(contains(concat(' ', normalize-space(@class), ' '), ' b '))]", @parser.parse('p.a:not(.b)') assert_xpath "//p[@a = 'foo' and not(contains(concat(' ', normalize-space(@class), ' '), ' b '))]", @parser.parse("p[a='foo']:not(.b)") end def test_multiple_not assert_xpath "//p[not(contains(concat(' ', normalize-space(@class), ' '), ' a ')) and not(contains(concat(' ', normalize-space(@class), ' '), ' b ')) and not(contains(concat(' ', normalize-space(@class), ' '), ' c '))]", @parser.parse("p:not(.a):not(.b):not(.c)") end def test_ident assert_xpath '//x', @parser.parse('x') end def test_parse_space assert_xpath '//x//y', @parser.parse('x y') end def test_parse_descendant assert_xpath '//x/y', @parser.parse('x > y') end def test_parse_slash ## This is non standard CSS assert_xpath '//x/y', @parser.parse('x/y') end def test_parse_doubleslash ## This is non standard CSS assert_xpath '//x//y', @parser.parse('x//y') end def test_multi_path assert_xpath ['//x/y', '//y/z'], @parser.parse('x > y, y > z') assert_xpath ['//x/y', '//y/z'], @parser.parse('x > y,y > z') ### # TODO: should we make this work? # assert_xpath ['//x/y', '//y/z'], @parser.parse('x > y | y > z') end def test_attributes_with_namespace ## Default namespace is not applied to attributes. ## So this must be @class, not @xmlns:class. assert_xpath "//xmlns:a[@class = 'bar']", @parser_with_ns.parse("a[class='bar']") assert_xpath "//xmlns:a[@hoge:class = 'bar']", @parser_with_ns.parse("a[hoge|class='bar']") end def assert_xpath expecteds, asts expecteds = [expecteds].flatten expecteds.zip(asts).each do |expected, actual| assert_equal expected, actual.to_xpath end end end end end nokogiri-1.8.2/test/files/0000755000004100000410000000000013235345655015467 5ustar www-datawww-datanokogiri-1.8.2/test/files/bar/0000755000004100000410000000000013235345655016233 5ustar www-datawww-datanokogiri-1.8.2/test/files/bar/bar.xsd0000644000004100000410000000021513235345655017515 0ustar www-datawww-data nokogiri-1.8.2/test/files/po.xsd0000644000004100000410000000440513235345655016630 0ustar www-datawww-data Purchase order schema for Example.com. Copyright 2000 Example.com. All rights reserved. nokogiri-1.8.2/test/files/exslt.xslt0000644000004100000410000000207013235345655017541 0ustar www-datawww-data nokogiri-1.8.2/test/files/test_document_url/0000755000004100000410000000000013235345655021226 5ustar www-datawww-datanokogiri-1.8.2/test/files/test_document_url/document.xml0000644000004100000410000000017713235345655023573 0ustar www-datawww-data &bar; nokogiri-1.8.2/test/files/test_document_url/bar.xml0000644000004100000410000000007413235345655022515 0ustar www-datawww-data foobar nokogiri-1.8.2/test/files/test_document_url/document.dtd0000644000004100000410000000014313235345655023537 0ustar www-datawww-data nokogiri-1.8.2/test/files/to_be_xincluded.xml0000644000004100000410000000015513235345655021341 0ustar www-datawww-data this snippet is to be included from xinclude.xml nokogiri-1.8.2/test/files/namespace_pressure_test.xml0000644000004100000410000024477213235345655023154 0ustar www-datawww-data id 53cd4af1e4b0207100d2266e targetnamespace http://www.omg.org/bpmn20 resourceId 53cd4af1e4b0207100d2266e typelanguage http://www.w3.org/2001/XMLSchema expressionlanguage http://www.w3.org/1999/XPath adhocprocess false _05393109-B58E-44C3-8BF2-00C4B2421310 tasktype externalManufacturingTask script_language javascript fontcolor #000000 bgcolor #fafad2 bordercolor #000000 resourceId _7A0D6B74-FB75-4981-B072-0A5131A2CE6E name Deliver Mail avg_time 1m isselectable true asdomain 63.9 - Other information service activities origbordercolor #000000 min_time 1m origbgcolor #fafad2 assignments to=juergen.mangler@univie.ac.at,subject=Defect Part,body=data.defectid typeproc 63.99 - Other information service activities n.e.c. company max_time 1m documentation ManufacturingTask taskname externalManufacturingTask datainputset to:String,subject:String,body:String _D0127BEA-43BE-4405-9CA6-1BB7B13A77D4 _054228DC-266F-4DA8-A63F-8C2695DCC2A2 _7A0D6B74-FB75-4981-B072-0A5131A2CE6E_toInput _7A0D6B74-FB75-4981-B072-0A5131A2CE6E_subjectInput _7A0D6B74-FB75-4981-B072-0A5131A2CE6E_bodyInput _7A0D6B74-FB75-4981-B072-0A5131A2CE6E_TaskNameInput _7A0D6B74-FB75-4981-B072-0A5131A2CE6E_TaskNameInput externalManufacturingTask _7A0D6B74-FB75-4981-B072-0A5131A2CE6E_TaskNameInput _7A0D6B74-FB75-4981-B072-0A5131A2CE6E_toInput _7A0D6B74-FB75-4981-B072-0A5131A2CE6E_toInput _7A0D6B74-FB75-4981-B072-0A5131A2CE6E_subjectInput _7A0D6B74-FB75-4981-B072-0A5131A2CE6E_subjectInput _7A0D6B74-FB75-4981-B072-0A5131A2CE6E_bodyInput _7A0D6B74-FB75-4981-B072-0A5131A2CE6E_bodyInput tasktype smartobject script_language javascript fontcolor #000000 bgcolor #fafad2 bordercolor #000000 resourceId _AD18FADA-4FFD-4F01-8BA1-98F9AF578DDE name Receive avg_time 1m isselectable true asdomain 29.3 - Manufacture of parts and accessories for motor vehicles dataoutputset SensorTimestamp:String,SensorData:String,LocationValid:String,LocationTimestamp:String,LocationLatitude:Float,LocationLongitude:Float,LocationAccuracy:String,SensorID:Integer,OwnerID:String origbordercolor #000000 script origbgcolor #fafad2 min_time 1m assignments SensorID=14 typeproc 29.3223 - Manufacture of Research and Development for motor vehicles company max_time 1m documentation Smart Object taskname smartobject datainputset SensorID:Integer,OwnerID:Integer _A3BF1D3B-BA14-4641-A17E-124082F0B197 _E6F2E675-F1AB-4CE8-988F-845B9C345013 _D0127BEA-43BE-4405-9CA6-1BB7B13A77D4 _AD18FADA-4FFD-4F01-8BA1-98F9AF578DDE_SensorIDInput _AD18FADA-4FFD-4F01-8BA1-98F9AF578DDE_OwnerIDInput _AD18FADA-4FFD-4F01-8BA1-98F9AF578DDE_TaskNameInput _AD18FADA-4FFD-4F01-8BA1-98F9AF578DDE_SensorTimestampOutput _AD18FADA-4FFD-4F01-8BA1-98F9AF578DDE_SensorDataOutput _AD18FADA-4FFD-4F01-8BA1-98F9AF578DDE_LocationValidOutput _AD18FADA-4FFD-4F01-8BA1-98F9AF578DDE_LocationTimestampOutput _AD18FADA-4FFD-4F01-8BA1-98F9AF578DDE_LocationLatitudeOutput _AD18FADA-4FFD-4F01-8BA1-98F9AF578DDE_LocationLongitudeOutput _AD18FADA-4FFD-4F01-8BA1-98F9AF578DDE_LocationAccuracyOutput _AD18FADA-4FFD-4F01-8BA1-98F9AF578DDE_SensorIDOutput _AD18FADA-4FFD-4F01-8BA1-98F9AF578DDE_OwnerIDOutput _AD18FADA-4FFD-4F01-8BA1-98F9AF578DDE_TaskNameInput smartobject _AD18FADA-4FFD-4F01-8BA1-98F9AF578DDE_TaskNameInput _AD18FADA-4FFD-4F01-8BA1-98F9AF578DDE_SensorIDInput _AD18FADA-4FFD-4F01-8BA1-98F9AF578DDE_SensorIDInput waitforcompletion true script_language javascript fontcolor #000000 bgcolor #fafad2 bordercolor #000000 resourceId _8289E931-8723-4DEB-A62C-6CAF91139B0B name Spawn self activitytype Sub-Process isselectable true origbordercolor #000000 origbgcolor #fafad2 independent true calledelement 53cd4af1e4b0207100d2266e _054228DC-266F-4DA8-A63F-8C2695DCC2A2 _4054B828-4EB8-4340-B318-90CC78EB1209 _05393109-B58E-44C3-8BF2-00C4B2421310 _C3E3C56A-141C-4641-BB0E-C8D06D37F097 _4F965CA3-9A84-498F-A426-E5366BD31C5C tasktype None looptype None script_language javascript behavior all fontcolor #000000 bgcolor #fafad2 bordercolor #000000 resourceId _5B1B9F91-15AE-48CA-BD3D-CE6A41DC9729 name b isselectable true origbordercolor #000000 origbgcolor #fafad2 _C3E3C56A-141C-4641-BB0E-C8D06D37F097 _61243086-D25B-4C49-9E1B-D969A7BD6C2D tasktype None looptype None script_language javascript behavior all fontcolor #000000 bgcolor #fafad2 bordercolor #000000 resourceId _AE358313-9923-47D4-8D7F-2BD2DBD3C726 name a isselectable true origbordercolor #000000 origbgcolor #fafad2 _4F965CA3-9A84-498F-A426-E5366BD31C5C _2C144E08-F30C-4F06-B84D-A9A848B7F99D _2C144E08-F30C-4F06-B84D-A9A848B7F99D _61243086-D25B-4C49-9E1B-D969A7BD6C2D _A3BF1D3B-BA14-4641-A17E-124082F0B197 _57C35252-FD8D-45A7-A81A-B69E548FD723 _4054B828-4EB8-4340-B318-90CC78EB1209 _E6F2E675-F1AB-4CE8-988F-845B9C345013 _8B2D0306-7C68-466C-A192-D9637B1A2AC5 _8B2D0306-7C68-466C-A192-D9637B1A2AC5 _1827492A-0604-4974-A692-AF7D5CC78C14 _F50480EA-AC72-465F-B07C-7324B16B7F56 _1221DA43-76AB-4A51-9AE3-E423C47A9FF8 tasktype None looptype None script_language javascript behavior all fontcolor #000000 bgcolor #fafad2 bordercolor #000000 resourceId _53550CE0-4E1F-4171-AA2C-25D8599C2479 name c isselectable true origbordercolor #000000 origbgcolor #fafad2 _1827492A-0604-4974-A692-AF7D5CC78C14 _DB134771-8CD6-47FE-8843-75E730F194DC tasktype None looptype None script_language javascript behavior all fontcolor #000000 bgcolor #fafad2 bordercolor #000000 resourceId _0DE2B5EE-4CC8-4FD6-972B-FC76C25FB43F name d isselectable true origbordercolor #000000 origbgcolor #fafad2 _F50480EA-AC72-465F-B07C-7324B16B7F56 _256806B5-18BF-45C6-BDFC-23B560A9DC1A tasktype None looptype None script_language javascript behavior all fontcolor #000000 bgcolor #fafad2 bordercolor #000000 resourceId _E6E9EEFD-BDDF-4946-9FBF-85ABF92F72CC name e isselectable true origbordercolor #000000 origbgcolor #fafad2 _1221DA43-76AB-4A51-9AE3-E423C47A9FF8 _19997DA4-320C-4F45-8859-0CB5CFBA33FE _DB134771-8CD6-47FE-8843-75E730F194DC _256806B5-18BF-45C6-BDFC-23B560A9DC1A _19997DA4-320C-4F45-8859-0CB5CFBA33FE _0B51E7E0-24E9-487F-94FA-5F178D5DC41D _9EF997A4-881E-401E-8D23-D4CC9317DFA9 _0B51E7E0-24E9-487F-94FA-5F178D5DC41D _57C35252-FD8D-45A7-A81A-B69E548FD723 _4D029375-58C1-40B9-ABFB-6984240DAF2A tasktype None looptype None script_language javascript behavior all fontcolor #000000 bgcolor #fafad2 bordercolor #000000 resourceId _60EE8970-2AC4-490C-9638-538EDF84F9F8 name f isselectable true origbordercolor #000000 origbgcolor #fafad2 _4D029375-58C1-40B9-ABFB-6984240DAF2A _9EF997A4-881E-401E-8D23-D4CC9317DFA9 _40lQMS73EeS1AYtvYpBbmA _40lQMS73EeS1AYtvYpBbmA nokogiri-1.8.2/test/files/metacharset.html0000644000004100000410000000023413235345655020654 0ustar www-datawww-data $B$?$3>F$-2>LL(B

$B0-$$;v$r9=A[Cf!#(B

nokogiri-1.8.2/test/files/noencoding.html0000644000004100000410000001362413235345655020506 0ustar www-datawww-data I have no encoding declaration.

I want one.

I really want one.

I really really want one.

I really really really want one.

I really really really really want one.

I really really really really really want one.

I really really really really really really want one.

I really really really really really really really want one.

I really really really really really really really really want one.

I really really really really really really really really really want one.

I really really really really really really really really really really want one.

I really really really really really really really really really really really want one.

I really really really really really really really really really really really really want one.

I really really really really really really really really really really really really really want one.

I really really really really really really really really really really really really really really want one.

I really really really really really really really really really really really really really really really want one.

I really really really really really really really really really really really really really really really really want one.

I really really really really really really really really really really really really really really really really really want one.

I really really really really really really really really really really really really really really really really really really want one.

I really really really really really really really really really really really really really really really really really really really want one.

I really really really really really really really really really really really really really really really really really really really really want one.

I really really really really really really really really really really really really really really really really really really really really really want one.

I really really really really really really really really really really really really really really really really really really really really really really want one.

I really really really really really really really really really really really really really really really really really really really really really really really want one.

I really really really really really really really really really really really really really really really really really really really really really really really really want one.

I really really really really really really really really really really really really really really really really really really really really really really really really really want one.

I really really really really really really really really really really really really really really really really really really really really really really really really really really want one.

I really really really really really really really really really really really really really really really really really really really really really really really really really really really want one.

I really really really really really really really really really really really really really really really really really really really really really really really really really really really really want one.

I really really really really really really really really really really really really really really really really really really really really really really really really really really really really really want one.

I really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really want one.

I really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really want one.

I really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really want one.

I really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really want one.

I really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really want one.

I really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really want one.

I really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really want one.

I really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really want one.

I really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really want one.

nokogiri-1.8.2/test/files/GH_1042.html0000644000004100000410000000122013235345655017314 0ustar www-datawww-data
foo1.0barbazz
foo1.1barbazz
foo2.0barbazz
foo2.1barbazz
foo3.0barbazz
foo3.1barbazz
nokogiri-1.8.2/test/files/address_book.rlx0000644000004100000410000000042513235345655020656 0ustar www-datawww-data nokogiri-1.8.2/test/files/xinclude.xml0000644000004100000410000000021613235345655020023 0ustar www-datawww-data nokogiri-1.8.2/test/files/atom.xml0000644000004100000410000004335613235345655017164 0ustar www-datawww-data tag:github.com,2008:/sparklemotion/nokogiri/commits/master Recent Commits to nokogiri:master 2013-07-02T08:17:16-07:00 tag:github.com,2008:Grit::Commit/233489ddfe4698b24dfcdc1daf3ca15bc880e4b1 Updated changelog with merged pull requests #887 and #931 2013-07-02T08:17:16-07:00 injekt https://github.com/injekt <pre style='white-space:pre-wrap;width:81ex'>Updated changelog with merged pull requests #887 and #931</pre> tag:github.com,2008:Grit::Commit/15eff8be4539a3461cfc1e3c8a257e7eed134e01 Merge pull request #887 from Mange/double-not 2013-07-02T08:13:36-07:00 injekt https://github.com/injekt <pre style='white-space:pre-wrap;width:81ex'>Merge pull request #887 from Mange/double-not Add support for bare and multiple :not() functions in selectors</pre> tag:github.com,2008:Grit::Commit/7a54b1fd1ba1dbcd50d3566bcc62d554eb0fd30e Merge pull request #931 from sorah/dont_call_pkgconfig_when_using_bundled_libraries 2013-07-02T08:11:37-07:00 knu https://github.com/knu <pre style='white-space:pre-wrap;width:81ex'>Merge pull request #931 from sorah/dont_call_pkgconfig_when_using_bundled_libraries extconf.rb: Don't call pkg_config when using bundled libraries</pre> tag:github.com,2008:Grit::Commit/e5b93617ba810a34a4fc70dac76a83f9bebd2ea1 extconf.rb: Don't call pkg_config when using bundled libraries 2013-07-02T06:30:00-07:00 sorah https://github.com/sorah <pre style='white-space:pre-wrap;width:81ex'>extconf.rb: Don't call pkg_config when using bundled libraries</pre> tag:github.com,2008:Grit::Commit/64cd3c8f506394b558bda9376844a51db971bd60 Add support for bare and multiple :not() functions in selectors 2013-06-28T10:19:36-07:00 Mange https://github.com/Mange <pre style='white-space:pre-wrap;width:81ex'>Add support for bare and multiple :not() functions in selectors This enables parsing of ".flash:not(.error):not(.warning)" and ":not(p)". This entailed a huge change to the parser, but I think the parser should be a bit more robust now by not declaring :not a special case.</pre> tag:github.com,2008:Grit::Commit/37828ec784faf29d713225fa78585854912356cd Report error and stop parsing instead of silently ignoring it. 2013-06-27T18:46:12-07:00 jvshahid https://github.com/jvshahid <pre style='white-space:pre-wrap;width:81ex'>Report error and stop parsing instead of silently ignoring it.</pre> tag:github.com,2008:Grit::Commit/42da60e8ca58a5acc9e8c94ae5ad490589f146c6 Merge pull request #930 from ctborg/master 2013-06-27T04:23:33-07:00 injekt https://github.com/injekt <pre style='white-space:pre-wrap;width:81ex'>Merge pull request #930 from ctborg/master Adds support for Solaris, OpenSolaris, or illumos.</pre> tag:github.com,2008:Grit::Commit/7382a6e6a66d3f80da955ebbcd82250f99321900 Updated CHANGELOG with latest merged pulls 2013-06-27T04:04:17-07:00 injekt https://github.com/injekt <pre style='white-space:pre-wrap;width:81ex'>Updated CHANGELOG with latest merged pulls</pre> tag:github.com,2008:Grit::Commit/3382ebc90e17f2503f4acbbdf53a931d38f3322a Remove REE also. 2013-06-19T20:57:48-07:00 knu https://github.com/knu <pre style='white-space:pre-wrap;width:81ex'>Remove REE also.</pre> tag:github.com,2008:Grit::Commit/0c83f4027e295435680cda89a44b5e039e0e6cbb Added support for Solaris, OpenSolaris, or illumos 2013-06-19T07:12:50-07:00 cborg@oanda.com <pre style='white-space:pre-wrap;width:81ex'>Added support for Solaris, OpenSolaris, or illumos</pre> tag:github.com,2008:Grit::Commit/fb000c51e3ba4e8730a535d38d617d34111c21ef Ensure meta_encoding checks meta charset tag (closes #919) 2013-06-14T06:06:26-07:00 injekt https://github.com/injekt <pre style='white-space:pre-wrap;width:81ex'>Ensure meta_encoding checks meta charset tag (closes #919)</pre> tag:github.com,2008:Grit::Commit/14b7dc21bbeddec1990726760e6f6cc11e71542e Updated ROADMAP 2013-06-14T06:00:57-07:00 injekt https://github.com/injekt <pre style='white-space:pre-wrap;width:81ex'>Updated ROADMAP</pre> tag:github.com,2008:Grit::Commit/d1b0afd02f8a2b783380bdfde3acfabf021a0c5a Merge pull request #858 from ykzts/feature/not-only-child 2013-06-14T05:53:28-07:00 injekt https://github.com/injekt <pre style='white-space:pre-wrap;width:81ex'>Merge pull request #858 from ykzts/feature/not-only-child Add feature that the ':only-child' pseudo class should work even though it's in ':not' pseudo class.</pre> tag:github.com,2008:Grit::Commit/d24eb8508c69f2cf336f1ff1b6887fcc3b317fbc Merge pull request #886 from Mange/negative-nth 2013-06-14T05:50:13-07:00 injekt https://github.com/injekt <pre style='white-space:pre-wrap;width:81ex'>Merge pull request #886 from Mange/negative-nth Add support for an-b in nth selectors</pre> tag:github.com,2008:Grit::Commit/11eaf3d3f1b84adf5225b6686119dbc6714b4009 Note 1.8 deprecation in README 2013-06-11T06:48:53-07:00 flavorjones https://github.com/flavorjones <pre style='white-space:pre-wrap;width:81ex'>Note 1.8 deprecation in README</pre> tag:github.com,2008:Grit::Commit/82a936a0ceba0508d29cc9f6da84c5a98ae7bede Fix a typo and DRY with dir_config() calls. 2013-06-10T21:01:03-07:00 knu https://github.com/knu <pre style='white-space:pre-wrap;width:81ex'>Fix a typo and DRY with dir_config() calls.</pre> tag:github.com,2008:Grit::Commit/c7ef9b339054f8502e7f526b1b8054e3412cf7ba Iconv was for building libxml2 and not for nokogiri itself. 2013-06-10T17:55:20-07:00 knu https://github.com/knu <pre style='white-space:pre-wrap;width:81ex'>Iconv was for building libxml2 and not for nokogiri itself.</pre> tag:github.com,2008:Grit::Commit/4c1c225b9409571156430aeb5bcf89c4f9dd4812 Make sure the MRI gem is built correctly. 2013-06-10T07:40:39-07:00 flavorjones https://github.com/flavorjones <pre style='white-space:pre-wrap;width:81ex'>Make sure the MRI gem is built correctly.</pre> tag:github.com,2008:Grit::Commit/b6100afd7a0ce17097fb3ca58ae8fe5e63522f6d Fiddling with the windows cross-compile gem logic. 2013-06-10T07:33:59-07:00 flavorjones https://github.com/flavorjones <pre style='white-space:pre-wrap;width:81ex'>Fiddling with the windows cross-compile gem logic.</pre> tag:github.com,2008:Grit::Commit/b1483de363524c882b5e682a3d3a6e6ab5d7511b build_all now uses ruby 1.9.3 to build everything. 2013-06-10T07:33:56-07:00 flavorjones https://github.com/flavorjones <pre style='white-space:pre-wrap;width:81ex'>build_all now uses ruby 1.9.3 to build everything.</pre> nokogiri-1.8.2/test/files/shift_jis.html0000644000004100000410000000034113235345655020335 0ustar www-datawww-data ɂ́I

This is a Shift_JIS File

ɂ́I

nokogiri-1.8.2/test/files/exslt.xml0000644000004100000410000000017513235345655017353 0ustar www-datawww-data 1 3 2 nokogiri-1.8.2/test/files/slow-xpath.xml0000644000004100000410000666227413235345655020346 0ustar www-datawww-data Se alla dina favoritprogram i TV4 Play när du vill 1.2685868 http://cdn01.tv4.se/polopoly_fs/1.2686722.1343822477!image/417788328.jpg Leo, Harry och Nikki utreder mordet på en före detta fångvaktare på det ökända Redhillfängelset men de stöter på hårt motstånd från fängelseledningen. Nikki och Harry undersöker en kriminalinspektör medan Leo följer sin instinkt något som sätter hans liv i fara. false Tyst vittne del 5 1.2676183 http://cdn01.tv4.se/polopoly_fs/1.2686011.1343750300!image/3787949953.jpg Palmer lyckas fly från häktet och allt fler nya mordoffer dyker upp. I ett desperat försök att bevisa att hon är en duglig polis risker Chen allt för att fånga Nicklin och Palmer. false kommissarie Thorne 1.1973674 http://cdn01.tv4.se/polopoly_fs/1.2662770.1343822660!image/2538413098.jpg false Sommarpaktet: Sveriges mästerkock 1.2181324 http://cdn01.tv4.se/polopoly_fs/1.2675774.1343737800!image/1579367872.jpg false Lotta på Liseberg - direktreprisering 1.1845499 http://cdn01.tv4.se/polopoly_fs/1.2666126.1343822676!image/4285710386.jpg false Sommarpaketet: robinson fritt 1.1829176 http://cdn01.tv4.se/polopoly_fs/1.2373543.1322055348!image/2180876603.jpg Senaste från Nyheterna. false Nyheterna 1.1856339 http://cdn01.tv4.se/polopoly_fs/1.2671401.1343307940!image/3608908854.jpg false Väder 1.2152118,1.1844502,1.2321924,1.2321915,1.1863951,1.2457570,1.1912577,1.2544107,1.1821167,1.2564392,1.2588849,1.2550922,1.1978218,1.1915797,1.1844440,1.1838156,1.1844724,1.1883387,1.1844427,1.2661272,1.1854782,1.1969811,1.1839697,1.2255345,1.1871398,1.1820784,1.2282021,1.1862493,1.2440034,1.2137917,1.1844690,1.2255338,1.2320043,1.2321930,2.77843,2.77842,1.2691648,1.2681630,1.2607835,1.2573609,1.2606746,1.2581108,1.1844409,1.2518288,2.77847,2.85511,1.2255334,1.2690213,1.2676183,1.2685868,1.2693237,1.1844807,1.2086492,1.2203988,1.1825110,1.1848699,1.1844635,1.2473495,1.1844605,1.1854778,1.1837835,1.2615840,1.1844519,1.2588900,1.1831595,1.1844575,1.1844531,1.1831673,1.1968239,1.2125388,1.2681510,1.2655039,2.77844,1.2084439,1.2200758,1.2587006,1.1820990,1.1832125,1.1844669,1.1831988,1.2175713,1.2624242,1.2625985,1.1838058 1.1828779 1.1856331 1.1856339 1.1829176 1.1848485,1.1848732,1.1846706,1.1848734,1.1848481,1.1848725,1.1846676,1.1848727,1.1846697,1.1846663,1.1848736,1.1848741,1.1848501,1.1848490,1.1848529,1.1848596,1.1848605,1.1848610,1.1848690,1.1848694,1.1848702,1.1848714,1.1848717,1.1848721,1.1848719 1.2262327 http://cdn01.tv4.se/polopoly_fs/1.2260988.1339407868!image/831388909.jpg http://cdn01.tv4.se/polopoly_fs/1.2260988.1339407868!image-logo/2359429122.png false Välkommen till TV4 PLAY (sparas) 1.2685868 http://cdn01.tv4.se/polopoly_fs/1.2686726.1343822847!image/417788328.jpg Leo, Harry och Nikki utreder mordet på en före detta fångvaktare på det ökända Redhillfängelset men de stöter på hårt motstånd från fängelseledningen. Nikki och Harry undersöker en kriminalinspektör medan Leo följer sin instinkt något som sätter hans liv i fara. false Tyst vittne del 5 1.2676183 http://cdn01.tv4.se/polopoly_fs/1.2686017.1343750960!image/3787949953.jpg Palmer lyckas fly från häktet och allt fler nya mordoffer dyker upp. I ett desperat försök att bevisa att hon är en duglig polis risker Chen allt för att fånga Nicklin och Palmer. false Kommissarie Thorne 1.1871398 http://cdn01.tv4.se/polopoly_fs/1.2675784.1343822899!image/2691194910.jpg Nu bjuder vi på hela säsongen av Så mycket bättre. Se alla middagar och uppträdanden igen. false Sommarpaket: Så mycket bättre 1.2440034 http://cdn01.tv4.se/polopoly_fs/1.2664241.1343822918!image/2319386804.jpg Se hela säsongen av den rafflande sångtävlingen The voice Sverige igen. false Sommarpaketet: The voice sverige 1.1829176 false Nyheterna (sparas) 1.1969736 http://cdn01.tv4.se/polopoly_fs/1.2670164.1343751057!image/488502359.jpg Saknar du Talang? Nu kan du se hela förra säsongen gratis i TV4 Play hela sommaren. false Talang (sommarpaket) 1.1856339 http://cdn01.tv4.se/polopoly_fs/1.2671402.1343308009!image/3608908854.jpg Badväder i morgon? Här ser du senaste väderprognosen. false Väder Rekommenderat 8 true 1.1969811,1.1829176,1.2690213,1.2255345,1.1831595,1.1820784,1.2175713,1.1820811,1.2184526 1.2544107,1.1912577,1.1969875,1.1844502,1.1965969,1.1863951,1.1821167,1.2086492,1.2321924,1.2320043,1.1844807,1.2457570,1.2152118,1.1825110,1.2321915,1.2203988,1.1844724,1.1832125,1.1831595,1.1831673,1.1831988,1.1844519,1.1837835,1.1844531,1.1838156,1.1844440,1.2668676,1.2518288,1.2082509,1.1848699,1.2473495,1.1844605,1.1854778,1.1967026,1.2175713,1.2615840,1.2606746,1.2607835,1.2588900,1.2621798,1.2588849,2.77843,2.77842,1.2625985,1.2084439,1.2255334,1.2373582,1.2581108,1.1883387,1.2488527,1.1915797,1.2681630,1.2184526,2.77847,1.2590548,2.85511,1.2587006,1.1969811,1.2690213,1.2624242,1.2676183,1.1839697,1.2573609,1.2661272,1.1978218,1.2685868,1.1854782,1.1844409,1.1845449,1.2693237,1.2564392,1.2255338,1.1844690,1.2691648,1.2321930,1.2681510,1.2255345,1.1839976,2.77844,1.2282021,1.1831818,1.2125388,1.1862493,1.1968239,1.2320454,1.2200758,1.2137917 1.1856331 1.1856339 1.1829176 1.1848702,1.1848714,1.1848690,1.1848694,1.1848721,1.1848717,1.1848719,1.1846663,1.1848734,1.1848732,1.1848727,1.1848725,1.1848741,1.1848736,1.1846676,1.1846697,1.1846706,1.1848481,1.1848485,1.1848490,1.1848501,1.1848529,1.1848596,1.1848610,1.1848605 1.2503717 1.1915797 1.2625985 1.2527371 1.2655039 1.1845111 1.1828786 1.2009707 1.1854138 1.2361595 1.2620467 1.1828779 1.2649871 1.2564392 1.1968362 1.2263922 1.2596045 1.1883387 1.2084439 1.1878278 1.1845423 1.2493064 1.1878293 1.1967026 http://cdn01.tv4.se/polopoly_fs/1.2651028.1343822263!image/2745291321.jpg Nu bjuder vi på hela årets säsong av Bygglov. Se hela årets säsong av Bygglov false Sommarpaket: Bygglov 1.2685868 http://cdn01.tv4.se/polopoly_fs/1.2686006.1343822274!image/417788328.jpg Leo, Harry och Nikki utreder mordet på en före detta fångvaktare på det ökända Redhillfängelset men de stöter på hårt motstånd från fängelseledningen. Nikki och Harry undersöker en kriminalinspektör medan Leo följer sin instinkt något som sätter hans liv i fara. Se femte delen av Tyst vittne false Tyst vittne del 5 1.2175713 http://cdn01.tv4.se/polopoly_fs/1.2668117.1343822361!image/4231872023.jpg Kan du inte få nog av Ernst Kirschsteiger? Nu bjuder vi på hela förra säsongen av Sommar med Ernst. Sommarkänslor med Ernst false Sommarpaketet: Sommar med Ernst 1.1831595 http://cdn01.tv4.se/polopoly_fs/1.2669669.1343822392!image/3157052724.png Ska man uppfostra hunden med strypkoppel och fysisk auktoritet eller med kärlek och omtanke? Medverkar gör bland andra Dogge Doggelito. Se Kvällsöppet med Thomas Ritter här. Strypkoppel eller ej? Debatt i Kvällsöppet false Kvällsöppet - hunddebatt 1.1969736 http://cdn01.tv4.se/polopoly_fs/1.2670149.1343822403!image/488502359.jpg Saknar du Talang? Nu kan du se hela förra säsongen gratis i TV4 Play hela sommaren. Se om Talang gratis hela sommaren false Talang (sommarpaket) Just nu i TV4 Play – gratis 20 false 1.1969811,1.2203988,1.2676183,1.2693237,1.1973674,1.2685868,1.2690213,1.1820955,1.2668845,1.2522584,1.1820811,1.1871398,1.2181324,1.2344977,1.2361258,1.2681630,1.1829176,1.1831673,1.1831595,1.2175713,1.1831988,1.1845111,1.2184526,1.2473136,1.2125388,1.2200758 Exklusivt för dig med Premium – just nu 49 kronor första månaden 15 false 1.2293959,1.2503717,1.2509817,1.1825110,1.1969847,1.1973474,1.2496859,1.1985464,1.2170705,1.1854778,1.2556898,1.2556889,1.2134569,1.2034642,1.2625985 false http://cdn01.tv4.se/polopoly_fs/1.2242004.1341213165!image/298177630.jpg https://www.tv4play.se/order/produkter?redirect_url=%2F%3F&promo=fiskpinnen&product_group_id=7 Våra bästa barnprogram - fritt för alla 8 false 1.1831818,1.1839976,1.1844724,1.2282021,1.1838156,1.1863951,1.2255334,1.2255345,1.2488527,1.1837835,1.2373582,1.1844440,1.1844519,1.2320454,1.1862493,1.1844605,1.1844531,1.1844669,1.2137917,1.1844690,1.2255338,1.2321930,1.2320043,1.2321924,1.2321915,1.2152118,1.1844409,1.1844502,1.1821167 http://cdn01.tv4.se/polopoly_fs/1.2578183.1332174994!image/366646244.jpg https://www.tv4play.se/order/produkter?&utm_campaign=Karusellen&utm_medium=banner&utm_source=KarusellenPremium&utm_content=Kopflodet false Mobilt http://cdn01.tv4.se/polopoly_fs/1.2630330.1336120967!image/28765676.png https://www.tv4play.se/order/produkter?&utm_campaign=Karusellen&utm_medium=banner&utm_source=KarusellenPremium&utm_content=Kopflodet false Sport xtra http://cdn01.tv4.se/polopoly_fs/1.2578186.1332175010!image/1082667311.jpg https://www.tv4play.se/order/produkter?&utm_campaign=Karusellen&utm_medium=banner&utm_source=KarusellenPremium&utm_content=Kopflodet false Hela säsonger http://cdn01.tv4.se/polopoly_fs/1.2578191.1332175071!image/4124446226.jpg https://www.tv4play.se/order/produkter?&utm_campaign=Karusellen&utm_medium=banner&utm_source=KarusellenPremium&utm_content=Kopflodet false News 1.2170705 http://cdn01.tv4.se/polopoly_fs/1.2688561.1343823166!image/1175129833.jpg I sommar kan du som har Premiumabonnemang se en hel rad storfilmer. Vi bjuder på filmer som Brokeback mountain, Be kind rewind, Ellie Parker, Lost in translation, Chicago och - sist men inte minst - The hottie and the nottie med Paris Hilton i huvudrollen. Stort filmpaket i sommar false Filmpaket 1.1844807 http://cdn01.tv4.se/polopoly_fs/1.2655332.1343823203!image/3490347281.jpg Få inspiration till sommarprojektet av Äntligen hemma. Här ser du hela säsonger. Endast i premium. Inspiration till sommarprojektet false Äntligen hemma 1.2685868 http://cdn01.tv4.se/polopoly_fs/1.2686734.1343823216!image/417788328.jpg Leo, Harry och Nikki utreder mordet på en före detta fångvaktare på det ökända Redhillfängelset men de stöter på hårt motstånd från fängelseledningen. Nikki och Harry undersöker en kriminalinspektör medan Leo följer sin instinkt något som sätter hans liv i fara. Se Tyst vittne utan avbrott false Tyst vittne del 5 1.1824916 Du har väl inte missat den svenska talkshowen med David Hellenius som träffar kända och aktuella gäster i sitt eget program? I så fall får du en chans till här. Se hela Hellenius hörna false Hellenius hörna 1.1848699 http://cdn01.tv4.se/polopoly_fs/1.2692959.1343823262!image/512909403.jpg http://www.tv4play.se/dokumentarer/dokumentarfilm?title=burn_center&videoid=2079702 Tillsammans med brännskadade människors personliga historier redovisas den senaste medicinska teknikens framsteg. Brännskadeoffren behandlas på San Diego Regional Burn Center på University of California, en av världens främsta kliniker på området. Brännskadeoffrens personlinga historier false Dokumentär: Burn center Program - Nöje 30 false Alla 1.1820990,1.2120627,1.2491507,1.2473136,1.2266601,1.1820784,1.2587006,1.2344977,1.1969736,1.2590548,1.2307821,1.2196401,1.1821037,1.2125388,1.2200758,1.1993874,1.1968239,1.2106198,1.2390377,1.1946393,1.2184526,1.2181324,1.2283836,1.1821137,1.1854782,1.1839697,1.2390982,1.2184421,1.2120602,1.1953998 1.2590548,1.1978218 1.1835450,1.1839723 1.2142079,1.1981817,1.2169368,1.2317301,1.2364417,1.1824916,1.2522532,1.1826861,1.2120627,1.1978218,1.2202962,1.1820832,1.2196414,1.2034653 1.2661272,1.2276280,1.2076344,1.2257567,1.1980443,1.2488517,1.1820811,1.2476817,1.1980105,1.1965997,1.2071777,1.2030592,1.1889566,1.1981511,1.1887718,1.1981499,1.1845499,1.2202905,1.1980436,1.2186002,1.1980419,1.2473260,1.1980416,1.1980123,1.1969811,1.1969780,1.2582459,1.2561082,1.1969774,1.2518288,1.2488511,1.2184463,1.2293917,1.1969822,1.1969830,1.2116071 1.1993874,1.2181324,1.2200758,1.2184526,1.2308278,1.1871398,1.2373837,1.1821037,1.2440034 false http://cdn01.tv4.se/polopoly_fs/1.2242004.1341213165!image/298177630.jpg https://www.tv4play.se/order/produkter?redirect_url=%2F%3F&promo=fiskpinnen&product_group_id=7 Senaste programmen inom Nöje 4 true false true false Alla 1.2521546,1.1927588,1.2518288,1.1969780,1.2473260,1.2440034,1.2344977,1.2522532,1.1969811,1.2488517,1.2661272,1.2488511,1.2582459,1.2181324,1.1854782,1.1969774,1.2200758,1.2473136,1.2561082,1.2184526 http://cdn01.tv4.se/polopoly_fs/1.2181324.1343737624!mobileimage/3595672992.jpg http://cdn01.tv4.se/polopoly_fs/1.2181324.1343737624!mobileimage-logo/3057882083.png http://cdn01.tv4.se/polopoly_fs/1.2181324.1343737624!mobileimage-large/1673440566.jpg http://cdn01.tv4.se/polopoly_fs/1.2181324.1343737624!mobileimage-highres/4232680974.jpg http://cdn01.tv4.se/polopoly_fs/1.2181324.1343737624!mobileimage-logo-highres/1604157988.png http://cdn01.tv4.se/polopoly_fs/1.2181324.1343737624!mobileimage-large-highres/2321595633.jpg http://cdn01.tv4.se/polopoly_fs/1.2181324.1343737624!originallogoimage/1062855519.png http://cdn01.tv4.se/polopoly_fs/1.2181324.1343737624!originalformatimage/3178825015.jpg http://cdn01.tv4.se/polopoly_fs/1.2181324.1343737624!originalcarouselimage/634984642.jpg Lotta på Liseberg är ett direktsänt underhållningsprogram i åtta delar och sänds från stora scenen på nöjesparken Liseberg i Göteborg. Måndagar 20:00 tv4 false http://cdn01.tv4.se/polopoly_fs/1.2181324.1343737624!image/1795610653.jpg http://cdn01.tv4.se/polopoly_fs/1.2181324.1343737624!smallformatimage/3527802397.jpg http://cdn01.tv4.se/polopoly_fs/1.2181324.1343737624!categorylarge/4038802900.jpg http://cdn01.tv4.se/polopoly_fs/1.2181324.1343737624!image-large/1959422053.jpg http://cdn01.tv4.se/polopoly_fs/1.2181324.1343737624!image-logo/3689859914.png http://cdn01.tv4.se/polopoly_fs/1.2181324.1343737624!small-image-logo/1884613105.png Hela program 12 true false false false Alla 1.2181334 Senaste klipp 12 false true false false Alla 1.2674308 Senaste programmen inom Nöje 4 true false true false Alla 1.2521546,1.1927588,1.2518288,1.1969780,1.2473260,1.2440034,1.2344977,1.2522532,1.1969811,1.2488517,1.2661272,1.2488511,1.2582459,1.2181324,1.1854782,1.1969774,1.2200758,1.2473136,1.2561082,1.2184526 http://cdn01.tv4.se/polopoly_fs/1.2344977.1343807447!originallogoimage/4072134893.png http://cdn01.tv4.se/polopoly_fs/1.2344977.1343807447!originalformatimage/1433907066.jpg http://cdn01.tv4.se/polopoly_fs/1.2344977.1343807447!originalcarouselimage/659220024.jpg Ett frågesportsprogram där det gäller att svara snabbt för att bevisa att man inte är den svagaste länken. SE 115.111.227.14 115.111.227.6 25.19.39.117 210.94.41.89 217.67.201.237 217.67.201.162;SE;SE 115.111.227.14 115.111.227.6 25.19.39.117 210.94.41.89 217.67.201.237 217.67.201.162 Måndag-torsdag 19:00 tv4plus false Hela program 4 true false false false Alla 1.2344980 Senaste programmen inom Nöje 4 true false true false Alla 1.2521546,1.1927588,1.2518288,1.1969780,1.2473260,1.2440034,1.2344977,1.2522532,1.1969811,1.2488517,1.2661272,1.2488511,1.2582459,1.2181324,1.1854782,1.1969774,1.2200758,1.2473136,1.2561082,1.2184526 http://cdn01.tv4.se/polopoly_fs/1.1968239.1338819561!originallogoimage/2574448941.png http://cdn01.tv4.se/polopoly_fs/1.1968239.1338819561!originalformatimage/3372218050.jpg http://cdn01.tv4.se/polopoly_fs/1.1968239.1338819561!originalcarouselimage/2841056242.png Kända svenskar och deras professionella danspartners övar in och framför klassiska danser. Inför proffsjuryn och tv-tittarna måste de prestera maximalt. SE 129.35.209.170 58.247.178.245 115.111.227.14 115.111.227.6 25.19.39.117 210.94.41.89 217.67.201.237 217.67.201.162;SE 115.111.227.14 115.111.227.6 25.19.39.117 210.94.41.89 217.67.201.237 217.67.201.162;SE 129.35.209.170 58.247.178.245 115.111.227.14 115.111.227.6 25.19.39.117 210.94.41.89 217.67.201.237 217.67.201.162;SE 129.35.209.170 58.247.178.245 115.111.227.14 115.111.227.6 25.19.39.117 210.94.41.89 217.67.201.237 217.67.201.162 Visas i tv4 http://www.tv4.se/lets_dance false Hela program 12 true false false false 1.1968247 Senaste klippen 12 true true false false 1.1968246 Senaste programmen inom Nöje 4 true false true false Alla 1.2521546,1.1927588,1.2518288,1.1969780,1.2473260,1.2440034,1.2344977,1.2522532,1.1969811,1.2488517,1.2661272,1.2488511,1.2582459,1.2181324,1.1854782,1.1969774,1.2200758,1.2473136,1.2561082,1.2184526 http://cdn01.tv4.se/polopoly_fs/1.2125388.1338819610!mobileimage/1392623345.jpg http://cdn01.tv4.se/polopoly_fs/1.2125388.1338819610!mobileimage-logo/3375472028.png http://cdn01.tv4.se/polopoly_fs/1.2125388.1338819610!mobileimage-large/767842709.jpg http://cdn01.tv4.se/polopoly_fs/1.2125388.1338819610!mobileimage-highres/1529681280.jpg http://cdn01.tv4.se/polopoly_fs/1.2125388.1338819610!mobileimage-logo-highres/2137474704.png http://cdn01.tv4.se/polopoly_fs/1.2125388.1338819610!mobileimage-large-highres/2610070169.jpg http://cdn01.tv4.se/polopoly_fs/1.2125388.1338819610!originallogoimage/2137474704.png http://cdn01.tv4.se/polopoly_fs/1.2125388.1338819610!originalformatimage/1790346201.jpg http://cdn01.tv4.se/polopoly_fs/1.2125388.1338819610!originalcarouselimage/1821701154.png Martin Stenmarck genomför galna blåsningar och ger människor chansen att förverkliga sina drömmar. SE;SE 129.35.209.170 58.247.178.245 115.111.227.14 115.111.227.6 25.19.39.117 210.94.41.89 217.67.201.237 217.67.201.162;SE 129.35.209.170 58.247.178.245 115.111.227.14 115.111.227.6 25.19.39.117 210.94.41.89 217.67.201.237 217.67.201.162;SE 115.111.227.14 115.111.227.6 25.19.39.117 210.94.41.89 217.67.201.237 217.67.201.162 Lördagar 20:00 tv4 false Hela program 4 true false false false Alla 1.2125395 Hela program 2011 4 true false false false Alla 1.2623265 Klipp 4 false true false false Alla 1.2125396 Senaste programmen inom Nöje 4 true false true false Alla 1.2521546,1.1927588,1.2518288,1.1969780,1.2473260,1.2440034,1.2344977,1.2522532,1.1969811,1.2488517,1.2661272,1.2488511,1.2582459,1.2181324,1.1854782,1.1969774,1.2200758,1.2473136,1.2561082,1.2184526 http://cdn01.tv4.se/polopoly_fs/1.2473136.1338820311!originallogoimage/3368842786.png http://cdn01.tv4.se/polopoly_fs/1.2473136.1338820311!originalformatimage/3763297799.jpg http://cdn01.tv4.se/polopoly_fs/1.2473136.1338820311!originalcarouselimage/3099514660.png 16 gladiatorer, starkare än någonsin, gör allt för att hindra 32 utmanare att plocka poäng till slutstriden i hinderbanan. SE 115.111.227.14 115.111.227.6 25.19.39.117 210.94.41.89 217.67.201.237 217.67.201.162;SE 115.111.227.14 115.111.227.6 25.19.39.117 210.94.41.89 217.67.201.237 217.67.201.162;SE;SE 115.111.227.14 115.111.227.6 25.19.39.117 210.94.41.89 217.67.201.237 217.67.201.162 lördagar 20:00 tv4 false Hela program 12 true false false false Alla 1.2473136 Senaste klippen 12 true true false false Alla 1.2473138 Senaste programmen inom Nöje 4 true false true false Alla 1.2521546,1.1927588,1.2518288,1.1969780,1.2473260,1.2440034,1.2344977,1.2522532,1.1969811,1.2488517,1.2661272,1.2488511,1.2582459,1.2181324,1.1854782,1.1969774,1.2200758,1.2473136,1.2561082,1.2184526 http://cdn01.tv4.se/polopoly_fs/1.2200758.1342525809!mobileimage/2925777132.jpg http://cdn01.tv4.se/polopoly_fs/1.2200758.1342525809!mobileimage-logo/2906321456.png http://cdn01.tv4.se/polopoly_fs/1.2200758.1342525809!mobileimage-large/3082422701.jpg http://cdn01.tv4.se/polopoly_fs/1.2200758.1342525809!mobileimage-highres/2670151176.jpg http://cdn01.tv4.se/polopoly_fs/1.2200758.1342525809!mobileimage-logo-highres/2832431922.png http://cdn01.tv4.se/polopoly_fs/1.2200758.1342525809!mobileimage-large-highres/2991816879.jpg http://cdn01.tv4.se/polopoly_fs/1.2200758.1342525809!originallogoimage/1868830695.png http://cdn01.tv4.se/polopoly_fs/1.2200758.1342525809!originalformatimage/2643439519.jpg http://cdn01.tv4.se/polopoly_fs/1.2200758.1342525809!originalcarouselimage/221009949.jpg Katrine Moholt leder allsången på Fredriksten fästning i Halden. Folkkära artister från både Norge och Sverige sjunger allsång med publiken. SE;SE;SE;SE Visas i sjuan false http://cdn01.tv4.se/polopoly_fs/1.2200758.1342525809!image/453920920.jpg http://cdn01.tv4.se/polopoly_fs/1.2200758.1342525809!smallformatimage/464980926.jpg http://cdn01.tv4.se/polopoly_fs/1.2200758.1342525809!categorylarge/4180512617.jpg http://cdn01.tv4.se/polopoly_fs/1.2200758.1342525809!image-large/1171225894.jpg http://cdn01.tv4.se/polopoly_fs/1.2200758.1342525809!image-logo/39666724.png Hela program 12 true false false true Alla 1.2200758 Senaste klippen 12 false true false false Alla 1.2200758 Senaste programmen inom Nöje 4 true false true false Alla 1.2521546,1.1927588,1.2518288,1.1969780,1.2473260,1.2440034,1.2344977,1.2522532,1.1969811,1.2488517,1.2661272,1.2488511,1.2582459,1.2181324,1.1854782,1.1969774,1.2200758,1.2473136,1.2561082,1.2184526 http://cdn01.tv4.se/polopoly_fs/1.2587006.1338819640!originallogoimage/110935628.png http://cdn01.tv4.se/polopoly_fs/1.2587006.1338819640!originalformatimage/148822965.jpg http://cdn01.tv4.se/polopoly_fs/1.2587006.1338819640!originalcarouselimage/3354033573.png Etik och moral ställs på sin spets. Scenarion spelas upp på offentliga platser och dold kamera dokumenterar allmänhetens reaktioner. SE 115.111.227.14 115.111.227.6 25.19.39.117 210.94.41.89 217.67.201.237 217.67.201.162;SE 115.111.227.14 115.111.227.6 25.19.39.117 210.94.41.89 217.67.201.237 217.67.201.162;SE Visas i sjuan false Hela program 12 true false false false Alla 1.2587006 Senaste programmen inom Nöje 4 true false true false Alla 1.2521546,1.1927588,1.2518288,1.1969780,1.2473260,1.2440034,1.2344977,1.2522532,1.1969811,1.2488517,1.2661272,1.2488511,1.2582459,1.2181324,1.1854782,1.1969774,1.2200758,1.2473136,1.2561082,1.2184526 http://cdn01.tv4.se/polopoly_fs/1.2184526.1343045316!mobileimage/1948101451.jpg http://cdn01.tv4.se/polopoly_fs/1.2184526.1343045316!mobileimage-logo/2875762293.png http://cdn01.tv4.se/polopoly_fs/1.2184526.1343045316!mobileimage-large/1052560365.jpg http://cdn01.tv4.se/polopoly_fs/1.2184526.1343045316!mobileimage-highres/1394067018.jpg http://cdn01.tv4.se/polopoly_fs/1.2184526.1343045316!mobileimage-logo-highres/2724772997.png http://cdn01.tv4.se/polopoly_fs/1.2184526.1343045316!mobileimage-large-highres/935121181.jpg http://cdn01.tv4.se/polopoly_fs/1.2184526.1343045316!originallogoimage/2724772997.png http://cdn01.tv4.se/polopoly_fs/1.2184526.1343045316!originalformatimage/3566702883.jpg http://cdn01.tv4.se/polopoly_fs/1.2184526.1343045316!originalcarouselimage/4005123813.jpg Sommarkrysset med Lottodragningen är ett direktsänt underhållningsprogram i nio delar som sänds från nöjesparken Gröna Lund i Stockholm. Lördagar 20:00 tv4 false http://cdn01.tv4.se/polopoly_fs/1.2184526.1343045316!image/385573583.jpg http://cdn01.tv4.se/polopoly_fs/1.2184526.1343045316!smallformatimage/2334176381.jpg http://cdn01.tv4.se/polopoly_fs/1.2184526.1343045316!categorylarge/3889724966.jpg http://cdn01.tv4.se/polopoly_fs/1.2184526.1343045316!image-large/1227027472.jpg http://cdn01.tv4.se/polopoly_fs/1.2184526.1343045316!image-logo/2111716464.png http://cdn01.tv4.se/polopoly_fs/1.2184526.1343045316!small-image-logo/158197536.png Hela program 12 true false false false Alla 1.2184526 Senaste klippen 12 false true false false Alla 1.2184526 Senaste programmen inom Nöje 4 true false true false Alla 1.2521546,1.1927588,1.2518288,1.1969780,1.2473260,1.2440034,1.2344977,1.2522532,1.1969811,1.2488517,1.2661272,1.2488511,1.2582459,1.2181324,1.1854782,1.1969774,1.2200758,1.2473136,1.2561082,1.2184526 http://cdn01.tv4.se/polopoly_fs/1.2590548.1336654044!originallogoimage/2627532088.png http://cdn01.tv4.se/polopoly_fs/1.2590548.1336654044!originalformatimage/666330892.jpg http://cdn01.tv4.se/polopoly_fs/1.2590548.1336654044!originalcarouselimage/763004557.jpg Både radio-podcast och tv-program på samma gång med Jenny Strömstedt och Carina Berg exklusivt i TV4 Play. tv4 false Hela program 12 true false false false Alla 1.2590552 Senaste klippen 12 false true false false Alla 1.2609167 http://cdn01.tv4.se/polopoly_fs/1.1854782.1336653656!mobileimage/2655160459.jpg http://cdn01.tv4.se/polopoly_fs/1.1854782.1336653656!mobileimage-logo/3706973906.png http://cdn01.tv4.se/polopoly_fs/1.1854782.1336653656!mobileimage-large/2845126314.jpg http://cdn01.tv4.se/polopoly_fs/1.1854782.1336653656!mobileimage-highres/3755267270.jpg http://cdn01.tv4.se/polopoly_fs/1.1854782.1336653656!mobileimage-logo-highres/3959807981.png http://cdn01.tv4.se/polopoly_fs/1.1854782.1336653656!mobileimage-large-highres/264729157.jpg http://cdn01.tv4.se/polopoly_fs/1.1854782.1336653656!originallogoimage/3403024452.png http://cdn01.tv4.se/polopoly_fs/1.1854782.1336653656!originalformatimage/1912445552.jpg http://cdn01.tv4.se/polopoly_fs/1.1854782.1336653656!originalcarouselimage/1465929465.jpg En tävlande får femton frågor i olika ämnen på väg mot vinsten på en miljon kronor. SE 129.35.209.170 58.247.178.245 115.111.227.14 115.111.227.6 25.19.39.117 210.94.41.89 217.67.201.237 217.67.201.162;SE 129.35.209.170 58.247.178.245 Programmen är tillgängliga i sju dagar efter sändning Fredagar och lördagar 19:30 tv4 false Hela program 12 true false false true 1.1854782 Senaste programmen inom Nöje 4 true false true false Alla 1.2521546,1.1927588,1.2518288,1.1969780,1.2473260,1.2440034,1.2344977,1.2522532,1.1969811,1.2488517,1.2661272,1.2488511,1.2582459,1.2181324,1.1854782,1.1969774,1.2200758,1.2473136,1.2561082,1.2184526 http://cdn01.tv4.se/polopoly_fs/1.2661272.1338881009!originallogoimage/521631896.png http://cdn01.tv4.se/polopoly_fs/1.2661272.1338881009!originalformatimage/3043061557.jpg http://cdn01.tv4.se/polopoly_fs/1.2661272.1338881009!originalcarouselimage/1980169747.jpg Här ska några chefer från Australiens största företag jobba under täckmantel i sina egna verksamheter. SE;SE 115.111.227.14 115.111.227.6 25.19.39.117 210.94.41.89 217.67.201.237 217.67.201.162;SE Visas i sjuan false Hela program 12 true false false false Alla 1.2661277 http://cdn01.tv4.se/polopoly_fs/1.1839697.1333548948!mobileimage/3079628201.jpg http://cdn01.tv4.se/polopoly_fs/1.1839697.1333548948!mobileimage-logo/276331873.png http://cdn01.tv4.se/polopoly_fs/1.1839697.1333548948!mobileimage-large/4154749987.jpg http://cdn01.tv4.se/polopoly_fs/1.1839697.1333548948!mobileimage-highres/3388627086.jpg http://cdn01.tv4.se/polopoly_fs/1.1839697.1333548948!mobileimage-logo-highres/1404480398.png http://cdn01.tv4.se/polopoly_fs/1.1839697.1333548948!mobileimage-large-highres/3026887372.jpg http://cdn01.tv4.se/polopoly_fs/1.1839697.1333548948!originallogoimage/1404480398.png http://cdn01.tv4.se/polopoly_fs/1.1839697.1333548948!originalformatimage/3489409841.jpg http://cdn01.tv4.se/polopoly_fs/1.1839697.1333548948!originalcarouselimage/3215451139.jpg Jan Bylund bjuder på massor med bingospel, namnkunniga gäster och livemusik direkt från Bingolotto-studion i Göteborg. Bingolotto från 25/3 utgår pga tekniska problem. Söndagar 19:00 tv4plus http://www.bingolotto.se false Hela program 12 true false false true 1.1839697 Senaste programmen inom Nöje 4 true false true false Alla 1.2521546,1.1927588,1.2518288,1.1969780,1.2473260,1.2440034,1.2344977,1.2522532,1.1969811,1.2488517,1.2661272,1.2488511,1.2582459,1.2181324,1.1854782,1.1969774,1.2200758,1.2473136,1.2561082,1.2184526 http://cdn01.tv4.se/polopoly_fs/1.1969811.1339599922!mobileimage/2331349130.jpg http://cdn01.tv4.se/polopoly_fs/1.1969811.1339599922!mobileimage-logo/2942146759.png http://cdn01.tv4.se/polopoly_fs/1.1969811.1339599922!mobileimage-large/2792663894.jpg http://cdn01.tv4.se/polopoly_fs/1.1969811.1339599922!mobileimage-highres/902159103.jpg http://cdn01.tv4.se/polopoly_fs/1.1969811.1339599922!mobileimage-logo-highres/980298249.png http://cdn01.tv4.se/polopoly_fs/1.1969811.1339599922!mobileimage-large-highres/860297624.jpg http://cdn01.tv4.se/polopoly_fs/1.1969811.1339599922!originallogoimage/3005778632.png http://cdn01.tv4.se/polopoly_fs/1.1969811.1339599922!originalformatimage/2122146088.jpg http://cdn01.tv4.se/polopoly_fs/1.1969811.1339599922!originalcarouselimage/231831452.png 100 dagar isolerad i ett hus och bevakad av tv-kameror dygnet runt. Målet: att inte bli nominerad till utröstning. Känsliga tittare varnas. Innehållet kan väcka anstöt. Visas i tv11 http://www.bigbrother.se/ false http://cdn01.tv4.se/polopoly_fs/1.1969811.1339599922!image/2835410971.jpg http://cdn01.tv4.se/polopoly_fs/1.1969811.1339599922!smallformatimage/316166659.jpg http://cdn01.tv4.se/polopoly_fs/1.1969811.1339599922!categorylarge/3067397707.jpg http://cdn01.tv4.se/polopoly_fs/1.1969811.1339599922!image-large/3101957999.jpg http://cdn01.tv4.se/polopoly_fs/1.1969811.1339599922!image-logo/704501287.png Säsong 2012 4 true false false false Alla 1.2521562 Klipp säsong 2012 12 true true false false Alla 1.2519731 Säsong 2011 4 true false false true Alla 1.2022708 Klipp säsong 2011 4 true true false false Alla 1.2491286 Senaste programmen inom Nöje 4 true false true false Alla 1.2521546,1.1927588,1.2518288,1.1969780,1.2473260,1.2440034,1.2344977,1.2522532,1.1969811,1.2488517,1.2661272,1.2488511,1.2582459,1.2181324,1.1854782,1.1969774,1.2200758,1.2473136,1.2561082,1.2184526 http://cdn01.tv4.se/polopoly_fs/1.1820784.1338820245!mobileimage/1084128371.png http://cdn01.tv4.se/polopoly_fs/1.1820784.1338820245!mobileimage-logo/4249355735.png http://cdn01.tv4.se/polopoly_fs/1.1820784.1338820245!mobileimage-large/2066689129.jpg http://cdn01.tv4.se/polopoly_fs/1.1820784.1338820245!mobileimage-highres/1737757042.png http://cdn01.tv4.se/polopoly_fs/1.1820784.1338820245!mobileimage-logo-highres/2371795076.png http://cdn01.tv4.se/polopoly_fs/1.1820784.1338820245!mobileimage-large-highres/3335462748.jpg http://cdn01.tv4.se/polopoly_fs/1.1820784.1338820245!originallogoimage/224884551.png http://cdn01.tv4.se/polopoly_fs/1.1820784.1338820245!originalformatimage/635723618.jpg http://cdn01.tv4.se/polopoly_fs/1.1820784.1338820245!originalcarouselimage/3960002416.png Carina Berg flyttar in hos spännande och kända personer och bjuder på skratt, oväntade samtal och roliga händelser. Visas i tv4 http://www.tv4.se/berg_flyttar_in false Hela program 12 true false false true 1.1820801 Senaste klippen 12 false true false false 1.1820800 Hela program 2010 4 true false false false Alla 1.2623276 Hela program 2008 12 true false false false Alla 1.2658654 Senaste programmen inom Nöje 4 true false true false Alla 1.2521546,1.1927588,1.2518288,1.1969780,1.2473260,1.2440034,1.2344977,1.2522532,1.1969811,1.2488517,1.2661272,1.2488511,1.2582459,1.2181324,1.1854782,1.1969774,1.2200758,1.2473136,1.2561082,1.2184526 http://cdn01.tv4.se/polopoly_fs/1.1871398.1338820486!mobileimage/474025440.jpg http://cdn01.tv4.se/polopoly_fs/1.1871398.1338820486!mobileimage-logo/1150168315.png http://cdn01.tv4.se/polopoly_fs/1.1871398.1338820486!mobileimage-large/93901985.jpg http://cdn01.tv4.se/polopoly_fs/1.1871398.1338820486!mobileimage-highres/1435929747.jpg http://cdn01.tv4.se/polopoly_fs/1.1871398.1338820486!mobileimage-logo-highres/3236945985.png http://cdn01.tv4.se/polopoly_fs/1.1871398.1338820486!mobileimage-large-highres/7429539.jpg http://cdn01.tv4.se/polopoly_fs/1.1871398.1338820486!originallogoimage/936349934.png http://cdn01.tv4.se/polopoly_fs/1.1871398.1338820486!originalformatimage/2416961401.jpg http://cdn01.tv4.se/polopoly_fs/1.1871398.1338820486!originalcarouselimage/272858193.png Följ artisterna som under en semestervecka ska bo tillsammans, lära känna varandra men också tolka varandras största hits. SE 115.111.227.14 115.111.227.6 25.19.39.117 210.94.41.89 217.67.201.237 217.67.201.162;SE;SE 115.111.227.14 115.111.227.6 25.19.39.117 210.94.41.89 217.67.201.237 217.67.201.162;SE;SE 115.111.227.14 115.111.227.6 25.19.39.117 210.94.41.89 217.67.201.237 217.67.201.162;SE 115.111.227.14 115.111.227.6 25.19.39.117 210.94.41.89 217.67.201.237 217.67.201.162;SE 115.111.227.14 115.111.227.6 25.19.39.117 210.94.41.89 217.67.201.237 217.67.201.162 Visas i tv4 http://www.tv4.se/sa_mycket_battre false Program 4 true false false false Alla 1.1871416 Måltiderna 4 true true false false Alla 1.2139569 Program säsong 2010 4 true false false true Alla 1.2369940 Senaste klippen 12 false true false false 1.1871419 Senaste programmen inom Nöje 4 true false true false Alla 1.2521546,1.1927588,1.2518288,1.1969780,1.2473260,1.2440034,1.2344977,1.2522532,1.1969811,1.2488517,1.2661272,1.2488511,1.2582459,1.2181324,1.1854782,1.1969774,1.2200758,1.2473136,1.2561082,1.2184526 http://cdn01.tv4.se/polopoly_fs/1.1820811.1342601781!mobileimage/2293761506.png http://cdn01.tv4.se/polopoly_fs/1.1820811.1342601781!mobileimage-logo/1612338373.png http://cdn01.tv4.se/polopoly_fs/1.1820811.1342601781!mobileimage-large/1924643622.jpg http://cdn01.tv4.se/polopoly_fs/1.1820811.1342601781!mobileimage-highres/4288167705.png http://cdn01.tv4.se/polopoly_fs/1.1820811.1342601781!mobileimage-logo-highres/3719210691.png http://cdn01.tv4.se/polopoly_fs/1.1820811.1342601781!mobileimage-large-highres/3473099040.jpg http://cdn01.tv4.se/polopoly_fs/1.1820811.1342601781!originallogoimage/1941805145.png http://cdn01.tv4.se/polopoly_fs/1.1820811.1342601781!originalformatimage/1530835068.jpg http://cdn01.tv4.se/polopoly_fs/1.1820811.1342601781!originalcarouselimage/3581065258.png Inför Bonde söker fru 2012 längtar åtta förhoppningsfulla bönder efter kärleken. Vem kommer att hitta kärleken? SE 115.111.227.14 115.111.227.6 25.19.39.117 210.94.41.89 217.67.201.237 217.67.201.162;SE;SE;SE 129.35.209.170 58.247.178.245 115.111.227.14 115.111.227.6 25.19.39.117 210.94.41.89 217.67.201.237 217.67.201.162;SE 115.111.227.14 115.111.227.6 25.19.39.117 210.94.41.89 217.67.201.237 217.67.201.162;SE 129.35.209.170 58.247.178.245 Visas i tv4 http://www.tv4.se/bonde_soker_fru false Hela program 12 true false false true 1.1820828 Senaste klippen 12 false true false false Alla 1.1820826 Senaste programmen inom Nöje 4 true false true false Alla 1.2521546,1.1927588,1.2518288,1.1969780,1.2473260,1.2440034,1.2344977,1.2522532,1.1969811,1.2488517,1.2661272,1.2488511,1.2582459,1.2181324,1.1854782,1.1969774,1.2200758,1.2473136,1.2561082,1.2184526 http://cdn01.tv4.se/polopoly_fs/1.1821037.1338820599!mobileimage/1046085366.jpg http://cdn01.tv4.se/polopoly_fs/1.1821037.1338820599!mobileimage-logo/2660887531.png http://cdn01.tv4.se/polopoly_fs/1.1821037.1338820599!mobileimage-large/3924215279.jpg http://cdn01.tv4.se/polopoly_fs/1.1821037.1338820599!mobileimage-highres/1239180256.jpg http://cdn01.tv4.se/polopoly_fs/1.1821037.1338820599!mobileimage-logo-highres/3325747727.png http://cdn01.tv4.se/polopoly_fs/1.1821037.1338820599!mobileimage-large-highres/2974141451.jpg http://cdn01.tv4.se/polopoly_fs/1.1821037.1338820599!originallogoimage/2945637659.png http://cdn01.tv4.se/polopoly_fs/1.1821037.1338820599!originalformatimage/1934612203.jpg http://cdn01.tv4.se/polopoly_fs/1.1821037.1338820599!originalcarouselimage/3663123239.png Succéprogrammet Idol, med en musikbranschkunnig jury i spetsen, ger sig ut på jakt efter Sveriges nästa popstjärna. SE 129.35.209.170 58.247.178.245;SE 109.70.50.189 115.111.227.14 115.111.227.6 25.19.39.117 210.94.41.89 217.67.201.237 217.67.201.162;SE 109.70.50.189 129.35.209.170 58.247.178.245 115.111.227.14 115.111.227.6 25.19.39.117 210.94.41.89 217.67.201.237 217.67.201.162;SE 109.70.50.189 115.111.227.14 115.111.227.6 25.19.39.117 210.94.41.89 217.67.201.237 217.67.201.162;SE 109.70.50.189 115.111.227.14 115.111.227.6 25.19.39.117 210.94.41.89 217.67.201.237 217.67.201.162;SE 109.70.50.189 115.111.227.14 115.111.227.6 25.19.39.117 210.94.41.89 217.67.201.237 217.67.201.162;SE;SE 129.35.209.170 58.247.178.245 115.111.227.14 115.111.227.6 25.19.39.117 210.94.41.89 217.67.201.237 217.67.201.162 Visas i tv4 http://www.tv4.se/idol false Hela program 8 true false false true Alla 1.1821069 Klipp 2011 8 false true false false Alla 1.1821065 Auditions 8 false true false false Alla 1.2266429 Klipp från 2010 4 false true false false Alla 1.2079930 Senaste programmen inom Nöje 4 true false true false Alla 1.2521546,1.1927588,1.2518288,1.1969780,1.2473260,1.2440034,1.2344977,1.2522532,1.1969811,1.2488517,1.2661272,1.2488511,1.2582459,1.2181324,1.1854782,1.1969774,1.2200758,1.2473136,1.2561082,1.2184526 http://cdn01.tv4.se/polopoly_fs/1.2440034.1338820368!originallogoimage/3980947820.png http://cdn01.tv4.se/polopoly_fs/1.2440034.1338820368!originalformatimage/831879836.jpg http://cdn01.tv4.se/polopoly_fs/1.2440034.1338820368!originalcarouselimage/790533531.png I The voice Sverige handlar allt om rösten. Magnus Uggla, Carola, Petter och Ola Salo ska hitta Sveriges bästa röst. SE 115.111.227.14 115.111.227.6 25.19.39.117 210.94.41.89 217.67.201.237 217.67.201.162;SE 115.111.227.14 115.111.227.6 25.19.39.117 210.94.41.89 217.67.201.237 217.67.201.162;SE 115.111.227.14 115.111.227.6 25.19.39.117 210.94.41.89 217.67.201.237 217.67.201.162;SE tv4 false Hela program 4 true false false false Alla 1.2481588 Senaste klippen 4 true true false false Alla 1.2444673 Senaste programmen inom Nöje 4 true false true false Alla 1.2521546,1.1927588,1.2518288,1.1969780,1.2473260,1.2440034,1.2344977,1.2522532,1.1969811,1.2488517,1.2661272,1.2488511,1.2582459,1.2181324,1.1854782,1.1969774,1.2200758,1.2473136,1.2561082,1.2184526 http://cdn01.tv4.se/polopoly_fs/1.2518288.1338820401!originallogoimage/2676599892.png http://cdn01.tv4.se/polopoly_fs/1.2518288.1338820401!originalformatimage/814630176.jpg http://cdn01.tv4.se/polopoly_fs/1.2518288.1338820401!originalcarouselimage/3132658408.png Chefer på några av Sveriges största företag jobbar under täckmantel för att ta reda på hur allting fungerar. SE;SE 115.111.227.14 115.111.227.6 25.19.39.117 210.94.41.89 217.67.201.237 217.67.201.162;SE 115.111.227.14 115.111.227.6 25.19.39.117 210.94.41.89 217.67.201.237 217.67.201.162 Visas i tv4 false Hela program 12 true false false false Alla 1.2518288 Senaste programmen inom Nöje 4 true false true false Alla 1.2521546,1.1927588,1.2518288,1.1969780,1.2473260,1.2440034,1.2344977,1.2522532,1.1969811,1.2488517,1.2661272,1.2488511,1.2582459,1.2181324,1.1854782,1.1969774,1.2200758,1.2473136,1.2561082,1.2184526 http://cdn01.tv4.se/polopoly_fs/1.1953998.1338820732!mobileimage/3394025903.jpg http://cdn01.tv4.se/polopoly_fs/1.1953998.1338820732!mobileimage-logo/1158034843.png http://cdn01.tv4.se/polopoly_fs/1.1953998.1338820732!mobileimage-large/2935008852.jpg http://cdn01.tv4.se/polopoly_fs/1.1953998.1338820732!mobileimage-highres/1055885667.jpg http://cdn01.tv4.se/polopoly_fs/1.1953998.1338820732!mobileimage-logo-highres/3795431667.png http://cdn01.tv4.se/polopoly_fs/1.1953998.1338820732!mobileimage-large-highres/164571964.jpg http://cdn01.tv4.se/polopoly_fs/1.1953998.1338820732!originallogoimage/1136281303.png http://cdn01.tv4.se/polopoly_fs/1.1953998.1338820732!originalformatimage/3971854243.jpg http://cdn01.tv4.se/polopoly_fs/1.1953998.1338820732!originalcarouselimage/3234989372.png Genom farliga uppdrag och utmaningar ska deltagarna samla nycklar och lösenord till skatten på Fort Boyard. Visas i tv4 false Hela program 4 true false false false 1.1955214 Senaste klippen 8 false true false false 1.1955213 Senaste programmen inom Nöje 4 true false true false Alla 1.2521546,1.1927588,1.2518288,1.1969780,1.2473260,1.2440034,1.2344977,1.2522532,1.1969811,1.2488517,1.2661272,1.2488511,1.2582459,1.2181324,1.1854782,1.1969774,1.2200758,1.2473136,1.2561082,1.2184526 http://cdn01.tv4.se/polopoly_fs/1.1969736.1338820518!mobileimage/2148493928.jpg http://cdn01.tv4.se/polopoly_fs/1.1969736.1338820518!mobileimage-logo/4114276484.png http://cdn01.tv4.se/polopoly_fs/1.1969736.1338820518!mobileimage-large/3572736977.jpg http://cdn01.tv4.se/polopoly_fs/1.1969736.1338820518!mobileimage-highres/628861502.jpg http://cdn01.tv4.se/polopoly_fs/1.1969736.1338820518!mobileimage-logo-highres/3514585396.png http://cdn01.tv4.se/polopoly_fs/1.1969736.1338820518!mobileimage-large-highres/4038398561.jpg http://cdn01.tv4.se/polopoly_fs/1.1969736.1338820518!originallogoimage/3514585396.png http://cdn01.tv4.se/polopoly_fs/1.1969736.1338820518!originalformatimage/1322838110.jpg http://cdn01.tv4.se/polopoly_fs/1.1969736.1338820518!originalcarouselimage/1608481210.png Inför en tuff juryn och en hängiven publik får talangerna med sitt livs chans till en plats i rampljuset. SE 129.35.209.170 58.247.178.245 115.111.227.14 115.111.227.6 25.19.39.117 210.94.41.89 217.67.201.237 217.67.201.162;SE 129.35.209.170 58.247.178.245 Fredagar 20:00 tv4 http://www.tv4.se/talang false http://cdn01.tv4.se/polopoly_fs/1.1969736.1338820518!image/109593347.jpg http://cdn01.tv4.se/polopoly_fs/1.1969736.1338820518!smallformatimage/1552650350.jpg http://cdn01.tv4.se/polopoly_fs/1.1969736.1338820518!categorylarge/2235553901.jpg http://cdn01.tv4.se/polopoly_fs/1.1969736.1338820518!image-large/281670991.jpg http://cdn01.tv4.se/polopoly_fs/1.1969736.1338820518!image-logo/4087192458.png http://cdn01.tv4.se/polopoly_fs/1.1969736.1338820518!small-image-logo/2862117784.png Hela program 12 true false false false Alla 1.1969753 Senaste klippen 12 false true false false Alla 1.1969754 Senaste programmen inom Nöje 4 true false true false Alla 1.2521546,1.1927588,1.2518288,1.1969780,1.2473260,1.2440034,1.2344977,1.2522532,1.1969811,1.2488517,1.2661272,1.2488511,1.2582459,1.2181324,1.1854782,1.1969774,1.2200758,1.2473136,1.2561082,1.2184526 http://cdn01.tv4.se/polopoly_fs/1.1969780.1341216126!mobileimage/1219950192.jpg http://cdn01.tv4.se/polopoly_fs/1.1969780.1341216126!mobileimage-logo/1557978196.png http://cdn01.tv4.se/polopoly_fs/1.1969780.1341216126!mobileimage-large/297836735.png http://cdn01.tv4.se/polopoly_fs/1.1969780.1341216126!mobileimage-highres/2365025405.jpg http://cdn01.tv4.se/polopoly_fs/1.1969780.1341216126!mobileimage-logo-highres/751460615.png http://cdn01.tv4.se/polopoly_fs/1.1969780.1341216126!mobileimage-large-highres/1641422316.png http://cdn01.tv4.se/polopoly_fs/1.1969780.1341216126!originallogoimage/775451329.png http://cdn01.tv4.se/polopoly_fs/1.1969780.1341216126!originalformatimage/940009224.jpg http://cdn01.tv4.se/polopoly_fs/1.1969780.1341216126!originalcarouselimage/3402479304.jpg Vi får följa skådespelarna Tori Spelling och Dean McDermotts liv i Hollywood tillsammans med sina två barn Liam och Stella. SE 129.35.209.170 58.247.178.245 115.111.227.14 115.111.227.6 25.19.39.117 210.94.41.89 217.67.201.237 217.67.201.162 Visas i tv11 true http://cdn01.tv4.se/polopoly_fs/1.1969780.1341216126!image/1834880902.jpg http://cdn01.tv4.se/polopoly_fs/1.1969780.1341216126!smallformatimage/3617451715.jpg http://cdn01.tv4.se/polopoly_fs/1.1969780.1341216126!categorylarge/408934559.jpg http://cdn01.tv4.se/polopoly_fs/1.1969780.1341216126!image-large/381181305.jpg http://cdn01.tv4.se/polopoly_fs/1.1969780.1341216126!image-logo/206650434.png http://cdn01.tv4.se/polopoly_fs/1.1969780.1341216126!small-image-logo/1745401217.png Hela program 12 true true false false 1.1969794 Webbisodes 12 true true false false Alla 1.2579465 Senaste programmen inom Nöje 4 true false true false Alla 1.2521546,1.1927588,1.2518288,1.1969780,1.2473260,1.2440034,1.2344977,1.2522532,1.1969811,1.2488517,1.2661272,1.2488511,1.2582459,1.2181324,1.1854782,1.1969774,1.2200758,1.2473136,1.2561082,1.2184526 http://cdn01.tv4.se/polopoly_fs/1.2473260.1342526192!originallogoimage/1063836458.png http://cdn01.tv4.se/polopoly_fs/1.2473260.1342526192!originalformatimage/2561191101.jpg http://cdn01.tv4.se/polopoly_fs/1.2473260.1342526192!originalcarouselimage/3935692287.jpg Vi följer den kände brottaren Hulk Hogan och hans hustru Linda, dotter Brooke och son Nick i deras vardag. SE 115.111.227.14 115.111.227.6 25.19.39.117 210.94.41.89 217.67.201.237 217.67.201.162;SE visas i tv4sport true Hela program 12 true false false false Alla 1.2473260 Senaste programmen inom Nöje 4 true false true false Alla 1.2521546,1.1927588,1.2518288,1.1969780,1.2473260,1.2440034,1.2344977,1.2522532,1.1969811,1.2488517,1.2661272,1.2488511,1.2582459,1.2181324,1.1854782,1.1969774,1.2200758,1.2473136,1.2561082,1.2184526 http://cdn01.tv4.se/polopoly_fs/1.1845499.1338820699!mobileimage/3787874102.png http://cdn01.tv4.se/polopoly_fs/1.1845499.1338820699!mobileimage-logo/2230735698.png http://cdn01.tv4.se/polopoly_fs/1.1845499.1338820699!mobileimage-large/4085874006.jpg http://cdn01.tv4.se/polopoly_fs/1.1845499.1338820699!mobileimage-highres/2521023008.png http://cdn01.tv4.se/polopoly_fs/1.1845499.1338820699!mobileimage-logo-highres/3696581302.png http://cdn01.tv4.se/polopoly_fs/1.1845499.1338820699!mobileimage-large-highres/2871686322.jpg http://cdn01.tv4.se/polopoly_fs/1.1845499.1338820699!originallogoimage/3053282722.png http://cdn01.tv4.se/polopoly_fs/1.1845499.1338820699!originalformatimage/1763733074.jpg http://cdn01.tv4.se/polopoly_fs/1.1845499.1338820699!originalcarouselimage/4259680745.png Ett gäng äventyrslystna deltagare i Filippinerna eliminineras en efter en i örådet tills en ensam vinnare står kvar. SE 115.111.227.14 115.111.227.6 25.19.39.117 210.94.41.89 217.67.201.237 217.67.201.162;SE 129.35.209.170 58.247.178.245;SE;SE 129.35.209.170 58.247.178.245 115.111.227.14 115.111.227.6 25.19.39.117 210.94.41.89 217.67.201.237 217.67.201.162 Del 9 kan tyvärr inte visas pga rättighetsskäl. Visas i tv4 http://www.tv4.se/robinson false Hela program 12 true false false true 1.1845499 Senaste klippen 12 true true false false 1.1845522 Senaste programmen inom Nöje 4 true false true false Alla 1.2521546,1.1927588,1.2518288,1.1969780,1.2473260,1.2440034,1.2344977,1.2522532,1.1969811,1.2488517,1.2661272,1.2488511,1.2582459,1.2181324,1.1854782,1.1969774,1.2200758,1.2473136,1.2561082,1.2184526 http://cdn01.tv4.se/polopoly_fs/1.2184463.1342526249!mobileimage/1125336123.jpg http://cdn01.tv4.se/polopoly_fs/1.2184463.1342526249!mobileimage-logo/1129398651.png http://cdn01.tv4.se/polopoly_fs/1.2184463.1342526249!mobileimage-large/931700022.jpg http://cdn01.tv4.se/polopoly_fs/1.2184463.1342526249!mobileimage-highres/42276982.jpg http://cdn01.tv4.se/polopoly_fs/1.2184463.1342526249!mobileimage-logo-highres/1940353092.png http://cdn01.tv4.se/polopoly_fs/1.2184463.1342526249!mobileimage-large-highres/125742089.jpg http://cdn01.tv4.se/polopoly_fs/1.2184463.1342526249!originallogoimage/1940353092.png http://cdn01.tv4.se/polopoly_fs/1.2184463.1342526249!originalformatimage/4154306264.jpg http://cdn01.tv4.se/polopoly_fs/1.2184463.1342526249!originalcarouselimage/861407308.jpg Gene Simmons familjejuveler är en amerikansk realityserie från 2008. Gene Simmons var basist och sångare i rockbandet Kiss. SE 115.111.227.14 115.111.227.6 25.19.39.117 210.94.41.89 217.67.201.237 217.67.201.162;SE Visas i tv11 true http://cdn01.tv4.se/polopoly_fs/1.2184463.1342526249!image/4184395803.jpg http://cdn01.tv4.se/polopoly_fs/1.2184463.1342526249!smallformatimage/3996745239.jpg http://cdn01.tv4.se/polopoly_fs/1.2184463.1342526249!categorylarge/1704221839.jpg http://cdn01.tv4.se/polopoly_fs/1.2184463.1342526249!image-large/833758773.jpg http://cdn01.tv4.se/polopoly_fs/1.2184463.1342526249!image-logo/3392287972.png http://cdn01.tv4.se/polopoly_fs/1.2184463.1342526249!small-image-logo/2926296359.png Hela program 12 true false false false Alla 1.2184463 Senaste programmen inom Nöje 4 true false true false Alla 1.2521546,1.1927588,1.2518288,1.1969780,1.2473260,1.2440034,1.2344977,1.2522532,1.1969811,1.2488517,1.2661272,1.2488511,1.2582459,1.2181324,1.1854782,1.1969774,1.2200758,1.2473136,1.2561082,1.2184526 http://cdn01.tv4.se/polopoly_fs/1.2488517.1341216381!originallogoimage/321961112.png http://cdn01.tv4.se/polopoly_fs/1.2488517.1341216381!originalformatimage/987689474.jpg http://cdn01.tv4.se/polopoly_fs/1.2488517.1341216381!originalcarouselimage/1571098605.jpg Glamourmodellen Cindy Margolis är nybliven singel och söker efter kärleken bland 24 män som slåss för att bli den utvalde. SE;SE 115.111.227.14 115.111.227.6 25.19.39.117 210.94.41.89 217.67.201.237 217.67.201.162;SE 115.111.227.14 115.111.227.6 25.19.39.117 210.94.41.89 217.67.201.237 217.67.201.162 Visas i sjuan true Hela program 12 true false false false Alla 1.2488517 Senaste programmen inom Nöje 4 true false true false Alla 1.2521546,1.1927588,1.2518288,1.1969780,1.2473260,1.2440034,1.2344977,1.2522532,1.1969811,1.2488517,1.2661272,1.2488511,1.2582459,1.2181324,1.1854782,1.1969774,1.2200758,1.2473136,1.2561082,1.2184526 http://cdn01.tv4.se/polopoly_fs/1.2086501.1342526361!mobileimage/231868496.jpg http://cdn01.tv4.se/polopoly_fs/1.2086501.1342526361!mobileimage-logo/2204056321.png http://cdn01.tv4.se/polopoly_fs/1.2086501.1342526361!mobileimage-large/1488382486.jpg http://cdn01.tv4.se/polopoly_fs/1.2086501.1342526361!mobileimage-highres/2052560198.jpg http://cdn01.tv4.se/polopoly_fs/1.2086501.1342526361!mobileimage-logo-highres/1055639815.png http://cdn01.tv4.se/polopoly_fs/1.2086501.1342526361!mobileimage-large-highres/3842119696.jpg Sju unga kvinnor med temperament, attityd och partyhumör flyttar in i ett lyxhus i Hollywood. Kan samvaron hjälpa dem att få insikt i hur deras beteende påverkar andra? SE 129.35.209.170 58.247.178.245 115.111.227.14 115.111.227.6 25.19.39.117 210.94.41.89 217.67.201.237 217.67.201.162;SE 129.35.209.170 58.247.178.245 Visas i tv11 true http://cdn01.tv4.se/polopoly_fs/1.2086501.1342526361!image/3379143895.jpg http://cdn01.tv4.se/polopoly_fs/1.2086501.1342526361!smallformatimage/115370064.jpg http://cdn01.tv4.se/polopoly_fs/1.2086501.1342526361!categorylarge/3396768885.jpg http://cdn01.tv4.se/polopoly_fs/1.2086501.1342526361!image-large/2613967496.jpg http://cdn01.tv4.se/polopoly_fs/1.2086501.1342526361!image-logo/2752005646.png http://cdn01.tv4.se/polopoly_fs/1.2086501.1342526361!small-image-logo/3474433057.png Hela program 4 true false false false Alla 1.2086502 Senaste programmen inom Nöje 4 true false true false Alla 1.2521546,1.1927588,1.2518288,1.1969780,1.2473260,1.2440034,1.2344977,1.2522532,1.1969811,1.2488517,1.2661272,1.2488511,1.2582459,1.2181324,1.1854782,1.1969774,1.2200758,1.2473136,1.2561082,1.2184526 http://cdn01.tv4.se/polopoly_fs/1.2488511.1336657769!originallogoimage/3800616819.png http://cdn01.tv4.se/polopoly_fs/1.2488511.1336657769!originalformatimage/51822415.jpg http://cdn01.tv4.se/polopoly_fs/1.2488511.1336657769!originalcarouselimage/1042820096.jpg Tre stygga tjejer får chans att träffa sina drömmars man när flera killar slåss om deras uppmärksamhet. SE 115.111.227.14 115.111.227.6 25.19.39.117 210.94.41.89 217.67.201.237 217.67.201.162;SE Visas i tv11 true Hela program 12 true false false false Alla 1.2488511 Senaste programmen inom Nöje 4 true false true false Alla 1.2521546,1.1927588,1.2518288,1.1969780,1.2473260,1.2440034,1.2344977,1.2522532,1.1969811,1.2488517,1.2661272,1.2488511,1.2582459,1.2181324,1.1854782,1.1969774,1.2200758,1.2473136,1.2561082,1.2184526 http://cdn01.tv4.se/polopoly_fs/1.2582459.1342526484!originallogoimage/2059818711.png http://cdn01.tv4.se/polopoly_fs/1.2582459.1342526484!originalformatimage/776613415.jpg http://cdn01.tv4.se/polopoly_fs/1.2582459.1342526484!originalcarouselimage/3051103814.jpg Den brittiske finansmannen Matt Grant ska i säsong 12 av The Bachelor försöka hitta sin drömkvinna bland 25 amerikanska kvinnor. SE 115.111.227.14 115.111.227.6 25.19.39.117 210.94.41.89 217.67.201.237 217.67.201.162;SE Visas i tv11 true Hela program 12 true false false false Alla 1.2582459 Senaste programmen inom Nöje 4 true false true false Alla 1.2521546,1.1927588,1.2518288,1.1969780,1.2473260,1.2440034,1.2344977,1.2522532,1.1969811,1.2488517,1.2661272,1.2488511,1.2582459,1.2181324,1.1854782,1.1969774,1.2200758,1.2473136,1.2561082,1.2184526 http://cdn01.tv4.se/polopoly_fs/1.1969774.1335447488!mobileimage/3697356582.jpg http://cdn01.tv4.se/polopoly_fs/1.1969774.1335447488!mobileimage-logo/191123725.png http://cdn01.tv4.se/polopoly_fs/1.1969774.1335447488!mobileimage-large/1770921904.jpg http://cdn01.tv4.se/polopoly_fs/1.1969774.1335447488!mobileimage-highres/4135134344.jpg http://cdn01.tv4.se/polopoly_fs/1.1969774.1335447488!mobileimage-logo-highres/790814909.png http://cdn01.tv4.se/polopoly_fs/1.1969774.1335447488!mobileimage-large-highres/2152730231.jpg http://cdn01.tv4.se/polopoly_fs/1.1969774.1335447488!originallogoimage/3559670141.png http://cdn01.tv4.se/polopoly_fs/1.1969774.1335447488!originalformatimage/3990353451.jpg http://cdn01.tv4.se/polopoly_fs/1.1969774.1335447488!originalcarouselimage/2197692904.jpg I Sveriges värsta bilförare medverkar åtta svenskar som har en sak gemensamt, de är alla usla bilförare. Visas i tv4 http://www.tv4.se/sveriges_varsta_bilforare true http://cdn01.tv4.se/polopoly_fs/1.1969774.1335447488!image/1630956187.jpg http://cdn01.tv4.se/polopoly_fs/1.1969774.1335447488!smallformatimage/3631565979.jpg http://cdn01.tv4.se/polopoly_fs/1.1969774.1335447488!categorylarge/3079362653.jpg http://cdn01.tv4.se/polopoly_fs/1.1969774.1335447488!image-large/2420591458.jpg http://cdn01.tv4.se/polopoly_fs/1.1969774.1335447488!image-logo/230894083.png http://cdn01.tv4.se/polopoly_fs/1.1969774.1335447488!small-image-logo/1422311953.png Hela program 8 true false false false 1.1969778 Senaste klippen 12 false true false true 1.1969778,1.1969774 Senaste programmen inom Nöje 4 true false true false Alla 1.2521546,1.1927588,1.2518288,1.1969780,1.2473260,1.2440034,1.2344977,1.2522532,1.1969811,1.2488517,1.2661272,1.2488511,1.2582459,1.2181324,1.1854782,1.1969774,1.2200758,1.2473136,1.2561082,1.2184526 Hela program 2011 4 true false false false Alla 1.2623272 http://cdn01.tv4.se/polopoly_fs/1.2561082.1334662238!originallogoimage/2197090762.png http://cdn01.tv4.se/polopoly_fs/1.2561082.1334662238!originalformatimage/1025349361.jpg http://cdn01.tv4.se/polopoly_fs/1.2561082.1334662238!originalcarouselimage/1711355331.jpg Här får elva kvinnor och åtta män som tidigare medverkat i Bachelor och Bachelorette chans att tävla om en stor summa pengar. SE;SE 115.111.227.14 115.111.227.6 25.19.39.117 210.94.41.89 217.67.201.237 217.67.201.162 Visas i tv11 true Hela program 12 true false false false Alla 1.2561082 Senaste programmen inom Nöje 4 true false true false Alla 1.2521546,1.1927588,1.2518288,1.1969780,1.2473260,1.2440034,1.2344977,1.2522532,1.1969811,1.2488517,1.2661272,1.2488511,1.2582459,1.2181324,1.1854782,1.1969774,1.2200758,1.2473136,1.2561082,1.2184526 http://cdn01.tv4.se/polopoly_fs/1.2390982.1336657792!originallogoimage/1664158431.png http://cdn01.tv4.se/polopoly_fs/1.2390982.1336657792!originalformatimage/3776048311.jpg http://cdn01.tv4.se/polopoly_fs/1.2390982.1336657792!originalcarouselimage/2041704770.jpg Sex lag, med tre personer från samma stad, tävlar i en frågesport om vilka som kan mest om Sverige. söndagar 20:00 tv4 true Hela program 12 true false false false Alla 1.2390982 Senaste programmen inom Nöje 4 true false true false Alla 1.2521546,1.1927588,1.2518288,1.1969780,1.2473260,1.2440034,1.2344977,1.2522532,1.1969811,1.2488517,1.2661272,1.2488511,1.2582459,1.2181324,1.1854782,1.1969774,1.2200758,1.2473136,1.2561082,1.2184526 http://cdn01.tv4.se/polopoly_fs/1.2522532.1330097899!originallogoimage/1784270031.png http://cdn01.tv4.se/polopoly_fs/1.2522532.1330097899!originalformatimage/3513933563.jpg http://cdn01.tv4.se/polopoly_fs/1.2522532.1330097899!originalcarouselimage/3686776698.jpg Här bjuder man på skruvade sketcher med komikern Catherine Tate i olika karaktärer. SE 115.111.227.14 115.111.227.6 25.19.39.117 210.94.41.89 217.67.201.237 217.67.201.162;SE Visas i tv4komedi true Hela program 12 true false false false Alla 1.2522532 Senaste programmen inom Nöje 4 true false true false Alla 1.2521546,1.1927588,1.2518288,1.1969780,1.2473260,1.2440034,1.2344977,1.2522532,1.1969811,1.2488517,1.2661272,1.2488511,1.2582459,1.2181324,1.1854782,1.1969774,1.2200758,1.2473136,1.2561082,1.2184526 http://cdn01.tv4.se/polopoly_fs/1.1980443.1336658849!mobileimage/846551631.jpg http://cdn01.tv4.se/polopoly_fs/1.1980443.1336658849!mobileimage-logo/543397329.png http://cdn01.tv4.se/polopoly_fs/1.1980443.1336658849!mobileimage-large/3068694655.jpg http://cdn01.tv4.se/polopoly_fs/1.1980443.1336658849!mobileimage-highres/2689824740.jpg http://cdn01.tv4.se/polopoly_fs/1.1980443.1336658849!mobileimage-logo-highres/2270957753.png http://cdn01.tv4.se/polopoly_fs/1.1980443.1336658849!mobileimage-large-highres/190603897.jpg http://cdn01.tv4.se/polopoly_fs/1.1980443.1336658849!originallogoimage/3634681870.png http://cdn01.tv4.se/polopoly_fs/1.1980443.1336658849!originalformatimage/1518616166.jpg http://cdn01.tv4.se/polopoly_fs/1.1980443.1336658849!originalcarouselimage/3257148307.jpg På två veckor ska 12 före detta interner lära sig att driva en lyxrestaurang i Brisbane, Australien. SE 115.111.227.14 115.111.227.6 25.19.39.117 210.94.41.89 217.67.201.237 217.67.201.162;SE Visas i tv11 true http://cdn01.tv4.se/polopoly_fs/1.1980443.1336658849!image/2581036987.jpg http://cdn01.tv4.se/polopoly_fs/1.1980443.1336658849!smallformatimage/2143760421.jpg http://cdn01.tv4.se/polopoly_fs/1.1980443.1336658849!categorylarge/3129470962.jpg http://cdn01.tv4.se/polopoly_fs/1.1980443.1336658849!image-large/1972601057.jpg http://cdn01.tv4.se/polopoly_fs/1.1980443.1336658849!image-logo/1007939611.png http://cdn01.tv4.se/polopoly_fs/1.1980443.1336658849!small-image-logo/2544489120.png Hela program 4 true false false false 1.1980446 Senaste programmen inom Nöje 4 true false true false Alla 1.2521546,1.1927588,1.2518288,1.1969780,1.2473260,1.2440034,1.2344977,1.2522532,1.1969811,1.2488517,1.2661272,1.2488511,1.2582459,1.2181324,1.1854782,1.1969774,1.2200758,1.2473136,1.2561082,1.2184526 http://cdn01.tv4.se/polopoly_fs/1.2373837.1330334813!originallogoimage/4271559861.png http://cdn01.tv4.se/polopoly_fs/1.2373837.1330334813!originalformatimage/863578986.jpg http://cdn01.tv4.se/polopoly_fs/1.2373837.1330334813!originalcarouselimage/2848740669.jpg Lotta Engberg är tillbaka på Liseberg för att bjuda på ett pärlband av både klassiska och nyskrivna jullåtar. Curt-Eric Holmquist står för musiken tillsammans med sin orkester. Torsdagar 20:00 tv4 true Hela program 12 true false false false Alla 1.2373837 Senaste programmen inom Nöje 4 true false true false Alla 1.2521546,1.1927588,1.2518288,1.1969780,1.2473260,1.2440034,1.2344977,1.2522532,1.1969811,1.2488517,1.2661272,1.2488511,1.2582459,1.2181324,1.1854782,1.1969774,1.2200758,1.2473136,1.2561082,1.2184526 http://cdn01.tv4.se/polopoly_fs/1.2476817.1342526583!originallogoimage/893654597.png http://cdn01.tv4.se/polopoly_fs/1.2476817.1342526583!originalformatimage/3946761998.jpg http://cdn01.tv4.se/polopoly_fs/1.2476817.1342526583!originalcarouselimage/331670352.jpg Elva singlar får möjligheten att leva i paradiset. För att få stanna måste de hittar en rumskamrat av motsatt kön. SE 115.111.227.14 115.111.227.6 25.19.39.117 210.94.41.89 217.67.201.237 217.67.201.162;SE;SE;SE 115.111.227.14 115.111.227.6 25.19.39.117 210.94.41.89 217.67.201.237 217.67.201.162;SE visas i tv11 true Säsong I 8 true true false false Alla 1.2488233 Säsong II 8 true false false false Alla 1.2476828 Senaste programmen inom Nöje 4 true false true false Alla 1.2521546,1.1927588,1.2518288,1.1969780,1.2473260,1.2440034,1.2344977,1.2522532,1.1969811,1.2488517,1.2661272,1.2488511,1.2582459,1.2181324,1.1854782,1.1969774,1.2200758,1.2473136,1.2561082,1.2184526 http://cdn01.tv4.se/polopoly_fs/1.2307821.1336747046!originallogoimage/2684502385.png http://cdn01.tv4.se/polopoly_fs/1.2307821.1336747046!originalformatimage/252028933.jpg http://cdn01.tv4.se/polopoly_fs/1.2307821.1336747046!originalcarouselimage/3259633291.jpg Par tävlar om att vinna två miljoner kronor genom att satsa pengar på svarsalternativ till ett antal frågor. Måndagar 20:00 tv4 true Hela program 12 true false false false Alla 1.2307821 Senaste programmen inom Nöje 4 true false true false Alla 1.2521546,1.1927588,1.2518288,1.1969780,1.2473260,1.2440034,1.2344977,1.2522532,1.1969811,1.2488517,1.2661272,1.2488511,1.2582459,1.2181324,1.1854782,1.1969774,1.2200758,1.2473136,1.2561082,1.2184526 http://cdn01.tv4.se/polopoly_fs/1.1824916.1332408397!mobileimage/3925110706.png http://cdn01.tv4.se/polopoly_fs/1.1824916.1332408397!mobileimage-logo/22429333.png http://cdn01.tv4.se/polopoly_fs/1.1824916.1332408397!mobileimage-large/335270262.jpg http://cdn01.tv4.se/polopoly_fs/1.1824916.1332408397!mobileimage-highres/2664715593.png http://cdn01.tv4.se/polopoly_fs/1.1824916.1332408397!mobileimage-logo-highres/3168980115.png http://cdn01.tv4.se/polopoly_fs/1.1824916.1332408397!mobileimage-large-highres/2924422000.jpg http://cdn01.tv4.se/polopoly_fs/1.1824916.1332408397!originallogoimage/3356320268.png http://cdn01.tv4.se/polopoly_fs/1.1824916.1332408397!originalformatimage/1875711387.jpg http://cdn01.tv4.se/polopoly_fs/1.1824916.1332408397!originalcarouselimage/502291673.jpg Svensk talkshow med David Hellenius som träffar kända och aktuella gäster varvat med träffsäkra sketcher. tv4 http://www.tv4.se/hellenius_horna true http://cdn01.tv4.se/polopoly_fs/1.1824916.1332408397!image/3440622888.png http://cdn01.tv4.se/polopoly_fs/1.1824916.1332408397!smallformatimage/522092950.png http://cdn01.tv4.se/polopoly_fs/1.1824916.1332408397!categorylarge/3762974788.png http://cdn01.tv4.se/polopoly_fs/1.1824916.1332408397!image-large/794697559.png http://cdn01.tv4.se/polopoly_fs/1.1824916.1332408397!image-logo/2627292636.png http://cdn01.tv4.se/polopoly_fs/1.1824916.1332408397!small-image-logo/2288459251.png Senaste klippen 12 true true false true 1.1849085 Hela program 4 true false false false Alla 1.1849086 Senaste programmen inom Nöje 4 true false true false Alla 1.2521546,1.1927588,1.2518288,1.1969780,1.2473260,1.2440034,1.2344977,1.2522532,1.1969811,1.2488517,1.2661272,1.2488511,1.2582459,1.2181324,1.1854782,1.1969774,1.2200758,1.2473136,1.2561082,1.2184526 http://cdn01.tv4.se/polopoly_fs/1.2283836.1330097585!originallogoimage/1174070368.png http://cdn01.tv4.se/polopoly_fs/1.2283836.1330097585!originalformatimage/1149185310.jpg http://cdn01.tv4.se/polopoly_fs/1.2283836.1330097585!originalcarouselimage/2416433845.jpg I Let's dance Norge kastar sig tio kända personer handlöst ut på dansgolvet tillsammans med några av landets bästa tävlingsdansare. SE 115.111.227.14 115.111.227.6 25.19.39.117 210.94.41.89 217.67.201.237 217.67.201.162;SE;SE 115.111.227.14 115.111.227.6 25.19.39.117 210.94.41.89 217.67.201.237 217.67.201.162 tv4 true Hela program 12 true false false false Alla 1.2283836 Senaste programmen inom Nöje 4 true false true false Alla 1.2521546,1.1927588,1.2518288,1.1969780,1.2473260,1.2440034,1.2344977,1.2522532,1.1969811,1.2488517,1.2661272,1.2488511,1.2582459,1.2181324,1.1854782,1.1969774,1.2200758,1.2473136,1.2561082,1.2184526 http://cdn01.tv4.se/polopoly_fs/1.2308278.1342526695!originallogoimage/3466663302.png http://cdn01.tv4.se/polopoly_fs/1.2308278.1342526695!originalformatimage/2670467689.jpg http://cdn01.tv4.se/polopoly_fs/1.2308278.1342526695!originalcarouselimage/696065220.jpg Idol Extra sänds direkt efter Idols fredagsfinal. Möt bland annat den deltagare som blivit tvungen att lämna tävlingen. SE;SE 115.111.227.14 115.111.227.6 25.19.39.117 210.94.41.89 217.67.201.237 217.67.201.162 Visas i tv11 true Hela program 12 true false false false Alla 1.2308278 Senaste programmen inom Nöje 4 true false true false Alla 1.2521546,1.1927588,1.2518288,1.1969780,1.2473260,1.2440034,1.2344977,1.2522532,1.1969811,1.2488517,1.2661272,1.2488511,1.2582459,1.2181324,1.1854782,1.1969774,1.2200758,1.2473136,1.2561082,1.2184526 http://cdn01.tv4.se/polopoly_fs/1.1826861.1330097528!originallogoimage/3935886581.png http://cdn01.tv4.se/polopoly_fs/1.1826861.1330097528!originalformatimage/4238854460.jpg http://cdn01.tv4.se/polopoly_fs/1.1826861.1330097528!originalcarouselimage/242030844.jpg Snacksaliga och frispråkiga politiska röstfiskedueller är kärnan i det prisbelönta och folkkära Parlamentet. Visas i tv4 http://www.tv4.se/parlamentet true Hela program 4 true false false true 1.1826861 Senaste klippen 12 true true false false 1.1826870 Senaste programmen inom Nöje 4 true false true false Alla 1.2521546,1.1927588,1.2518288,1.1969780,1.2473260,1.2440034,1.2344977,1.2522532,1.1969811,1.2488517,1.2661272,1.2488511,1.2582459,1.2181324,1.1854782,1.1969774,1.2200758,1.2473136,1.2561082,1.2184526 http://cdn01.tv4.se/polopoly_fs/1.2364417.1330097479!originallogoimage/2061033936.png http://cdn01.tv4.se/polopoly_fs/1.2364417.1330097479!originalformatimage/3688868127.jpg http://cdn01.tv4.se/polopoly_fs/1.2364417.1330097479!originalcarouselimage/1453214832.jpg Den brittiske ståuppkomikern Stewart Lee tar hjälp av flera komiker och skämtar om ett enskilt ämne i varje avsnitt. Allt ifrån välgörenhet, London och demokrati hamnar under luppen. SE 115.111.227.14 115.111.227.6 25.19.39.117 210.94.41.89 217.67.201.237 217.67.201.162;SE visas i tv4Komedi true Hela program 12 true false false false Alla 1.2364417 Senaste programmen inom Nöje 4 true false true false Alla 1.2521546,1.1927588,1.2518288,1.1969780,1.2473260,1.2440034,1.2344977,1.2522532,1.1969811,1.2488517,1.2661272,1.2488511,1.2582459,1.2181324,1.1854782,1.1969774,1.2200758,1.2473136,1.2561082,1.2184526 http://cdn01.tv4.se/polopoly_fs/1.2317301.1330097459!originallogoimage/1344168172.png http://cdn01.tv4.se/polopoly_fs/1.2317301.1330097459!originalformatimage/2350265074.jpg http://cdn01.tv4.se/polopoly_fs/1.2317301.1330097459!originalcarouselimage/617069729.jpg The Pranker är en brittisk komediserie från 2011 i sex delar. Komikern Ross Lee tar sig an flera olika karaktärer som ger sig ut på gatorna och möter vanliga människor. SE 115.111.227.14 115.111.227.6 25.19.39.117 210.94.41.89 217.67.201.237 217.67.201.162;SE Fredagar 21:10 tv4komedi true Hela program 12 true false false false Alla 1.2317301 Senaste programmen inom Nöje 4 true false true false Alla 1.2521546,1.1927588,1.2518288,1.1969780,1.2473260,1.2440034,1.2344977,1.2522532,1.1969811,1.2488517,1.2661272,1.2488511,1.2582459,1.2181324,1.1854782,1.1969774,1.2200758,1.2473136,1.2561082,1.2184526 http://cdn01.tv4.se/polopoly_fs/1.2293917.1336747879!originallogoimage/2713592781.png http://cdn01.tv4.se/polopoly_fs/1.2293917.1336747879!originalformatimage/1542664079.jpg http://cdn01.tv4.se/polopoly_fs/1.2293917.1336747879!originalcarouselimage/2925944486.jpg Vi får följa Tinsley, känd som prinsessan från Park Avenue, och hennes vänner som bor på Manhattan. SE 115.111.227.14 115.111.227.6 25.19.39.117 210.94.41.89 217.67.201.237 217.67.201.162;SE Visas i tv11 true Hela program 12 true false false false Alla 1.2293917 Senaste programmen inom Nöje 4 true false true false Alla 1.2521546,1.1927588,1.2518288,1.1969780,1.2473260,1.2440034,1.2344977,1.2522532,1.1969811,1.2488517,1.2661272,1.2488511,1.2582459,1.2181324,1.1854782,1.1969774,1.2200758,1.2473136,1.2561082,1.2184526 http://cdn01.tv4.se/polopoly_fs/1.2257567.1330097410!originallogoimage/220783920.png http://cdn01.tv4.se/polopoly_fs/1.2257567.1330097410!originalformatimage/487870510.jpg http://cdn01.tv4.se/polopoly_fs/1.2257567.1330097410!originalcarouselimage/4024336878.jpg Här följer man personalen på kliniken Leaf & Rusher i Hollywood. Tillsammans gör de sitt bästa för att hålla kändisar och mångmiljardärer unga och vackra. SE;SE 115.111.227.14 115.111.227.6 25.19.39.117 210.94.41.89 217.67.201.237 217.67.201.162 Visas i tv11 true Hela program 4 true false false false Alla 1.2257573 Senaste programmen inom Nöje 4 true false true false Alla 1.2521546,1.1927588,1.2518288,1.1969780,1.2473260,1.2440034,1.2344977,1.2522532,1.1969811,1.2488517,1.2661272,1.2488511,1.2582459,1.2181324,1.1854782,1.1969774,1.2200758,1.2473136,1.2561082,1.2184526 http://cdn01.tv4.se/polopoly_fs/1.2266601.1330097393!originallogoimage/2690376640.png http://cdn01.tv4.se/polopoly_fs/1.2266601.1330097393!originalformatimage/175239178.jpg http://cdn01.tv4.se/polopoly_fs/1.2266601.1330097393!originalcarouselimage/4144849480.jpg Brittisk komediserie där några av de bästa stå-up-komikerna uppträder. SE;SE 115.111.227.14 115.111.227.6 25.19.39.117 210.94.41.89 217.67.201.237 217.67.201.162 Visas i tv4komedi true Hela program 12 true false false false Alla 1.2266601 Senaste programmen inom Nöje 4 true false true false Alla 1.2521546,1.1927588,1.2518288,1.1969780,1.2473260,1.2440034,1.2344977,1.2522532,1.1969811,1.2488517,1.2661272,1.2488511,1.2582459,1.2181324,1.1854782,1.1969774,1.2200758,1.2473136,1.2561082,1.2184526 http://cdn01.tv4.se/polopoly_fs/1.2076344.1336748085!mobileimage/1240002175.jpg http://cdn01.tv4.se/polopoly_fs/1.2076344.1336748085!mobileimage-logo/2866302961.png http://cdn01.tv4.se/polopoly_fs/1.2076344.1336748085!mobileimage-large/3096965194.jpg http://cdn01.tv4.se/polopoly_fs/1.2076344.1336748085!mobileimage-highres/3969658409.jpg http://cdn01.tv4.se/polopoly_fs/1.2076344.1336748085!mobileimage-logo-highres/1154729812.png http://cdn01.tv4.se/polopoly_fs/1.2076344.1336748085!mobileimage-large-highres/1453095151.jpg http://cdn01.tv4.se/polopoly_fs/1.2076344.1336748085!originallogoimage/874187979.png http://cdn01.tv4.se/polopoly_fs/1.2076344.1336748085!originalformatimage/64809667.jpg http://cdn01.tv4.se/polopoly_fs/1.2076344.1336748085!originalcarouselimage/2608658230.jpg Ru Paul är på jakt efter nästa stora superstjärna - inom dragshowartisteriet. SE 129.35.209.170 58.247.178.245 115.111.227.14 115.111.227.6 25.19.39.117 210.94.41.89 217.67.201.237 217.67.201.162 Visas i tv11 true Hela program 12 true false false false Alla 1.2076344 Senaste programmen inom Nöje 4 true false true false Alla 1.2521546,1.1927588,1.2518288,1.1969780,1.2473260,1.2440034,1.2344977,1.2522532,1.1969811,1.2488517,1.2661272,1.2488511,1.2582459,1.2181324,1.1854782,1.1969774,1.2200758,1.2473136,1.2561082,1.2184526 http://cdn01.tv4.se/polopoly_fs/1.2276280.1342526934!originallogoimage/1877070262.png http://cdn01.tv4.se/polopoly_fs/1.2276280.1342526934!originalformatimage/2258645655.jpg http://cdn01.tv4.se/polopoly_fs/1.2276280.1342526934!originalcarouselimage/816268880.jpg Vi följer designern Shareen Mitchell som gör om gamla kläder till moderätta plagg, som ofta bärs av Hollywood-kändisar. SE;SE 115.111.227.14 115.111.227.6 25.19.39.117 210.94.41.89 217.67.201.237 217.67.201.162 Visas i tv11 true Hela program 12 true false false false Alla 1.2276280 Senaste programmen inom Nöje 4 true false true false Alla 1.2521546,1.1927588,1.2518288,1.1969780,1.2473260,1.2440034,1.2344977,1.2522532,1.1969811,1.2488517,1.2661272,1.2488511,1.2582459,1.2181324,1.1854782,1.1969774,1.2200758,1.2473136,1.2561082,1.2184526 http://cdn01.tv4.se/polopoly_fs/1.2120627.1330097339!mobileimage/4126392434.jpg http://cdn01.tv4.se/polopoly_fs/1.2120627.1330097339!mobileimage-logo/941907635.png http://cdn01.tv4.se/polopoly_fs/1.2120627.1330097339!mobileimage-large/3757594609.jpg http://cdn01.tv4.se/polopoly_fs/1.2120627.1330097339!mobileimage-highres/1742073305.jpg http://cdn01.tv4.se/polopoly_fs/1.2120627.1330097339!mobileimage-logo-highres/2078967900.png http://cdn01.tv4.se/polopoly_fs/1.2120627.1330097339!mobileimage-large-highres/2620817694.jpg http://cdn01.tv4.se/polopoly_fs/1.2120627.1330097339!originallogoimage/3426477933.png http://cdn01.tv4.se/polopoly_fs/1.2120627.1330097339!originalformatimage/3837316936.jpg http://cdn01.tv4.se/polopoly_fs/1.2120627.1330097339!originalcarouselimage/3734374542.jpg Här bjuder några av Storbritanniens ledande komiker på sketcher. Bland de medverkande finns Lee Mack, Jim Tavare, Time Vine, Karen Taylor och Kitty Flanagan. SE;SE 129.35.209.170 58.247.178.245 115.111.227.14 115.111.227.6 25.19.39.117 210.94.41.89 217.67.201.237 217.67.201.162 Visas i tv4komedi true Hela program 12 true false false false Alla 1.2120634 Senaste programmen inom Nöje 4 true false true false Alla 1.2521546,1.1927588,1.2518288,1.1969780,1.2473260,1.2440034,1.2344977,1.2522532,1.1969811,1.2488517,1.2661272,1.2488511,1.2582459,1.2181324,1.1854782,1.1969774,1.2200758,1.2473136,1.2561082,1.2184526 http://cdn01.tv4.se/polopoly_fs/1.2202962.1330097320!originallogoimage/3670410656.png http://cdn01.tv4.se/polopoly_fs/1.2202962.1330097320!originalformatimage/2819597559.jpg http://cdn01.tv4.se/polopoly_fs/1.2202962.1330097320!originalcarouselimage/2497542520.jpg Brittisk realityserie från 2010. i sex delar. Här söker man efter Storbritanniens roligaste ännu inte upptäckta komiker. SE 115.111.227.14 115.111.227.6 25.19.39.117 210.94.41.89 217.67.201.237 217.67.201.162;SE visas i tv4komedi true Hela program 12 true false false false Alla 1.2202962 Senaste programmen inom Nöje 4 true false true false Alla 1.2521546,1.1927588,1.2518288,1.1969780,1.2473260,1.2440034,1.2344977,1.2522532,1.1969811,1.2488517,1.2661272,1.2488511,1.2582459,1.2181324,1.1854782,1.1969774,1.2200758,1.2473136,1.2561082,1.2184526 http://cdn01.tv4.se/polopoly_fs/1.2390377.1330097300!originallogoimage/1685859543.jpg http://cdn01.tv4.se/polopoly_fs/1.2390377.1330097300!originalformatimage/1322220494.jpg http://cdn01.tv4.se/polopoly_fs/1.2390377.1330097300!originalcarouselimage/1685859543.jpg TV4s julkalender. Varje dag i december tipsar våra hallåor om sina favoritavsnitt av olika program. Avsnittet, som normalt sett finns i TV4 Play Premium, finns sedan tillgängligt i 24 timmar. God jul önskar TV4. SE visas i tv4 false Hela program 12 true true false false Alla 1.2390547 Senaste programmen inom Nöje 4 true false true false Alla 1.2521546,1.1927588,1.2518288,1.1969780,1.2473260,1.2440034,1.2344977,1.2522532,1.1969811,1.2488517,1.2661272,1.2488511,1.2582459,1.2181324,1.1854782,1.1969774,1.2200758,1.2473136,1.2561082,1.2184526 http://cdn01.tv4.se/polopoly_fs/1.2071777.1336748271!mobileimage/2583088799.jpg http://cdn01.tv4.se/polopoly_fs/1.2071777.1336748271!mobileimage-logo/169232867.png http://cdn01.tv4.se/polopoly_fs/1.2071777.1336748271!mobileimage-large/414950912.jpg http://cdn01.tv4.se/polopoly_fs/1.2071777.1336748271!mobileimage-highres/2447009262.jpg http://cdn01.tv4.se/polopoly_fs/1.2071777.1336748271!mobileimage-logo-highres/3080895461.png http://cdn01.tv4.se/polopoly_fs/1.2071777.1336748271!mobileimage-large-highres/2769245190.jpg http://cdn01.tv4.se/polopoly_fs/1.2071777.1336748271!originallogoimage/3080895461.png http://cdn01.tv4.se/polopoly_fs/1.2071777.1336748271!originalformatimage/2688676791.jpg http://cdn01.tv4.se/polopoly_fs/1.2071777.1336748271!originalcarouselimage/1474781516.jpg Två mammor med helt olika liv byter vardag med varandra under en vecka. SE 129.35.209.170 58.247.178.245 115.111.227.14 115.111.227.6 25.19.39.117 210.94.41.89 217.67.201.237 217.67.201.162;SE 129.35.209.170 58.247.178.245 115.111.227.14 115.111.227.6 25.19.39.117 210.94.41.89 217.67.201.237 217.67.201.162;SE 129.35.209.170 58.247.178.245;SE 129.35.209.170 58.247.178.245 115.111.227.14 115.111.227.6 25.19.39.117 210.94.41.89 217.67.201.237 217.67.201.162 Måndagar 20:00 tv4 true http://cdn01.tv4.se/polopoly_fs/1.2071777.1336748271!image/2720175555.jpg http://cdn01.tv4.se/polopoly_fs/1.2071777.1336748271!smallformatimage/2877524038.jpg http://cdn01.tv4.se/polopoly_fs/1.2071777.1336748271!categorylarge/349493645.jpg http://cdn01.tv4.se/polopoly_fs/1.2071777.1336748271!image-large/3686839966.jpg http://cdn01.tv4.se/polopoly_fs/1.2071777.1336748271!image-logo/2057964534.png http://cdn01.tv4.se/polopoly_fs/1.2071777.1336748271!small-image-logo/297134553.png Hela program 12 true false false false Alla 1.2071777 Senaste programmen inom Nöje 4 true false true false Alla 1.2521546,1.1927588,1.2518288,1.1969780,1.2473260,1.2440034,1.2344977,1.2522532,1.1969811,1.2488517,1.2661272,1.2488511,1.2582459,1.2181324,1.1854782,1.1969774,1.2200758,1.2473136,1.2561082,1.2184526 http://cdn01.tv4.se/polopoly_fs/1.2106198.1342527039!mobileimage/2455924259.jpg http://cdn01.tv4.se/polopoly_fs/1.2106198.1342527039!mobileimage-logo/1729105156.png http://cdn01.tv4.se/polopoly_fs/1.2106198.1342527039!mobileimage-large/2580848876.jpg http://cdn01.tv4.se/polopoly_fs/1.2106198.1342527039!mobileimage-highres/2958394639.jpg http://cdn01.tv4.se/polopoly_fs/1.2106198.1342527039!mobileimage-logo-highres/1068696800.png http://cdn01.tv4.se/polopoly_fs/1.2106198.1342527039!mobileimage-large-highres/3245844744.jpg http://cdn01.tv4.se/polopoly_fs/1.2106198.1342527039!originallogoimage/2356458699.png http://cdn01.tv4.se/polopoly_fs/1.2106198.1342527039!originalformatimage/1350362837.jpg http://cdn01.tv4.se/polopoly_fs/1.2106198.1342527039!originalcarouselimage/4172114054.jpg Herr och fru är ett frågesportprogram där kända par öppnar upp dörren till sina privatliv genom att tävla i hur väl de egentligen känner sin partner. Torsdagar 20:00 tv4 true http://cdn01.tv4.se/polopoly_fs/1.2106198.1342527039!image/2328901490.jpg http://cdn01.tv4.se/polopoly_fs/1.2106198.1342527039!smallformatimage/1163525109.jpg http://cdn01.tv4.se/polopoly_fs/1.2106198.1342527039!categorylarge/376682528.jpg http://cdn01.tv4.se/polopoly_fs/1.2106198.1342527039!image-large/4095620995.jpg http://cdn01.tv4.se/polopoly_fs/1.2106198.1342527039!image-logo/3086945653.png http://cdn01.tv4.se/polopoly_fs/1.2106198.1342527039!small-image-logo/3184769855.png Hela program 12 true false false true Alla 1.2106227 Senaste klippen 8 false true false true Alla 1.2106198 Senaste programmen inom Nöje 4 true false true false Alla 1.2521546,1.1927588,1.2518288,1.1969780,1.2473260,1.2440034,1.2344977,1.2522532,1.1969811,1.2488517,1.2661272,1.2488511,1.2582459,1.2181324,1.1854782,1.1969774,1.2200758,1.2473136,1.2561082,1.2184526 http://cdn01.tv4.se/polopoly_fs/1.2231666.1330097128!originallogoimage/3729469162.png http://cdn01.tv4.se/polopoly_fs/1.2231666.1330097128!originalformatimage/723632794.jpg http://cdn01.tv4.se/polopoly_fs/1.2231666.1330097128!originalcarouselimage/1794534328.jpg Modeskaparna Austin Scarlett och Santino Rice, reser runt i USA för att hjälpa kvinnor att sy kostymer för speciella tillfällen. Eftersom kvinnorna inte har någon koll på mode och Austin och Santino har svårt att komma överrens, blir det en tuff utmaning för modeskaparna. SE;SE 115.111.227.14 115.111.227.6 25.19.39.117 210.94.41.89 217.67.201.237 217.67.201.162 Visas i tv11 true Hela program 12 true false false false Alla 1.2231666 Senaste programmen inom Nöje 4 true false true false Alla 1.2521546,1.1927588,1.2518288,1.1969780,1.2473260,1.2440034,1.2344977,1.2522532,1.1969811,1.2488517,1.2661272,1.2488511,1.2582459,1.2181324,1.1854782,1.1969774,1.2200758,1.2473136,1.2561082,1.2184526 http://cdn01.tv4.se/polopoly_fs/1.2202905.1330097105!originallogoimage/2546071461.png http://cdn01.tv4.se/polopoly_fs/1.2202905.1330097105!originalformatimage/335227193.jpg http://cdn01.tv4.se/polopoly_fs/1.2202905.1330097105!originalcarouselimage/3611201453.jpg Bret Michaels - Life as I know it är en amerikansk realityserie från 2010 Om Bret Michaels, sångaren i det världsberömda bandet Poison. SE;SE 115.111.227.14 115.111.227.6 25.19.39.117 210.94.41.89 217.67.201.237 217.67.201.162 Visas i tv11 true Hela program 12 true false false false Alla 1.2202905 Senaste programmen inom Nöje 4 true false true false Alla 1.2521546,1.1927588,1.2518288,1.1969780,1.2473260,1.2440034,1.2344977,1.2522532,1.1969811,1.2488517,1.2661272,1.2488511,1.2582459,1.2181324,1.1854782,1.1969774,1.2200758,1.2473136,1.2561082,1.2184526 http://cdn01.tv4.se/polopoly_fs/1.2219613.1330097077!originallogoimage/132173940.png http://cdn01.tv4.se/polopoly_fs/1.2219613.1330097077!originalformatimage/2288816891.jpg http://cdn01.tv4.se/polopoly_fs/1.2219613.1330097077!originalcarouselimage/4229436179.jpg merikansk realityserie från 2010. Om vänskapen mellan fyra homosexuella killar och deras kvinnliga bästa kompisar i New York. Man följer Crystal och Nathan, Elisa och David, Rosebud och Sahil och Sarah och Joel när de festar, shoppar och alltid finns där för varandra SE 115.111.227.14 115.111.227.6 25.19.39.117 210.94.41.89 217.67.201.237 217.67.201.162;SE visas i tv11 true Hela program 12 true true false false Alla 1.2219613 Senaste programmen inom Nöje 4 true false true false Alla 1.2521546,1.1927588,1.2518288,1.1969780,1.2473260,1.2440034,1.2344977,1.2522532,1.1969811,1.2488517,1.2661272,1.2488511,1.2582459,1.2181324,1.1854782,1.1969774,1.2200758,1.2473136,1.2561082,1.2184526 http://cdn01.tv4.se/polopoly_fs/1.2196414.1330097057!mobileimage/709821765.jpg http://cdn01.tv4.se/polopoly_fs/1.2196414.1330097057!mobileimage-logo/2768603505.png http://cdn01.tv4.se/polopoly_fs/1.2196414.1330097057!mobileimage-large/1324552894.jpg http://cdn01.tv4.se/polopoly_fs/1.2196414.1330097057!mobileimage-highres/3740022153.jpg http://cdn01.tv4.se/polopoly_fs/1.2196414.1330097057!mobileimage-logo-highres/37358617.png http://cdn01.tv4.se/polopoly_fs/1.2196414.1330097057!mobileimage-large-highres/3922499542.jpg http://cdn01.tv4.se/polopoly_fs/1.2196414.1330097057!originallogoimage/37358617.png http://cdn01.tv4.se/polopoly_fs/1.2196414.1330097057!originalformatimage/464199959.jpg http://cdn01.tv4.se/polopoly_fs/1.2196414.1330097057!originalcarouselimage/641971569.jpg Brittisk animerad satirserie i sketchform där animerade kända personer parodieras. SE Visas i tv11 true http://cdn01.tv4.se/polopoly_fs/1.2196414.1330097057!image/1498916970.jpg http://cdn01.tv4.se/polopoly_fs/1.2196414.1330097057!smallformatimage/709113637.jpg http://cdn01.tv4.se/polopoly_fs/1.2196414.1330097057!categorylarge/3951405826.jpg http://cdn01.tv4.se/polopoly_fs/1.2196414.1330097057!image-large/2475926752.jpg http://cdn01.tv4.se/polopoly_fs/1.2196414.1330097057!image-logo/736244235.png http://cdn01.tv4.se/polopoly_fs/1.2196414.1330097057!small-image-logo/3532507175.png Hela program 12 true false false false Alla 1.2196414 Senaste programmen inom Nöje 4 true false true false Alla 1.2521546,1.1927588,1.2518288,1.1969780,1.2473260,1.2440034,1.2344977,1.2522532,1.1969811,1.2488517,1.2661272,1.2488511,1.2582459,1.2181324,1.1854782,1.1969774,1.2200758,1.2473136,1.2561082,1.2184526 http://cdn01.tv4.se/polopoly_fs/1.2186002.1342527167!mobileimage/3242119620.jpg http://cdn01.tv4.se/polopoly_fs/1.2186002.1342527167!mobileimage-logo/3579116512.png http://cdn01.tv4.se/polopoly_fs/1.2186002.1342527167!mobileimage-large/1572380274.jpg http://cdn01.tv4.se/polopoly_fs/1.2186002.1342527167!mobileimage-highres/92228553.jpg http://cdn01.tv4.se/polopoly_fs/1.2186002.1342527167!mobileimage-logo-highres/2772584115.png http://cdn01.tv4.se/polopoly_fs/1.2186002.1342527167!mobileimage-large-highres/766386977.jpg http://cdn01.tv4.se/polopoly_fs/1.2186002.1342527167!originallogoimage/2772584115.png http://cdn01.tv4.se/polopoly_fs/1.2186002.1342527167!originalformatimage/3250232315.jpg http://cdn01.tv4.se/polopoly_fs/1.2186002.1342527167!originalcarouselimage/4256208507.jpg Vi får följa Melanie Brown, känd som Mel B i Spice Girls, hennes man Stephen Belafonte och hennes två döttrar från ett tidigare äktenskap, Phoenix och Angel. SE;SE 115.111.227.14 115.111.227.6 25.19.39.117 210.94.41.89 217.67.201.237 217.67.201.162 Visas i tv11 true http://cdn01.tv4.se/polopoly_fs/1.2186002.1342527167!image/3839240242.jpg http://cdn01.tv4.se/polopoly_fs/1.2186002.1342527167!smallformatimage/1578486135.jpg http://cdn01.tv4.se/polopoly_fs/1.2186002.1342527167!categorylarge/2446851883.jpg http://cdn01.tv4.se/polopoly_fs/1.2186002.1342527167!image-large/2670754509.jpg http://cdn01.tv4.se/polopoly_fs/1.2186002.1342527167!image-logo/441377339.png http://cdn01.tv4.se/polopoly_fs/1.2186002.1342527167!small-image-logo/2842075908.png Hela program 12 true false false false Alla 1.2186002 Senaste programmen inom Nöje 4 true false true false Alla 1.2521546,1.1927588,1.2518288,1.1969780,1.2473260,1.2440034,1.2344977,1.2522532,1.1969811,1.2488517,1.2661272,1.2488511,1.2582459,1.2181324,1.1854782,1.1969774,1.2200758,1.2473136,1.2561082,1.2184526 http://cdn01.tv4.se/polopoly_fs/1.2184421.1330096913!mobileimage/2742091438.jpg http://cdn01.tv4.se/polopoly_fs/1.2184421.1330096913!mobileimage-logo/1856462959.png http://cdn01.tv4.se/polopoly_fs/1.2184421.1330096913!mobileimage-large/2306566445.jpg http://cdn01.tv4.se/polopoly_fs/1.2184421.1330096913!mobileimage-highres/827773701.jpg http://cdn01.tv4.se/polopoly_fs/1.2184421.1330096913!mobileimage-logo-highres/761902720.png http://cdn01.tv4.se/polopoly_fs/1.2184421.1330096913!mobileimage-large-highres/3400908738.jpg http://cdn01.tv4.se/polopoly_fs/1.2184421.1330096913!originallogoimage/761902720.png http://cdn01.tv4.se/polopoly_fs/1.2184421.1330096913!originalformatimage/639904338.jpg http://cdn01.tv4.se/polopoly_fs/1.2184421.1330096913!originalcarouselimage/2194146987.jpg Engelsk ståupp-komedi från 2008. Inspelad på Wembley Arena. Bill Bailey genomför ett enmansuppträdande kantat av filmstycken, animationer och musikalisk uppfinningsrikedom. SE 115.111.227.14 115.111.227.6 25.19.39.117 210.94.41.89 217.67.201.237 217.67.201.162;SE Visas i tv4komedi true http://cdn01.tv4.se/polopoly_fs/1.2184421.1330096913!image/148036442.jpg http://cdn01.tv4.se/polopoly_fs/1.2184421.1330096913!smallformatimage/4005729476.jpg http://cdn01.tv4.se/polopoly_fs/1.2184421.1330096913!categorylarge/4250461854.jpg http://cdn01.tv4.se/polopoly_fs/1.2184421.1330096913!image-large/91583848.jpg http://cdn01.tv4.se/polopoly_fs/1.2184421.1330096913!image-logo/3740868598.png http://cdn01.tv4.se/polopoly_fs/1.2184421.1330096913!small-image-logo/3973586159.png Hela program 12 true false false false Alla 1.2184421 Senaste programmen inom Nöje 4 true false true false Alla 1.2521546,1.1927588,1.2518288,1.1969780,1.2473260,1.2440034,1.2344977,1.2522532,1.1969811,1.2488517,1.2661272,1.2488511,1.2582459,1.2181324,1.1854782,1.1969774,1.2200758,1.2473136,1.2561082,1.2184526 http://cdn01.tv4.se/polopoly_fs/1.1969822.1330096890!mobileimage/3347309650.jpg http://cdn01.tv4.se/polopoly_fs/1.1969822.1330096890!mobileimage-logo/3285210711.png http://cdn01.tv4.se/polopoly_fs/1.1969822.1330096890!mobileimage-large/3108373302.jpg http://cdn01.tv4.se/polopoly_fs/1.1969822.1330096890!mobileimage-highres/3484372771.jpg http://cdn01.tv4.se/polopoly_fs/1.1969822.1330096890!mobileimage-logo-highres/3885426663.png http://cdn01.tv4.se/polopoly_fs/1.1969822.1330096890!mobileimage-large-highres/3328156850.jpg SE 129.35.209.170 58.247.178.245 115.111.227.14 115.111.227.6 25.19.39.117 210.94.41.89 217.67.201.237 217.67.201.162 Visas i tv11 true http://cdn01.tv4.se/polopoly_fs/1.1969822.1330096890!image/4233608974.jpg http://cdn01.tv4.se/polopoly_fs/1.1969822.1330096890!smallformatimage/4126581387.jpg http://cdn01.tv4.se/polopoly_fs/1.1969822.1330096890!categorylarge/195630303.jpg http://cdn01.tv4.se/polopoly_fs/1.1969822.1330096890!image-large/541681719.jpg http://cdn01.tv4.se/polopoly_fs/1.1969822.1330096890!image-logo/4181788314.png Hela program 12 true true false false 1.1969824 Senaste programmen inom Nöje 4 true false true false Alla 1.2521546,1.1927588,1.2518288,1.1969780,1.2473260,1.2440034,1.2344977,1.2522532,1.1969811,1.2488517,1.2661272,1.2488511,1.2582459,1.2181324,1.1854782,1.1969774,1.2200758,1.2473136,1.2561082,1.2184526 http://cdn01.tv4.se/polopoly_fs/1.1969830.1342527257!mobileimage/2968841843.jpg http://cdn01.tv4.se/polopoly_fs/1.1969830.1342527257!mobileimage-logo/852797945.png http://cdn01.tv4.se/polopoly_fs/1.1969830.1342527257!mobileimage-large/544818714.jpg http://cdn01.tv4.se/polopoly_fs/1.1969830.1342527257!mobileimage-highres/2599216605.jpg http://cdn01.tv4.se/polopoly_fs/1.1969830.1342527257!mobileimage-logo-highres/2405456895.png http://cdn01.tv4.se/polopoly_fs/1.1969830.1342527257!mobileimage-large-highres/2647503900.jpg Tio personer tror att de är guds gåva till det motsatta könet, men är raka motsatsen. De får lära sig att bli en perfekt partner med hjälp av relationsexperten Trina Dolenz. SE 129.35.209.170 58.247.178.245 115.111.227.14 115.111.227.6 25.19.39.117 210.94.41.89 217.67.201.237 217.67.201.162 Visas i tv11 true http://cdn01.tv4.se/polopoly_fs/1.1969830.1342527257!image/228830158.jpg http://cdn01.tv4.se/polopoly_fs/1.1969830.1342527257!smallformatimage/3034615246.jpg http://cdn01.tv4.se/polopoly_fs/1.1969830.1342527257!categorylarge/2518568455.jpg http://cdn01.tv4.se/polopoly_fs/1.1969830.1342527257!image-large/309271478.jpg http://cdn01.tv4.se/polopoly_fs/1.1969830.1342527257!image-logo/3175856281.png http://cdn01.tv4.se/polopoly_fs/1.1969830.1342527257!small-image-logo/2156179671.png Hela program 12 true true false false 1.1969832 Senaste programmen inom Nöje 4 true false true false Alla 1.2521546,1.1927588,1.2518288,1.1969780,1.2473260,1.2440034,1.2344977,1.2522532,1.1969811,1.2488517,1.2661272,1.2488511,1.2582459,1.2181324,1.1854782,1.1969774,1.2200758,1.2473136,1.2561082,1.2184526 http://cdn01.tv4.se/polopoly_fs/1.2169368.1330096843!mobileimage/2525839994.jpg http://cdn01.tv4.se/polopoly_fs/1.2169368.1330096843!mobileimage-logo/2196203614.png http://cdn01.tv4.se/polopoly_fs/1.2169368.1330096843!mobileimage-large/168496588.jpg http://cdn01.tv4.se/polopoly_fs/1.2169368.1330096843!mobileimage-highres/1389156471.jpg http://cdn01.tv4.se/polopoly_fs/1.2169368.1330096843!mobileimage-logo-highres/4075934989.png http://cdn01.tv4.se/polopoly_fs/1.2169368.1330096843!mobileimage-large-highres/2048766111.jpg Stå-up-komikern Michael McIntyre reser runt Storbritannien och uppträder på välkända platser tillsammans med nya spännande komiker. SE 115.111.227.14 115.111.227.6 25.19.39.117 210.94.41.89 217.67.201.237 217.67.201.162;SE tv4komedi true http://cdn01.tv4.se/polopoly_fs/1.2169368.1330096843!image/3009788812.jpg http://cdn01.tv4.se/polopoly_fs/1.2169368.1330096843!smallformatimage/161897161.jpg http://cdn01.tv4.se/polopoly_fs/1.2169368.1330096843!categorylarge/3328470165.jpg http://cdn01.tv4.se/polopoly_fs/1.2169368.1330096843!image-large/3364088179.jpg http://cdn01.tv4.se/polopoly_fs/1.2169368.1330096843!image-logo/1308455301.png http://cdn01.tv4.se/polopoly_fs/1.2169368.1330096843!small-image-logo/917524224.png Hela program 12 true false false false Alla 1.2169368 Senaste programmen inom Nöje 4 true false true false Alla 1.2521546,1.1927588,1.2518288,1.1969780,1.2473260,1.2440034,1.2344977,1.2522532,1.1969811,1.2488517,1.2661272,1.2488511,1.2582459,1.2181324,1.1854782,1.1969774,1.2200758,1.2473136,1.2561082,1.2184526 http://cdn01.tv4.se/polopoly_fs/1.2120602.1330096825!mobileimage/1436418898.jpg http://cdn01.tv4.se/polopoly_fs/1.2120602.1330096825!mobileimage-logo/1440482834.png http://cdn01.tv4.se/polopoly_fs/1.2120602.1330096825!mobileimage-large/554031711.jpg http://cdn01.tv4.se/polopoly_fs/1.2120602.1330096825!mobileimage-highres/336092959.jpg http://cdn01.tv4.se/polopoly_fs/1.2120602.1330096825!mobileimage-logo-highres/1697265453.png http://cdn01.tv4.se/polopoly_fs/1.2120602.1330096825!mobileimage-large-highres/301198176.jpg Brittiskt underhållningsprogram. Komikern Jimmy Carr leder tävlingen där deltagare får svara på frågor samtidigt som de utsätts för störningsmoment så som elektriska stötar och annat mindre trevligt. SE 129.35.209.170 58.247.178.245 115.111.227.14 115.111.227.6 25.19.39.117 210.94.41.89 217.67.201.237 217.67.201.162;SE Visas i tv11 true http://cdn01.tv4.se/polopoly_fs/1.2120602.1330096825!image/4024801138.jpg http://cdn01.tv4.se/polopoly_fs/1.2120602.1330096825!smallformatimage/4172560766.jpg http://cdn01.tv4.se/polopoly_fs/1.2120602.1330096825!categorylarge/1931025382.jpg http://cdn01.tv4.se/polopoly_fs/1.2120602.1330096825!image-large/658465116.jpg http://cdn01.tv4.se/polopoly_fs/1.2120602.1330096825!image-logo/3703534477.png http://cdn01.tv4.se/polopoly_fs/1.2120602.1330096825!small-image-logo/3102145102.png Hela program 12 true false false false Alla 1.2120605 Senaste programmen inom Nöje 4 true false true false Alla 1.2521546,1.1927588,1.2518288,1.1969780,1.2473260,1.2440034,1.2344977,1.2522532,1.1969811,1.2488517,1.2661272,1.2488511,1.2582459,1.2181324,1.1854782,1.1969774,1.2200758,1.2473136,1.2561082,1.2184526 http://cdn01.tv4.se/polopoly_fs/1.2116071.1342527335!mobileimage/2733063653.jpg http://cdn01.tv4.se/polopoly_fs/1.2116071.1342527335!mobileimage-logo/1914475494.png http://cdn01.tv4.se/polopoly_fs/1.2116071.1342527335!mobileimage-large/2155457811.jpg http://cdn01.tv4.se/polopoly_fs/1.2116071.1342527335!mobileimage-highres/3700555970.jpg http://cdn01.tv4.se/polopoly_fs/1.2116071.1342527335!mobileimage-logo-highres/1865621749.png http://cdn01.tv4.se/polopoly_fs/1.2116071.1342527335!mobileimage-large-highres/1919663072.jpg Sju före detta tonårsidoler: Jamie Walters, Christopher Atkins, Adrian Zmed, Bill Hufsey, Eric Nies, Jeremy Jackson och David Chokachi samlas för att bo under samma tak. SE 129.35.209.170 58.247.178.245 115.111.227.14 115.111.227.6 25.19.39.117 210.94.41.89 217.67.201.237 217.67.201.162 Visas i tv11 true http://cdn01.tv4.se/polopoly_fs/1.2116071.1342527335!image/4129063477.jpg http://cdn01.tv4.se/polopoly_fs/1.2116071.1342527335!smallformatimage/4027643083.jpg http://cdn01.tv4.se/polopoly_fs/1.2116071.1342527335!categorylarge/2449615650.jpg http://cdn01.tv4.se/polopoly_fs/1.2116071.1342527335!image-large/3680865258.jpg http://cdn01.tv4.se/polopoly_fs/1.2116071.1342527335!image-logo/1674740387.png http://cdn01.tv4.se/polopoly_fs/1.2116071.1342527335!small-image-logo/3574040543.png Hela program 4 true false false false Alla 1.2116078 Senaste programmen inom Nöje 4 true false true false Alla 1.2521546,1.1927588,1.2518288,1.1969780,1.2473260,1.2440034,1.2344977,1.2522532,1.1969811,1.2488517,1.2661272,1.2488511,1.2582459,1.2181324,1.1854782,1.1969774,1.2200758,1.2473136,1.2561082,1.2184526 http://cdn01.tv4.se/polopoly_fs/1.1839723.1330096790!mobileimage/3278150236.png http://cdn01.tv4.se/polopoly_fs/1.1839723.1330096790!mobileimage-highres/2196948497.png Modeprogram med Elin Kling tv4 false http://cdn01.tv4.se/polopoly_fs/1.1839723.1330096790!image/2032078460.png http://cdn01.tv4.se/polopoly_fs/1.1839723.1330096790!smallformatimage/1850646640.png http://cdn01.tv4.se/polopoly_fs/1.1839723.1330096790!categorylarge/3856892648.png http://cdn01.tv4.se/polopoly_fs/1.1839723.1330096790!image-large/2982541394.png http://cdn01.tv4.se/polopoly_fs/1.1839723.1330096790!image-logo/2411066362.png http://cdn01.tv4.se/polopoly_fs/1.1839723.1330096790!small-image-logo/3958143545.png Hela program 12 true true false true Alla 1.1849046 Senaste programmen inom Nöje 4 true false true false Alla 1.2521546,1.1927588,1.2518288,1.1969780,1.2473260,1.2440034,1.2344977,1.2522532,1.1969811,1.2488517,1.2661272,1.2488511,1.2582459,1.2181324,1.1854782,1.1969774,1.2200758,1.2473136,1.2561082,1.2184526 http://cdn01.tv4.se/polopoly_fs/1.1820990.1330096749!mobileimage/69440933.png http://cdn01.tv4.se/polopoly_fs/1.1820990.1330096749!mobileimage-logo/1533679302.png http://cdn01.tv4.se/polopoly_fs/1.1820990.1330096749!mobileimage-large/1482424087.jpg http://cdn01.tv4.se/polopoly_fs/1.1820990.1330096749!mobileimage-highres/1634405811.png http://cdn01.tv4.se/polopoly_fs/1.1820990.1330096749!mobileimage-logo-highres/3763421800.png http://cdn01.tv4.se/polopoly_fs/1.1820990.1330096749!mobileimage-large-highres/4284775039.jpg http://cdn01.tv4.se/polopoly_fs/1.1820990.1330096749!originallogoimage/3069554332.png http://cdn01.tv4.se/polopoly_fs/1.1820990.1330096749!originalformatimage/2061984389.jpg http://cdn01.tv4.se/polopoly_fs/1.1820990.1330096749!originalcarouselimage/3785568020.jpg Felix Herngren besöker svenska framgångsrika ingenjörer i utlandet. Visas i tv4 http://www.tv4.se/felix_stor_en_ingenjor false http://cdn01.tv4.se/polopoly_fs/1.1820990.1330096749!image/2015762895.png http://cdn01.tv4.se/polopoly_fs/1.1820990.1330096749!smallformatimage/3131363141.png http://cdn01.tv4.se/polopoly_fs/1.1820990.1330096749!categorylarge/2920774124.jpg http://cdn01.tv4.se/polopoly_fs/1.1820990.1330096749!image-large/43958672.jpg http://cdn01.tv4.se/polopoly_fs/1.1820990.1330096749!image-logo/2868613387.png http://cdn01.tv4.se/polopoly_fs/1.1820990.1330096749!small-image-logo/3238090721.png Hela program 4 true false false true 1.1820998 Senaste klippen 4 false true false true Senaste programmen inom Nöje 4 true false true false Alla 1.2521546,1.1927588,1.2518288,1.1969780,1.2473260,1.2440034,1.2344977,1.2522532,1.1969811,1.2488517,1.2661272,1.2488511,1.2582459,1.2181324,1.1854782,1.1969774,1.2200758,1.2473136,1.2561082,1.2184526 http://cdn01.tv4.se/polopoly_fs/1.1993874.1342527437!mobileimage/2638085742.jpg http://cdn01.tv4.se/polopoly_fs/1.1993874.1342527437!mobileimage-logo/4271283865.png http://cdn01.tv4.se/polopoly_fs/1.1993874.1342527437!mobileimage-large/358614358.jpg http://cdn01.tv4.se/polopoly_fs/1.1993874.1342527437!mobileimage-highres/980130969.jpg http://cdn01.tv4.se/polopoly_fs/1.1993874.1342527437!mobileimage-logo-highres/1504254961.png http://cdn01.tv4.se/polopoly_fs/1.1993874.1342527437!mobileimage-large-highres/2992603198.jpg http://cdn01.tv4.se/polopoly_fs/1.1993874.1342527437!originallogoimage/1125803955.png http://cdn01.tv4.se/polopoly_fs/1.1993874.1342527437!originalformatimage/311912540.jpg http://cdn01.tv4.se/polopoly_fs/1.1993874.1342527437!originalcarouselimage/1421731153.png Sju kända personer sadlar om till körledare, och tävlar tillsammans med sina körer om 500 000 kronor att skänka till välgörenhet. Visas i tv4 false http://cdn01.tv4.se/polopoly_fs/1.1993874.1342527437!image/3403687635.jpg http://cdn01.tv4.se/polopoly_fs/1.1993874.1342527437!smallformatimage/418191981.jpg http://cdn01.tv4.se/polopoly_fs/1.1993874.1342527437!categorylarge/2268933333.jpg http://cdn01.tv4.se/polopoly_fs/1.1993874.1342527437!image-large/3355489032.jpg http://cdn01.tv4.se/polopoly_fs/1.1993874.1342527437!image-logo/1886463459.png http://cdn01.tv4.se/polopoly_fs/1.1993874.1342527437!small-image-logo/2300501967.png Hela program 8 true false false true Alla 1.1993879 Senaste klippen 12 false true false true Alla 1.2099567,1.1993874 Senaste programmen inom Nöje 4 true false true false Alla 1.2521546,1.1927588,1.2518288,1.1969780,1.2473260,1.2440034,1.2344977,1.2522532,1.1969811,1.2488517,1.2661272,1.2488511,1.2582459,1.2181324,1.1854782,1.1969774,1.2200758,1.2473136,1.2561082,1.2184526 http://cdn01.tv4.se/polopoly_fs/1.2030592.1342527505!mobileimage/1923467815.jpg http://cdn01.tv4.se/polopoly_fs/1.2030592.1342527505!mobileimage-logo/1927794535.png http://cdn01.tv4.se/polopoly_fs/1.2030592.1342527505!mobileimage-large/104731434.jpg http://cdn01.tv4.se/polopoly_fs/1.2030592.1342527505!mobileimage-highres/859018858.jpg http://cdn01.tv4.se/polopoly_fs/1.2030592.1342527505!mobileimage-logo-highres/1108475480.png http://cdn01.tv4.se/polopoly_fs/1.2030592.1342527505!mobileimage-large-highres/919085589.jpg Nio bortskämda unga kvinnor får pröva på det liv som är verklighet för de flesta vanliga människor. Vana vid festande och shopping har de inte behövt göra många uppoffringar i sitt liv. SE 115.111.227.14 115.111.227.6 25.19.39.117 210.94.41.89 217.67.201.237 217.67.201.162;SE Visas i tv11 true http://cdn01.tv4.se/polopoly_fs/1.2030592.1342527505!image/3370016263.jpg http://cdn01.tv4.se/polopoly_fs/1.2030592.1342527505!smallformatimage/3750752267.jpg http://cdn01.tv4.se/polopoly_fs/1.2030592.1342527505!categorylarge/1411568275.jpg http://cdn01.tv4.se/polopoly_fs/1.2030592.1342527505!image-large/305193.jpg http://cdn01.tv4.se/polopoly_fs/1.2030592.1342527505!image-logo/4219779832.png Hela program 4 true false false false Alla 1.2030604 Senaste programmen inom Nöje 4 true false true false Alla 1.2521546,1.1927588,1.2518288,1.1969780,1.2473260,1.2440034,1.2344977,1.2522532,1.1969811,1.2488517,1.2661272,1.2488511,1.2582459,1.2181324,1.1854782,1.1969774,1.2200758,1.2473136,1.2561082,1.2184526 http://cdn01.tv4.se/polopoly_fs/1.1980105.1342527664!mobileimage/1280237069.jpg http://cdn01.tv4.se/polopoly_fs/1.1980105.1342527664!mobileimage-logo/2733406768.png http://cdn01.tv4.se/polopoly_fs/1.1980105.1342527664!mobileimage-large/847985001.jpg http://cdn01.tv4.se/polopoly_fs/1.1980105.1342527664!mobileimage-highres/1147303292.jpg http://cdn01.tv4.se/polopoly_fs/1.1980105.1342527664!mobileimage-logo-highres/1358851267.png http://cdn01.tv4.se/polopoly_fs/1.1980105.1342527664!mobileimage-large-highres/2229133925.jpg Människor luras att delta i skrämmande situationer som inspirerats av science fictionserier samtidigt som de filmas av dolda kameror. SE;SE 115.111.227.14 115.111.227.6 25.19.39.117 210.94.41.89 217.67.201.237 217.67.201.162 Visas i tv11 true http://cdn01.tv4.se/polopoly_fs/1.1980105.1342527664!image/2006615377.jpg http://cdn01.tv4.se/polopoly_fs/1.1980105.1342527664!smallformatimage/2117834964.jpg http://cdn01.tv4.se/polopoly_fs/1.1980105.1342527664!categorylarge/2154049152.jpg http://cdn01.tv4.se/polopoly_fs/1.1980105.1342527664!image-large/2877575784.jpg http://cdn01.tv4.se/polopoly_fs/1.1980105.1342527664!image-logo/1837346584.png http://cdn01.tv4.se/polopoly_fs/1.1980105.1342527664!small-image-logo/165291739.png Hela program 12 true false false false Alla 1.1980105 Senaste programmen inom Nöje 4 true false true false Alla 1.2521546,1.1927588,1.2518288,1.1969780,1.2473260,1.2440034,1.2344977,1.2522532,1.1969811,1.2488517,1.2661272,1.2488511,1.2582459,1.2181324,1.1854782,1.1969774,1.2200758,1.2473136,1.2561082,1.2184526 http://cdn01.tv4.se/polopoly_fs/1.1965997.1342527739!mobileimage/1305796616.jpg http://cdn01.tv4.se/polopoly_fs/1.1965997.1342527739!mobileimage-logo/3977573653.png http://cdn01.tv4.se/polopoly_fs/1.1965997.1342527739!mobileimage-large/1774195962.jpg http://cdn01.tv4.se/polopoly_fs/1.1965997.1342527739!mobileimage-highres/978418974.jpg http://cdn01.tv4.se/polopoly_fs/1.1965997.1342527739!mobileimage-logo-highres/3048733937.png http://cdn01.tv4.se/polopoly_fs/1.1965997.1342527739!mobileimage-large-highres/3267941109.jpg Två kvinnor byter familj under två veckor. Första veckan får de följa familjens regler, men under andra veckan får de själv diktera reglerna. SE 129.35.209.170 58.247.178.245 115.111.227.14 115.111.227.6 25.19.39.117 210.94.41.89 217.67.201.237 217.67.201.162;SE 129.35.209.170 58.247.178.245 115.111.227.14 115.111.227.6 25.19.39.117 210.94.41.89 217.67.201.237 217.67.201.162 Visas i tv4plus true http://cdn01.tv4.se/polopoly_fs/1.1965997.1342527739!image/807230401.jpg http://cdn01.tv4.se/polopoly_fs/1.1965997.1342527739!smallformatimage/54806007.jpg http://cdn01.tv4.se/polopoly_fs/1.1965997.1342527739!categorylarge/2540280379.jpg http://cdn01.tv4.se/polopoly_fs/1.1965997.1342527739!image-large/3276791937.jpg http://cdn01.tv4.se/polopoly_fs/1.1965997.1342527739!image-logo/3024123528.png http://cdn01.tv4.se/polopoly_fs/1.1965997.1342527739!small-image-logo/1650799892.png Hela program 12 true false false false 1.1966005 Senaste programmen inom Nöje 4 true false true false Alla 1.2521546,1.1927588,1.2518288,1.1969780,1.2473260,1.2440034,1.2344977,1.2522532,1.1969811,1.2488517,1.2661272,1.2488511,1.2582459,1.2181324,1.1854782,1.1969774,1.2200758,1.2473136,1.2561082,1.2184526 http://cdn01.tv4.se/polopoly_fs/1.1887718.1342527883!mobileimage/2883272487.jpg http://cdn01.tv4.se/polopoly_fs/1.1887718.1342527883!mobileimage-logo/418165839.png http://cdn01.tv4.se/polopoly_fs/1.1887718.1342527883!mobileimage-large/3576796214.jpg http://cdn01.tv4.se/polopoly_fs/1.1887718.1342527883!mobileimage-highres/246415217.jpg http://cdn01.tv4.se/polopoly_fs/1.1887718.1342527883!mobileimage-logo-highres/687806970.png http://cdn01.tv4.se/polopoly_fs/1.1887718.1342527883!mobileimage-large-highres/1073882872.jpg http://cdn01.tv4.se/polopoly_fs/1.1887718.1342527883!originallogoimage/3514227268.png http://cdn01.tv4.se/polopoly_fs/1.1887718.1342527883!originalformatimage/1784498288.jpg http://cdn01.tv4.se/polopoly_fs/1.1887718.1342527883!originalcarouselimage/1620093425.jpg I Stockholms societet finns många starka, framgångsrika kvinnor. Möt nätverksexperten Grete Qviberg, entreprenören Tone Oppenstam och modedrottningen Gaby Borglund. Visas i tv4plus http://www.tv4.se/ladies_pa_ostermalm true http://cdn01.tv4.se/polopoly_fs/1.1887718.1342527883!image/761009740.jpg http://cdn01.tv4.se/polopoly_fs/1.1887718.1342527883!smallformatimage/2002765089.jpg http://cdn01.tv4.se/polopoly_fs/1.1887718.1342527883!categorylarge/6414418.png http://cdn01.tv4.se/polopoly_fs/1.1887718.1342527883!image-large/240204150.png http://cdn01.tv4.se/polopoly_fs/1.1887718.1342527883!image-logo/1788453935.png http://cdn01.tv4.se/polopoly_fs/1.1887718.1342527883!small-image-logo/3289236328.png Hela program 12 true false false true 1.1887808 Senaste klippen 8 false true false false 1.1887807 Senaste programmen inom Nöje 4 true false true false Alla 1.2521546,1.1927588,1.2518288,1.1969780,1.2473260,1.2440034,1.2344977,1.2522532,1.1969811,1.2488517,1.2661272,1.2488511,1.2582459,1.2181324,1.1854782,1.1969774,1.2200758,1.2473136,1.2561082,1.2184526 http://cdn01.tv4.se/polopoly_fs/1.1946393.1330096572!mobileimage/4291691529.jpg http://cdn01.tv4.se/polopoly_fs/1.1946393.1330096572!mobileimage-logo/792046090.png http://cdn01.tv4.se/polopoly_fs/1.1946393.1330096572!mobileimage-highres/2176530734.jpg http://cdn01.tv4.se/polopoly_fs/1.1946393.1330096572!mobileimage-logo-highres/3710369017.png http://cdn01.tv4.se/polopoly_fs/1.1946393.1330096572!originallogoimage/1320649199.png http://cdn01.tv4.se/polopoly_fs/1.1946393.1330096572!originalformatimage/1714727370.jpg http://cdn01.tv4.se/polopoly_fs/1.1946393.1330096572!originalcarouselimage/2909428458.jpg Visas i tv4 false Hela program 12 true false false false Alla 1.1946397 Senaste programmen inom Nöje 4 true false true false Alla 1.2521546,1.1927588,1.2518288,1.1969780,1.2473260,1.2440034,1.2344977,1.2522532,1.1969811,1.2488517,1.2661272,1.2488511,1.2582459,1.2181324,1.1854782,1.1969774,1.2200758,1.2473136,1.2561082,1.2184526 http://cdn01.tv4.se/polopoly_fs/1.1889566.1330096549!mobileimage/2422709359.jpg http://cdn01.tv4.se/polopoly_fs/1.1889566.1330096549!mobileimage-logo/2807836073.png http://cdn01.tv4.se/polopoly_fs/1.1889566.1330096549!mobileimage-large/1077174648.jpg http://cdn01.tv4.se/polopoly_fs/1.1889566.1330096549!mobileimage-highres/20155937.jpg http://cdn01.tv4.se/polopoly_fs/1.1889566.1330096549!mobileimage-logo-highres/1431190362.png http://cdn01.tv4.se/polopoly_fs/1.1889566.1330096549!mobileimage-large-highres/3293949378.jpg http://cdn01.tv4.se/polopoly_fs/1.1889566.1330096549!originallogoimage/2368881866.png http://cdn01.tv4.se/polopoly_fs/1.1889566.1330096549!originalformatimage/252879522.jpg http://cdn01.tv4.se/polopoly_fs/1.1889566.1330096549!originalcarouselimage/2545074007.jpg I denna realityserie följer kameran fem dansbandsbrudar när de under årets varmaste månader sjunger sig igenom landets dansbandsställen. Visas i tv4plus true http://cdn01.tv4.se/polopoly_fs/1.1889566.1330096549!image/706480207.jpg http://cdn01.tv4.se/polopoly_fs/1.1889566.1330096549!smallformatimage/1028499011.jpg http://cdn01.tv4.se/polopoly_fs/1.1889566.1330096549!categorylarge/1519934455.jpg http://cdn01.tv4.se/polopoly_fs/1.1889566.1330096549!image-large/2133300942.jpg http://cdn01.tv4.se/polopoly_fs/1.1889566.1330096549!image-logo/3063037164.png http://cdn01.tv4.se/polopoly_fs/1.1889566.1330096549!small-image-logo/4667792.png Hela program 12 true false false true 1.1889566 Senaste klippen 8 false true false false 1.1889581 Senaste programmen inom Nöje 4 true false true false Alla 1.2521546,1.1927588,1.2518288,1.1969780,1.2473260,1.2440034,1.2344977,1.2522532,1.1969811,1.2488517,1.2661272,1.2488511,1.2582459,1.2181324,1.1854782,1.1969774,1.2200758,1.2473136,1.2561082,1.2184526 http://cdn01.tv4.se/polopoly_fs/1.1835450.1330096531!mobileimage/2790796497.jpg http://cdn01.tv4.se/polopoly_fs/1.1835450.1330096531!mobileimage-logo/1804579344.png http://cdn01.tv4.se/polopoly_fs/1.1835450.1330096531!mobileimage-large/2354297682.jpg http://cdn01.tv4.se/polopoly_fs/1.1835450.1330096531!mobileimage-highres/880673146.jpg http://cdn01.tv4.se/polopoly_fs/1.1835450.1330096531!mobileimage-logo-highres/675374335.png http://cdn01.tv4.se/polopoly_fs/1.1835450.1330096531!mobileimage-large-highres/3483200957.jpg Förkväll är ett vardagslyxigt program om allt det senaste inom kändisvärlden, matlagningstrender, mode, skönhet och dejting. Visas i tv4 http://www.tv4.se/forkvall true http://cdn01.tv4.se/polopoly_fs/1.1835450.1330096531!image/234490149.jpg http://cdn01.tv4.se/polopoly_fs/1.1835450.1330096531!smallformatimage/3957999291.jpg http://cdn01.tv4.se/polopoly_fs/1.1835450.1330096531!categorylarge/1031810456.png http://cdn01.tv4.se/polopoly_fs/1.1835450.1330096531!image-large/3316498030.png http://cdn01.tv4.se/polopoly_fs/1.1835450.1330096531!image-logo/495009474.png http://cdn01.tv4.se/polopoly_fs/1.1835450.1330096531!small-image-logo/3924872848.png Hela program 4 true false false true 1.1835450 Senaste klippen 12 true true false false 1.1835476 Senaste programmen inom Nöje 4 true false true false Alla 1.2521546,1.1927588,1.2518288,1.1969780,1.2473260,1.2440034,1.2344977,1.2522532,1.1969811,1.2488517,1.2661272,1.2488511,1.2582459,1.2181324,1.1854782,1.1969774,1.2200758,1.2473136,1.2561082,1.2184526 http://cdn01.tv4.se/polopoly_fs/1.1820832.1330096476!mobileimage/1650200648.jpg http://cdn01.tv4.se/polopoly_fs/1.1820832.1330096476!mobileimage-logo/3131074368.png http://cdn01.tv4.se/polopoly_fs/1.1820832.1330096476!mobileimage-large/2607358997.jpg http://cdn01.tv4.se/polopoly_fs/1.1820832.1330096476!mobileimage-highres/1163296073.jpg http://cdn01.tv4.se/polopoly_fs/1.1820832.1330096476!mobileimage-logo-highres/2665928432.png http://cdn01.tv4.se/polopoly_fs/1.1820832.1330096476!mobileimage-large-highres/3207566757.jpg http://cdn01.tv4.se/polopoly_fs/1.1820832.1330096476!originallogoimage/2781444456.png http://cdn01.tv4.se/polopoly_fs/1.1820832.1330096476!originalformatimage/2878020753.jpg http://cdn01.tv4.se/polopoly_fs/1.1820832.1330096476!originalcarouselimage/807212272.jpg Vad är en cirkus med Måns Möller om inte galen, skrattframkallande och alldeles, alldeles underbar? Visas i tv4 http://www.tv4.se/cirkus_moller true http://cdn01.tv4.se/polopoly_fs/1.1820832.1330096476!image/12245452.jpg http://cdn01.tv4.se/polopoly_fs/1.1820832.1330096476!smallformatimage/2640383870.jpg http://cdn01.tv4.se/polopoly_fs/1.1820832.1330096476!categorylarge/2952778813.png http://cdn01.tv4.se/polopoly_fs/1.1820832.1330096476!image-large/3530796063.png http://cdn01.tv4.se/polopoly_fs/1.1820832.1330096476!image-logo/2229395449.png http://cdn01.tv4.se/polopoly_fs/1.1820832.1330096476!small-image-logo/523000867.png Hela program 12 true false false true 1.1820832 Senaste klippen 12 false true false true 1.1820852 Senaste programmen inom Nöje 4 true false true false Alla 1.2521546,1.1927588,1.2518288,1.1969780,1.2473260,1.2440034,1.2344977,1.2522532,1.1969811,1.2488517,1.2661272,1.2488511,1.2582459,1.2181324,1.1854782,1.1969774,1.2200758,1.2473136,1.2561082,1.2184526 http://cdn01.tv4.se/polopoly_fs/1.1821137.1330096448!mobileimage/2009812727.png http://cdn01.tv4.se/polopoly_fs/1.1821137.1330096448!mobileimage-logo/3635689767.png http://cdn01.tv4.se/polopoly_fs/1.1821137.1330096448!mobileimage-large/2633373716.jpg http://cdn01.tv4.se/polopoly_fs/1.1821137.1330096448!mobileimage-highres/3862836572.png http://cdn01.tv4.se/polopoly_fs/1.1821137.1330096448!mobileimage-logo-highres/1557525917.png http://cdn01.tv4.se/polopoly_fs/1.1821137.1330096448!mobileimage-large-highres/412603566.jpg http://cdn01.tv4.se/polopoly_fs/1.1821137.1330096448!originallogoimage/3853216247.png http://cdn01.tv4.se/polopoly_fs/1.1821137.1330096448!originalformatimage/3022415384.jpg http://cdn01.tv4.se/polopoly_fs/1.1821137.1330096448!originalcarouselimage/41377973.jpg Klassiska dansnummer framförda med glimten i ögat av svenska kändisar - det är Dansfeber. SE 129.35.209.170 58.247.178.245 115.111.227.14 115.111.227.6 25.19.39.117 210.94.41.89 217.67.201.237 217.67.201.162 Visas i tv4 http://www.tv4.se/dansfeber true http://cdn01.tv4.se/polopoly_fs/1.1821137.1330096448!image/1636149439.png http://cdn01.tv4.se/polopoly_fs/1.1821137.1330096448!smallformatimage/311834608.png http://cdn01.tv4.se/polopoly_fs/1.1821137.1330096448!categorylarge/1828278792.png http://cdn01.tv4.se/polopoly_fs/1.1821137.1330096448!image-large/2817445527.jpg http://cdn01.tv4.se/polopoly_fs/1.1821137.1330096448!image-logo/636278989.png http://cdn01.tv4.se/polopoly_fs/1.1821137.1330096448!small-image-logo/1010826336.png Hela program 12 true false false true 1.1821148 Senaste klippen 12 false true false true 1.1821146 Tittarnas dansfilmer 4 false false false true 1.1856463 Senaste programmen inom Nöje 4 true false true false Alla 1.2521546,1.1927588,1.2518288,1.1969780,1.2473260,1.2440034,1.2344977,1.2522532,1.1969811,1.2488517,1.2661272,1.2488511,1.2582459,1.2181324,1.1854782,1.1969774,1.2200758,1.2473136,1.2561082,1.2184526 http://cdn01.tv4.se/polopoly_fs/1.1927588.1342528401!originallogoimage/3015036800.png http://cdn01.tv4.se/polopoly_fs/1.1927588.1342528401!originalformatimage/2604066725.jpg http://cdn01.tv4.se/polopoly_fs/1.1927588.1342528401!originalcarouselimage/2702712931.jpg Här kan du se individuella program som visats inom nöjeskategorin i TV4:s kanaler. SE 115.111.227.14 115.111.227.6 25.19.39.117 210.94.41.89 217.67.201.237 217.67.201.162 tv4 false Hela program 12 true false false false 1.1927591 Senaste programmen inom Nöje 4 true false true false Alla 1.2521546,1.1927588,1.2518288,1.1969780,1.2473260,1.2440034,1.2344977,1.2522532,1.1969811,1.2488517,1.2661272,1.2488511,1.2582459,1.2181324,1.1854782,1.1969774,1.2200758,1.2473136,1.2561082,1.2184526 http://cdn01.tv4.se/polopoly_fs/1.1980043.1342528025!mobileimage/2190436156.jpg http://cdn01.tv4.se/polopoly_fs/1.1980043.1342528025!mobileimage-logo/621306758.png http://cdn01.tv4.se/polopoly_fs/1.1980043.1342528025!mobileimage-large/2497866449.jpg http://cdn01.tv4.se/polopoly_fs/1.1980043.1342528025!mobileimage-highres/2716948193.jpg http://cdn01.tv4.se/polopoly_fs/1.1980043.1342528025!mobileimage-logo-highres/3998062267.png http://cdn01.tv4.se/polopoly_fs/1.1980043.1342528025!mobileimage-large-highres/850409022.jpg http://cdn01.tv4.se/polopoly_fs/1.1980043.1342528025!originallogoimage/279995245.png http://cdn01.tv4.se/polopoly_fs/1.1980043.1342528025!originalformatimage/4143866314.jpg http://cdn01.tv4.se/polopoly_fs/1.1980043.1342528025!originalcarouselimage/2108428135.jpg Serien följer människor som vill förbättra sitt utseende genom hela processen, från första mötet med läkaren tills ärren har läkt och drömmen blivit verklighet. SE;SE 115.111.227.14 115.111.227.6 25.19.39.117 210.94.41.89 217.67.201.237 217.67.201.162 Visas i tv11 true http://cdn01.tv4.se/polopoly_fs/1.1980043.1342528025!image/923301333.jpg http://cdn01.tv4.se/polopoly_fs/1.1980043.1342528025!smallformatimage/453240418.jpg http://cdn01.tv4.se/polopoly_fs/1.1980043.1342528025!categorylarge/1068437529.jpg http://cdn01.tv4.se/polopoly_fs/1.1980043.1342528025!image-large/469593089.jpg http://cdn01.tv4.se/polopoly_fs/1.1980043.1342528025!image-logo/698906607.png http://cdn01.tv4.se/polopoly_fs/1.1980043.1342528025!small-image-logo/1822784007.png Hela program 4 true false false false 1.1980068 Senaste programmen inom Nöje 4 true false true false Alla 1.2521546,1.1927588,1.2518288,1.1969780,1.2473260,1.2440034,1.2344977,1.2522532,1.1969811,1.2488517,1.2661272,1.2488511,1.2582459,1.2181324,1.1854782,1.1969774,1.2200758,1.2473136,1.2561082,1.2184526 http://cdn01.tv4.se/polopoly_fs/1.1980094.1330096381!mobileimage/4132270043.jpg http://cdn01.tv4.se/polopoly_fs/1.1980094.1330096381!mobileimage-logo/1000010010.png http://cdn01.tv4.se/polopoly_fs/1.1980094.1330096381!mobileimage-large/3695638616.jpg http://cdn01.tv4.se/polopoly_fs/1.1980094.1330096381!mobileimage-highres/1684750960.jpg http://cdn01.tv4.se/polopoly_fs/1.1980094.1330096381!mobileimage-logo-highres/2018781173.png http://cdn01.tv4.se/polopoly_fs/1.1980094.1330096381!mobileimage-large-highres/2676502199.jpg En av rocken och heavy metaltidens stora stjärnor, Poisons sångare Bret Michaels, samlar 20 kvinnor i en datingshow för att se vem av dem som ska få dela hans hjärta och liv. SE 115.111.227.14 115.111.227.6 25.19.39.117 210.94.41.89 217.67.201.237 217.67.201.162;SE Visas i tv11 true http://cdn01.tv4.se/polopoly_fs/1.1980094.1330096381!image/1575963183.jpg http://cdn01.tv4.se/polopoly_fs/1.1980094.1330096381!smallformatimage/3154052529.jpg http://cdn01.tv4.se/polopoly_fs/1.1980094.1330096381!categorylarge/2825222123.jpg http://cdn01.tv4.se/polopoly_fs/1.1980094.1330096381!image-large/1346954269.jpg http://cdn01.tv4.se/polopoly_fs/1.1980094.1330096381!image-logo/2344914563.png http://cdn01.tv4.se/polopoly_fs/1.1980094.1330096381!small-image-logo/3118828954.png Hela program 4 true false false false 1.1980098 Senaste programmen inom Nöje 4 true false true false Alla 1.2521546,1.1927588,1.2518288,1.1969780,1.2473260,1.2440034,1.2344977,1.2522532,1.1969811,1.2488517,1.2661272,1.2488511,1.2582459,1.2181324,1.1854782,1.1969774,1.2200758,1.2473136,1.2561082,1.2184526 http://cdn01.tv4.se/polopoly_fs/1.1980123.1330096358!mobileimage/140596087.jpg http://cdn01.tv4.se/polopoly_fs/1.1980123.1330096358!mobileimage-logo/1928099940.png http://cdn01.tv4.se/polopoly_fs/1.1980123.1330096358!mobileimage-large/1767694799.jpg http://cdn01.tv4.se/polopoly_fs/1.1980123.1330096358!mobileimage-highres/4028662575.jpg http://cdn01.tv4.se/polopoly_fs/1.1980123.1330096358!mobileimage-logo-highres/2164158103.png http://cdn01.tv4.se/polopoly_fs/1.1980123.1330096358!mobileimage-large-highres/1616706367.jpg Serien tar reda på vad som gör oss attraktiva för det motsatta könet, och i olika experiment och intervjuer med kändisar och sexualexperter kommer många roliga och intressanta frågor upp. SE 115.111.227.14 115.111.227.6 25.19.39.117 210.94.41.89 217.67.201.237 217.67.201.162;SE Visas i tv11 true http://cdn01.tv4.se/polopoly_fs/1.1980123.1330096358!image/3506605753.jpg http://cdn01.tv4.se/polopoly_fs/1.1980123.1330096358!smallformatimage/2217452293.jpg http://cdn01.tv4.se/polopoly_fs/1.1980123.1330096358!categorylarge/2956481540.jpg http://cdn01.tv4.se/polopoly_fs/1.1980123.1330096358!image-large/516087346.jpg http://cdn01.tv4.se/polopoly_fs/1.1980123.1330096358!image-logo/708712018.png Hela program 4 true false false false 1.1980125 Senaste programmen inom Nöje 4 true false true false Alla 1.2521546,1.1927588,1.2518288,1.1969780,1.2473260,1.2440034,1.2344977,1.2522532,1.1969811,1.2488517,1.2661272,1.2488511,1.2582459,1.2181324,1.1854782,1.1969774,1.2200758,1.2473136,1.2561082,1.2184526 http://cdn01.tv4.se/polopoly_fs/1.1980416.1330096339!mobileimage/1404141190.jpg http://cdn01.tv4.se/polopoly_fs/1.1980416.1330096339!mobileimage-logo/2183199971.png http://cdn01.tv4.se/polopoly_fs/1.1980416.1330096339!mobileimage-large/452766972.jpg http://cdn01.tv4.se/polopoly_fs/1.1980416.1330096339!mobileimage-highres/304554699.jpg http://cdn01.tv4.se/polopoly_fs/1.1980416.1330096339!mobileimage-logo-highres/4063642032.png http://cdn01.tv4.se/polopoly_fs/1.1980416.1330096339!mobileimage-large-highres/1496480275.jpg I jakten på äkta skönhet genomgår tio vackra deltagare olika test för att se om de även har en vacker personlighet. Vanilla Minnillo, Cheryl Tiegs och Nolé Marin sitter i juryn som ska bestämma vem av de sex kvinnorna och fyra männen som har en vacker in- och utsida. Visas i tv411 true http://cdn01.tv4.se/polopoly_fs/1.1980416.1330096339!image/3922389670.jpg http://cdn01.tv4.se/polopoly_fs/1.1980416.1330096339!smallformatimage/4271588522.jpg http://cdn01.tv4.se/polopoly_fs/1.1980416.1330096339!categorylarge/1860117327.jpg http://cdn01.tv4.se/polopoly_fs/1.1980416.1330096339!image-large/2532487353.jpg http://cdn01.tv4.se/polopoly_fs/1.1980416.1330096339!image-logo/1300159015.png Hela program 4 true false false false 1.1980417 Senaste programmen inom Nöje 4 true false true false Alla 1.2521546,1.1927588,1.2518288,1.1969780,1.2473260,1.2440034,1.2344977,1.2522532,1.1969811,1.2488517,1.2661272,1.2488511,1.2582459,1.2181324,1.1854782,1.1969774,1.2200758,1.2473136,1.2561082,1.2184526 http://cdn01.tv4.se/polopoly_fs/1.1980419.1330096315!mobileimage/1447860634.jpg http://cdn01.tv4.se/polopoly_fs/1.1980419.1330096315!mobileimage-logo/2728458755.png http://cdn01.tv4.se/polopoly_fs/1.1980419.1330096315!mobileimage-large/3598263886.jpg http://cdn01.tv4.se/polopoly_fs/1.1980419.1330096315!mobileimage-highres/1583362795.jpg http://cdn01.tv4.se/polopoly_fs/1.1980419.1330096315!mobileimage-logo-highres/2455161660.png http://cdn01.tv4.se/polopoly_fs/1.1980419.1330096315!mobileimage-large-highres/3868137329.jpg Här driver man med realitybaserade tävlingsprogram. En ny person tror i varje avsnitt att han eller hon har blivit uttagen till ett tv-program, men i verkligheten är programmen påhittade och alla andra är skådespelare. SE 115.111.227.14 115.111.227.6 25.19.39.117 210.94.41.89 217.67.201.237 217.67.201.162;SE Visas i tv11 true http://cdn01.tv4.se/polopoly_fs/1.1980419.1330096315!image/1838727878.jpg http://cdn01.tv4.se/polopoly_fs/1.1980419.1330096315!smallformatimage/1681514307.jpg http://cdn01.tv4.se/polopoly_fs/1.1980419.1330096315!categorylarge/2221271031.jpg http://cdn01.tv4.se/polopoly_fs/1.1980419.1330096315!image-large/3494092109.jpg http://cdn01.tv4.se/polopoly_fs/1.1980419.1330096315!image-logo/734236572.png Hela program 4 true false false false 1.1980420 Senaste programmen inom Nöje 4 true false true false Alla 1.2521546,1.1927588,1.2518288,1.1969780,1.2473260,1.2440034,1.2344977,1.2522532,1.1969811,1.2488517,1.2661272,1.2488511,1.2582459,1.2181324,1.1854782,1.1969774,1.2200758,1.2473136,1.2561082,1.2184526 http://cdn01.tv4.se/polopoly_fs/1.1980427.1342528132!mobileimage/2404120090.jpg http://cdn01.tv4.se/polopoly_fs/1.1980427.1342528132!mobileimage-logo/96814.png http://cdn01.tv4.se/polopoly_fs/1.1980427.1342528132!mobileimage-large/3958890977.jpg http://cdn01.tv4.se/polopoly_fs/1.1980427.1342528132!mobileimage-highres/2078852822.jpg http://cdn01.tv4.se/polopoly_fs/1.1980427.1342528132!mobileimage-logo-highres/2805923654.png http://cdn01.tv4.se/polopoly_fs/1.1980427.1342528132!mobileimage-large-highres/1288201353.jpg I Sexfällan får människor i förhållanden hjälp att avgöra om deras partner är otrogen. Detektiven Sandra Hope och iscensätter en lockande situation och filmar allting. SE 129.35.209.170 58.247.178.245 115.111.227.14 115.111.227.6 25.19.39.117 210.94.41.89 217.67.201.237 217.67.201.162 Visas i tv11 true http://cdn01.tv4.se/polopoly_fs/1.1980427.1342528132!image/4233321269.jpg http://cdn01.tv4.se/polopoly_fs/1.1980427.1342528132!smallformatimage/2403386490.jpg http://cdn01.tv4.se/polopoly_fs/1.1980427.1342528132!categorylarge/2041235554.jpg http://cdn01.tv4.se/polopoly_fs/1.1980427.1342528132!image-large/915888063.jpg http://cdn01.tv4.se/polopoly_fs/1.1980427.1342528132!image-logo/2397487444.png Hela program 4 true false false false 1.1980432 Senaste programmen inom Nöje 4 true false true false Alla 1.2521546,1.1927588,1.2518288,1.1969780,1.2473260,1.2440034,1.2344977,1.2522532,1.1969811,1.2488517,1.2661272,1.2488511,1.2582459,1.2181324,1.1854782,1.1969774,1.2200758,1.2473136,1.2561082,1.2184526 http://cdn01.tv4.se/polopoly_fs/1.1980436.1342528213!mobileimage/1637064136.jpg http://cdn01.tv4.se/polopoly_fs/1.1980436.1342528213!mobileimage-logo/1178200681.png http://cdn01.tv4.se/polopoly_fs/1.1980436.1342528213!mobileimage-large/3720312563.jpg http://cdn01.tv4.se/polopoly_fs/1.1980436.1342528213!mobileimage-highres/3097988063.jpg http://cdn01.tv4.se/polopoly_fs/1.1980436.1342528213!mobileimage-logo-highres/100088966.png http://cdn01.tv4.se/polopoly_fs/1.1980436.1342528213!mobileimage-large-highres/3987528518.jpg USA:s värsta bilförare får tävlingsdeltagare mötas i galna grenar för att inte bli korade till den sämsta föraren i staden. Den som kommer sist får sin bil förstörd och kommer vidare till finalomgången. SE 115.111.227.14 115.111.227.6 25.19.39.117 210.94.41.89 217.67.201.237 217.67.201.162;SE Visas i tv11 true http://cdn01.tv4.se/polopoly_fs/1.1980436.1342528213!image/3280990346.jpg http://cdn01.tv4.se/polopoly_fs/1.1980436.1342528213!smallformatimage/4227460747.jpg http://cdn01.tv4.se/polopoly_fs/1.1980436.1342528213!categorylarge/1219195147.jpg http://cdn01.tv4.se/polopoly_fs/1.1980436.1342528213!image-large/1541651233.jpg http://cdn01.tv4.se/polopoly_fs/1.1980436.1342528213!image-logo/4035903933.png Hela program 4 true false false false 1.1980438 Senaste programmen inom Nöje 4 true false true false Alla 1.2521546,1.1927588,1.2518288,1.1969780,1.2473260,1.2440034,1.2344977,1.2522532,1.1969811,1.2488517,1.2661272,1.2488511,1.2582459,1.2181324,1.1854782,1.1969774,1.2200758,1.2473136,1.2561082,1.2184526 http://cdn01.tv4.se/polopoly_fs/1.1981499.1342528296!mobileimage/1786034872.jpg http://cdn01.tv4.se/polopoly_fs/1.1981499.1342528296!mobileimage-logo/4044504797.png http://cdn01.tv4.se/polopoly_fs/1.1981499.1342528296!mobileimage-large/1807094375.jpg http://cdn01.tv4.se/polopoly_fs/1.1981499.1342528296!mobileimage-highres/3441612879.jpg http://cdn01.tv4.se/polopoly_fs/1.1981499.1342528296!mobileimage-logo-highres/1445837749.png http://cdn01.tv4.se/polopoly_fs/1.1981499.1342528296!mobileimage-large-highres/2243795650.jpg Serien följer polisens arbete att få bukt med narkotika, prostitution och olagligt spelande i Memphis och Orlando. SE;SE 115.111.227.14 115.111.227.6 25.19.39.117 210.94.41.89 217.67.201.237 217.67.201.162 Visas i tv11 true http://cdn01.tv4.se/polopoly_fs/1.1981499.1342528296!image/1034510853.jpg http://cdn01.tv4.se/polopoly_fs/1.1981499.1342528296!smallformatimage/4020526779.jpg http://cdn01.tv4.se/polopoly_fs/1.1981499.1342528296!categorylarge/4159800136.jpg http://cdn01.tv4.se/polopoly_fs/1.1981499.1342528296!image-large/288243131.jpg http://cdn01.tv4.se/polopoly_fs/1.1981499.1342528296!image-logo/327937622.png Hela program 4 true false false false 1.1981504 Senaste programmen inom Nöje 4 true false true false Alla 1.2521546,1.1927588,1.2518288,1.1969780,1.2473260,1.2440034,1.2344977,1.2522532,1.1969811,1.2488517,1.2661272,1.2488511,1.2582459,1.2181324,1.1854782,1.1969774,1.2200758,1.2473136,1.2561082,1.2184526 http://cdn01.tv4.se/polopoly_fs/1.1981511.1330096140!mobileimage/234458463.jpg http://cdn01.tv4.se/polopoly_fs/1.1981511.1330096140!mobileimage-large/3662067270.jpg http://cdn01.tv4.se/polopoly_fs/1.1981511.1330096140!mobileimage-highres/2054950985.jpg http://cdn01.tv4.se/polopoly_fs/1.1981511.1330096140!mobileimage-large-highres/2196094882.jpg Den här realityshowen hjälper människor som misstänker att deras partners bedrar dem med andra. Ett bevakningsteam rycker ut och skuggar den misstänkt otrogna partnern och samlar bevis för att bekräfta misstankarna. SE;SE 115.111.227.14 115.111.227.6 25.19.39.117 210.94.41.89 217.67.201.237 217.67.201.162 Visas i tv11 true http://cdn01.tv4.se/polopoly_fs/1.1981511.1330096140!image/3376554456.jpg http://cdn01.tv4.se/polopoly_fs/1.1981511.1330096140!smallformatimage/114027871.jpg http://cdn01.tv4.se/polopoly_fs/1.1981511.1330096140!categorylarge/1440853642.jpg http://cdn01.tv4.se/polopoly_fs/1.1981511.1330096140!image-large/3079414057.jpg http://cdn01.tv4.se/polopoly_fs/1.1981511.1330096140!image-logo/4100791263.png http://cdn01.tv4.se/polopoly_fs/1.1981511.1330096140!small-image-logo/575166531.png Hela program 4 true false false false 1.1981512 Senaste programmen inom Nöje 4 true false true false Alla 1.2521546,1.1927588,1.2518288,1.1969780,1.2473260,1.2440034,1.2344977,1.2522532,1.1969811,1.2488517,1.2661272,1.2488511,1.2582459,1.2181324,1.1854782,1.1969774,1.2200758,1.2473136,1.2561082,1.2184526 http://cdn01.tv4.se/polopoly_fs/1.1981817.1329926450!mobileimage/2943177670.jpg http://cdn01.tv4.se/polopoly_fs/1.1981817.1329926450!mobileimage-logo/1961612172.png http://cdn01.tv4.se/polopoly_fs/1.1981817.1329926450!mobileimage-large/3517494434.jpg http://cdn01.tv4.se/polopoly_fs/1.1981817.1329926450!mobileimage-highres/2806118583.jpg http://cdn01.tv4.se/polopoly_fs/1.1981817.1329926450!mobileimage-logo-highres/3215861425.png http://cdn01.tv4.se/polopoly_fs/1.1981817.1329926450!mobileimage-large-highres/1744727982.jpg Programledarna Filip Hammar och Fredrik Wikingsson beskriver programmet som "ett wake up-call för ett slumrande u-land" - och med u-land avser de Sverige. Visas i tv4 true http://cdn01.tv4.se/polopoly_fs/1.1981817.1329926450!image/2495154330.jpg http://cdn01.tv4.se/polopoly_fs/1.1981817.1329926450!smallformatimage/2635601183.jpg http://cdn01.tv4.se/polopoly_fs/1.1981817.1329926450!categorylarge/1665639243.jpg http://cdn01.tv4.se/polopoly_fs/1.1981817.1329926450!image-large/1218961315.jpg http://cdn01.tv4.se/polopoly_fs/1.1981817.1329926450!image-logo/1794467522.png Hela program 4 true false false false 1.1981832 Senaste programmen inom Nöje 4 true false true false Alla 1.2521546,1.1927588,1.2518288,1.1969780,1.2473260,1.2440034,1.2344977,1.2522532,1.1969811,1.2488517,1.2661272,1.2488511,1.2582459,1.2181324,1.1854782,1.1969774,1.2200758,1.2473136,1.2561082,1.2184526 http://cdn01.tv4.se/polopoly_fs/1.2069543.1329926427!mobileimage/933276558.jpg http://cdn01.tv4.se/polopoly_fs/1.2069543.1329926427!mobileimage-logo/2539699859.png http://cdn01.tv4.se/polopoly_fs/1.2069543.1329926427!mobileimage-large/3760165015.jpg http://cdn01.tv4.se/polopoly_fs/1.2069543.1329926427!mobileimage-highres/1076180632.jpg http://cdn01.tv4.se/polopoly_fs/1.2069543.1329926427!mobileimage-logo-highres/3485710199.png http://cdn01.tv4.se/polopoly_fs/1.2069543.1329926427!mobileimage-large-highres/3099367795.jpg SE 129.35.209.170 58.247.178.245 115.111.227.14 115.111.227.6 25.19.39.117 210.94.41.89 217.67.201.237 217.67.201.162 Visas i tv4 true http://cdn01.tv4.se/polopoly_fs/1.2069543.1329926427!image/4078634761.jpg http://cdn01.tv4.se/polopoly_fs/1.2069543.1329926427!smallformatimage/1016253326.jpg http://cdn01.tv4.se/polopoly_fs/1.2069543.1329926427!categorylarge/1874364507.jpg http://cdn01.tv4.se/polopoly_fs/1.2069543.1329926427!image-large/2379548664.jpg http://cdn01.tv4.se/polopoly_fs/1.2069543.1329926427!image-logo/3459529998.png http://cdn01.tv4.se/polopoly_fs/1.2069543.1329926427!small-image-logo/403799698.png Hela program 4 true false false false Alla 1.2069602 Senaste programmen inom Nöje 4 true false true false Alla 1.2521546,1.1927588,1.2518288,1.1969780,1.2473260,1.2440034,1.2344977,1.2522532,1.1969811,1.2488517,1.2661272,1.2488511,1.2582459,1.2181324,1.1854782,1.1969774,1.2200758,1.2473136,1.2561082,1.2184526 http://cdn01.tv4.se/polopoly_fs/1.2086506.1329926410!mobileimage/1138459059.jpg http://cdn01.tv4.se/polopoly_fs/1.2086506.1329926410!mobileimage-logo/2269799207.png http://cdn01.tv4.se/polopoly_fs/1.2086506.1329926410!mobileimage-large/661100104.jpg http://cdn01.tv4.se/polopoly_fs/1.2086506.1329926410!mobileimage-highres/1343220524.jpg http://cdn01.tv4.se/polopoly_fs/1.2086506.1329926410!mobileimage-logo-highres/3756616387.png http://cdn01.tv4.se/polopoly_fs/1.2086506.1329926410!mobileimage-large-highres/2153255712.jpg Mark och Jeremy har ett ohälsosamt beroende av varandra, ett beroende som ofta leder till frustration. SE 129.35.209.170 58.247.178.245;SE 129.35.209.170 58.247.178.245 115.111.227.14 115.111.227.6 25.19.39.117 210.94.41.89 217.67.201.237 217.67.201.162 Visas i tv4komedi true http://cdn01.tv4.se/polopoly_fs/1.2086506.1329926410!image/818097308.jpg http://cdn01.tv4.se/polopoly_fs/1.2086506.1329926410!smallformatimage/1137750995.jpg http://cdn01.tv4.se/polopoly_fs/1.2086506.1329926410!categorylarge/3040526283.jpg http://cdn01.tv4.se/polopoly_fs/1.2086506.1329926410!image-large/4194770966.jpg http://cdn01.tv4.se/polopoly_fs/1.2086506.1329926410!image-logo/3726565562.png http://cdn01.tv4.se/polopoly_fs/1.2086506.1329926410!small-image-logo/138126118.png Hela program 12 true true false false 1.2086509 Senaste programmen inom Nöje 4 true false true false Alla 1.2521546,1.1927588,1.2518288,1.1969780,1.2473260,1.2440034,1.2344977,1.2522532,1.1969811,1.2488517,1.2661272,1.2488511,1.2582459,1.2181324,1.1854782,1.1969774,1.2200758,1.2473136,1.2561082,1.2184526 http://cdn01.tv4.se/polopoly_fs/1.2091245.1329926390!mobileimage/2021560628.jpg http://cdn01.tv4.se/polopoly_fs/1.2091245.1329926390!mobileimage-logo/3223293247.png http://cdn01.tv4.se/polopoly_fs/1.2091245.1329926390!mobileimage-large/736696048.jpg http://cdn01.tv4.se/polopoly_fs/1.2091245.1329926390!mobileimage-highres/2114332862.png http://cdn01.tv4.se/polopoly_fs/1.2091245.1329926390!mobileimage-logo-highres/1730152535.png http://cdn01.tv4.se/polopoly_fs/1.2091245.1329926390!mobileimage-large-highres/2362872728.jpg http://cdn01.tv4.se/polopoly_fs/1.2091245.1329926390!originallogoimage/2106815509.png http://cdn01.tv4.se/polopoly_fs/1.2091245.1329926390!originalformatimage/740195322.jpg http://cdn01.tv4.se/polopoly_fs/1.2091245.1329926390!originalcarouselimage/2588900695.jpg Kan man hitta mannen i sina drömmar genom att enbart lita på det första intrycket? Programledaren Carolina Gynning samlar ett antal tjejer som drömmer om att finna den stora kärleken. SE 129.35.209.170 58.247.178.245 115.111.227.14 115.111.227.6 25.19.39.117 210.94.41.89 217.67.201.237 217.67.201.162 Visas i tv11 true http://cdn01.tv4.se/polopoly_fs/1.2091245.1329926390!image/191249435.jpg http://cdn01.tv4.se/polopoly_fs/1.2091245.1329926390!smallformatimage/1331573611.jpg http://cdn01.tv4.se/polopoly_fs/1.2091245.1329926390!categorylarge/3115597683.jpg http://cdn01.tv4.se/polopoly_fs/1.2091245.1329926390!image-large/4136214702.jpg http://cdn01.tv4.se/polopoly_fs/1.2091245.1329926390!image-logo/1324889669.png http://cdn01.tv4.se/polopoly_fs/1.2091245.1329926390!small-image-logo/3080178793.png Hela program 12 true false false false Alla 1.2091245 Senaste programmen inom Nöje 4 true false true false Alla 1.2521546,1.1927588,1.2518288,1.1969780,1.2473260,1.2440034,1.2344977,1.2522532,1.1969811,1.2488517,1.2661272,1.2488511,1.2582459,1.2181324,1.1854782,1.1969774,1.2200758,1.2473136,1.2561082,1.2184526 http://cdn01.tv4.se/polopoly_fs/1.2034653.1329926339!mobileimage/812834984.jpg http://cdn01.tv4.se/polopoly_fs/1.2034653.1329926339!mobileimage-logo/3570816373.png http://cdn01.tv4.se/polopoly_fs/1.2034653.1329926339!mobileimage-large/3208380268.jpg http://cdn01.tv4.se/polopoly_fs/1.2034653.1329926339!mobileimage-highres/279074129.jpg http://cdn01.tv4.se/polopoly_fs/1.2034653.1329926339!mobileimage-logo-highres/2829027696.png http://cdn01.tv4.se/polopoly_fs/1.2034653.1329926339!mobileimage-large-highres/3279037289.jpg Den brittiska komikern Stephen K Amos blandar ståupp-framträdanden med sketcher och dolda kameran-skämt. Varje program har ett tema som kan handla om allt från skolan till relationer och resor. Publiken i studion får vara beredda på att de när som helst kan kallas upp på scenen eller få veta att de följts med en dold kamera. SE 129.35.209.170 58.247.178.245 115.111.227.14 115.111.227.6 25.19.39.117 210.94.41.89 217.67.201.237 217.67.201.162 Lördagskvällar tv11 true http://cdn01.tv4.se/polopoly_fs/1.2034653.1329926339!image/3076109850.jpg http://cdn01.tv4.se/polopoly_fs/1.2034653.1329926339!smallformatimage/2760832750.jpg http://cdn01.tv4.se/polopoly_fs/1.2034653.1329926339!categorylarge/3693949912.jpg http://cdn01.tv4.se/polopoly_fs/1.2034653.1329926339!image-large/3760252880.jpg http://cdn01.tv4.se/polopoly_fs/1.2034653.1329926339!image-logo/1952061251.png Hela program 4 true false false false Alla 1.2034658 Senaste programmen inom Nöje 4 true false true false Alla 1.2521546,1.1927588,1.2518288,1.1969780,1.2473260,1.2440034,1.2344977,1.2522532,1.1969811,1.2488517,1.2661272,1.2488511,1.2582459,1.2181324,1.1854782,1.1969774,1.2200758,1.2473136,1.2561082,1.2184526 http://cdn01.tv4.se/polopoly_fs/1.2262327.1342528440!originallogoimage/3372114103.png http://cdn01.tv4.se/polopoly_fs/1.2262327.1342528440!originalformatimage/232887938.jpg http://cdn01.tv4.se/polopoly_fs/1.2262327.1342528440!originalcarouselimage/270732956.jpg I TV4 Play hittar du våra mest populära och bästa program – från barnprogram till Lotta på Liseberg. Välkommen! tv4 false Senaste klippen 12 true true false false Alla 1.2262327 Senaste programmen inom Nöje 4 true false true false Alla 1.2521546,1.1927588,1.2518288,1.1969780,1.2473260,1.2440034,1.2344977,1.2522532,1.1969811,1.2488517,1.2661272,1.2488511,1.2582459,1.2181324,1.1854782,1.1969774,1.2200758,1.2473136,1.2561082,1.2184526 SE 115.111.227.14 115.111.227.6 25.19.39.117 210.94.41.89 217.67.201.237 217.67.201.162 tv4 false Klipp 12 true true false false Alla 1.2266164 Senaste programmen inom Nöje 4 true false true false Alla 1.2521546,1.1927588,1.2518288,1.1969780,1.2473260,1.2440034,1.2344977,1.2522532,1.1969811,1.2488517,1.2661272,1.2488511,1.2582459,1.2181324,1.1854782,1.1969774,1.2200758,1.2473136,1.2561082,1.2184526 http://cdn01.tv4.se/polopoly_fs/1.2196401.1329926289!mobileimage/18616387.jpg http://cdn01.tv4.se/polopoly_fs/1.2196401.1329926289!mobileimage-logo/743331869.png http://cdn01.tv4.se/polopoly_fs/1.2196401.1329926289!mobileimage-large/1055111166.jpg http://cdn01.tv4.se/polopoly_fs/1.2196401.1329926289!mobileimage-highres/1983654584.jpg http://cdn01.tv4.se/polopoly_fs/1.2196401.1329926289!mobileimage-logo-highres/2449123867.png http://cdn01.tv4.se/polopoly_fs/1.2196401.1329926289!mobileimage-large-highres/2203534840.jpg http://cdn01.tv4.se/polopoly_fs/1.2196401.1329926289!originallogoimage/2449123867.png http://cdn01.tv4.se/polopoly_fs/1.2196401.1329926289!originalformatimage/69847887.jpg http://cdn01.tv4.se/polopoly_fs/1.2196401.1329926289!originalcarouselimage/3982554871.jpg Magplask, kallsupar och dramatiska vurpor utlovas när lag från åtta svenska städer kämpar om 100 000 kronor, som skänks till ett valfritt välgörenhetsprojekt i hemstaden. fredag 20:00 tv4 false http://cdn01.tv4.se/polopoly_fs/1.2196401.1329926289!image/3953897907.jpg http://cdn01.tv4.se/polopoly_fs/1.2196401.1329926289!smallformatimage/3461986501.jpg http://cdn01.tv4.se/polopoly_fs/1.2196401.1329926289!categorylarge/848087155.jpg http://cdn01.tv4.se/polopoly_fs/1.2196401.1329926289!image-large/4254639968.jpg http://cdn01.tv4.se/polopoly_fs/1.2196401.1329926289!image-logo/1559370248.png http://cdn01.tv4.se/polopoly_fs/1.2196401.1329926289!small-image-logo/938342439.png Hela program 12 true false false false Alla 1.2196401 Senaste klippen 4 false true false true Alla 1.2196401 Senaste programmen inom Nöje 4 true false true false Alla 1.2521546,1.1927588,1.2518288,1.1969780,1.2473260,1.2440034,1.2344977,1.2522532,1.1969811,1.2488517,1.2661272,1.2488511,1.2582459,1.2181324,1.1854782,1.1969774,1.2200758,1.2473136,1.2561082,1.2184526 http://cdn01.tv4.se/polopoly_fs/1.2491507.1336038715!originallogoimage/3531982759.png http://cdn01.tv4.se/polopoly_fs/1.2491507.1336038715!originalformatimage/3684398631.jpg http://cdn01.tv4.se/polopoly_fs/1.2491507.1336038715!originalcarouselimage/693217255.jpg Här kan du se ett urval av TV4:s program teckenspråkstolkade. SE Visas i tv4 false Hela program 12 true false false false Alla 1.2491507 Senaste programmen inom Nöje 4 true false true false Alla 1.2521546,1.1927588,1.2518288,1.1969780,1.2473260,1.2440034,1.2344977,1.2522532,1.1969811,1.2488517,1.2661272,1.2488511,1.2582459,1.2181324,1.1854782,1.1969774,1.2200758,1.2473136,1.2561082,1.2184526 http://cdn01.tv4.se/polopoly_fs/1.2521546.1329926240!originallogoimage/3948297744.png http://cdn01.tv4.se/polopoly_fs/1.2521546.1329926240!originalformatimage/1870847999.jpg http://cdn01.tv4.se/polopoly_fs/1.2521546.1329926240!originalcarouselimage/2619936788.jpg Kommer i höst SE 115.111.227.14 115.111.227.6 25.19.39.117 210.94.41.89 217.67.201.237 217.67.201.162;SE 115.111.227.14 115.111.227.6 25.19.39.117 210.94.41.89 217.67.201.237 217.67.201.162;SE 115.111.227.14 115.111.227.6 25.19.39.117 210.94.41.89 217.67.201.237 217.67.201.162;SE tv4 false Klipp 12 false true false false Alla 1.2521552 Hela program 12 true false false false Alla 1.2521546 Senaste programmen inom Nöje 4 true false true false Alla 1.2521546,1.1927588,1.2518288,1.1969780,1.2473260,1.2440034,1.2344977,1.2522532,1.1969811,1.2488517,1.2661272,1.2488511,1.2582459,1.2181324,1.1854782,1.1969774,1.2200758,1.2473136,1.2561082,1.2184526 http://cdn01.tv4.se/polopoly_fs/1.1978218.1342528539!mobileimage/3153075231.jpg http://cdn01.tv4.se/polopoly_fs/1.1978218.1342528539!mobileimage-logo/493882894.png http://cdn01.tv4.se/polopoly_fs/1.1978218.1342528539!mobileimage-large/1817126662.jpg http://cdn01.tv4.se/polopoly_fs/1.1978218.1342528539!mobileimage-highres/3430252809.jpg http://cdn01.tv4.se/polopoly_fs/1.1978218.1342528539!mobileimage-logo-highres/3593861939.png http://cdn01.tv4.se/polopoly_fs/1.1978218.1342528539!mobileimage-large-highres/887893730.jpg http://cdn01.tv4.se/polopoly_fs/1.1978218.1342528539!originallogoimage/2026377632.png http://cdn01.tv4.se/polopoly_fs/1.1978218.1342528539!originalformatimage/4229754959.jpg http://cdn01.tv4.se/polopoly_fs/1.1978218.1342528539!originalcarouselimage/263667620.jpg I Time out tävlar två lag och testar sina kunskaper i ämnet sport. Det gäller att vara snabb och vass i repliken, kunna improvisera och ha stor fantasi. SE 115.111.227.14 115.111.227.6 25.19.39.117 210.94.41.89 217.67.201.237 217.67.201.162;SE Söndagar 20:30 tv4 false Hela program 4 true false false true 1.1978221 Senaste klippen 4 false true false true 1.1988914 Senaste programmen inom Nöje 4 true false true false Alla 1.2521546,1.1927588,1.2518288,1.1969780,1.2473260,1.2440034,1.2344977,1.2522532,1.1969811,1.2488517,1.2661272,1.2488511,1.2582459,1.2181324,1.1854782,1.1969774,1.2200758,1.2473136,1.2561082,1.2184526 Program - Barn 30 false 1.2321924,1.2321930,1.1838058,1.2320043,1.1844575,1.1844690,1.1844605,1.2255338,1.2320454,1.2137917,1.1831818,1.1844669,1.1862493,1.2152118,1.2321915,1.1844502,1.1912577,1.1821167,1.1863951,1.1844427,1.1844724,1.1838156,1.1844440,1.2556898,1.1844409,1.2282021,1.2255334,1.1844519,1.2373582,1.1844531,1.2488527,1.2556889,1.1837835,1.1839976,1.2255345 false http://cdn01.tv4.se/polopoly_fs/1.2242004.1341213165!image/298177630.jpg https://www.tv4play.se/order/produkter?redirect_url=%2F%3F&promo=fiskpinnen&product_group_id=7 Senaste programmen inom Barn 4 true true true false Alla 1.1821167,1.1863951,1.1844724,1.1838156,1.2137917,1.1844690,1.1844440,1.2556889,1.1844519,1.2320454,1.2556898,1.2488527,1.1844409,1.1862493,1.1839976,1.2255345,1.2255334,1.2373582,1.1831818,1.2282021 http://cdn01.tv4.se/polopoly_fs/1.1844409.1342528620!mobileimage/476241711.png http://cdn01.tv4.se/polopoly_fs/1.1844409.1342528620!mobileimage-logo/3455642738.png http://cdn01.tv4.se/polopoly_fs/1.1844409.1342528620!mobileimage-large/985668890.jpg http://cdn01.tv4.se/polopoly_fs/1.1844409.1342528620!mobileimage-highres/3626190114.png http://cdn01.tv4.se/polopoly_fs/1.1844409.1342528620!mobileimage-logo-highres/3186512161.png http://cdn01.tv4.se/polopoly_fs/1.1844409.1342528620!mobileimage-large-highres/2951983060.jpg http://cdn01.tv4.se/polopoly_fs/1.1844409.1342528620!originallogoimage/918563408.png http://cdn01.tv4.se/polopoly_fs/1.1844409.1342528620!originalformatimage/1613940866.jpg http://cdn01.tv4.se/polopoly_fs/1.1844409.1342528620!originalcarouselimage/303006144.jpg Zillah bjuder tillsammans med sin tygapa Totte på pratshow och möter spännande gäster och artister. Visas i tv4 false http://cdn01.tv4.se/polopoly_fs/1.1844409.1342528620!image/965355225.png http://cdn01.tv4.se/polopoly_fs/1.1844409.1342528620!smallformatimage/2202650524.png http://cdn01.tv4.se/polopoly_fs/1.1844409.1342528620!categorylarge/1284239808.png http://cdn01.tv4.se/polopoly_fs/1.1844409.1342528620!image-large/1114403878.png http://cdn01.tv4.se/polopoly_fs/1.1844409.1342528620!image-logo/48428457.png http://cdn01.tv4.se/polopoly_fs/1.1844409.1342528620!small-image-logo/2982851734.png Hela program 12 true true false false Alla 1.1844419 Senaste programmen inom Barn 4 true true true false Alla 1.1821167,1.1863951,1.1844724,1.1838156,1.2137917,1.1844690,1.1844440,1.2556889,1.1844519,1.2320454,1.2556898,1.2488527,1.1844409,1.1862493,1.1839976,1.2255345,1.2255334,1.2373582,1.1831818,1.2282021 http://cdn01.tv4.se/polopoly_fs/1.2556898.1342528674!originallogoimage/272357707.png http://cdn01.tv4.se/polopoly_fs/1.2556898.1342528674!originalformatimage/1102501540.jpg http://cdn01.tv4.se/polopoly_fs/1.2556898.1342528674!originalcarouselimage/4159164425.jpg Om grand danois-hunden Scooby-Doo och hans vänner som är medlemmar i ett deckargäng. SE 115.111.227.14 115.111.227.6 25.19.39.117 210.94.41.89 217.67.201.237 217.67.201.162;SE Visas i tv4 true Hela program 12 true false false false Alla 1.2556898 Senaste programmen inom Barn 4 true true true false Alla 1.1821167,1.1863951,1.1844724,1.1838156,1.2137917,1.1844690,1.1844440,1.2556889,1.1844519,1.2320454,1.2556898,1.2488527,1.1844409,1.1862493,1.1839976,1.2255345,1.2255334,1.2373582,1.1831818,1.2282021 http://cdn01.tv4.se/polopoly_fs/1.2556889.1332241268!originallogoimage/4136841123.png http://cdn01.tv4.se/polopoly_fs/1.2556889.1332241268!originalformatimage/3769383530.jpg http://cdn01.tv4.se/polopoly_fs/1.2556889.1332241268!originalcarouselimage/308734890.jpg Om katten Toms och musen Jerrys galna upptåg. SE 115.111.227.14 115.111.227.6 25.19.39.117 210.94.41.89 217.67.201.237 217.67.201.162;SE tv4 true Hela program 12 true false false false Alla 1.2556889 Senaste programmen inom Barn 4 true true true false Alla 1.1821167,1.1863951,1.1844724,1.1838156,1.2137917,1.1844690,1.1844440,1.2556889,1.1844519,1.2320454,1.2556898,1.2488527,1.1844409,1.1862493,1.1839976,1.2255345,1.2255334,1.2373582,1.1831818,1.2282021 http://cdn01.tv4.se/polopoly_fs/1.2488527.1342528707!originallogoimage/1453041469.png http://cdn01.tv4.se/polopoly_fs/1.2488527.1342528707!originalformatimage/3018410223.jpg http://cdn01.tv4.se/polopoly_fs/1.2488527.1342528707!originalcarouselimage/2706893821.jpg Doktor Goja har en speciell förmåga, han kan prata med djuren. Tillsammans med sin assistent Pillan och papegoja Pape gör han allt för att göra djuren lyckligare. SE;SE 115.111.227.14 115.111.227.6 25.19.39.117 210.94.41.89 217.67.201.237 217.67.201.162 Visas i tv4 false Hela program 12 true false false false Alla 1.2488527 Senaste programmen inom Barn 4 true true true false Alla 1.1821167,1.1863951,1.1844724,1.1838156,1.2137917,1.1844690,1.1844440,1.2556889,1.1844519,1.2320454,1.2556898,1.2488527,1.1844409,1.1862493,1.1839976,1.2255345,1.2255334,1.2373582,1.1831818,1.2282021 http://cdn01.tv4.se/polopoly_fs/1.2373582.1342528792!originallogoimage/160225057.png http://cdn01.tv4.se/polopoly_fs/1.2373582.1342528792!originalformatimage/3582231871.jpg http://cdn01.tv4.se/polopoly_fs/1.2373582.1342528792!originalcarouselimage/2102725484.jpg Doktor Mugg gör allt för att ta staden Dasseborg i besittning. Kapten Filling, doktor Muggs värsta fiende, gör dock allt för att hindra honom. lördagar 07:35 tv4 false Hela program 12 true false false false Alla 1.2373582 Senaste programmen inom Barn 4 true true true false Alla 1.1821167,1.1863951,1.1844724,1.1838156,1.2137917,1.1844690,1.1844440,1.2556889,1.1844519,1.2320454,1.2556898,1.2488527,1.1844409,1.1862493,1.1839976,1.2255345,1.2255334,1.2373582,1.1831818,1.2282021 http://cdn01.tv4.se/polopoly_fs/1.2255334.1343646818!originallogoimage/1842001872.png http://cdn01.tv4.se/polopoly_fs/1.2255334.1343646818!originalformatimage/2982340046.jpg http://cdn01.tv4.se/polopoly_fs/1.2255334.1343646818!originalcarouselimage/420703133.jpg Mona är en äventyrlig flicka som älskar att lösa olika mysterier. SE 115.111.227.14 115.111.227.6 25.19.39.117 210.94.41.89 217.67.201.237 217.67.201.162;SE Visas i tv4 false Hela program 12 true false false false Alla 1.2255334 Senaste programmen inom Barn 4 true true true false Alla 1.1821167,1.1863951,1.1844724,1.1838156,1.2137917,1.1844690,1.1844440,1.2556889,1.1844519,1.2320454,1.2556898,1.2488527,1.1844409,1.1862493,1.1839976,1.2255345,1.2255334,1.2373582,1.1831818,1.2282021 http://cdn01.tv4.se/polopoly_fs/1.2255345.1342529134!originallogoimage/1916848200.png http://cdn01.tv4.se/polopoly_fs/1.2255345.1342529134!originalformatimage/1808917830.jpg http://cdn01.tv4.se/polopoly_fs/1.2255345.1342529134!originalcarouselimage/1446605088.jpg I staden Pixieville bor Pixies som har tillgång till magiska klot som innehåller positiv magi. Staden är indelad i olika områden där Pixies, tomtar och älvor lever sida vid sida. SE Visas i tv4 false Hela program 12 true false false false Alla 1.2255345 Senaste programmen inom Barn 4 true true true false Alla 1.1821167,1.1863951,1.1844724,1.1838156,1.2137917,1.1844690,1.1844440,1.2556889,1.1844519,1.2320454,1.2556898,1.2488527,1.1844409,1.1862493,1.1839976,1.2255345,1.2255334,1.2373582,1.1831818,1.2282021 http://cdn01.tv4.se/polopoly_fs/1.1839976.1342529064!mobileimage/2299162775.jpg http://cdn01.tv4.se/polopoly_fs/1.1839976.1342529064!mobileimage-logo/3425684406.png http://cdn01.tv4.se/polopoly_fs/1.1839976.1342529064!mobileimage-large/1004767094.jpg http://cdn01.tv4.se/polopoly_fs/1.1839976.1342529064!mobileimage-highres/195555478.jpg http://cdn01.tv4.se/polopoly_fs/1.1839976.1342529064!mobileimage-logo-highres/124403339.png http://cdn01.tv4.se/polopoly_fs/1.1839976.1342529064!mobileimage-large-highres/4037440075.jpg http://cdn01.tv4.se/polopoly_fs/1.1839976.1342529064!originallogoimage/2845299736.png http://cdn01.tv4.se/polopoly_fs/1.1839976.1342529064!originalformatimage/759379447.jpg http://cdn01.tv4.se/polopoly_fs/1.1839976.1342529064!originalcarouselimage/3739810332.jpg Ash Ketchum fångar och tränar pokémon för att vinna pokémonligan. Frågan är om Ash ska lyckas fånga alla, det finns andra som gör allt de kan för att hindra honom. SE;SE 115.111.227.14 115.111.227.6 25.19.39.117 210.94.41.89 217.67.201.237 217.67.201.162;SE;SE 129.35.209.170 58.247.178.245 115.111.227.14 115.111.227.6 25.19.39.117 210.94.41.89 217.67.201.237 217.67.201.162;SE;SE;SE 115.111.227.14 115.111.227.6 25.19.39.117 210.94.41.89 217.67.201.237 217.67.201.162;SE 115.111.227.14 115.111.227.6 25.19.39.117 210.94.41.89 217.67.201.237 217.67.201.162;SE;SE 115.111.227.14 115.111.227.6 25.19.39.117 210.94.41.89 217.67.201.237 217.67.201.162;SE;SE 115.111.227.14 115.111.227.6 25.19.39.117 210.94.41.89 217.67.201.237 217.67.201.162;SE 115.111.227.14 115.111.227.6 25.19.39.117 210.94.41.89 217.67.201.237 217.67.201.162;SE Tyvärr saknas vissa episoder från olika säsonger samt hela säsong 5, detta beror på att de inte visats i tv. Visas i tv4 false Säsong 14 12 true true false false Alla 1.1839984 Säsong 13 12 true true false false 1.1967010 Säsong 1 4 true true false false Alla 1.2518426 Säsong 2 12 true true false false Alla 1.2530432 Säsong 3 12 true false false false Alla 1.2624287 Säsong 4 12 true false false false Alla 1.2635426 Säsong 6 12 true false false false Alla 1.2643875 Senaste programmen inom Barn 4 true true true false Alla 1.1821167,1.1863951,1.1844724,1.1838156,1.2137917,1.1844690,1.1844440,1.2556889,1.1844519,1.2320454,1.2556898,1.2488527,1.1844409,1.1862493,1.1839976,1.2255345,1.2255334,1.2373582,1.1831818,1.2282021 http://cdn01.tv4.se/polopoly_fs/1.2282021.1342528887!originallogoimage/4231690026.png http://cdn01.tv4.se/polopoly_fs/1.2282021.1342528887!originalformatimage/4237126430.jpg http://cdn01.tv4.se/polopoly_fs/1.2282021.1342528887!originalcarouselimage/3870985399.jpg Svamp-Bob Fyrkant är en tvättsvamp som bor på Stilla havets botten. Han jobbar på en krabbrestaurang och har en snigel som heter Gary. SE 115.111.227.14 115.111.227.6 25.19.39.117 210.94.41.89 217.67.201.237 217.67.201.162;SE Visas i tv4 false Hela program 12 true false false false Alla 1.2282021 Senaste programmen inom Barn 4 true true true false Alla 1.1821167,1.1863951,1.1844724,1.1838156,1.2137917,1.1844690,1.1844440,1.2556889,1.1844519,1.2320454,1.2556898,1.2488527,1.1844409,1.1862493,1.1839976,1.2255345,1.2255334,1.2373582,1.1831818,1.2282021 http://cdn01.tv4.se/polopoly_fs/1.1831818.1329925697!mobileimage/1727585309.png http://cdn01.tv4.se/polopoly_fs/1.1831818.1329925697!mobileimage-logo/3334310170.png http://cdn01.tv4.se/polopoly_fs/1.1831818.1329925697!mobileimage-large/4102151331.png http://cdn01.tv4.se/polopoly_fs/1.1831818.1329925697!mobileimage-highres/2455497937.png http://cdn01.tv4.se/polopoly_fs/1.1831818.1329925697!mobileimage-logo-highres/234388519.png http://cdn01.tv4.se/polopoly_fs/1.1831818.1329925697!mobileimage-large-highres/1069820318.png http://cdn01.tv4.se/polopoly_fs/1.1831818.1329925697!originallogoimage/2735052468.png http://cdn01.tv4.se/polopoly_fs/1.1831818.1329925697!originalformatimage/668039003.jpg http://cdn01.tv4.se/polopoly_fs/1.1831818.1329925697!originalcarouselimage/3564812464.jpg Dan och hans vänner Runo, Marucho, Julie, Shun, Alice och tillsammans är dom The Bakugan Battle Brawlers. SE 129.35.209.170 58.247.178.245 115.111.227.14 115.111.227.6 25.19.39.117 210.94.41.89 217.67.201.237 217.67.201.162 Visas i tv4 false Hela program 12 true true false false Senaste programmen inom Barn 4 true true true false Alla 1.1821167,1.1863951,1.1844724,1.1838156,1.2137917,1.1844690,1.1844440,1.2556889,1.1844519,1.2320454,1.2556898,1.2488527,1.1844409,1.1862493,1.1839976,1.2255345,1.2255334,1.2373582,1.1831818,1.2282021 http://cdn01.tv4.se/polopoly_fs/1.1862493.1329925713!mobileimage/1973476417.jpg http://cdn01.tv4.se/polopoly_fs/1.1862493.1329925713!mobileimage-logo/2774233666.png http://cdn01.tv4.se/polopoly_fs/1.1862493.1329925713!mobileimage-large/1463700663.jpg http://cdn01.tv4.se/polopoly_fs/1.1862493.1329925713!mobileimage-highres/198566246.jpg http://cdn01.tv4.se/polopoly_fs/1.1862493.1329925713!mobileimage-logo-highres/1464427697.png http://cdn01.tv4.se/polopoly_fs/1.1862493.1329925713!mobileimage-large-highres/2771147332.jpg http://cdn01.tv4.se/polopoly_fs/1.1862493.1329925713!originallogoimage/238568192.png http://cdn01.tv4.se/polopoly_fs/1.1862493.1329925713!originalformatimage/2594663959.jpg http://cdn01.tv4.se/polopoly_fs/1.1862493.1329925713!originalcarouselimage/2725570967.jpg I Mumindalen bor Mumintrollet med sin familj och sina vänner, bland andra Snusmumriken, Snorkfröken och Lilla My. Visas i tv4 false Hela program 12 true true false false Alla 1.1862508 Senaste programmen inom Barn 4 true true true false Alla 1.1821167,1.1863951,1.1844724,1.1838156,1.2137917,1.1844690,1.1844440,1.2556889,1.1844519,1.2320454,1.2556898,1.2488527,1.1844409,1.1862493,1.1839976,1.2255345,1.2255334,1.2373582,1.1831818,1.2282021 http://cdn01.tv4.se/polopoly_fs/1.2320454.1342529318!originallogoimage/3395563123.png http://cdn01.tv4.se/polopoly_fs/1.2320454.1342529318!originalformatimage/376208493.jpg http://cdn01.tv4.se/polopoly_fs/1.2320454.1342529318!originalcarouselimage/3200119358.jpg Tobbe Trollkarl lär ut trolleritrix till lärjungarna Lydia, Fredrik, Milan, Renaida och Kevin. Sedan får ge sig ut på gatorna och visa vad de lärt sig. tv4Play false Hela program 12 true false false false Alla 1.2320454 Senaste programmen inom Barn 4 true true true false Alla 1.1821167,1.1863951,1.1844724,1.1838156,1.2137917,1.1844690,1.1844440,1.2556889,1.1844519,1.2320454,1.2556898,1.2488527,1.1844409,1.1862493,1.1839976,1.2255345,1.2255334,1.2373582,1.1831818,1.2282021 http://cdn01.tv4.se/polopoly_fs/1.2137917.1329925773!mobileimage/4161545883.jpg http://cdn01.tv4.se/polopoly_fs/1.2137917.1329925773!mobileimage-logo/3579735749.png http://cdn01.tv4.se/polopoly_fs/1.2137917.1329925773!mobileimage-large/3354624294.jpg http://cdn01.tv4.se/polopoly_fs/1.2137917.1329925773!mobileimage-highres/2402032736.jpg http://cdn01.tv4.se/polopoly_fs/1.2137917.1329925773!mobileimage-logo-highres/1760206019.png http://cdn01.tv4.se/polopoly_fs/1.2137917.1329925773!mobileimage-large-highres/2051502880.jpg http://cdn01.tv4.se/polopoly_fs/1.2137917.1329925773!originallogoimage/470102620.png http://cdn01.tv4.se/polopoly_fs/1.2137917.1329925773!originalformatimage/3150267851.jpg http://cdn01.tv4.se/polopoly_fs/1.2137917.1329925773!originalcarouselimage/3388476553.jpg Om katten Frasse och hans äventyr med vännerna på bondgården som alltid försöka lösa varandras problem. Frasse och hans vänner söker svar på frågor från allt om vetenskap till naturen. SE;SE 129.35.209.170 58.247.178.245 115.111.227.14 115.111.227.6 25.19.39.117 210.94.41.89 217.67.201.237 217.67.201.162 Visas i tv4 false Hela program 4 true false false false Alla 1.2137923 Senaste programmen inom Barn 4 true true true false Alla 1.1821167,1.1863951,1.1844724,1.1838156,1.2137917,1.1844690,1.1844440,1.2556889,1.1844519,1.2320454,1.2556898,1.2488527,1.1844409,1.1862493,1.1839976,1.2255345,1.2255334,1.2373582,1.1831818,1.2282021 http://cdn01.tv4.se/polopoly_fs/1.1844690.1329925787!mobileimage/208734280.jpg http://cdn01.tv4.se/polopoly_fs/1.1844690.1329925787!mobileimage-logo/3596709388.png http://cdn01.tv4.se/polopoly_fs/1.1844690.1329925787!mobileimage-large/1485685233.jpg http://cdn01.tv4.se/polopoly_fs/1.1844690.1329925787!mobileimage-highres/2835728414.jpg http://cdn01.tv4.se/polopoly_fs/1.1844690.1329925787!mobileimage-logo-highres/4062699452.png http://cdn01.tv4.se/polopoly_fs/1.1844690.1329925787!mobileimage-large-highres/2093707329.jpg http://cdn01.tv4.se/polopoly_fs/1.1844690.1329925787!originallogoimage/3735488084.png http://cdn01.tv4.se/polopoly_fs/1.1844690.1329925787!originalformatimage/1003874694.jpg http://cdn01.tv4.se/polopoly_fs/1.1844690.1329925787!originalcarouselimage/694897300.jpg Yugi och hans vänner börjar, med Yugis morfars hjälp, samla och spela med Duel monster-kort. Men så blir Yugis morfar kidnappad av Pegausus, den man som skapat korten. Snart är Yugi och hans vänner indragna i ett äventyr där Yugis morfars liv står på spel. SE 129.35.209.170 58.247.178.245 115.111.227.14 115.111.227.6 25.19.39.117 210.94.41.89 217.67.201.237 217.67.201.162 Visas i tv4 false Hela program 12 true true false false Senaste programmen inom Barn 4 true true true false Alla 1.1821167,1.1863951,1.1844724,1.1838156,1.2137917,1.1844690,1.1844440,1.2556889,1.1844519,1.2320454,1.2556898,1.2488527,1.1844409,1.1862493,1.1839976,1.2255345,1.2255334,1.2373582,1.1831818,1.2282021 http://cdn01.tv4.se/polopoly_fs/1.2255338.1342529381!originallogoimage/1834037053.png http://cdn01.tv4.se/polopoly_fs/1.2255338.1342529381!originalformatimage/3595945350.jpg http://cdn01.tv4.se/polopoly_fs/1.2255338.1342529381!originalcarouselimage/443695104.jpg Mojje och Lisa har köpt ett hus som är i stort behov av renovering. Mimmi tycker dock allt är trist tills hon träffar ett gäng killar i byn. Visas i tv4 false Hela program 12 true false false false Alla 1.2255338 Senaste programmen inom Barn 4 true true true false Alla 1.1821167,1.1863951,1.1844724,1.1838156,1.2137917,1.1844690,1.1844440,1.2556889,1.1844519,1.2320454,1.2556898,1.2488527,1.1844409,1.1862493,1.1839976,1.2255345,1.2255334,1.2373582,1.1831818,1.2282021 http://cdn01.tv4.se/polopoly_fs/1.2321930.1342529485!originallogoimage/1807057485.png http://cdn01.tv4.se/polopoly_fs/1.2321930.1342529485!originalformatimage/527552261.jpg http://cdn01.tv4.se/polopoly_fs/1.2321930.1342529485!originalcarouselimage/1563869720.jpg Mojje drömmer om att slå igenom med sin musik och ett telefonsamtal från Glenne Gura kanske kan uppfylla drömmen. visas i tv4 false Hela program 12 true false false false Alla 1.2321930 Senaste programmen inom Barn 4 true true true false Alla 1.1821167,1.1863951,1.1844724,1.1838156,1.2137917,1.1844690,1.1844440,1.2556889,1.1844519,1.2320454,1.2556898,1.2488527,1.1844409,1.1862493,1.1839976,1.2255345,1.2255334,1.2373582,1.1831818,1.2282021 http://cdn01.tv4.se/polopoly_fs/1.2320043.1329925822!originallogoimage/501843692.png http://cdn01.tv4.se/polopoly_fs/1.2320043.1329925822!originalformatimage/2390624542.jpg http://cdn01.tv4.se/polopoly_fs/1.2320043.1329925822!originalcarouselimage/1899369407.jpg Mojje och Lisa får en ny granne och det visar sig vara Plåstret, Mojjes gamla plågoande, och hans flickvän Gurli. visas i tv4 false Hela program 12 true false false false Alla 1.2320043 Senaste programmen inom Barn 4 true true true false Alla 1.1821167,1.1863951,1.1844724,1.1838156,1.2137917,1.1844690,1.1844440,1.2556889,1.1844519,1.2320454,1.2556898,1.2488527,1.1844409,1.1862493,1.1839976,1.2255345,1.2255334,1.2373582,1.1831818,1.2282021 http://cdn01.tv4.se/polopoly_fs/1.2321924.1329925839!originallogoimage/1298182764.png http://cdn01.tv4.se/polopoly_fs/1.2321924.1329925839!originalformatimage/583764094.jpg http://cdn01.tv4.se/polopoly_fs/1.2321924.1329925839!originalcarouselimage/2736183960.jpg Mimmi och Mojje åker till Karibien för att spela musik och underhålla resenärerna på en lyxkryssare. visas i tv4 false Hela program 12 true false false false Alla 1.2321924 Senaste programmen inom Barn 4 true true true false Alla 1.1821167,1.1863951,1.1844724,1.1838156,1.2137917,1.1844690,1.1844440,1.2556889,1.1844519,1.2320454,1.2556898,1.2488527,1.1844409,1.1862493,1.1839976,1.2255345,1.2255334,1.2373582,1.1831818,1.2282021 http://cdn01.tv4.se/polopoly_fs/1.2321915.1342529605!originallogoimage/870765770.png http://cdn01.tv4.se/polopoly_fs/1.2321915.1342529605!originalformatimage/2809788893.jpg http://cdn01.tv4.se/polopoly_fs/1.2321915.1342529605!originalcarouselimage/3292385801.jpg Mimmi ska åka på semester med sin mamma Lisa och när Lisa frågar om Mojje vill följa med tackar han genast ja. visas i tv4 false Hela program 12 true false false false Alla 1.2321915 Senaste programmen inom Barn 4 true true true false Alla 1.1821167,1.1863951,1.1844724,1.1838156,1.2137917,1.1844690,1.1844440,1.2556889,1.1844519,1.2320454,1.2556898,1.2488527,1.1844409,1.1862493,1.1839976,1.2255345,1.2255334,1.2373582,1.1831818,1.2282021 http://cdn01.tv4.se/polopoly_fs/1.2152118.1342529701!mobileimage/3081408188.jpg http://cdn01.tv4.se/polopoly_fs/1.2152118.1342529701!mobileimage-logo/1759478658.png http://cdn01.tv4.se/polopoly_fs/1.2152118.1342529701!mobileimage-large/4245417498.jpg http://cdn01.tv4.se/polopoly_fs/1.2152118.1342529701!mobileimage-highres/2426463165.jpg http://cdn01.tv4.se/polopoly_fs/1.2152118.1342529701!mobileimage-logo-highres/1642043762.png http://cdn01.tv4.se/polopoly_fs/1.2152118.1342529701!mobileimage-large-highres/4094424298.jpg http://cdn01.tv4.se/polopoly_fs/1.2152118.1342529701!originallogoimage/3081942482.png http://cdn01.tv4.se/polopoly_fs/1.2152118.1342529701!originalformatimage/3373835970.jpg http://cdn01.tv4.se/polopoly_fs/1.2152118.1342529701!originalcarouselimage/1119607044.jpg Mojje och Mimmis mamma Lisa har flyttat ihop och Mimmi tycker att Mojje är oerhört pinsam. När Mojje träffar vännen mr Mysko reser hela familjen reser till Mallorca. Visas i tv4 false http://cdn01.tv4.se/polopoly_fs/1.2152118.1342529701!image/3578545976.jpg http://cdn01.tv4.se/polopoly_fs/1.2152118.1342529701!smallformatimage/1217892746.jpg http://cdn01.tv4.se/polopoly_fs/1.2152118.1342529701!categorylarge/611277777.jpg http://cdn01.tv4.se/polopoly_fs/1.2152118.1342529701!image-large/2325074407.jpg http://cdn01.tv4.se/polopoly_fs/1.2152118.1342529701!image-logo/3194558855.png http://cdn01.tv4.se/polopoly_fs/1.2152118.1342529701!small-image-logo/3403334359.png Hela program 12 true true false false Alla 1.2152118 Senaste programmen inom Barn 4 true true true false Alla 1.1821167,1.1863951,1.1844724,1.1838156,1.2137917,1.1844690,1.1844440,1.2556889,1.1844519,1.2320454,1.2556898,1.2488527,1.1844409,1.1862493,1.1839976,1.2255345,1.2255334,1.2373582,1.1831818,1.2282021 http://cdn01.tv4.se/polopoly_fs/1.1844502.1329925907!mobileimage/2282324056.png http://cdn01.tv4.se/polopoly_fs/1.1844502.1329925907!mobileimage-logo/2483907445.png http://cdn01.tv4.se/polopoly_fs/1.1844502.1329925907!mobileimage-large/2450544462.jpg http://cdn01.tv4.se/polopoly_fs/1.1844502.1329925907!mobileimage-highres/4050945055.png http://cdn01.tv4.se/polopoly_fs/1.1844502.1329925907!mobileimage-logo-highres/576434297.png http://cdn01.tv4.se/polopoly_fs/1.1844502.1329925907!mobileimage-large-highres/2082201579.jpg http://cdn01.tv4.se/polopoly_fs/1.1844502.1329925907!originallogoimage/3895263526.png http://cdn01.tv4.se/polopoly_fs/1.1844502.1329925907!originalformatimage/1392939794.jpg http://cdn01.tv4.se/polopoly_fs/1.1844502.1329925907!originalcarouselimage/1506505363.jpg Mojje ger sig ut i trafiken som självutnämnd superhjälte för att se att allt går rätt till. Visas i tv4 false http://cdn01.tv4.se/polopoly_fs/1.1844502.1329925907!image/33504853.png http://cdn01.tv4.se/polopoly_fs/1.1844502.1329925907!smallformatimage/3555853035.png http://cdn01.tv4.se/polopoly_fs/1.1844502.1329925907!categorylarge/3620537014.jpg http://cdn01.tv4.se/polopoly_fs/1.1844502.1329925907!image-large/762864107.png http://cdn01.tv4.se/polopoly_fs/1.1844502.1329925907!image-logo/3928861567.png http://cdn01.tv4.se/polopoly_fs/1.1844502.1329925907!small-image-logo/947664466.png Hela program 12 true true false false Alla 1.1844514 Senaste programmen inom Barn 4 true true true false Alla 1.1821167,1.1863951,1.1844724,1.1838156,1.2137917,1.1844690,1.1844440,1.2556889,1.1844519,1.2320454,1.2556898,1.2488527,1.1844409,1.1862493,1.1839976,1.2255345,1.2255334,1.2373582,1.1831818,1.2282021 http://cdn01.tv4.se/polopoly_fs/1.1912577.1342529810!mobileimage/245848753.jpg http://cdn01.tv4.se/polopoly_fs/1.1912577.1342529810!mobileimage-logo/1266868624.png http://cdn01.tv4.se/polopoly_fs/1.1912577.1342529810!mobileimage-large/1285460922.jpg http://cdn01.tv4.se/polopoly_fs/1.1912577.1342529810!mobileimage-highres/2349521584.jpg http://cdn01.tv4.se/polopoly_fs/1.1912577.1342529810!mobileimage-logo-highres/2160530605.png http://cdn01.tv4.se/polopoly_fs/1.1912577.1342529810!mobileimage-large-highres/339581534.jpg http://cdn01.tv4.se/polopoly_fs/1.1912577.1342529810!originallogoimage/775618110.png http://cdn01.tv4.se/polopoly_fs/1.1912577.1342529810!originalformatimage/2867732433.jpg http://cdn01.tv4.se/polopoly_fs/1.1912577.1342529810!originalcarouselimage/1497747514.jpg Mojje har flyttat hem till sin mamma för att hitta inspiration. Där finns hans gamla trotjänare, tyghunden Fisen, som för Mojje är som en levande hund. Visas i tv4 false http://cdn01.tv4.se/polopoly_fs/1.1912577.1342529810!image/3561055560.jpg http://cdn01.tv4.se/polopoly_fs/1.1912577.1342529810!smallformatimage/3877141374.jpg http://cdn01.tv4.se/polopoly_fs/1.1912577.1342529810!categorylarge/2127077004.jpg http://cdn01.tv4.se/polopoly_fs/1.1912577.1342529810!image-large/2872912197.jpg http://cdn01.tv4.se/polopoly_fs/1.1912577.1342529810!image-logo/1775006357.jpg Hela program 8 true true false false 1.1912599 Senaste programmen inom Barn 4 true true true false Alla 1.1821167,1.1863951,1.1844724,1.1838156,1.2137917,1.1844690,1.1844440,1.2556889,1.1844519,1.2320454,1.2556898,1.2488527,1.1844409,1.1862493,1.1839976,1.2255345,1.2255334,1.2373582,1.1831818,1.2282021 http://cdn01.tv4.se/polopoly_fs/1.1821167.1329925944!mobileimage/1976522997.png http://cdn01.tv4.se/polopoly_fs/1.1821167.1329925944!mobileimage-logo/705651425.png http://cdn01.tv4.se/polopoly_fs/1.1821167.1329925944!mobileimage-large/1009809192.jpg http://cdn01.tv4.se/polopoly_fs/1.1821167.1329925944!mobileimage-highres/2112091012.png http://cdn01.tv4.se/polopoly_fs/1.1821167.1329925944!mobileimage-logo-highres/2623125997.png http://cdn01.tv4.se/polopoly_fs/1.1821167.1329925944!mobileimage-large-highres/2321984548.jpg Max och Rex reser till Afrika och räddar dinosaurier från den onda Dr Z. SE;SE 115.111.227.14 115.111.227.6 25.19.39.117 210.94.41.89 217.67.201.237 217.67.201.162 Visas i tv4 false http://cdn01.tv4.se/polopoly_fs/1.1821167.1329925944!image/1310393257.png http://cdn01.tv4.se/polopoly_fs/1.1821167.1329925944!smallformatimage/1203379756.png http://cdn01.tv4.se/polopoly_fs/1.1821167.1329925944!categorylarge/1261402552.png http://cdn01.tv4.se/polopoly_fs/1.1821167.1329925944!image-large/1624180048.png http://cdn01.tv4.se/polopoly_fs/1.1821167.1329925944!image-logo/1951360632.png http://cdn01.tv4.se/polopoly_fs/1.1821167.1329925944!small-image-logo/1889826400.png Hela program 12 true true false false Alla 1.1821167 Senaste programmen inom Barn 4 true true true false Alla 1.1821167,1.1863951,1.1844724,1.1838156,1.2137917,1.1844690,1.1844440,1.2556889,1.1844519,1.2320454,1.2556898,1.2488527,1.1844409,1.1862493,1.1839976,1.2255345,1.2255334,1.2373582,1.1831818,1.2282021 http://cdn01.tv4.se/polopoly_fs/1.1863951.1338198306!mobileimage/859957632.jpg http://cdn01.tv4.se/polopoly_fs/1.1863951.1338198306!mobileimage-logo/2842807021.png http://cdn01.tv4.se/polopoly_fs/1.1863951.1338198306!mobileimage-large/1300500196.jpg http://cdn01.tv4.se/polopoly_fs/1.1863951.1338198306!mobileimage-highres/997016305.jpg http://cdn01.tv4.se/polopoly_fs/1.1863951.1338198306!mobileimage-logo-highres/522654177.png http://cdn01.tv4.se/polopoly_fs/1.1863951.1338198306!mobileimage-large-highres/4224898536.jpg http://cdn01.tv4.se/polopoly_fs/1.1863951.1338198306!originallogoimage/3185286297.png http://cdn01.tv4.se/polopoly_fs/1.1863951.1338198306!originalformatimage/3013212512.jpg http://cdn01.tv4.se/polopoly_fs/1.1863951.1338198306!originalcarouselimage/672133377.jpg Den undersökande detektiven Tobbe Blom ger sig ut på en tidsresa genom Sveriges historia, från stenåldern till nutid och in i framtiden. Visas i tv4 false http://cdn01.tv4.se/polopoly_fs/1.1863951.1338198306!image/144028380.jpg http://cdn01.tv4.se/polopoly_fs/1.1863951.1338198306!smallformatimage/20229977.jpg http://cdn01.tv4.se/polopoly_fs/1.1863951.1338198306!categorylarge/4285208845.jpg http://cdn01.tv4.se/polopoly_fs/1.1863951.1338198306!image-large/3565905381.jpg http://cdn01.tv4.se/polopoly_fs/1.1863951.1338198306!image-logo/3376949069.png http://cdn01.tv4.se/polopoly_fs/1.1863951.1338198306!small-image-logo/3410095566.png Hela program 12 true true false false Alla 1.1863956 Senaste programmen inom Barn 4 true true true false Alla 1.1821167,1.1863951,1.1844724,1.1838156,1.2137917,1.1844690,1.1844440,1.2556889,1.1844519,1.2320454,1.2556898,1.2488527,1.1844409,1.1862493,1.1839976,1.2255345,1.2255334,1.2373582,1.1831818,1.2282021 http://cdn01.tv4.se/polopoly_fs/1.1844427.1329925974!mobileimage/3975936268.png http://cdn01.tv4.se/polopoly_fs/1.1844427.1329925974!mobileimage-logo/4135513419.png http://cdn01.tv4.se/polopoly_fs/1.1844427.1329925974!mobileimage-large/3236973358.jpg http://cdn01.tv4.se/polopoly_fs/1.1844427.1329925974!mobileimage-highres/3421606925.png http://cdn01.tv4.se/polopoly_fs/1.1844427.1329925974!mobileimage-logo-highres/4286511035.png http://cdn01.tv4.se/polopoly_fs/1.1844427.1329925974!mobileimage-large-highres/3837196958.jpg George bor i djungeln tillsammans med en samling apor, och andra djur, som är hans vänner. Visas i tv4 false http://cdn01.tv4.se/polopoly_fs/1.1844427.1329925974!image/2384277640.png http://cdn01.tv4.se/polopoly_fs/1.1844427.1329925974!smallformatimage/331802170.png http://cdn01.tv4.se/polopoly_fs/1.1844427.1329925974!categorylarge/2436640914.jpg http://cdn01.tv4.se/polopoly_fs/1.1844427.1329925974!image-large/80354736.jpg http://cdn01.tv4.se/polopoly_fs/1.1844427.1329925974!image-logo/550008654.png http://cdn01.tv4.se/polopoly_fs/1.1844427.1329925974!small-image-logo/1417391134.png Hela program 12 true true false false Senaste programmen inom Barn 4 true true true false Alla 1.1821167,1.1863951,1.1844724,1.1838156,1.2137917,1.1844690,1.1844440,1.2556889,1.1844519,1.2320454,1.2556898,1.2488527,1.1844409,1.1862493,1.1839976,1.2255345,1.2255334,1.2373582,1.1831818,1.2282021 http://cdn01.tv4.se/polopoly_fs/1.1844724.1329925989!mobileimage/1617392984.png http://cdn01.tv4.se/polopoly_fs/1.1844724.1329925989!mobileimage-logo/2294621311.png http://cdn01.tv4.se/polopoly_fs/1.1844724.1329925989!mobileimage-large/2590559132.jpg http://cdn01.tv4.se/polopoly_fs/1.1844724.1329925989!mobileimage-highres/390549411.png http://cdn01.tv4.se/polopoly_fs/1.1844724.1329925989!mobileimage-logo-highres/896652921.png http://cdn01.tv4.se/polopoly_fs/1.1844724.1329925989!mobileimage-large-highres/668744090.jpg I Vännernas stad bor det en brandbil, en polisbil och en ambulans och tillsammans rycker de ut och löser stora och små uppdrag i byn. Visas i tv4 false http://cdn01.tv4.se/polopoly_fs/1.1844724.1329925989!image/2328941736.png http://cdn01.tv4.se/polopoly_fs/1.1844724.1329925989!smallformatimage/2938297822.png http://cdn01.tv4.se/polopoly_fs/1.1844724.1329925989!categorylarge/1408740712.png http://cdn01.tv4.se/polopoly_fs/1.1844724.1329925989!image-large/2632172155.png http://cdn01.tv4.se/polopoly_fs/1.1844724.1329925989!image-logo/4168705642.png http://cdn01.tv4.se/polopoly_fs/1.1844724.1329925989!small-image-logo/2472969285.png Hela program 12 true true false false Senaste programmen inom Barn 4 true true true false Alla 1.1821167,1.1863951,1.1844724,1.1838156,1.2137917,1.1844690,1.1844440,1.2556889,1.1844519,1.2320454,1.2556898,1.2488527,1.1844409,1.1862493,1.1839976,1.2255345,1.2255334,1.2373582,1.1831818,1.2282021 http://cdn01.tv4.se/polopoly_fs/1.1838156.1329926024!mobileimage/769696020.jpg http://cdn01.tv4.se/polopoly_fs/1.1838156.1329926024!mobileimage-logo/4246408983.png http://cdn01.tv4.se/polopoly_fs/1.1838156.1329926024!mobileimage-large/4251723537.jpg http://cdn01.tv4.se/polopoly_fs/1.1838156.1329926024!mobileimage-highres/1402313779.jpg http://cdn01.tv4.se/polopoly_fs/1.1838156.1329926024!mobileimage-logo-highres/252254692.png http://cdn01.tv4.se/polopoly_fs/1.1838156.1329926024!mobileimage-large-highres/1415714587.jpg Elias - den lilla räddningsbåten är ett norskt tecknat barnprogram. Visas i tv4 false http://cdn01.tv4.se/polopoly_fs/1.1838156.1329926024!image/2031820484.jpg http://cdn01.tv4.se/polopoly_fs/1.1838156.1329926024!smallformatimage/2132240442.jpg http://cdn01.tv4.se/polopoly_fs/1.1838156.1329926024!categorylarge/486914003.jpg http://cdn01.tv4.se/polopoly_fs/1.1838156.1329926024!image-large/1415714587.jpg http://cdn01.tv4.se/polopoly_fs/1.1838156.1329926024!image-logo/3973389906.png http://cdn01.tv4.se/polopoly_fs/1.1838156.1329926024!small-image-logo/1509956398.png Hela program 12 true true false false 1.1838156 Senaste programmen inom Barn 4 true true true false Alla 1.1821167,1.1863951,1.1844724,1.1838156,1.2137917,1.1844690,1.1844440,1.2556889,1.1844519,1.2320454,1.2556898,1.2488527,1.1844409,1.1862493,1.1839976,1.2255345,1.2255334,1.2373582,1.1831818,1.2282021 http://cdn01.tv4.se/polopoly_fs/1.1844440.1342529911!mobileimage/2949919530.jpg http://cdn01.tv4.se/polopoly_fs/1.1844440.1342529911!mobileimage-logo/2189851508.png http://cdn01.tv4.se/polopoly_fs/1.1844440.1342529911!mobileimage-large/2875923852.jpg http://cdn01.tv4.se/polopoly_fs/1.1844440.1342529911!mobileimage-highres/3639871953.jpg http://cdn01.tv4.se/polopoly_fs/1.1844440.1342529911!mobileimage-logo-highres/1060276594.png http://cdn01.tv4.se/polopoly_fs/1.1844440.1342529911!mobileimage-large-highres/2927793294.jpg http://cdn01.tv4.se/polopoly_fs/1.1844440.1342529911!originallogoimage/1020099686.png http://cdn01.tv4.se/polopoly_fs/1.1844440.1342529911!originalformatimage/340677699.jpg http://cdn01.tv4.se/polopoly_fs/1.1844440.1342529911!originalcarouselimage/778081157.jpg Tea Stjärne och hennes kompis Rabih Jaber lagar mat tillsammans och varje vecka väljer Tea ut en person som hon tillägnar maträtten till. Visas i tv4 false http://cdn01.tv4.se/polopoly_fs/1.1844440.1342529911!image/1164153562.jpg http://cdn01.tv4.se/polopoly_fs/1.1844440.1342529911!smallformatimage/1620155308.jpg http://cdn01.tv4.se/polopoly_fs/1.1844440.1342529911!categorylarge/3858537288.jpg http://cdn01.tv4.se/polopoly_fs/1.1844440.1342529911!image-large/1495165191.jpg http://cdn01.tv4.se/polopoly_fs/1.1844440.1342529911!image-logo/4063902049.png http://cdn01.tv4.se/polopoly_fs/1.1844440.1342529911!small-image-logo/2569395022.png Hela program 12 true true false false Alla 1.1844440 Senaste programmen inom Barn 4 true true true false Alla 1.1821167,1.1863951,1.1844724,1.1838156,1.2137917,1.1844690,1.1844440,1.2556889,1.1844519,1.2320454,1.2556898,1.2488527,1.1844409,1.1862493,1.1839976,1.2255345,1.2255334,1.2373582,1.1831818,1.2282021 http://cdn01.tv4.se/polopoly_fs/1.1844519.1329926059!mobileimage/1517921631.png http://cdn01.tv4.se/polopoly_fs/1.1844519.1329926059!mobileimage-logo/96051019.png http://cdn01.tv4.se/polopoly_fs/1.1844519.1329926059!mobileimage-large/3802222618.jpg http://cdn01.tv4.se/polopoly_fs/1.1844519.1329926059!mobileimage-highres/1381305902.png http://cdn01.tv4.se/polopoly_fs/1.1844519.1329926059!mobileimage-logo-highres/3018802247.png http://cdn01.tv4.se/polopoly_fs/1.1844519.1329926059!mobileimage-large-highres/3953216234.jpg Lattjo lajbans egen robot har öppnat detektivfirman Nema problema och skickar iväg tjejerna på uppdrag. Visas i tv4 false http://cdn01.tv4.se/polopoly_fs/1.1844519.1329926059!image/1638792707.png http://cdn01.tv4.se/polopoly_fs/1.1844519.1329926059!smallformatimage/1745675142.png http://cdn01.tv4.se/polopoly_fs/1.1844519.1329926059!categorylarge/1002825169.jpg http://cdn01.tv4.se/polopoly_fs/1.1844519.1329926059!image-large/2503962599.jpg http://cdn01.tv4.se/polopoly_fs/1.1844519.1329926059!image-logo/1702916843.png http://cdn01.tv4.se/polopoly_fs/1.1844519.1329926059!small-image-logo/1737078888.png Hela program 12 true true false false Alla 1.1844526 Senaste programmen inom Barn 4 true true true false Alla 1.1821167,1.1863951,1.1844724,1.1838156,1.2137917,1.1844690,1.1844440,1.2556889,1.1844519,1.2320454,1.2556898,1.2488527,1.1844409,1.1862493,1.1839976,1.2255345,1.2255334,1.2373582,1.1831818,1.2282021 http://cdn01.tv4.se/polopoly_fs/1.1837835.1329926081!mobileimage/2642473709.png http://cdn01.tv4.se/polopoly_fs/1.1837835.1329926081!mobileimage-logo/3610929056.png http://cdn01.tv4.se/polopoly_fs/1.1837835.1329926081!mobileimage-large/1020066927.jpg http://cdn01.tv4.se/polopoly_fs/1.1837835.1329926081!mobileimage-highres/1763951137.png http://cdn01.tv4.se/polopoly_fs/1.1837835.1329926081!mobileimage-logo-highres/1879433928.png http://cdn01.tv4.se/polopoly_fs/1.1837835.1329926081!mobileimage-large-highres/2616424711.jpg Brevbärare Per är mycket mer än bara brevbärare. Han är vän med alla i staden där han bor och har alltid något snällt att säga eller ett skämt till alla och han finns alltid till hands för att rycka ut och hjälpa till när det behövs. Visas i tv4 false http://cdn01.tv4.se/polopoly_fs/1.1837835.1329926081!image/4002963394.png http://cdn01.tv4.se/polopoly_fs/1.1837835.1329926081!smallformatimage/2643181709.png http://cdn01.tv4.se/polopoly_fs/1.1837835.1329926081!categorylarge/3705005051.jpg http://cdn01.tv4.se/polopoly_fs/1.1837835.1329926081!image-large/3705005051.jpg http://cdn01.tv4.se/polopoly_fs/1.1837835.1329926081!image-logo/1507712218.png http://cdn01.tv4.se/polopoly_fs/1.1837835.1329926081!small-image-logo/2696029942.png Hela program 12 true true false false 1.1837835 Senaste programmen inom Barn 4 true true true false Alla 1.1821167,1.1863951,1.1844724,1.1838156,1.2137917,1.1844690,1.1844440,1.2556889,1.1844519,1.2320454,1.2556898,1.2488527,1.1844409,1.1862493,1.1839976,1.2255345,1.2255334,1.2373582,1.1831818,1.2282021 http://cdn01.tv4.se/polopoly_fs/1.1844531.1334064605!mobileimage/1308576755.png http://cdn01.tv4.se/polopoly_fs/1.1844531.1334064605!mobileimage-highres/3478309874.png http://cdn01.tv4.se/polopoly_fs/1.1844531.1334064605!originallogoimage/2828203525.png http://cdn01.tv4.se/polopoly_fs/1.1844531.1334064605!originalformatimage/742791146.jpg http://cdn01.tv4.se/polopoly_fs/1.1844531.1334064605!originalcarouselimage/3545813473.jpg Raymond är ett franskt-brittiskt barnprogram från 2008. Raymond är åtta år och hamnar ständigt i kniviga situationer. Men med sin charm och list, samt med hjälp av goda vänner klarar han sig alltid ur de knipor han hamnat i. SE;SE 115.111.227.14 115.111.227.6 25.19.39.117 210.94.41.89 217.67.201.237 217.67.201.162 Visas i tv4 false http://cdn01.tv4.se/polopoly_fs/1.1844531.1334064605!image/2535027722.png http://cdn01.tv4.se/polopoly_fs/1.1844531.1334064605!smallformatimage/2755684924.png Hela program 12 true true false false Alla 1.1844570 Senaste programmen inom Barn 4 true true true false Alla 1.1821167,1.1863951,1.1844724,1.1838156,1.2137917,1.1844690,1.1844440,1.2556889,1.1844519,1.2320454,1.2556898,1.2488527,1.1844409,1.1862493,1.1839976,1.2255345,1.2255334,1.2373582,1.1831818,1.2282021 http://cdn01.tv4.se/polopoly_fs/1.1844575.1329926116!mobileimage/2647738356.png http://cdn01.tv4.se/polopoly_fs/1.1844575.1329926116!mobileimage-logo/3255926240.png http://cdn01.tv4.se/polopoly_fs/1.1844575.1329926116!mobileimage-large/652524009.jpg http://cdn01.tv4.se/polopoly_fs/1.1844575.1329926116!mobileimage-highres/2516446341.png http://cdn01.tv4.se/polopoly_fs/1.1844575.1329926116!mobileimage-logo-highres/1950852844.png http://cdn01.tv4.se/polopoly_fs/1.1844575.1329926116!mobileimage-large-highres/2427609829.jpg Rupert Björn är ett brittiskt barnprogram i 52 delar från 2007. Visas i tv4 false http://cdn01.tv4.se/polopoly_fs/1.1844575.1329926116!image/2785352872.png http://cdn01.tv4.se/polopoly_fs/1.1844575.1329926116!smallformatimage/2946761005.png http://cdn01.tv4.se/polopoly_fs/1.1844575.1329926116!categorylarge/2483793408.jpg http://cdn01.tv4.se/polopoly_fs/1.1844575.1329926116!image-large/3219903208.jpg http://cdn01.tv4.se/polopoly_fs/1.1844575.1329926116!image-logo/2720567360.png http://cdn01.tv4.se/polopoly_fs/1.1844575.1329926116!small-image-logo/2686540483.png Hela program 12 true true false false Alla 1.1844575 Senaste programmen inom Barn 4 true true true false Alla 1.1821167,1.1863951,1.1844724,1.1838156,1.2137917,1.1844690,1.1844440,1.2556889,1.1844519,1.2320454,1.2556898,1.2488527,1.1844409,1.1862493,1.1839976,1.2255345,1.2255334,1.2373582,1.1831818,1.2282021 http://cdn01.tv4.se/polopoly_fs/1.1844605.1332340706!mobileimage/1327939764.jpg http://cdn01.tv4.se/polopoly_fs/1.1844605.1332340706!mobileimage-logo/1332004340.png http://cdn01.tv4.se/polopoly_fs/1.1844605.1332340706!mobileimage-large/1002248633.jpg http://cdn01.tv4.se/polopoly_fs/1.1844605.1332340706!mobileimage-highres/246455545.jpg http://cdn01.tv4.se/polopoly_fs/1.1844605.1332340706!mobileimage-logo-highres/2140337355.png http://cdn01.tv4.se/polopoly_fs/1.1844605.1332340706!mobileimage-large-highres/189474950.jpg Programledaren Tobbe Blom och hans smartskallar tänjer på vetenskapens gränser och ger svar på mängder av frågor. Visas i tv4 false http://cdn01.tv4.se/polopoly_fs/1.1844605.1332340706!image/4116534420.jpg http://cdn01.tv4.se/polopoly_fs/1.1844605.1332340706!smallformatimage/3792501400.jpg http://cdn01.tv4.se/polopoly_fs/1.1844605.1332340706!categorylarge/1772214272.jpg http://cdn01.tv4.se/polopoly_fs/1.1844605.1332340706!image-large/1032299194.jpg http://cdn01.tv4.se/polopoly_fs/1.1844605.1332340706!image-logo/2724084136.png http://cdn01.tv4.se/polopoly_fs/1.1844605.1332340706!small-image-logo/3322392683.png Hela program 12 true true false false Alla 1.1844605 Senaste programmen inom Barn 4 true true true false Alla 1.1821167,1.1863951,1.1844724,1.1838156,1.2137917,1.1844690,1.1844440,1.2556889,1.1844519,1.2320454,1.2556898,1.2488527,1.1844409,1.1862493,1.1839976,1.2255345,1.2255334,1.2373582,1.1831818,1.2282021 http://cdn01.tv4.se/polopoly_fs/1.1844635.1329926146!mobileimage/498359111.png http://cdn01.tv4.se/polopoly_fs/1.1844635.1329926146!mobileimage-logo/2144287846.png http://cdn01.tv4.se/polopoly_fs/1.1844635.1329926146!mobileimage-large/3458813907.jpg http://cdn01.tv4.se/polopoly_fs/1.1844635.1329926146!mobileimage-highres/1053452954.png http://cdn01.tv4.se/polopoly_fs/1.1844635.1329926146!mobileimage-logo-highres/3650969737.png http://cdn01.tv4.se/polopoly_fs/1.1844635.1329926146!mobileimage-large-highres/1752896316.jpg Husdjur kan vara jobbiga för sina ägare men som tur är finns Windy, den perfekta djurvakten. Varje dag efter skolan gör Windy sitt bästa för att samla in sin skara av djur och ofta lär hon sig en värdefull läxa på vägen. Visas i tv4 false http://cdn01.tv4.se/polopoly_fs/1.1844635.1329926146!image/2821933486.png http://cdn01.tv4.se/polopoly_fs/1.1844635.1329926146!smallformatimage/2218318361.png http://cdn01.tv4.se/polopoly_fs/1.1844635.1329926146!categorylarge/1701066011.jpg http://cdn01.tv4.se/polopoly_fs/1.1844635.1329926146!image-large/1094076675.jpg http://cdn01.tv4.se/polopoly_fs/1.1844635.1329926146!image-logo/1935889133.png http://cdn01.tv4.se/polopoly_fs/1.1844635.1329926146!small-image-logo/913202949.png Hela program 12 true true false false Alla 1.1844635 Senaste programmen inom Barn 4 true true true false Alla 1.1821167,1.1863951,1.1844724,1.1838156,1.2137917,1.1844690,1.1844440,1.2556889,1.1844519,1.2320454,1.2556898,1.2488527,1.1844409,1.1862493,1.1839976,1.2255345,1.2255334,1.2373582,1.1831818,1.2282021 http://cdn01.tv4.se/polopoly_fs/1.1838058.1329926161!mobileimage/3326112391.jpg http://cdn01.tv4.se/polopoly_fs/1.1838058.1329926161!mobileimage-logo/1550864874.png http://cdn01.tv4.se/polopoly_fs/1.1838058.1329926161!mobileimage-large/1430911882.jpg http://cdn01.tv4.se/polopoly_fs/1.1838058.1329926161!mobileimage-highres/3463240182.jpg http://cdn01.tv4.se/polopoly_fs/1.1838058.1329926161!mobileimage-logo-highres/3928394470.png http://cdn01.tv4.se/polopoly_fs/1.1838058.1329926161!mobileimage-large-highres/1896827450.jpg Följ med det lilla blå tankloket Thomas äventyr tillsammans med sina vänner. Visas i tv4 false http://cdn01.tv4.se/polopoly_fs/1.1838058.1329926161!image/4254345691.jpg http://cdn01.tv4.se/polopoly_fs/1.1838058.1329926161!smallformatimage/4097127518.jpg http://cdn01.tv4.se/polopoly_fs/1.1838058.1329926161!categorylarge/75857974.jpg http://cdn01.tv4.se/polopoly_fs/1.1838058.1329926161!image-large/2440277268.jpg http://cdn01.tv4.se/polopoly_fs/1.1838058.1329926161!image-logo/1915208657.png http://cdn01.tv4.se/polopoly_fs/1.1838058.1329926161!small-image-logo/723659715.png Hela program 12 true true false false Alla 1.1838058 Senaste programmen inom Barn 4 true true true false Alla 1.1821167,1.1863951,1.1844724,1.1838156,1.2137917,1.1844690,1.1844440,1.2556889,1.1844519,1.2320454,1.2556898,1.2488527,1.1844409,1.1862493,1.1839976,1.2255345,1.2255334,1.2373582,1.1831818,1.2282021 http://cdn01.tv4.se/polopoly_fs/1.1844669.1342530003!mobileimage/4002527710.png http://cdn01.tv4.se/polopoly_fs/1.1844669.1342530003!mobileimage-logo/1582574155.png http://cdn01.tv4.se/polopoly_fs/1.1844669.1342530003!mobileimage-large/2154103207.jpg http://cdn01.tv4.se/polopoly_fs/1.1844669.1342530003!mobileimage-highres/1273330056.png http://cdn01.tv4.se/polopoly_fs/1.1844669.1342530003!mobileimage-logo-highres/2048039931.png http://cdn01.tv4.se/polopoly_fs/1.1844669.1342530003!mobileimage-large-highres/1260450970.jpg I en liten studio på TV4 sänder TV Myra nyheter. Nyhetsankare är en divig myra som rapporterar om viktiga händelser. Visas i tv4 false http://cdn01.tv4.se/polopoly_fs/1.1844669.1342530003!image/1746309301.png http://cdn01.tv4.se/polopoly_fs/1.1844669.1342530003!smallformatimage/840254424.png http://cdn01.tv4.se/polopoly_fs/1.1844669.1342530003!categorylarge/3953200091.png http://cdn01.tv4.se/polopoly_fs/1.1844669.1342530003!image-large/2119640825.png http://cdn01.tv4.se/polopoly_fs/1.1844669.1342530003!image-logo/3190526444.png http://cdn01.tv4.se/polopoly_fs/1.1844669.1342530003!small-image-logo/32946519.png Hela program 12 true true false false Alla 1.1844669 Senaste programmen inom Barn 4 true true true false Alla 1.1821167,1.1863951,1.1844724,1.1838156,1.2137917,1.1844690,1.1844440,1.2556889,1.1844519,1.2320454,1.2556898,1.2488527,1.1844409,1.1862493,1.1839976,1.2255345,1.2255334,1.2373582,1.1831818,1.2282021 http://cdn01.tv4.se/polopoly_fs/1.1844489.1329926192!mobileimage/2332055436.png http://cdn01.tv4.se/polopoly_fs/1.1844489.1329926192!mobileimage-logo/1520067793.png http://cdn01.tv4.se/polopoly_fs/1.1844489.1329926192!mobileimage-large/3530948931.jpg http://cdn01.tv4.se/polopoly_fs/1.1844489.1329926192!mobileimage-highres/1329712513.png http://cdn01.tv4.se/polopoly_fs/1.1844489.1329926192!mobileimage-logo-highres/713873794.png http://cdn01.tv4.se/polopoly_fs/1.1844489.1329926192!mobileimage-large-highres/2724248592.jpg Leon är ett lejon som lever på savannen. Han är kungen bland djuren men lyckas inte skrämma de övriga djuren. Visas i tv4 false http://cdn01.tv4.se/polopoly_fs/1.1844489.1329926192!image/2934484602.png http://cdn01.tv4.se/polopoly_fs/1.1844489.1329926192!smallformatimage/338382655.png http://cdn01.tv4.se/polopoly_fs/1.1844489.1329926192!categorylarge/504979482.jpg http://cdn01.tv4.se/polopoly_fs/1.1844489.1329926192!image-logo/2508225802.png http://cdn01.tv4.se/polopoly_fs/1.1844489.1329926192!small-image-logo/648559669.png Hela program 12 true true false false Alla 1.1844489 Senaste programmen inom Barn 4 true true true false Alla 1.1821167,1.1863951,1.1844724,1.1838156,1.2137917,1.1844690,1.1844440,1.2556889,1.1844519,1.2320454,1.2556898,1.2488527,1.1844409,1.1862493,1.1839976,1.2255345,1.2255334,1.2373582,1.1831818,1.2282021 Program - Hem & fritid 30 false Alla 1.1969883,1.2175713,1.1967202,1.2607835,1.1844807,1.1967026,1.2496849,1.1969875,1.2495269,1.1820939,1.2120233,1.1820906,1.1998013,1.2001088,1.2104220,1.1981803 1.2203988,1.2175713,1.2131342,1.1968381,1.2290190,1.1973674,1.2454622,1.2553778,1.1969934,1.1844773,1.2183904,1.1825110,1.1969920,1.1969891,1.1889143,1.1969952,1.1955586,1.1954288,1.2116087,1.1969944,1.2179010,1.2143651,1.2142089,1.2063787,1.1999217,1.2501348,1.2114429,1.1920934,1.2070220,1.1944937,1.2169395,1.1969926,1.1959999,1.2391229,1.2179038,1.1933016 1.2691648,1.1965969,1.2485530,1.2499112,1.1985464,1.1965981,1.2329867,1.1969971,1.2338332,1.1833763,1.2069968,1.1973119,1.2120185,1.2107951,1.1969960,1.1973424,1.1973415,1.1973433 1.1965981,1.2606746,1.2069968,1.2086492,1.1820955,1.2116082,1.1967155,1.2086513,1.2509944 1.2485530,1.2063787 false http://cdn01.tv4.se/polopoly_fs/1.2242004.1341213165!image/298177630.jpg https://www.tv4play.se/order/produkter?redirect_url=%2F%3F&promo=fiskpinnen&product_group_id=7 Senaste programmen inom Hem & Fritid 4 true true true false Alla 1.2496849,1.1833763,1.1969971,1.1985464,1.2501348,1.1969891,1.1844807,1.2086492,1.2203988,1.1825110,1.2175713,1.1969875,1.2114429,1.1844773,1.1973674,1.2607835,1.2183904,1.2691648,1.1969952,1.1820955 http://cdn01.tv4.se/polopoly_fs/1.2175713.1342530461!mobileimage/614139170.jpg http://cdn01.tv4.se/polopoly_fs/1.2175713.1342530461!mobileimage-logo/164187516.png http://cdn01.tv4.se/polopoly_fs/1.2175713.1342530461!mobileimage-large/1607881717.jpg http://cdn01.tv4.se/polopoly_fs/1.2175713.1342530461!mobileimage-highres/1780844709.jpg http://cdn01.tv4.se/polopoly_fs/1.2175713.1342530461!mobileimage-logo-highres/3028139898.png http://cdn01.tv4.se/polopoly_fs/1.2175713.1342530461!mobileimage-large-highres/2915321094.jpg http://cdn01.tv4.se/polopoly_fs/1.2175713.1342530461!originallogoimage/3230798309.png http://cdn01.tv4.se/polopoly_fs/1.2175713.1342530461!originalformatimage/1733453426.jpg http://cdn01.tv4.se/polopoly_fs/1.2175713.1342530461!originalcarouselimage/359608112.jpg Ernst Kirchsteiger reser till olika platser i Sommarsverige för att inreda och hjälpa till med familjers sommarprojekt. Visas i tv4 false http://cdn01.tv4.se/polopoly_fs/1.2175713.1342530461!image/3459032274.jpg http://cdn01.tv4.se/polopoly_fs/1.2175713.1342530461!smallformatimage/3957239204.jpg http://cdn01.tv4.se/polopoly_fs/1.2175713.1342530461!categorylarge/1303238084.jpg http://cdn01.tv4.se/polopoly_fs/1.2175713.1342530461!image-large/80377100.jpg http://cdn01.tv4.se/polopoly_fs/1.2175713.1342530461!image-logo/2037714793.png http://cdn01.tv4.se/polopoly_fs/1.2175713.1342530461!small-image-logo/308997446.png Hela program 12 true false false false Alla 1.2681506 Senaste klippen 8 false true false true Alla 1.2175713 Hela program 2011 12 true false false false Alla 1.2175721 Hela program 2010 12 true true false false Alla 1.2661344 Hela program 2009 12 true true false false Alla 1.2661343 Hela program 2008 12 true false false false Alla 1.2661341 Senaste programmen inom Hem & Fritid 4 true true true false Alla 1.2496849,1.1833763,1.1969971,1.1985464,1.2501348,1.1969891,1.1844807,1.2086492,1.2203988,1.1825110,1.2175713,1.1969875,1.2114429,1.1844773,1.1973674,1.2607835,1.2183904,1.2691648,1.1969952,1.1820955 http://cdn01.tv4.se/polopoly_fs/1.1967026.1342530528!mobileimage/131522476.jpg http://cdn01.tv4.se/polopoly_fs/1.1967026.1342530528!mobileimage-logo/1123247245.png http://cdn01.tv4.se/polopoly_fs/1.1967026.1342530528!mobileimage-large/3040815181.jpg http://cdn01.tv4.se/polopoly_fs/1.1967026.1342530528!mobileimage-highres/2239455149.jpg http://cdn01.tv4.se/polopoly_fs/1.1967026.1342530528!mobileimage-logo-highres/2310443440.png http://cdn01.tv4.se/polopoly_fs/1.1967026.1342530528!mobileimage-large-highres/2121981296.jpg http://cdn01.tv4.se/polopoly_fs/1.1967026.1342530528!originallogoimage/659258147.png http://cdn01.tv4.se/polopoly_fs/1.1967026.1342530528!originalformatimage/2745146060.jpg http://cdn01.tv4.se/polopoly_fs/1.1967026.1342530528!originalcarouselimage/1899921628.png Teamet åker landet runt för att finna bygg- och renoveringsprojekt som strandat på grund av att kunskapen eller tiden inte räckt till. Visas i tv4 false http://cdn01.tv4.se/polopoly_fs/1.1967026.1342530528!image/3710967893.jpg http://cdn01.tv4.se/polopoly_fs/1.1967026.1342530528!smallformatimage/3999923811.jpg http://cdn01.tv4.se/polopoly_fs/1.1967026.1342530528!categorylarge/2008619921.jpg http://cdn01.tv4.se/polopoly_fs/1.1967026.1342530528!image-large/2722933848.jpg http://cdn01.tv4.se/polopoly_fs/1.1967026.1342530528!image-logo/2773348081.png http://cdn01.tv4.se/polopoly_fs/1.1967026.1342530528!small-image-logo/1454217809.png Hela program 4 true false false true Alla 1.1967028 Senaste klippen 12 true true false false 1.1967031 Hela program 2011 12 true false false false Alla 1.2658592 Hela program 2010 12 true false false false Alla 1.2658591 Hela program 2009 12 true false false false Alla 1.2658589 Senaste programmen inom Hem & Fritid 4 true true true false Alla 1.2496849,1.1833763,1.1969971,1.1985464,1.2501348,1.1969891,1.1844807,1.2086492,1.2203988,1.1825110,1.2175713,1.1969875,1.2114429,1.1844773,1.1973674,1.2607835,1.2183904,1.2691648,1.1969952,1.1820955 http://cdn01.tv4.se/polopoly_fs/1.2668845.1339705176!originallogoimage/3349283014.png http://cdn01.tv4.se/polopoly_fs/1.2668845.1339705176!originalformatimage/3009826190.jpg http://cdn01.tv4.se/polopoly_fs/1.2668845.1339705176!originalcarouselimage/4045488275.jpg I Jamies sommarfestival från 2011 ordnar Jamie Oliver med en tre dagars festival som kombinerar förstaklassig mat med musik. SE;SE Visas i sjuan false Hela program 12 true false false false Alla 1.2668845 http://cdn01.tv4.se/polopoly_fs/1.2606746.1334146782!originallogoimage/798147622.png http://cdn01.tv4.se/polopoly_fs/1.2606746.1334146782!originalformatimage/2914132558.jpg http://cdn01.tv4.se/polopoly_fs/1.2606746.1334146782!originalcarouselimage/890388411.jpg Jamie Oliver hjälper tillsammans med vetenskapsmannen David Starkey, journalisten Alastair Campbell, skådespelaren Simon Callow, musikern Jazzie B, artisten Rolf Harris och olympiamästaren Dealye Thomson ungdomar som lämnat skolan för att ge dem en andra chans till utbildning. SE;SE 115.111.227.14 115.111.227.6 25.19.39.117 210.94.41.89 217.67.201.237 217.67.201.162 Visas i sjuan false Hela program 12 true false false false Alla 1.2606746 Senaste programmen inom Hem & Fritid 4 true true true false Alla 1.2496849,1.1833763,1.1969971,1.1985464,1.2501348,1.1969891,1.1844807,1.2086492,1.2203988,1.1825110,1.2175713,1.1969875,1.2114429,1.1844773,1.1973674,1.2607835,1.2183904,1.2691648,1.1969952,1.1820955 http://cdn01.tv4.se/polopoly_fs/1.2607835.1342530614!originallogoimage/1076185533.png http://cdn01.tv4.se/polopoly_fs/1.2607835.1342530614!originalformatimage/4012024009.jpg http://cdn01.tv4.se/polopoly_fs/1.2607835.1342530614!originalcarouselimage/257151423.png Linda Lindorff förbättrar tillsammans med sitt team utemiljöer för människor och verksamheter som verkligen behöver det. SE 115.111.227.14 115.111.227.6 25.19.39.117 210.94.41.89 217.67.201.237 217.67.201.162 Visas i tv4 false Hela program 12 true false false false Alla 1.2607835 Senaste klippen 12 false true false false Alla 1.2607847 Senaste programmen inom Hem & Fritid 4 true true true false Alla 1.2496849,1.1833763,1.1969971,1.1985464,1.2501348,1.1969891,1.1844807,1.2086492,1.2203988,1.1825110,1.2175713,1.1969875,1.2114429,1.1844773,1.1973674,1.2607835,1.2183904,1.2691648,1.1969952,1.1820955 http://cdn01.tv4.se/polopoly_fs/1.1973674.1342530721!mobileimage/887589120.jpg http://cdn01.tv4.se/polopoly_fs/1.1973674.1342530721!mobileimage-logo/1158542135.png http://cdn01.tv4.se/polopoly_fs/1.1973674.1342530721!mobileimage-large/579503341.jpg http://cdn01.tv4.se/polopoly_fs/1.1973674.1342530721!mobileimage-highres/395950301.jpg http://cdn01.tv4.se/polopoly_fs/1.1973674.1342530721!mobileimage-logo-highres/4082837563.png http://cdn01.tv4.se/polopoly_fs/1.1973674.1342530721!mobileimage-large-highres/1863555087.jpg http://cdn01.tv4.se/polopoly_fs/1.1973674.1342530721!originallogoimage/2373283881.png http://cdn01.tv4.se/polopoly_fs/1.1973674.1342530721!originalformatimage/2172406291.jpg http://cdn01.tv4.se/polopoly_fs/1.1973674.1342530721!originalcarouselimage/4291375587.png I Sveriges mästerkock följer man svenska amatörkockar när de tar steget ut från sitt eget kök till att laga mat på toppnivå. SE 115.111.227.14 115.111.227.6 25.19.39.117 210.94.41.89 217.67.201.237 217.67.201.162;SE 115.111.227.14 115.111.227.6 25.19.39.117 210.94.41.89 217.67.201.237 217.67.201.162;SE 115.111.227.14 115.111.227.6 25.19.39.117 210.94.41.89 217.67.201.237 217.67.201.162;SE 115.111.227.14 115.111.227.6 25.19.39.117 210.94.41.89 217.67.201.237 217.67.201.162 Visas i tv4 http://www.tv4.se/sveriges_masterkock false http://cdn01.tv4.se/polopoly_fs/1.1973674.1342530721!image/2170592233.jpg http://cdn01.tv4.se/polopoly_fs/1.1973674.1342530721!smallformatimage/2909472862.jpg http://cdn01.tv4.se/polopoly_fs/1.1973674.1342530721!categorylarge/1645002280.jpg http://cdn01.tv4.se/polopoly_fs/1.1973674.1342530721!image-large/2912256573.jpg http://cdn01.tv4.se/polopoly_fs/1.1973674.1342530721!image-logo/2680199635.png http://cdn01.tv4.se/polopoly_fs/1.1973674.1342530721!small-image-logo/3670905915.png Hela program 12 true false false true 1.1973674 Senaste klippen 12 false true false true 1.1973687 Masterclass 4 true true false false Alla 1.2501651 Senaste programmen inom Hem & Fritid 4 true true true false Alla 1.2496849,1.1833763,1.1969971,1.1985464,1.2501348,1.1969891,1.1844807,1.2086492,1.2203988,1.1825110,1.2175713,1.1969875,1.2114429,1.1844773,1.1973674,1.2607835,1.2183904,1.2691648,1.1969952,1.1820955 http://cdn01.tv4.se/polopoly_fs/1.1820955.1342530787!mobileimage/3140782615.jpg http://cdn01.tv4.se/polopoly_fs/1.1820955.1342530787!mobileimage-logo/2526528936.png http://cdn01.tv4.se/polopoly_fs/1.1820955.1342530787!mobileimage-large/165510646.jpg http://cdn01.tv4.se/polopoly_fs/1.1820955.1342530787!mobileimage-highres/966330902.jpg http://cdn01.tv4.se/polopoly_fs/1.1820955.1342530787!mobileimage-logo-highres/549527204.png http://cdn01.tv4.se/polopoly_fs/1.1820955.1342530787!mobileimage-large-highres/3264776395.jpg http://cdn01.tv4.se/polopoly_fs/1.1820955.1342530787!originallogoimage/446651829.png http://cdn01.tv4.se/polopoly_fs/1.1820955.1342530787!originalformatimage/1753330831.jpg http://cdn01.tv4.se/polopoly_fs/1.1820955.1342530787!originalcarouselimage/3616248762.png Sju par som tillsammans väger nästan två ton får chansen att förändra sina liv och bli av med farlig övervikt. SE 115.111.227.14 115.111.227.6 25.19.39.117 210.94.41.89 217.67.201.237 217.67.201.162;SE 129.35.209.170 58.247.178.245 115.111.227.14 115.111.227.6 25.19.39.117 210.94.41.89 217.67.201.237 217.67.201.162;SE 115.111.227.14 115.111.227.6 25.19.39.117 210.94.41.89 217.67.201.237 217.67.201.162 Visas i tv4 http://www.tv4.se/biggest_loser false http://cdn01.tv4.se/polopoly_fs/1.1820955.1342530787!image/1641199086.jpg http://cdn01.tv4.se/polopoly_fs/1.1820955.1342530787!smallformatimage/1384885208.jpg http://cdn01.tv4.se/polopoly_fs/1.1820955.1342530787!categorylarge/3955841363.jpg http://cdn01.tv4.se/polopoly_fs/1.1820955.1342530787!image-large/3858333815.jpg http://cdn01.tv4.se/polopoly_fs/1.1820955.1342530787!image-logo/2644096684.png http://cdn01.tv4.se/polopoly_fs/1.1820955.1342530787!small-image-logo/4104643211.png Hela program 12 true false false true 1.1844906 Senaste klippen 12 true true false false 1.1844908 Senaste programmen inom Hem & Fritid 4 true true true false Alla 1.2496849,1.1833763,1.1969971,1.1985464,1.2501348,1.1969891,1.1844807,1.2086492,1.2203988,1.1825110,1.2175713,1.1969875,1.2114429,1.1844773,1.1973674,1.2607835,1.2183904,1.2691648,1.1969952,1.1820955 http://cdn01.tv4.se/polopoly_fs/1.1965969.1342530862!mobileimage/1947816669.jpg http://cdn01.tv4.se/polopoly_fs/1.1965969.1342530862!mobileimage-logo/3117337628.png http://cdn01.tv4.se/polopoly_fs/1.1965969.1342530862!mobileimage-large/1578288478.jpg http://cdn01.tv4.se/polopoly_fs/1.1965969.1342530862!mobileimage-highres/3862921078.jpg http://cdn01.tv4.se/polopoly_fs/1.1965969.1342530862!mobileimage-logo-highres/4194310899.png http://cdn01.tv4.se/polopoly_fs/1.1965969.1342530862!mobileimage-large-highres/500962225.jpg http://cdn01.tv4.se/polopoly_fs/1.1965969.1342530862!originallogoimage/1793835627.png http://cdn01.tv4.se/polopoly_fs/1.1965969.1342530862!originalformatimage/3057043867.jpg http://cdn01.tv4.se/polopoly_fs/1.1965969.1342530862!originalcarouselimage/837722378.png Elisabet Bellman, Hans Fahlén och Hanna Hedlund reser världen över för att återfinna personers biologiska föräldrar eller okända syskon. SE 129.35.209.170 58.247.178.245 115.111.227.14 115.111.227.6 25.19.39.117 210.94.41.89 217.67.201.237 217.67.201.162;SE 129.35.209.170 58.247.178.245 115.111.227.14 115.111.227.6 25.19.39.117 210.94.41.89 217.67.201.237 217.67.201.162;SE 115.111.227.14 115.111.227.6 25.19.39.117 210.94.41.89 217.67.201.237 217.67.201.162;SE;SE 129.35.209.170 58.247.178.245;SE 129.35.209.170 58.247.178.245 Visas i tv4 http://www.tv4.se/1.2490385 false http://cdn01.tv4.se/polopoly_fs/1.1965969.1342530862!image/3753604905.jpg http://cdn01.tv4.se/polopoly_fs/1.1965969.1342530862!smallformatimage/967522487.jpg http://cdn01.tv4.se/polopoly_fs/1.1965969.1342530862!categorylarge/707873517.jpg http://cdn01.tv4.se/polopoly_fs/1.1965969.1342530862!image-large/3525105947.jpg http://cdn01.tv4.se/polopoly_fs/1.1965969.1342530862!image-logo/160478085.png Hela program 12 true false false true Alla 1.1965974 Senaste programmen inom Hem & Fritid 4 true true true false Alla 1.2496849,1.1833763,1.1969971,1.1985464,1.2501348,1.1969891,1.1844807,1.2086492,1.2203988,1.1825110,1.2175713,1.1969875,1.2114429,1.1844773,1.1973674,1.2607835,1.2183904,1.2691648,1.1969952,1.1820955 Hela program 2010 12 true false false false Alla 1.2658602 Hela program 2011 12 true false false false Alla 1.2658603 http://cdn01.tv4.se/polopoly_fs/1.1969875.1338821610!mobileimage/438601551.jpg http://cdn01.tv4.se/polopoly_fs/1.1969875.1338821610!mobileimage-logo/2148836386.png http://cdn01.tv4.se/polopoly_fs/1.1969875.1338821610!mobileimage-large/1692491819.jpg http://cdn01.tv4.se/polopoly_fs/1.1969875.1338821610!mobileimage-highres/302525502.jpg http://cdn01.tv4.se/polopoly_fs/1.1969875.1338821610!mobileimage-logo-highres/910327598.png http://cdn01.tv4.se/polopoly_fs/1.1969875.1338821610!mobileimage-large-highres/3535256359.jpg http://cdn01.tv4.se/polopoly_fs/1.1969875.1338821610!originallogoimage/2495541846.png http://cdn01.tv4.se/polopoly_fs/1.1969875.1338821610!originalformatimage/2600245167.jpg http://cdn01.tv4.se/polopoly_fs/1.1969875.1338821610!originalcarouselimage/3499499897.png Många svenska familjer är hårt drabbade av fuskande hantverkare. Lennart Ekdal och Martin Timell hjälper familjer som blivit lurade. SE Visas i tv4 http://www.hemmakanalen.se/2.60373 false http://cdn01.tv4.se/polopoly_fs/1.1969875.1338821610!image/569433107.jpg http://cdn01.tv4.se/polopoly_fs/1.1969875.1338821610!smallformatimage/676446614.jpg http://cdn01.tv4.se/polopoly_fs/1.1969875.1338821610!categorylarge/3591272386.jpg http://cdn01.tv4.se/polopoly_fs/1.1969875.1338821610!image-large/4260236074.jpg http://cdn01.tv4.se/polopoly_fs/1.1969875.1338821610!image-logo/3761064322.png http://cdn01.tv4.se/polopoly_fs/1.1969875.1338821610!small-image-logo/3794043649.png Hela program 12 true false false false Alla 1.2658580 Hela program 2011 12 true false false false Alla 1.2658577 Hela program 2010 12 true false false false Alla 1.2658576 Senaste klippen 12 false true false false 1.1969879,1.1969875 Senaste programmen inom Hem & Fritid 4 true true true false Alla 1.2496849,1.1833763,1.1969971,1.1985464,1.2501348,1.1969891,1.1844807,1.2086492,1.2203988,1.1825110,1.2175713,1.1969875,1.2114429,1.1844773,1.1973674,1.2607835,1.2183904,1.2691648,1.1969952,1.1820955 http://cdn01.tv4.se/polopoly_fs/1.2203988.1341428455!originallogoimage/744077163.png http://cdn01.tv4.se/polopoly_fs/1.2203988.1341428455!originalformatimage/2888225055.jpg http://cdn01.tv4.se/polopoly_fs/1.2203988.1341428455!originalcarouselimage/1453278726.jpg I Tinas sommarkök åker Tina Nordström runt bland svenska sommarpärlor och lagar mat. Onsdagar 20:00 tv4 false Hela program 12 true false false false Alla 1.2681500,1.2681501 Hela program 2011 12 true false false false Alla 1.2203994 Senaste programmen inom Hem & Fritid 4 true true true false Alla 1.2496849,1.1833763,1.1969971,1.1985464,1.2501348,1.1969891,1.1844807,1.2086492,1.2203988,1.1825110,1.2175713,1.1969875,1.2114429,1.1844773,1.1973674,1.2607835,1.2183904,1.2691648,1.1969952,1.1820955 http://cdn01.tv4.se/polopoly_fs/1.1825110.1342603179!mobileimage/4108696940.jpg http://cdn01.tv4.se/polopoly_fs/1.1825110.1342603179!mobileimage-logo/3652711730.png http://cdn01.tv4.se/polopoly_fs/1.1825110.1342603179!mobileimage-large/2826949984.jpg http://cdn01.tv4.se/polopoly_fs/1.1825110.1342603179!mobileimage-highres/2210760599.jpg http://cdn01.tv4.se/polopoly_fs/1.1825110.1342603179!mobileimage-logo-highres/1677920052.png http://cdn01.tv4.se/polopoly_fs/1.1825110.1342603179!mobileimage-large-highres/255873032.jpg http://cdn01.tv4.se/polopoly_fs/1.1825110.1342603179!originallogoimage/2614280065.png http://cdn01.tv4.se/polopoly_fs/1.1825110.1342603179!originalformatimage/1192211569.jpg http://cdn01.tv4.se/polopoly_fs/1.1825110.1342603179!originalcarouselimage/2648944340.jpg Amatörkockar sätts på prov. Varje vecka får fyra, för varandra okända, personer turas om att bjuda varandra på middag. SE 115.111.227.14 115.111.227.6 25.19.39.117 210.94.41.89 217.67.201.237 217.67.201.162;SE;SE 115.111.227.14 115.111.227.6 25.19.39.117 210.94.41.89 217.67.201.237 217.67.201.162;SE;SE;SE 115.111.227.14 115.111.227.6 25.19.39.117 210.94.41.89 217.67.201.237 217.67.201.162;SE 115.111.227.14 115.111.227.6 25.19.39.117 210.94.41.89 217.67.201.237 217.67.201.162;SE 115.111.227.14 115.111.227.6 25.19.39.117 210.94.41.89 217.67.201.237 217.67.201.162;SE 115.111.227.14 115.111.227.6 25.19.39.117 210.94.41.89 217.67.201.237 217.67.201.162;SE;SE Visas i tv4 http://www.recept.nu/1.311645/ true Hela program 12 true false true false Alla 1.1825131,1.1981455,1.1981453,1.1981452,1.1981448,1.1981458 Senaste klippen 12 false true false false 1.1825129 Senaste programmen inom Hem & Fritid 4 true true true false Alla 1.2496849,1.1833763,1.1969971,1.1985464,1.2501348,1.1969891,1.1844807,1.2086492,1.2203988,1.1825110,1.2175713,1.1969875,1.2114429,1.1844773,1.1973674,1.2607835,1.2183904,1.2691648,1.1969952,1.1820955 http://cdn01.tv4.se/polopoly_fs/1.1844807.1342531059!mobileimage/1703299653.jpg http://cdn01.tv4.se/polopoly_fs/1.1844807.1342531059!mobileimage-logo/804611943.png http://cdn01.tv4.se/polopoly_fs/1.1844807.1342531059!mobileimage-large/2975238537.jpg http://cdn01.tv4.se/polopoly_fs/1.1844807.1342531059!mobileimage-highres/1116481348.jpg http://cdn01.tv4.se/polopoly_fs/1.1844807.1342531059!mobileimage-logo-highres/2453771617.png http://cdn01.tv4.se/polopoly_fs/1.1844807.1342531059!mobileimage-large-highres/216169359.jpg http://cdn01.tv4.se/polopoly_fs/1.1844807.1342531059!originallogoimage/3985594376.png http://cdn01.tv4.se/polopoly_fs/1.1844807.1342531059!originalformatimage/3305926701.jpg http://cdn01.tv4.se/polopoly_fs/1.1844807.1342531059!originalcarouselimage/2477200872.jpg Äntligen hemma-gänget med Martin Timell i spetsen besöker familjer som får hjälp med bygg- och snickeriprojekt. SE;SE 115.111.227.14 115.111.227.6 25.19.39.117 210.94.41.89 217.67.201.237 217.67.201.162 Tisdagar 20:00 tv4 http://www.tv4.se/antligen_hemma true Hela program 12 true false false true 1.1844807 Senaste klippen 12 false true false false 1.1844872 Senaste programmen inom Hem & Fritid 4 true true true false Alla 1.2496849,1.1833763,1.1969971,1.1985464,1.2501348,1.1969891,1.1844807,1.2086492,1.2203988,1.1825110,1.2175713,1.1969875,1.2114429,1.1844773,1.1973674,1.2607835,1.2183904,1.2691648,1.1969952,1.1820955 http://cdn01.tv4.se/polopoly_fs/1.2086492.1342531095!mobileimage/3178135354.jpg http://cdn01.tv4.se/polopoly_fs/1.2086492.1342531095!mobileimage-logo/2245710598.png http://cdn01.tv4.se/polopoly_fs/1.2086492.1342531095!mobileimage-large/3084335725.jpg http://cdn01.tv4.se/polopoly_fs/1.2086492.1342531095!mobileimage-highres/2590249531.jpg http://cdn01.tv4.se/polopoly_fs/1.2086492.1342531095!mobileimage-logo-highres/1812251329.png http://cdn01.tv4.se/polopoly_fs/1.2086492.1342531095!mobileimage-large-highres/3084335725.jpg http://cdn01.tv4.se/polopoly_fs/1.2086492.1342531095!originallogoimage/895970679.png http://cdn01.tv4.se/polopoly_fs/1.2086492.1342531095!originalformatimage/501499218.jpg http://cdn01.tv4.se/polopoly_fs/1.2086492.1342531095!originalcarouselimage/667583124.jpg Kostexperten Anna Skipper hjälper deltagarna att sluta med ohälsosam mat, allt för att återfå livslusten och helt enkelt må bättre. SE;SE 115.111.227.14 115.111.227.6 25.19.39.117 210.94.41.89 217.67.201.237 217.67.201.162;SE 129.35.209.170 58.247.178.245;SE 129.35.209.170 58.247.178.245 115.111.227.14 115.111.227.6 25.19.39.117 210.94.41.89 217.67.201.237 217.67.201.162;SE 129.35.209.170 58.247.178.245 115.111.227.14 115.111.227.6 25.19.39.117 210.94.41.89 217.67.201.237 217.67.201.162;SE 115.111.227.14 115.111.227.6 25.19.39.117 210.94.41.89 217.67.201.237 217.67.201.162 Torsdagar 20:00 tv4plus true http://cdn01.tv4.se/polopoly_fs/1.2086492.1342531095!image/3750278846.jpg http://cdn01.tv4.se/polopoly_fs/1.2086492.1342531095!smallformatimage/1112760332.jpg http://cdn01.tv4.se/polopoly_fs/1.2086492.1342531095!categorylarge/3084335725.jpg http://cdn01.tv4.se/polopoly_fs/1.2086492.1342531095!image-large/3084335725.jpg http://cdn01.tv4.se/polopoly_fs/1.2086492.1342531095!image-logo/3900148655.png http://cdn01.tv4.se/polopoly_fs/1.2086492.1342531095!small-image-logo/1137551636.png Alla program 4 true false false false Alla 1.2086497 Senaste klippen 4 false true false false Alla 1.2087700,1.2086492 Senaste programmen inom Hem & Fritid 4 true true true false Alla 1.2496849,1.1833763,1.1969971,1.1985464,1.2501348,1.1969891,1.1844807,1.2086492,1.2203988,1.1825110,1.2175713,1.1969875,1.2114429,1.1844773,1.1973674,1.2607835,1.2183904,1.2691648,1.1969952,1.1820955 http://cdn01.tv4.se/polopoly_fs/1.1985464.1342531167!mobileimage-large/4201069228.jpg http://cdn01.tv4.se/polopoly_fs/1.1985464.1342531167!mobileimage-large-highres/1278337440.jpg http://cdn01.tv4.se/polopoly_fs/1.1985464.1342531167!originallogoimage/2547260547.png http://cdn01.tv4.se/polopoly_fs/1.1985464.1342531167!originalformatimage/3353734438.jpg http://cdn01.tv4.se/polopoly_fs/1.1985464.1342531167!originalcarouselimage/2383247161.jpg Cesar Millan är mannen som får de mest aggressiva och hopplösa hundar att bli välartade familjemedlemmar. SE 129.35.209.170 58.247.178.245 115.111.227.14 115.111.227.6 25.19.39.117 210.94.41.89 217.67.201.237 217.67.201.162;SE;SE 115.111.227.14 115.111.227.6 25.19.39.117 210.94.41.89 217.67.201.237 217.67.201.162 Visas i tv4plus true Hela program 4 true false false false 1.1985482 Senaste programmen inom Hem & Fritid 4 true true true false Alla 1.2496849,1.1833763,1.1969971,1.1985464,1.2501348,1.1969891,1.1844807,1.2086492,1.2203988,1.1825110,1.2175713,1.1969875,1.2114429,1.1844773,1.1973674,1.2607835,1.2183904,1.2691648,1.1969952,1.1820955 http://cdn01.tv4.se/polopoly_fs/1.1965981.1334078059!mobileimage/1455728716.jpg http://cdn01.tv4.se/polopoly_fs/1.1965981.1334078059!mobileimage-logo/1936498689.png http://cdn01.tv4.se/polopoly_fs/1.1965981.1334078059!mobileimage-large/2051380112.jpg http://cdn01.tv4.se/polopoly_fs/1.1965981.1334078059!mobileimage-highres/3925140025.jpg http://cdn01.tv4.se/polopoly_fs/1.1965981.1334078059!mobileimage-logo-highres/3864990415.png http://cdn01.tv4.se/polopoly_fs/1.1965981.1334078059!mobileimage-large-highres/4017496414.jpg http://cdn01.tv4.se/polopoly_fs/1.1965981.1334078059!originallogoimage/204007549.png http://cdn01.tv4.se/polopoly_fs/1.1965981.1334078059!originalformatimage/3251312546.jpg http://cdn01.tv4.se/polopoly_fs/1.1965981.1334078059!originalcarouselimage/1472106846.jpg I den nya säsongen av Familjen Annorlunda medverkar tre familjer som har gemensamt att de har ovanligt många barn. SE 115.111.227.14 115.111.227.6 25.19.39.117 210.94.41.89 217.67.201.237 217.67.201.162;SE Visas i tv4 http://www.tv4.se/familjen_annorlunda true http://cdn01.tv4.se/polopoly_fs/1.1965981.1334078059!image/1966196957.jpg http://cdn01.tv4.se/polopoly_fs/1.1965981.1334078059!smallformatimage/3471403717.jpg http://cdn01.tv4.se/polopoly_fs/1.1965981.1334078059!categorylarge/1793457805.jpg http://cdn01.tv4.se/polopoly_fs/1.1965981.1334078059!image-large/1691690921.jpg http://cdn01.tv4.se/polopoly_fs/1.1965981.1334078059!image-logo/4123848417.png http://cdn01.tv4.se/polopoly_fs/1.1965981.1334078059!small-image-logo/3395174915.png Hela program 12 true false false true 1.1965981 Senaste klippen 12 true true false false 1.1967220 Senaste programmen inom Hem & Fritid 4 true true true false Alla 1.2496849,1.1833763,1.1969971,1.1985464,1.2501348,1.1969891,1.1844807,1.2086492,1.2203988,1.1825110,1.2175713,1.1969875,1.2114429,1.1844773,1.1973674,1.2607835,1.2183904,1.2691648,1.1969952,1.1820955 http://cdn01.tv4.se/polopoly_fs/1.1833763.1332853501!mobileimage/1287202064.png http://cdn01.tv4.se/polopoly_fs/1.1833763.1332853501!mobileimage-logo/1151247016.png http://cdn01.tv4.se/polopoly_fs/1.1833763.1332853501!mobileimage-large/2739055594.jpg http://cdn01.tv4.se/polopoly_fs/1.1833763.1332853501!mobileimage-highres/3734964411.png http://cdn01.tv4.se/polopoly_fs/1.1833763.1332853501!mobileimage-logo-highres/122713159.png http://cdn01.tv4.se/polopoly_fs/1.1833763.1332853501!mobileimage-large-highres/3767303429.jpg http://cdn01.tv4.se/polopoly_fs/1.1833763.1332853501!originallogoimage/3386839695.png http://cdn01.tv4.se/polopoly_fs/1.1833763.1332853501!originalformatimage/2555518304.jpg http://cdn01.tv4.se/polopoly_fs/1.1833763.1332853501!originalcarouselimage/771955661.jpg Tillsammans med Sveriges främsta medier besöker programledaren Caroline Giertz svenska hem där de boende har problem med övernaturliga händelser. Visas i tv4plus true Hela program 8 true false false true 1.1833763 Senaste klippen 12 true true false false 1.1833773 Senaste programmen inom Hem & Fritid 4 true true true false Alla 1.2496849,1.1833763,1.1969971,1.1985464,1.2501348,1.1969891,1.1844807,1.2086492,1.2203988,1.1825110,1.2175713,1.1969875,1.2114429,1.1844773,1.1973674,1.2607835,1.2183904,1.2691648,1.1969952,1.1820955 http://cdn01.tv4.se/polopoly_fs/1.1969971.1342603271!mobileimage/3508015473.jpg http://cdn01.tv4.se/polopoly_fs/1.1969971.1342603271!mobileimage-logo/31702898.png http://cdn01.tv4.se/polopoly_fs/1.1969971.1342603271!mobileimage-large/4085678471.jpg http://cdn01.tv4.se/polopoly_fs/1.1969971.1342603271!mobileimage-highres/2943167574.jpg http://cdn01.tv4.se/polopoly_fs/1.1969971.1342603271!mobileimage-logo-highres/4092701057.png http://cdn01.tv4.se/polopoly_fs/1.1969971.1342603271!mobileimage-large-highres/26515316.jpg William Moberg-Faulds och Peter Sjödin reser runt i Skandinavien för att fiska allt från gädda till lax. tv4sport true http://cdn01.tv4.se/polopoly_fs/1.1969971.1342603271!image/2246291105.jpg http://cdn01.tv4.se/polopoly_fs/1.1969971.1342603271!smallformatimage/2213533791.jpg http://cdn01.tv4.se/polopoly_fs/1.1969971.1342603271!categorylarge/3791456182.jpg http://cdn01.tv4.se/polopoly_fs/1.1969971.1342603271!image-large/499048894.jpg http://cdn01.tv4.se/polopoly_fs/1.1969971.1342603271!image-logo/271429175.png Hela program 12 true true false false 1.1969986 Senaste programmen inom Hem & Fritid 4 true true true false Alla 1.2496849,1.1833763,1.1969971,1.1985464,1.2501348,1.1969891,1.1844807,1.2086492,1.2203988,1.1825110,1.2175713,1.1969875,1.2114429,1.1844773,1.1973674,1.2607835,1.2183904,1.2691648,1.1969952,1.1820955 http://cdn01.tv4.se/polopoly_fs/1.2509944.1342531289!originallogoimage/1847720904.png http://cdn01.tv4.se/polopoly_fs/1.2509944.1342531289!originalformatimage/2906864071.jpg http://cdn01.tv4.se/polopoly_fs/1.2509944.1342531289!originalcarouselimage/1891828971.jpg Fyra blivande brudar tävlar mot varandra om vem som har det bästa bröllopet. Den brud som får högst poäng vinner en bröllopsresa. SE 115.111.227.14 115.111.227.6 25.19.39.117 210.94.41.89 217.67.201.237 217.67.201.162;SE;SE 115.111.227.14 115.111.227.6 25.19.39.117 210.94.41.89 217.67.201.237 217.67.201.162 visas i Sjuan true Hela program 12 true false false false Alla 1.2509944 Senaste programmen inom Hem & Fritid 4 true true true false Alla 1.2496849,1.1833763,1.1969971,1.1985464,1.2501348,1.1969891,1.1844807,1.2086492,1.2203988,1.1825110,1.2175713,1.1969875,1.2114429,1.1844773,1.1973674,1.2607835,1.2183904,1.2691648,1.1969952,1.1820955 http://cdn01.tv4.se/polopoly_fs/1.2495269.1342603409!originallogoimage/2821772115.png http://cdn01.tv4.se/polopoly_fs/1.2495269.1342603409!originalformatimage/320553319.jpg http://cdn01.tv4.se/polopoly_fs/1.2495269.1342603409!originalcarouselimage/433496294.jpg I denna blandning av dokumentär, reportage och modern livsstil får vi följa människorna i koloniområdet Iris. Sjuan true Hela program 12 true false false false Alla 1.2495269 Senaste programmen inom Hem & Fritid 4 true true true false Alla 1.2496849,1.1833763,1.1969971,1.1985464,1.2501348,1.1969891,1.1844807,1.2086492,1.2203988,1.1825110,1.2175713,1.1969875,1.2114429,1.1844773,1.1973674,1.2607835,1.2183904,1.2691648,1.1969952,1.1820955 http://cdn01.tv4.se/polopoly_fs/1.2553778.1333565963!originallogoimage/1119486250.png http://cdn01.tv4.se/polopoly_fs/1.2553778.1333565963!originalformatimage/756103992.jpg http://cdn01.tv4.se/polopoly_fs/1.2553778.1333565963!originalcarouselimage/2899077598.jpg Jamie Oliver beger sig till Los Angeles för att försöka förändra folkets matvanor. Men han stöter genast på patrull när Los Angeles skoldistrikt inte ger honom tillstånd att visa skolor hur man kan laga nyttig mat SE 115.111.227.14 115.111.227.6 25.19.39.117 210.94.41.89 217.67.201.237 217.67.201.162;SE Visas i sjuan false Hela program 12 true false false false Alla 1.2553778 Senaste programmen inom Hem & Fritid 4 true true true false Alla 1.2496849,1.1833763,1.1969971,1.1985464,1.2501348,1.1969891,1.1844807,1.2086492,1.2203988,1.1825110,1.2175713,1.1969875,1.2114429,1.1844773,1.1973674,1.2607835,1.2183904,1.2691648,1.1969952,1.1820955 http://cdn01.tv4.se/polopoly_fs/1.2691648.1342791105!originallogoimage/1421529210.png http://cdn01.tv4.se/polopoly_fs/1.2691648.1342791105!originalformatimage/3020019573.jpg http://cdn01.tv4.se/polopoly_fs/1.2691648.1342791105!originalcarouselimage/1167260897.jpg Här följer man Mark Barret när han jagar de största fiskarna i England och Norge. SE;SE Visas i tv4sport true Hela program 12 true false false false Alla 1.2691648 Senaste programmen inom Hem & Fritid 4 true true true false Alla 1.2496849,1.1833763,1.1969971,1.1985464,1.2501348,1.1969891,1.1844807,1.2086492,1.2203988,1.1825110,1.2175713,1.1969875,1.2114429,1.1844773,1.1973674,1.2607835,1.2183904,1.2691648,1.1969952,1.1820955 http://cdn01.tv4.se/polopoly_fs/1.2496849.1334661858!originallogoimage/265680952.png http://cdn01.tv4.se/polopoly_fs/1.2496849.1334661858!originalformatimage/2064758128.jpg http://cdn01.tv4.se/polopoly_fs/1.2496849.1334661858!originalcarouselimage/961984621.jpg Inredningsdesignern Kathryn Rayward och antikexperten Mark Hill inreder med vintage- och antika möbler. SE;SE 115.111.227.14 115.111.227.6 25.19.39.117 210.94.41.89 217.67.201.237 217.67.201.162;SE 115.111.227.14 115.111.227.6 25.19.39.117 210.94.41.89 217.67.201.237 217.67.201.162 Visas i sjuan true Hela program 12 true false false false Alla 1.2496849 http://cdn01.tv4.se/polopoly_fs/1.2499112.1342603492!originallogoimage/1718158686.png http://cdn01.tv4.se/polopoly_fs/1.2499112.1342603492!originalformatimage/1747673255.jpg http://cdn01.tv4.se/polopoly_fs/1.2499112.1342603492!originalcarouselimage/2226365164.jpg I Wild weddings bjuder man på de mest minnesvärda ögonblick som kan inträffa vid bröllop. SE 115.111.227.14 115.111.227.6 25.19.39.117 210.94.41.89 217.67.201.237 217.67.201.162;SE 115.111.227.14 115.111.227.6 25.19.39.117 210.94.41.89 217.67.201.237 217.67.201.162;SE visas i Sjuan true Hela program 12 true false false false Alla 1.2499112 Senaste programmen inom Hem & Fritid 4 true true true false Alla 1.2496849,1.1833763,1.1969971,1.1985464,1.2501348,1.1969891,1.1844807,1.2086492,1.2203988,1.1825110,1.2175713,1.1969875,1.2114429,1.1844773,1.1973674,1.2607835,1.2183904,1.2691648,1.1969952,1.1820955 http://cdn01.tv4.se/polopoly_fs/1.2501348.1329917834!originallogoimage/745973868.png http://cdn01.tv4.se/polopoly_fs/1.2501348.1329917834!originalformatimage/3594232878.jpg http://cdn01.tv4.se/polopoly_fs/1.2501348.1329917834!originalcarouselimage/598660359.jpg Brittisk matlagningsserie där Jamie Oliver tar sig an det brittiska köket för att visa att landet har en fantastik matkultur. Han besöker bland annat olika delar av landet som Yorkshire, Essex, Bristol och Wales för att få inspiration och tittar närmare på traditionen och kulturen som gör brittisk mat så spännande. SE;SE 115.111.227.14 115.111.227.6 25.19.39.117 210.94.41.89 217.67.201.237 217.67.201.162 visas i Sjuan false Hela program 12 true false false false Alla 1.2501348 Senaste programmen inom Hem & Fritid 4 true true true false Alla 1.2496849,1.1833763,1.1969971,1.1985464,1.2501348,1.1969891,1.1844807,1.2086492,1.2203988,1.1825110,1.2175713,1.1969875,1.2114429,1.1844773,1.1973674,1.2607835,1.2183904,1.2691648,1.1969952,1.1820955 http://cdn01.tv4.se/polopoly_fs/1.2485530.1342603526!originallogoimage/249795185.png http://cdn01.tv4.se/polopoly_fs/1.2485530.1342603526!originalformatimage/643873364.jpg http://cdn01.tv4.se/polopoly_fs/1.2485530.1342603526!originalcarouselimage/474906002.jpg Jan Guillou åker till Tanzania och Sydafrika för att jaga och hamnar i en jakt på tjuvjägare. visas i tv4 true Hela program 12 true false false false Alla 1.2485530 Senaste programmen inom Hem & Fritid 4 true true true false Alla 1.2496849,1.1833763,1.1969971,1.1985464,1.2501348,1.1969891,1.1844807,1.2086492,1.2203988,1.1825110,1.2175713,1.1969875,1.2114429,1.1844773,1.1973674,1.2607835,1.2183904,1.2691648,1.1969952,1.1820955 http://cdn01.tv4.se/polopoly_fs/1.2454622.1329918012!originallogoimage/1956576076.png http://cdn01.tv4.se/polopoly_fs/1.2454622.1329918012!originalformatimage/3111978131.jpg http://cdn01.tv4.se/polopoly_fs/1.2454622.1329918012!originalcarouselimage/600341188.jpg Här tar Jamie Olivers döttrar Poppy och Daisy över i köket. Tillsammans med sin pappa lagar de några av sina favoriter från julbordet. Dessutom tipsar Jamie om hur man får en lugn jul utan stress och visar hur man gör kalkon på ett enkelt vis. SE 115.111.227.14 115.111.227.6 25.19.39.117 210.94.41.89 217.67.201.237 217.67.201.162;SE visas i Sjuan false Hela program 12 true false false false Alla 1.2454622 Senaste programmen inom Hem & Fritid 4 true true true false Alla 1.2496849,1.1833763,1.1969971,1.1985464,1.2501348,1.1969891,1.1844807,1.2086492,1.2203988,1.1825110,1.2175713,1.1969875,1.2114429,1.1844773,1.1973674,1.2607835,1.2183904,1.2691648,1.1969952,1.1820955 http://cdn01.tv4.se/polopoly_fs/1.2338332.1342603604!originallogoimage/1316747789.png http://cdn01.tv4.se/polopoly_fs/1.2338332.1342603604!originalformatimage/3783005049.jpg http://cdn01.tv4.se/polopoly_fs/1.2338332.1342603604!originalcarouselimage/741586423.jpg Vi får följa par som ska gifta sig - men här är det brudgummen som bestämmer allt. SE;SE 115.111.227.14 115.111.227.6 25.19.39.117 210.94.41.89 217.67.201.237 217.67.201.162;SE 115.111.227.14 115.111.227.6 25.19.39.117 210.94.41.89 217.67.201.237 217.67.201.162 Visas i sjuan true Hela program 12 true false false false Alla 1.2338332 Senaste programmen inom Hem & Fritid 4 true true true false Alla 1.2496849,1.1833763,1.1969971,1.1985464,1.2501348,1.1969891,1.1844807,1.2086492,1.2203988,1.1825110,1.2175713,1.1969875,1.2114429,1.1844773,1.1973674,1.2607835,1.2183904,1.2691648,1.1969952,1.1820955 http://cdn01.tv4.se/polopoly_fs/1.2290190.1329918114!originallogoimage/2188112873.png http://cdn01.tv4.se/polopoly_fs/1.2290190.1329918114!originalformatimage/762059421.jpg http://cdn01.tv4.se/polopoly_fs/1.2290190.1329918114!originalcarouselimage/4134306496.jpg I Den stora matresan tar Per Morberg del av svenska mattraditioner och lagar lokala paradrätter på sitt eget morbergska vis. Visas i sjuan true Hela program 12 true false false false Alla 1.2290190 Senaste klippen 4 false true false false Alla 1.2321679 Senaste programmen inom Hem & Fritid 4 true true true false Alla 1.2496849,1.1833763,1.1969971,1.1985464,1.2501348,1.1969891,1.1844807,1.2086492,1.2203988,1.1825110,1.2175713,1.1969875,1.2114429,1.1844773,1.1973674,1.2607835,1.2183904,1.2691648,1.1969952,1.1820955 http://cdn01.tv4.se/polopoly_fs/1.2329867.1342603683!originallogoimage/1096872590.png http://cdn01.tv4.se/polopoly_fs/1.2329867.1342603683!originalformatimage/3999734778.jpg http://cdn01.tv4.se/polopoly_fs/1.2329867.1342603683!originalcarouselimage/589872500.jpg Johan Broman och Fredrik Sjöblom reser till olika vatten i Sverige för att fiska och titta närmare på svensk fiskevård. Visas i tv4sport true Hela program 12 true false false false Alla 1.2329867 Senaste programmen inom Hem & Fritid 4 true true true false Alla 1.2496849,1.1833763,1.1969971,1.1985464,1.2501348,1.1969891,1.1844807,1.2086492,1.2203988,1.1825110,1.2175713,1.1969875,1.2114429,1.1844773,1.1973674,1.2607835,1.2183904,1.2691648,1.1969952,1.1820955 http://cdn01.tv4.se/polopoly_fs/1.1844773.1333446859!mobileimage/220134975.png http://cdn01.tv4.se/polopoly_fs/1.1844773.1333446859!mobileimage-logo/3937175922.png http://cdn01.tv4.se/polopoly_fs/1.1844773.1333446859!mobileimage-large/3375124377.jpg http://cdn01.tv4.se/polopoly_fs/1.1844773.1333446859!mobileimage-highres/2856885448.png http://cdn01.tv4.se/polopoly_fs/1.1844773.1333446859!mobileimage-logo-highres/2531612023.png http://cdn01.tv4.se/polopoly_fs/1.1844773.1333446859!mobileimage-large-highres/656918332.jpg http://cdn01.tv4.se/polopoly_fs/1.1844773.1333446859!originallogoimage/2771306533.png http://cdn01.tv4.se/polopoly_fs/1.1844773.1333446859!originalformatimage/170467665.jpg http://cdn01.tv4.se/polopoly_fs/1.1844773.1333446859!originalcarouselimage/3345385439.jpg Per Morbergs matlagningskonst går utöver det mesta. Det blir svettigt, spontant, passionerat, djärvt och godare än någonsin. Visas i tv4plus http://www.recept.nu true http://cdn01.tv4.se/polopoly_fs/1.1844773.1333446859!image/1522738818.png http://cdn01.tv4.se/polopoly_fs/1.1844773.1333446859!smallformatimage/2295208508.png http://cdn01.tv4.se/polopoly_fs/1.1844773.1333446859!categorylarge/2426128335.png http://cdn01.tv4.se/polopoly_fs/1.1844773.1333446859!image-large/1984198972.png http://cdn01.tv4.se/polopoly_fs/1.1844773.1333446859!image-logo/1243663172.png http://cdn01.tv4.se/polopoly_fs/1.1844773.1333446859!small-image-logo/68934332.png Hela program 12 true false false true 1.1844801,1.1844773 Senaste klippen 12 true true false false 1.1844799 http://cdn01.tv4.se/polopoly_fs/1.2183904.1342603742!mobileimage/1497334428.jpg http://cdn01.tv4.se/polopoly_fs/1.2183904.1342603742!mobileimage-logo/3280345222.png http://cdn01.tv4.se/polopoly_fs/1.2183904.1342603742!mobileimage-large/3428738541.jpg http://cdn01.tv4.se/polopoly_fs/1.2183904.1342603742!mobileimage-highres/1014438538.jpg http://cdn01.tv4.se/polopoly_fs/1.2183904.1342603742!mobileimage-logo-highres/2025671720.png http://cdn01.tv4.se/polopoly_fs/1.2183904.1342603742!mobileimage-large-highres/2003120451.jpg http://cdn01.tv4.se/polopoly_fs/1.2183904.1342603742!originallogoimage/2025671720.png http://cdn01.tv4.se/polopoly_fs/1.2183904.1342603742!originalformatimage/300336855.jpg http://cdn01.tv4.se/polopoly_fs/1.2183904.1342603742!originalcarouselimage/4276213600.jpg I ett vackert strandhus i Frankrike, bland vingårdar och creperier bakar Leila läckra sötsaker. Visas i tv4plus true http://cdn01.tv4.se/polopoly_fs/1.2183904.1342603742!image/624561910.jpg http://cdn01.tv4.se/polopoly_fs/1.2183904.1342603742!smallformatimage/3887650940.jpg http://cdn01.tv4.se/polopoly_fs/1.2183904.1342603742!categorylarge/2142047172.jpg http://cdn01.tv4.se/polopoly_fs/1.2183904.1342603742!image-large/2751826648.jpg http://cdn01.tv4.se/polopoly_fs/1.2183904.1342603742!image-logo/2986023413.png http://cdn01.tv4.se/polopoly_fs/1.2183904.1342603742!small-image-logo/1508727201.png Hela program 12 true false false false Alla 1.2183904 Senaste klippen 12 false true false true Alla 1.2371764 http://cdn01.tv4.se/polopoly_fs/1.1969934.1321866514!mobileimage/1306175783.jpg http://cdn01.tv4.se/polopoly_fs/1.1969934.1321866514!mobileimage-logo/3264226579.png http://cdn01.tv4.se/polopoly_fs/1.1969934.1321866514!mobileimage-large/694599388.jpg http://cdn01.tv4.se/polopoly_fs/1.1969934.1321866514!mobileimage-highres/3111754219.jpg http://cdn01.tv4.se/polopoly_fs/1.1969934.1321866514!mobileimage-logo-highres/1706008699.png http://cdn01.tv4.se/polopoly_fs/1.1969934.1321866514!mobileimage-large-highres/2388212660.jpg http://cdn01.tv4.se/polopoly_fs/1.1969934.1321866514!originallogoimage/2132597817.png http://cdn01.tv4.se/polopoly_fs/1.1969934.1321866514!originalformatimage/781308886.jpg http://cdn01.tv4.se/polopoly_fs/1.1969934.1321866514!originalcarouselimage/2562774395.jpg Kocken Leila Lindholm inspirerar, tipsar och lagar massor av mat, som hon bjuder familj och vänner att avnjuta. Visas i tv4 true http://cdn01.tv4.se/polopoly_fs/1.1969934.1321866514!image/1052902408.jpg http://cdn01.tv4.se/polopoly_fs/1.1969934.1321866514!smallformatimage/1305582407.jpg http://cdn01.tv4.se/polopoly_fs/1.1969934.1321866514!categorylarge/3141244767.jpg http://cdn01.tv4.se/polopoly_fs/1.1969934.1321866514!image-large/4094036098.jpg http://cdn01.tv4.se/polopoly_fs/1.1969934.1321866514!image-logo/1282907753.png http://cdn01.tv4.se/polopoly_fs/1.1969934.1321866514!small-image-logo/3038274629.png Hela program 12 true true false false Alla 1.1969940 http://cdn01.tv4.se/polopoly_fs/1.1889143.1320056359!originallogoimage/1939548924.png http://cdn01.tv4.se/polopoly_fs/1.1889143.1320056359!originalformatimage/3195589923.jpg http://cdn01.tv4.se/polopoly_fs/1.1889143.1320056359!originalcarouselimage/617458548.jpg Leila Lindholm tar med sig en kasse med råvaror för att laga en måltid hemma hos välkända svenskar. Visas i tv4plus true http://cdn01.tv4.se/polopoly_fs/1.1889143.1320056359!image/1732140908.png http://cdn01.tv4.se/polopoly_fs/1.1889143.1320056359!smallformatimage/338542627.png http://cdn01.tv4.se/polopoly_fs/1.1889143.1320056359!categorylarge/742707996.jpg http://cdn01.tv4.se/polopoly_fs/1.1889143.1320056359!image-large/3458817215.jpg http://cdn01.tv4.se/polopoly_fs/1.1889143.1320056359!image-logo/2378720841.png http://cdn01.tv4.se/polopoly_fs/1.1889143.1320056359!small-image-logo/1542268373.png Hela program 12 true false false true 1.1889143 Senaste klippen 8 false true false false 1.1889156 http://cdn01.tv4.se/polopoly_fs/1.1969891.1321866072!originallogoimage/1419407313.png http://cdn01.tv4.se/polopoly_fs/1.1969891.1321866072!originalformatimage/2291285455.jpg http://cdn01.tv4.se/polopoly_fs/1.1969891.1321866072!originalcarouselimage/541307804.jpg Kocken Leila Lindholm bakar och gör godis med inspiration från Sverige, USA och Frankrike. Visas i tv4plus http://www.recept.nu/1.147574/2008/07/28/leila_bakar_repris true Säsong 2010 12 true false false false 1.1969903 Säsong 2008 4 true false false true 1.1969898 Säsong 2007 4 true false false true 1.1969900 Senaste klippen 12 true true false false 1.1969912 http://cdn01.tv4.se/polopoly_fs/1.1969920.1342603854!mobileimage/3879976973.jpg http://cdn01.tv4.se/polopoly_fs/1.1969920.1342603854!mobileimage-logo/3751272924.png http://cdn01.tv4.se/polopoly_fs/1.1969920.1342603854!mobileimage-large/3382199769.jpg http://cdn01.tv4.se/polopoly_fs/1.1969920.1342603854!mobileimage-highres/2422471414.jpg http://cdn01.tv4.se/polopoly_fs/1.1969920.1342603854!mobileimage-logo-highres/4016165091.png http://cdn01.tv4.se/polopoly_fs/1.1969920.1342603854!mobileimage-large-highres/3231211305.jpg http://cdn01.tv4.se/polopoly_fs/1.1969920.1342603854!originallogoimage/2871737348.png http://cdn01.tv4.se/polopoly_fs/1.1969920.1342603854!originalformatimage/2208830497.jpg http://cdn01.tv4.se/polopoly_fs/1.1969920.1342603854!originalcarouselimage/3112621031.jpg Leila Lindholm ger, med sin enkla matlagning, inspiration till mat som passar perfekt en skön dag i hängmattan. Visas i tv4plus true http://cdn01.tv4.se/polopoly_fs/1.1969920.1342603854!image/234119677.jpg http://cdn01.tv4.se/polopoly_fs/1.1969920.1342603854!smallformatimage/671508619.jpg http://cdn01.tv4.se/polopoly_fs/1.1969920.1342603854!categorylarge/285011986.jpg http://cdn01.tv4.se/polopoly_fs/1.1969920.1342603854!image-large/3188095524.jpg http://cdn01.tv4.se/polopoly_fs/1.1969920.1342603854!image-logo/1458869315.png http://cdn01.tv4.se/polopoly_fs/1.1969920.1342603854!small-image-logo/850206080.png Hela program 12 true true false false 1.1969922 Senaste programmen inom Hem & Fritid 4 true true true false Alla 1.2496849,1.1833763,1.1969971,1.1985464,1.2501348,1.1969891,1.1844807,1.2086492,1.2203988,1.1825110,1.2175713,1.1969875,1.2114429,1.1844773,1.1973674,1.2607835,1.2183904,1.2691648,1.1969952,1.1820955 http://cdn01.tv4.se/polopoly_fs/1.2179010.1342603923!mobileimage/845419832.jpg http://cdn01.tv4.se/polopoly_fs/1.2179010.1342603923!mobileimage-logo/1196531668.png http://cdn01.tv4.se/polopoly_fs/1.2179010.1342603923!mobileimage-large/1721293953.jpg http://cdn01.tv4.se/polopoly_fs/1.2179010.1342603923!mobileimage-highres/2534462830.jpg http://cdn01.tv4.se/polopoly_fs/1.2179010.1342603923!mobileimage-logo-highres/1662463588.png http://cdn01.tv4.se/polopoly_fs/1.2179010.1342603923!mobileimage-large-highres/1121873201.jpg http://cdn01.tv4.se/polopoly_fs/1.2179010.1342603923!originallogoimage/1662463588.png http://cdn01.tv4.se/polopoly_fs/1.2179010.1342603923!originalformatimage/4239628046.jpg http://cdn01.tv4.se/polopoly_fs/1.2179010.1342603923!originalcarouselimage/3112259570.jpg Kocken Christian Hellberg slår ett slag för äkta grillkonst och för att inspirera alla amatörgrillkockar runt om i landet. tv4 true http://cdn01.tv4.se/polopoly_fs/1.2179010.1342603923!image/3034790995.jpg http://cdn01.tv4.se/polopoly_fs/1.2179010.1342603923!smallformatimage/4007718718.jpg http://cdn01.tv4.se/polopoly_fs/1.2179010.1342603923!categorylarge/928294717.jpg http://cdn01.tv4.se/polopoly_fs/1.2179010.1342603923!image-large/2728561183.jpg http://cdn01.tv4.se/polopoly_fs/1.2179010.1342603923!image-logo/1106699482.png http://cdn01.tv4.se/polopoly_fs/1.2179010.1342603923!small-image-logo/418581704.png Hela program 12 true false false false Alla 1.2179010 Senaste programmen inom Hem & Fritid 4 true true true false Alla 1.2496849,1.1833763,1.1969971,1.1985464,1.2501348,1.1969891,1.1844807,1.2086492,1.2203988,1.1825110,1.2175713,1.1969875,1.2114429,1.1844773,1.1973674,1.2607835,1.2183904,1.2691648,1.1969952,1.1820955 http://cdn01.tv4.se/polopoly_fs/1.2069968.1342604054!mobileimage/1949975474.jpg http://cdn01.tv4.se/polopoly_fs/1.2069968.1342604054!mobileimage-logo/17811806.png http://cdn01.tv4.se/polopoly_fs/1.2069968.1342604054!mobileimage-large/1547230821.jpg http://cdn01.tv4.se/polopoly_fs/1.2069968.1342604054!mobileimage-highres/3511583716.jpg http://cdn01.tv4.se/polopoly_fs/1.2069968.1342604054!mobileimage-logo-highres/625572078.png http://cdn01.tv4.se/polopoly_fs/1.2069968.1342604054!mobileimage-large-highres/3051802530.jpg http://cdn01.tv4.se/polopoly_fs/1.2069968.1342604054!originallogoimage/1497229265.png http://cdn01.tv4.se/polopoly_fs/1.2069968.1342604054!originalformatimage/3793122789.jpg http://cdn01.tv4.se/polopoly_fs/1.2069968.1342604054!originalcarouselimage/3906704484.jpg De brittiska stilpoliserna Trinny Woodall och Susannah Constantine kommer till Sverige och stylar om personer. SE 129.35.209.170 58.247.178.245 115.111.227.14 115.111.227.6 25.19.39.117 210.94.41.89 217.67.201.237 217.67.201.162;SE 129.35.209.170 58.247.178.245 115.111.227.14 115.111.227.6 25.19.39.117 210.94.41.89 217.67.201.237 217.67.201.162 Visas i tv4plus true http://cdn01.tv4.se/polopoly_fs/1.2069968.1342604054!image/4072499929.jpg http://cdn01.tv4.se/polopoly_fs/1.2069968.1342604054!smallformatimage/2831071668.jpg http://cdn01.tv4.se/polopoly_fs/1.2069968.1342604054!categorylarge/3476901511.jpg http://cdn01.tv4.se/polopoly_fs/1.2069968.1342604054!image-large/1263278902.jpg http://cdn01.tv4.se/polopoly_fs/1.2069968.1342604054!image-logo/128496208.png http://cdn01.tv4.se/polopoly_fs/1.2069968.1342604054!small-image-logo/1588419138.png Hela program 4 true false false false Alla 1.2069974 Klipp 4 false true false false Alla 1.2070178 Senaste programmen inom Hem & Fritid 4 true true true false Alla 1.2496849,1.1833763,1.1969971,1.1985464,1.2501348,1.1969891,1.1844807,1.2086492,1.2203988,1.1825110,1.2175713,1.1969875,1.2114429,1.1844773,1.1973674,1.2607835,1.2183904,1.2691648,1.1969952,1.1820955 http://cdn01.tv4.se/polopoly_fs/1.2143651.1342604198!mobileimage/1206103412.jpg http://cdn01.tv4.se/polopoly_fs/1.2143651.1342604198!mobileimage-logo/3721629209.png http://cdn01.tv4.se/polopoly_fs/1.2143651.1342604198!mobileimage-large/958810640.jpg http://cdn01.tv4.se/polopoly_fs/1.2143651.1342604198!mobileimage-highres/1338967557.jpg http://cdn01.tv4.se/polopoly_fs/1.2143651.1342604198!mobileimage-logo-highres/1803900181.png http://cdn01.tv4.se/polopoly_fs/1.2143651.1342604198!mobileimage-large-highres/2406519068.jpg Entreprenörerna och vännerna Heather och Lori har bestämt sig för att bygga upp ett bakverksimperium. SE;SE 129.35.209.170 58.247.178.245 115.111.227.14 115.111.227.6 25.19.39.117 210.94.41.89 217.67.201.237 217.67.201.162;SE 129.35.209.170 58.247.178.245 115.111.227.14 115.111.227.6 25.19.39.117 210.94.41.89 217.67.201.237 217.67.201.162 Visas i tv4plus true http://cdn01.tv4.se/polopoly_fs/1.2143651.1342604198!image/2084042280.jpg http://cdn01.tv4.se/polopoly_fs/1.2143651.1342604198!smallformatimage/1972825005.jpg http://cdn01.tv4.se/polopoly_fs/1.2143651.1342604198!categorylarge/2345229817.jpg http://cdn01.tv4.se/polopoly_fs/1.2143651.1342604198!image-large/2687050001.jpg http://cdn01.tv4.se/polopoly_fs/1.2143651.1342604198!image-logo/3186254777.png http://cdn01.tv4.se/polopoly_fs/1.2143651.1342604198!small-image-logo/3219368250.png Hela program 4 true false false false Alla 1.2143657 Senaste programmen inom Hem & Fritid 4 true true true false Alla 1.2496849,1.1833763,1.1969971,1.1985464,1.2501348,1.1969891,1.1844807,1.2086492,1.2203988,1.1825110,1.2175713,1.1969875,1.2114429,1.1844773,1.1973674,1.2607835,1.2183904,1.2691648,1.1969952,1.1820955 http://cdn01.tv4.se/polopoly_fs/1.2107951.1342604265!originallogoimage/3743601268.png http://cdn01.tv4.se/polopoly_fs/1.2107951.1342604265!originalformatimage/3374172093.jpg http://cdn01.tv4.se/polopoly_fs/1.2107951.1342604265!originalcarouselimage/1003951741.jpg Fyra brudarna tävlar om vem som har det bästa bröllopet. De går på varandras bröllop och bedömer dem utifrån klänning, mat, fest och upplevelse. Måndag - torsdag 19:25 tv4 true Hela program 12 true false false true Alla 1.2107963 Senaste klippen 8 false true false true Alla 1.2107951 Senaste programmen inom Hem & Fritid 4 true true true false Alla 1.2496849,1.1833763,1.1969971,1.1985464,1.2501348,1.1969891,1.1844807,1.2086492,1.2203988,1.1825110,1.2175713,1.1969875,1.2114429,1.1844773,1.1973674,1.2607835,1.2183904,1.2691648,1.1969952,1.1820955 http://cdn01.tv4.se/polopoly_fs/1.1820939.1342604346!mobileimage/700113237.jpg http://cdn01.tv4.se/polopoly_fs/1.1820939.1342604346!mobileimage-logo/704177173.png http://cdn01.tv4.se/polopoly_fs/1.1820939.1342604346!mobileimage-large/1264510858.jpg http://cdn01.tv4.se/polopoly_fs/1.1820939.1342604346!mobileimage-highres/1747762456.jpg http://cdn01.tv4.se/polopoly_fs/1.1820939.1342604346!mobileimage-logo-highres/420402474.png http://cdn01.tv4.se/polopoly_fs/1.1820939.1342604346!mobileimage-large-highres/4245175430.jpg http://cdn01.tv4.se/polopoly_fs/1.1820939.1342604346!originallogoimage/1888987969.png http://cdn01.tv4.se/polopoly_fs/1.1820939.1342604346!originalformatimage/555394222.jpg http://cdn01.tv4.se/polopoly_fs/1.1820939.1342604346!originalcarouselimage/2538316291.jpg Fastighetsmäklare sätts på prov. Hur bra kan de gissa priset på nyligen sålda objekt i för dem obekanta orter i Sverige. Visas i tv4plus http://www.hemmakanalen.se/sald_pa_hus true http://cdn01.tv4.se/polopoly_fs/1.1820939.1342604346!image/2478929269.jpg http://cdn01.tv4.se/polopoly_fs/1.1820939.1342604346!smallformatimage/2224085881.jpg http://cdn01.tv4.se/polopoly_fs/1.1820939.1342604346!categorylarge/4189188195.jpg http://cdn01.tv4.se/polopoly_fs/1.1820939.1342604346!image-large/3528559755.jpg http://cdn01.tv4.se/polopoly_fs/1.1820939.1342604346!image-logo/2224527264.png http://cdn01.tv4.se/polopoly_fs/1.1820939.1342604346!small-image-logo/2746534366.png Hela program 12 true false false true 1.1820939 Senaste klippen 12 true true false false 1.1820948 Senaste programmen inom Hem & Fritid 4 true true true false Alla 1.2496849,1.1833763,1.1969971,1.1985464,1.2501348,1.1969891,1.1844807,1.2086492,1.2203988,1.1825110,1.2175713,1.1969875,1.2114429,1.1844773,1.1973674,1.2607835,1.2183904,1.2691648,1.1969952,1.1820955 http://cdn01.tv4.se/polopoly_fs/1.2179038.1342604456!mobileimage/365705958.jpg http://cdn01.tv4.se/polopoly_fs/1.2179038.1342604456!mobileimage-logo/949908152.png http://cdn01.tv4.se/polopoly_fs/1.2179038.1342604456!mobileimage-large/708025691.jpg http://cdn01.tv4.se/polopoly_fs/1.2179038.1342604456!mobileimage-highres/1659633693.jpg http://cdn01.tv4.se/polopoly_fs/1.2179038.1342604456!mobileimage-logo-highres/2234155198.png http://cdn01.tv4.se/polopoly_fs/1.2179038.1342604456!mobileimage-large-highres/2542235485.jpg http://cdn01.tv4.se/polopoly_fs/1.2179038.1342604456!originallogoimage/2234155198.png http://cdn01.tv4.se/polopoly_fs/1.2179038.1342604456!originalformatimage/284811754.jpg http://cdn01.tv4.se/polopoly_fs/1.2179038.1342604456!originalcarouselimage/4189117522.jpg Tina Nordström lagar mat tillsammans med en känd gäst och med hela svenska folket. Tillsammans lagar de en trerättersmiddag på en timme. SE 115.111.227.14 115.111.227.6 25.19.39.117 210.94.41.89 217.67.201.237 217.67.201.162 tv4 true http://cdn01.tv4.se/polopoly_fs/1.2179038.1342604456!image/4286290710.jpg http://cdn01.tv4.se/polopoly_fs/1.2179038.1342604456!smallformatimage/3666448992.jpg http://cdn01.tv4.se/polopoly_fs/1.2179038.1342604456!categorylarge/643621590.jpg http://cdn01.tv4.se/polopoly_fs/1.2179038.1342604456!image-large/3913846213.jpg http://cdn01.tv4.se/polopoly_fs/1.2179038.1342604456!image-logo/1210200237.png http://cdn01.tv4.se/polopoly_fs/1.2179038.1342604456!small-image-logo/591254146.png Hela program 12 true false false false Alla 1.2179038 Senaste programmen inom Hem & Fritid 4 true true true false Alla 1.2496849,1.1833763,1.1969971,1.1985464,1.2501348,1.1969891,1.1844807,1.2086492,1.2203988,1.1825110,1.2175713,1.1969875,1.2114429,1.1844773,1.1973674,1.2607835,1.2183904,1.2691648,1.1969952,1.1820955 http://cdn01.tv4.se/polopoly_fs/1.1998013.1342604592!mobileimage/4000373117.jpg http://cdn01.tv4.se/polopoly_fs/1.1998013.1342604592!mobileimage-logo/1653693678.png http://cdn01.tv4.se/polopoly_fs/1.1998013.1342604592!mobileimage-large/1050947711.jpg http://cdn01.tv4.se/polopoly_fs/1.1998013.1342604592!mobileimage-highres/1258559787.jpg http://cdn01.tv4.se/polopoly_fs/1.1998013.1342604592!mobileimage-logo-highres/2474212566.png http://cdn01.tv4.se/polopoly_fs/1.1998013.1342604592!mobileimage-large-highres/994949501.jpg Mäklarna Pernille Sams och Jan Fog besöker exklusiva hem i Danmark och andra länder. SE 129.35.209.170 58.247.178.245 115.111.227.14 115.111.227.6 25.19.39.117 210.94.41.89 217.67.201.237 217.67.201.162;SE 129.35.209.170 58.247.178.245 115.111.227.14 115.111.227.6 25.19.39.117 210.94.41.89 217.67.201.237 217.67.201.162 Visas i tv4plus true http://cdn01.tv4.se/polopoly_fs/1.1998013.1342604592!image/1761079318.jpg http://cdn01.tv4.se/polopoly_fs/1.1998013.1342604592!smallformatimage/854860667.jpg http://cdn01.tv4.se/polopoly_fs/1.1998013.1342604592!categorylarge/1882437307.jpg http://cdn01.tv4.se/polopoly_fs/1.1998013.1342604592!image-large/3436266740.jpg http://cdn01.tv4.se/polopoly_fs/1.1998013.1342604592!image-logo/3455511290.png http://cdn01.tv4.se/polopoly_fs/1.1998013.1342604592!small-image-logo/3303522445.png Hela program 4 true false false false 1.1998024 Senaste programmen inom Hem & Fritid 4 true true true false Alla 1.2496849,1.1833763,1.1969971,1.1985464,1.2501348,1.1969891,1.1844807,1.2086492,1.2203988,1.1825110,1.2175713,1.1969875,1.2114429,1.1844773,1.1973674,1.2607835,1.2183904,1.2691648,1.1969952,1.1820955 http://cdn01.tv4.se/polopoly_fs/1.2114429.1342604646!mobileimage/779030305.jpg http://cdn01.tv4.se/polopoly_fs/1.2114429.1342604646!mobileimage-logo/2375187009.png http://cdn01.tv4.se/polopoly_fs/1.2114429.1342604646!mobileimage-large/1525995052.jpg http://cdn01.tv4.se/polopoly_fs/1.2114429.1342604646!mobileimage-highres/1878610796.jpg http://cdn01.tv4.se/polopoly_fs/1.2114429.1342604646!mobileimage-logo-highres/807831623.png http://cdn01.tv4.se/polopoly_fs/1.2114429.1342604646!mobileimage-large-highres/1778575123.jpg http://cdn01.tv4.se/polopoly_fs/1.2114429.1342604646!originallogoimage/271398963.png http://cdn01.tv4.se/polopoly_fs/1.2114429.1342604646!originalformatimage/4055058447.jpg http://cdn01.tv4.se/polopoly_fs/1.2114429.1342604646!originalcarouselimage/2096278880.jpg Kändisar får sätta sina matlagningskonster och sociala färdigheter på prov. Varje vecka turas fyra kända personer om att bjuda varandra på middag. Onsdagar 20:00 tv4 true http://cdn01.tv4.se/polopoly_fs/1.2114429.1342604646!image/2484378369.jpg http://cdn01.tv4.se/polopoly_fs/1.2114429.1342604646!smallformatimage/2202350861.jpg http://cdn01.tv4.se/polopoly_fs/1.2114429.1342604646!categorylarge/149428117.jpg http://cdn01.tv4.se/polopoly_fs/1.2114429.1342604646!image-large/1557032239.jpg http://cdn01.tv4.se/polopoly_fs/1.2114429.1342604646!image-logo/4247664724.png http://cdn01.tv4.se/polopoly_fs/1.2114429.1342604646!small-image-logo/2519849595.png Hela program 4 true false false false Alla 1.2114439 Senaste programmen inom Hem & Fritid 4 true true true false Alla 1.2496849,1.1833763,1.1969971,1.1985464,1.2501348,1.1969891,1.1844807,1.2086492,1.2203988,1.1825110,1.2175713,1.1969875,1.2114429,1.1844773,1.1973674,1.2607835,1.2183904,1.2691648,1.1969952,1.1820955 http://cdn01.tv4.se/polopoly_fs/1.2070220.1342604710!mobileimage/2323519387.jpg http://cdn01.tv4.se/polopoly_fs/1.2070220.1342604710!mobileimage-logo/2319192795.png http://cdn01.tv4.se/polopoly_fs/1.2070220.1342604710!mobileimage-large/386028649.jpg http://cdn01.tv4.se/polopoly_fs/1.2070220.1342604710!mobileimage-highres/3420998614.jpg http://cdn01.tv4.se/polopoly_fs/1.2070220.1342604710!mobileimage-logo-highres/3133809636.png http://cdn01.tv4.se/polopoly_fs/1.2070220.1342604710!mobileimage-large-highres/386028649.jpg Nutritionisten Gillian McKeith ska under åtta veckor förändra livet för tretton kvinnor och lära dem att äta sig sexiga. SE 129.35.209.170 58.247.178.245;SE 129.35.209.170 58.247.178.245 115.111.227.14 115.111.227.6 25.19.39.117 210.94.41.89 217.67.201.237 217.67.201.162;SE 129.35.209.170 58.247.178.245 115.111.227.14 115.111.227.6 25.19.39.117 210.94.41.89 217.67.201.237 217.67.201.162 Visas i tv4plus true http://cdn01.tv4.se/polopoly_fs/1.2070220.1342604710!image/805667771.jpg http://cdn01.tv4.se/polopoly_fs/1.2070220.1342604710!smallformatimage/659828151.jpg http://cdn01.tv4.se/polopoly_fs/1.2070220.1342604710!categorylarge/386028649.jpg http://cdn01.tv4.se/polopoly_fs/1.2070220.1342604710!image-large/386028649.jpg http://cdn01.tv4.se/polopoly_fs/1.2070220.1342604710!image-logo/56584004.png http://cdn01.tv4.se/polopoly_fs/1.2070220.1342604710!small-image-logo/1728507527.png Hela program 4 true false false false Alla 1.2070224 Senaste programmen inom Hem & Fritid 4 true true true false Alla 1.2496849,1.1833763,1.1969971,1.1985464,1.2501348,1.1969891,1.1844807,1.2086492,1.2203988,1.1825110,1.2175713,1.1969875,1.2114429,1.1844773,1.1973674,1.2607835,1.2183904,1.2691648,1.1969952,1.1820955 http://cdn01.tv4.se/polopoly_fs/1.2169395.1329918617!mobileimage/3086344222.jpg http://cdn01.tv4.se/polopoly_fs/1.2169395.1329918617!mobileimage-logo/1041142366.png http://cdn01.tv4.se/polopoly_fs/1.2169395.1329918617!mobileimage-large/1767379926.jpg http://cdn01.tv4.se/polopoly_fs/1.2169395.1329918617!mobileimage-highres/1337208902.jpg http://cdn01.tv4.se/polopoly_fs/1.2169395.1329918617!mobileimage-logo-highres/236797931.png http://cdn01.tv4.se/polopoly_fs/1.2169395.1329918617!mobileimage-large-highres/1498136163.jpg Matfanatikern Nigel Slater delar med sin av enkla recept som alla kan laga. Han visar hur man med lite fantasi kan skapa fantastiska rätter som är så lätta att komma ihåg att recepten inte behöver skrivas ner. SE 115.111.227.14 115.111.227.6 25.19.39.117 210.94.41.89 217.67.201.237 217.67.201.162;SE 115.111.227.14 115.111.227.6 25.19.39.117 210.94.41.89 217.67.201.237 217.67.201.162;SE Visas i tv4plus true http://cdn01.tv4.se/polopoly_fs/1.2169395.1329918617!image/1855339984.jpg http://cdn01.tv4.se/polopoly_fs/1.2169395.1329918617!smallformatimage/1002377324.jpg http://cdn01.tv4.se/polopoly_fs/1.2169395.1329918617!categorylarge/4232844334.jpg http://cdn01.tv4.se/polopoly_fs/1.2169395.1329918617!image-large/4010073604.jpg http://cdn01.tv4.se/polopoly_fs/1.2169395.1329918617!image-logo/1147692184.png http://cdn01.tv4.se/polopoly_fs/1.2169395.1329918617!small-image-logo/3942384607.png Hela program 12 true false false false Alla 1.2169395 Senaste programmen inom Hem & Fritid 4 true true true false Alla 1.2496849,1.1833763,1.1969971,1.1985464,1.2501348,1.1969891,1.1844807,1.2086492,1.2203988,1.1825110,1.2175713,1.1969875,1.2114429,1.1844773,1.1973674,1.2607835,1.2183904,1.2691648,1.1969952,1.1820955 http://cdn01.tv4.se/polopoly_fs/1.1968381.1342604794!mobileimage/2347519232.jpg http://cdn01.tv4.se/polopoly_fs/1.1968381.1342604794!mobileimage-logo/1664034431.png http://cdn01.tv4.se/polopoly_fs/1.1968381.1342604794!mobileimage-highres/690299794.jpg http://cdn01.tv4.se/polopoly_fs/1.1968381.1342604794!mobileimage-logo-highres/2331064248.png Nigella Lawsons köksfilosofi är att man inte ska behöva slava framför spisen för att lyckas. Här bjuder hon på mat för alla tillfällen. SE 129.35.209.170 58.247.178.245 115.111.227.14 115.111.227.6 25.19.39.117 210.94.41.89 217.67.201.237 217.67.201.162;SE 129.35.209.170 58.247.178.245 115.111.227.14 115.111.227.6 25.19.39.117 210.94.41.89 217.67.201.237 217.67.201.162 Visas i tv4plus true http://cdn01.tv4.se/polopoly_fs/1.1968381.1342604794!image/1048696180.jpg http://cdn01.tv4.se/polopoly_fs/1.1968381.1342604794!smallformatimage/1043895890.jpg http://cdn01.tv4.se/polopoly_fs/1.1968381.1342604794!categorylarge/1339318846.jpg http://cdn01.tv4.se/polopoly_fs/1.1968381.1342604794!image-large/15334883.jpg http://cdn01.tv4.se/polopoly_fs/1.1968381.1342604794!image-logo/422344879.png Hela program 12 true false false true 1.1968381 Senaste programmen inom Hem & Fritid 4 true true true false Alla 1.2496849,1.1833763,1.1969971,1.1985464,1.2501348,1.1969891,1.1844807,1.2086492,1.2203988,1.1825110,1.2175713,1.1969875,1.2114429,1.1844773,1.1973674,1.2607835,1.2183904,1.2691648,1.1969952,1.1820955 http://cdn01.tv4.se/polopoly_fs/1.2131342.1329919066!mobileimage/3570844191.jpg http://cdn01.tv4.se/polopoly_fs/1.2131342.1329919066!mobileimage-logo/1563275359.png http://cdn01.tv4.se/polopoly_fs/1.2131342.1329919066!mobileimage-large/175845847.jpg http://cdn01.tv4.se/polopoly_fs/1.2131342.1329919066!mobileimage-highres/748098119.jpg http://cdn01.tv4.se/polopoly_fs/1.2131342.1329919066!mobileimage-logo-highres/1832787434.png http://cdn01.tv4.se/polopoly_fs/1.2131342.1329919066!mobileimage-large-highres/979934306.jpg Jamie Oliver beger sig till Italien för att söka efter inspiration och återupptäcka sin kärlek för matlagning och riktig mat. Han kör runt i landet i sin Volkswagen-buss, möter lokala personligheter och lagar traditionella italienska rätter på sitt eget sätt. SE 129.35.209.170 58.247.178.245 115.111.227.14 115.111.227.6 25.19.39.117 210.94.41.89 217.67.201.237 217.67.201.162;SE Visas i tv4plus false http://cdn01.tv4.se/polopoly_fs/1.2131342.1329919066!image/229973969.jpg http://cdn01.tv4.se/polopoly_fs/1.2131342.1329919066!smallformatimage/1486631533.jpg http://cdn01.tv4.se/polopoly_fs/1.2131342.1329919066!categorylarge/2674865711.jpg http://cdn01.tv4.se/polopoly_fs/1.2131342.1329919066!image-large/2351430661.jpg http://cdn01.tv4.se/polopoly_fs/1.2131342.1329919066!image-logo/659244697.png http://cdn01.tv4.se/polopoly_fs/1.2131342.1329919066!small-image-logo/2313101790.png Hela program 12 true false false false Alla 1.2131385 Senaste programmen inom Hem & Fritid 4 true true true false Alla 1.2496849,1.1833763,1.1969971,1.1985464,1.2501348,1.1969891,1.1844807,1.2086492,1.2203988,1.1825110,1.2175713,1.1969875,1.2114429,1.1844773,1.1973674,1.2607835,1.2183904,1.2691648,1.1969952,1.1820955 http://cdn01.tv4.se/polopoly_fs/1.2120185.1342604839!mobileimage/2343214473.jpg http://cdn01.tv4.se/polopoly_fs/1.2120185.1342604839!mobileimage-logo/1423937719.png http://cdn01.tv4.se/polopoly_fs/1.2120185.1342604839!mobileimage-large/3238788399.jpg http://cdn01.tv4.se/polopoly_fs/1.2120185.1342604839!mobileimage-highres/2896228488.jpg http://cdn01.tv4.se/polopoly_fs/1.2120185.1342604839!mobileimage-logo-highres/1574931015.png http://cdn01.tv4.se/polopoly_fs/1.2120185.1342604839!mobileimage-large-highres/3356223455.jpg Här får två självutnämnda designers visa vad de går för i en dekorationsduell. De har två dagar på sig och programledaren Ty Pennington utser vinnaren. SE;SE 129.35.209.170 58.247.178.245 115.111.227.14 115.111.227.6 25.19.39.117 210.94.41.89 217.67.201.237 217.67.201.162;SE 129.35.209.170 58.247.178.245 115.111.227.14 115.111.227.6 25.19.39.117 210.94.41.89 217.67.201.237 217.67.201.162 Designduellen med Ty Pennington Visas i tv4plus true http://cdn01.tv4.se/polopoly_fs/1.2120185.1342604839!image/3914093581.jpg http://cdn01.tv4.se/polopoly_fs/1.2120185.1342604839!smallformatimage/1956086463.jpg http://cdn01.tv4.se/polopoly_fs/1.2120185.1342604839!categorylarge/409946340.jpg http://cdn01.tv4.se/polopoly_fs/1.2120185.1342604839!image-large/3063268050.jpg http://cdn01.tv4.se/polopoly_fs/1.2120185.1342604839!image-logo/2187922098.png http://cdn01.tv4.se/polopoly_fs/1.2120185.1342604839!small-image-logo/4141535714.png Senaste programmen 8 true false false true Alla 1.2120185 Senaste programmen inom Hem & Fritid 4 true true true false Alla 1.2496849,1.1833763,1.1969971,1.1985464,1.2501348,1.1969891,1.1844807,1.2086492,1.2203988,1.1825110,1.2175713,1.1969875,1.2114429,1.1844773,1.1973674,1.2607835,1.2183904,1.2691648,1.1969952,1.1820955 http://cdn01.tv4.se/polopoly_fs/1.2104220.1329924996!mobileimage/1940236905.jpg http://cdn01.tv4.se/polopoly_fs/1.2104220.1329924996!mobileimage-logo/1944563497.png http://cdn01.tv4.se/polopoly_fs/1.2104220.1329924996!mobileimage-large/121533284.jpg http://cdn01.tv4.se/polopoly_fs/1.2104220.1329924996!mobileimage-highres/842266148.jpg http://cdn01.tv4.se/polopoly_fs/1.2104220.1329924996!mobileimage-large-highres/935871067.jpg Party garden är en australiensisk livsstilsserie där australiensiska familjer får hjälp med att förvandla sina trädgårdar till den perfekta festplasten för varje tillfälle. SE 129.35.209.170 58.247.178.245 115.111.227.14 115.111.227.6 25.19.39.117 210.94.41.89 217.67.201.237 217.67.201.162;SE,129.35.209.170 Visas i tv4plus false http://cdn01.tv4.se/polopoly_fs/1.2104220.1329924996!image/3386785353.jpg http://cdn01.tv4.se/polopoly_fs/1.2104220.1329924996!smallformatimage/3733950533.jpg http://cdn01.tv4.se/polopoly_fs/1.2104220.1329924996!categorylarge/1428337373.jpg http://cdn01.tv4.se/polopoly_fs/1.2104220.1329924996!image-large/17090663.jpg http://cdn01.tv4.se/polopoly_fs/1.2104220.1329924996!image-logo/4203010742.png http://cdn01.tv4.se/polopoly_fs/1.2104220.1329924996!small-image-logo/2665304949.png Hela program 12 true false false true Alla 1.2104220 Senaste programmen inom Hem & Fritid 4 true true true false Alla 1.2496849,1.1833763,1.1969971,1.1985464,1.2501348,1.1969891,1.1844807,1.2086492,1.2203988,1.1825110,1.2175713,1.1969875,1.2114429,1.1844773,1.1973674,1.2607835,1.2183904,1.2691648,1.1969952,1.1820955 http://cdn01.tv4.se/polopoly_fs/1.1981803.1342605008!mobileimage/3676561677.jpg http://cdn01.tv4.se/polopoly_fs/1.1981803.1342605008!mobileimage-large/2948085760.jpg http://cdn01.tv4.se/polopoly_fs/1.1981803.1342605008!mobileimage-highres/2595601728.jpg http://cdn01.tv4.se/polopoly_fs/1.1981803.1342605008!mobileimage-large-highres/2672691519.jpg http://cdn01.tv4.se/polopoly_fs/1.1981803.1342605008!originallogoimage/3978847337.png http://cdn01.tv4.se/polopoly_fs/1.1981803.1342605008!originalformatimage/1443100253.jpg http://cdn01.tv4.se/polopoly_fs/1.1981803.1342605008!originalcarouselimage/1557010396.jpg Svenska folket uppmanas röja vindarna och tömma förråden när Ernst Kirchsteiger reser landet runt och bjuder in till auktion. Visas i tv4 true http://cdn01.tv4.se/polopoly_fs/1.1981803.1342605008!image/1633187117.jpg http://cdn01.tv4.se/polopoly_fs/1.1981803.1342605008!smallformatimage/1980357409.jpg http://cdn01.tv4.se/polopoly_fs/1.1981803.1342605008!categorylarge/4255447481.jpg http://cdn01.tv4.se/polopoly_fs/1.1981803.1342605008!image-large/2843902723.jpg http://cdn01.tv4.se/polopoly_fs/1.1981803.1342605008!image-logo/1375900114.png Hela program 4 true false false false Alla 1.1981805 Senaste programmen inom Hem & Fritid 4 true true true false Alla 1.2496849,1.1833763,1.1969971,1.1985464,1.2501348,1.1969891,1.1844807,1.2086492,1.2203988,1.1825110,1.2175713,1.1969875,1.2114429,1.1844773,1.1973674,1.2607835,1.2183904,1.2691648,1.1969952,1.1820955 http://cdn01.tv4.se/polopoly_fs/1.1954288.1329918060!originallogoimage/2747580923.png http://cdn01.tv4.se/polopoly_fs/1.1954288.1329918060!originalformatimage/73998397.jpg http://cdn01.tv4.se/polopoly_fs/1.1954288.1329918060!originalcarouselimage/4137939453.jpg Ernst Kirchsteiger inreder, pysslar och lagar mat inför julen. Visas i tv4 true http://cdn01.tv4.se/polopoly_fs/1.1954288.1329918060!image/699628755.jpg http://cdn01.tv4.se/polopoly_fs/1.1954288.1329918060!smallformatimage/801049133.jpg http://cdn01.tv4.se/polopoly_fs/1.1954288.1329918060!categorylarge/1303238084.jpg http://cdn01.tv4.se/polopoly_fs/1.1954288.1329918060!image-large/80377100.jpg http://cdn01.tv4.se/polopoly_fs/1.1954288.1329918060!image-logo/87855118.png http://cdn01.tv4.se/polopoly_fs/1.1954288.1329918060!small-image-logo/3018429810.png Hela program 12 true false false true 1.1954292,1.1954288 Senaste klippen 12 false true false false 1.1954294 http://cdn01.tv4.se/polopoly_fs/1.2001088.1342605085!mobileimage/4134412676.jpg http://cdn01.tv4.se/polopoly_fs/1.2001088.1342605085!mobileimage-large/2909236772.jpg http://cdn01.tv4.se/polopoly_fs/1.2001088.1342605085!mobileimage-highres/2283478179.jpg http://cdn01.tv4.se/polopoly_fs/1.2001088.1342605085!mobileimage-large-highres/2827937574.jpg Inredningsduon Colin och Justin har bestämt sig för att lära kanadensarna ett och annat om heminredning. SE 129.35.209.170 58.247.178.245 115.111.227.14 115.111.227.6 25.19.39.117 210.94.41.89 217.67.201.237 217.67.201.162 Visas i tv4plus true http://cdn01.tv4.se/polopoly_fs/1.2001088.1342605085!image/2727714388.jpg http://cdn01.tv4.se/polopoly_fs/1.2001088.1342605085!smallformatimage/2761549994.jpg http://cdn01.tv4.se/polopoly_fs/1.2001088.1342605085!categorylarge/1213809085.jpg http://cdn01.tv4.se/polopoly_fs/1.2001088.1342605085!image-large/478100231.jpg http://cdn01.tv4.se/polopoly_fs/1.2001088.1342605085!image-logo/928751298.png http://cdn01.tv4.se/polopoly_fs/1.2001088.1342605085!small-image-logo/2173606846.png Hela program 4 true false false false 1.2001100 Senaste programmen inom Hem & Fritid 4 true true true false Alla 1.2496849,1.1833763,1.1969971,1.1985464,1.2501348,1.1969891,1.1844807,1.2086492,1.2203988,1.1825110,1.2175713,1.1969875,1.2114429,1.1844773,1.1973674,1.2607835,1.2183904,1.2691648,1.1969952,1.1820955 http://cdn01.tv4.se/polopoly_fs/1.1969952.1329925184!mobileimage/1884569547.jpg http://cdn01.tv4.se/polopoly_fs/1.1969952.1329925184!mobileimage-logo/2695860680.png http://cdn01.tv4.se/polopoly_fs/1.1969952.1329925184!mobileimage-large/1389014845.jpg http://cdn01.tv4.se/polopoly_fs/1.1969952.1329925184!mobileimage-highres/237044460.jpg http://cdn01.tv4.se/polopoly_fs/1.1969952.1329925184!mobileimage-logo-highres/1388152635.png http://cdn01.tv4.se/polopoly_fs/1.1969952.1329925184!mobileimage-large-highres/2698557902.jpg SE 129.35.209.170 58.247.178.245 115.111.227.14 115.111.227.6 25.19.39.117 210.94.41.89 217.67.201.237 217.67.201.162 Visas i tv4 true http://cdn01.tv4.se/polopoly_fs/1.1969952.1329925184!image/615481371.jpg http://cdn01.tv4.se/polopoly_fs/1.1969952.1329925184!smallformatimage/581170917.jpg http://cdn01.tv4.se/polopoly_fs/1.1969952.1329925184!categorylarge/1085352204.jpg http://cdn01.tv4.se/polopoly_fs/1.1969952.1329925184!image-large/165054916.jpg http://cdn01.tv4.se/polopoly_fs/1.1969952.1329925184!image-logo/2975957133.png http://cdn01.tv4.se/polopoly_fs/1.1969952.1329925184!small-image-logo/129271281.png Hela program 12 true false false true 1.1969958 Senaste programmen inom Hem & Fritid 4 true true true false Alla 1.2496849,1.1833763,1.1969971,1.1985464,1.2501348,1.1969891,1.1844807,1.2086492,1.2203988,1.1825110,1.2175713,1.1969875,1.2114429,1.1844773,1.1973674,1.2607835,1.2183904,1.2691648,1.1969952,1.1820955 http://cdn01.tv4.se/polopoly_fs/1.1820906.1342605137!mobileimage/2849793173.jpg http://cdn01.tv4.se/polopoly_fs/1.1820906.1342605137!mobileimage-logo/1990814123.png http://cdn01.tv4.se/polopoly_fs/1.1820906.1342605137!mobileimage-large/3549458014.jpg http://cdn01.tv4.se/polopoly_fs/1.1820906.1342605137!mobileimage-highres/2396391828.jpg http://cdn01.tv4.se/polopoly_fs/1.1820906.1342605137!mobileimage-logo-highres/2141811547.png http://cdn01.tv4.se/polopoly_fs/1.1820906.1342605137!mobileimage-large-highres/1475453668.jpg http://cdn01.tv4.se/polopoly_fs/1.1820906.1342605137!originallogoimage/567637720.png http://cdn01.tv4.se/polopoly_fs/1.1820906.1342605137!originalformatimage/156655357.jpg http://cdn01.tv4.se/polopoly_fs/1.1820906.1342605137!originalcarouselimage/3555971339.jpg Fyra antikexperter letar efter var sitt föremål att sälja på auktion, med målet att inbringa så mycket pengar som möjligt. SE 129.35.209.170 58.247.178.245 Visas i tv4plus http://www.hemmakanalen.se/antikdeckarna true Hela program 12 true false false true 1.1820931 Senaste klippen 12 false true false false Senaste programmen inom Hem & Fritid 4 true true true false Alla 1.2496849,1.1833763,1.1969971,1.1985464,1.2501348,1.1969891,1.1844807,1.2086492,1.2203988,1.1825110,1.2175713,1.1969875,1.2114429,1.1844773,1.1973674,1.2607835,1.2183904,1.2691648,1.1969952,1.1820955 http://cdn01.tv4.se/polopoly_fs/1.1869259.1333447122!mobileimage/706803142.jpg http://cdn01.tv4.se/polopoly_fs/1.1869259.1333447122!mobileimage-highres/2373359409.jpg I Sälj eller släng får familjer som har svårt att släppa taget om sina prylar hjälp av Lulu Carter att rensa ut överfulla rum och förråd och på så vis tjäna pengar på sina gamla grejer. SE 129.35.209.170 58.247.178.245 115.111.227.14 115.111.227.6 25.19.39.117 210.94.41.89 217.67.201.237 217.67.201.162;SE 129.35.209.170 58.247.178.245 Programmen finns ute i en vecka efter att de sänts i TV4 Plus. Visas i tv4plus http://www.hemmakanalen.se/salj_eller_slang false http://cdn01.tv4.se/polopoly_fs/1.1869259.1333447122!image/2113744251.jpg http://cdn01.tv4.se/polopoly_fs/1.1869259.1333447122!smallformatimage/2951745989.jpg http://cdn01.tv4.se/polopoly_fs/1.1869259.1333447122!categorylarge/3081096246.jpg http://cdn01.tv4.se/polopoly_fs/1.1869259.1333447122!image-large/1366979269.jpg http://cdn01.tv4.se/polopoly_fs/1.1869259.1333447122!image-logo/4274002942.png http://cdn01.tv4.se/polopoly_fs/1.1869259.1333447122!small-image-logo/3876798291.png Senaste klipp 4 false true false true 1.1869282 Senaste programmen 12 true false false true 1.1869259 Senaste programmen inom Hem & Fritid 4 true true true false Alla 1.2496849,1.1833763,1.1969971,1.1985464,1.2501348,1.1969891,1.1844807,1.2086492,1.2203988,1.1825110,1.2175713,1.1969875,1.2114429,1.1844773,1.1973674,1.2607835,1.2183904,1.2691648,1.1969952,1.1820955 http://cdn01.tv4.se/polopoly_fs/1.1969883.1342611433!mobileimage/122773046.jpg http://cdn01.tv4.se/polopoly_fs/1.1969883.1342611433!mobileimage-logo/2811317035.png http://cdn01.tv4.se/polopoly_fs/1.1969883.1342611433!mobileimage-large/3505284399.jpg http://cdn01.tv4.se/polopoly_fs/1.1969883.1342611433!mobileimage-highres/1892991776.jpg http://cdn01.tv4.se/polopoly_fs/1.1969883.1342611433!mobileimage-logo-highres/4281483983.png http://cdn01.tv4.se/polopoly_fs/1.1969883.1342611433!mobileimage-large-highres/2286775499.jpg Serien handlar om borttappade och omhändertagna hundar och katter. Vi får följa djurens väg från hemlös till älskad. Visas i tv4 true http://cdn01.tv4.se/polopoly_fs/1.1969883.1342611433!image/3286954673.jpg http://cdn01.tv4.se/polopoly_fs/1.1969883.1342611433!smallformatimage/207830582.jpg http://cdn01.tv4.se/polopoly_fs/1.1969883.1342611433!categorylarge/1598651875.jpg http://cdn01.tv4.se/polopoly_fs/1.1969883.1342611433!image-large/3173315136.jpg http://cdn01.tv4.se/polopoly_fs/1.1969883.1342611433!image-logo/4274374838.png http://cdn01.tv4.se/polopoly_fs/1.1969883.1342611433!small-image-logo/685804330.png Hela program 12 true false false true 1.1969885 Senaste programmen inom Hem & Fritid 4 true true true false Alla 1.2496849,1.1833763,1.1969971,1.1985464,1.2501348,1.1969891,1.1844807,1.2086492,1.2203988,1.1825110,1.2175713,1.1969875,1.2114429,1.1844773,1.1973674,1.2607835,1.2183904,1.2691648,1.1969952,1.1820955 http://cdn01.tv4.se/polopoly_fs/1.1973119.1342611549!mobileimage/2378841969.jpg http://cdn01.tv4.se/polopoly_fs/1.1973119.1342611549!mobileimage-logo/2374515249.png http://cdn01.tv4.se/polopoly_fs/1.1973119.1342611549!mobileimage-large/4122071519.jpg http://cdn01.tv4.se/polopoly_fs/1.1973119.1342611549!mobileimage-highres/3428606780.jpg http://cdn01.tv4.se/polopoly_fs/1.1973119.1342611549!mobileimage-logo-highres/3179154190.png http://cdn01.tv4.se/polopoly_fs/1.1973119.1342611549!mobileimage-large-highres/1385059511.jpg http://cdn01.tv4.se/polopoly_fs/1.1973119.1342611549!originallogoimage/646054189.png http://cdn01.tv4.se/polopoly_fs/1.1973119.1342611549!originalformatimage/817698020.jpg http://cdn01.tv4.se/polopoly_fs/1.1973119.1342611549!originalcarouselimage/3262629156.jpg Hundexperten Fredrik Steen träffar både hussar, mattar och hundar som är i stort behov av hjälp. Visas i tv4 true http://cdn01.tv4.se/polopoly_fs/1.1973119.1342611549!image/934390609.jpg http://cdn01.tv4.se/polopoly_fs/1.1973119.1342611549!smallformatimage/551552349.jpg http://cdn01.tv4.se/polopoly_fs/1.1973119.1342611549!categorylarge/1743583324.jpg http://cdn01.tv4.se/polopoly_fs/1.1973119.1342611549!image-large/684812161.jpg http://cdn01.tv4.se/polopoly_fs/1.1973119.1342611549!image-logo/82530222.png http://cdn01.tv4.se/polopoly_fs/1.1973119.1342611549!small-image-logo/1622328941.png Hela program 12 true false false true 1.1973130 Senaste programmen inom Hem & Fritid 4 true true true false Alla 1.2496849,1.1833763,1.1969971,1.1985464,1.2501348,1.1969891,1.1844807,1.2086492,1.2203988,1.1825110,1.2175713,1.1969875,1.2114429,1.1844773,1.1973674,1.2607835,1.2183904,1.2691648,1.1969952,1.1820955 http://cdn01.tv4.se/polopoly_fs/1.1969944.1329925242!mobileimage/319872656.jpg http://cdn01.tv4.se/polopoly_fs/1.1969944.1329925242!mobileimage-logo/2623165092.png http://cdn01.tv4.se/polopoly_fs/1.1969944.1329925242!mobileimage-large/2007812459.jpg http://cdn01.tv4.se/polopoly_fs/1.1969944.1329925242!mobileimage-highres/3887328860.jpg http://cdn01.tv4.se/polopoly_fs/1.1969944.1329925242!mobileimage-logo-highres/996530124.png http://cdn01.tv4.se/polopoly_fs/1.1969944.1329925242!mobileimage-large-highres/3499314179.jpg Matakuten fortsätter att granska skolkök över hela Sverige. Visas i tv4 true http://cdn01.tv4.se/polopoly_fs/1.1969944.1329925242!image/1611166655.jpg http://cdn01.tv4.se/polopoly_fs/1.1969944.1329925242!smallformatimage/320597232.jpg http://cdn01.tv4.se/polopoly_fs/1.1969944.1329925242!categorylarge/3857834216.jpg http://cdn01.tv4.se/polopoly_fs/1.1969944.1329925242!image-large/2865528629.jpg http://cdn01.tv4.se/polopoly_fs/1.1969944.1329925242!image-logo/314436062.png http://cdn01.tv4.se/polopoly_fs/1.1969944.1329925242!small-image-logo/3956413426.png Hela program 12 true true false true 1.1969947 Senaste programmen inom Hem & Fritid 4 true true true false Alla 1.2496849,1.1833763,1.1969971,1.1985464,1.2501348,1.1969891,1.1844807,1.2086492,1.2203988,1.1825110,1.2175713,1.1969875,1.2114429,1.1844773,1.1973674,1.2607835,1.2183904,1.2691648,1.1969952,1.1820955 http://cdn01.tv4.se/polopoly_fs/1.2120233.1329925266!mobileimage/4015292117.jpg http://cdn01.tv4.se/polopoly_fs/1.2120233.1329925266!mobileimage-logo/3967291939.png http://cdn01.tv4.se/polopoly_fs/1.2120233.1329925266!mobileimage-large/2560740974.jpg http://cdn01.tv4.se/polopoly_fs/1.2120233.1329925266!mobileimage-highres/2557756462.jpg http://cdn01.tv4.se/polopoly_fs/1.2120233.1329925266!mobileimage-logo-highres/3700302620.png http://cdn01.tv4.se/polopoly_fs/1.2120233.1329925266!mobileimage-large-highres/2824339281.jpg Flower Power är en kanadensisk realityserie från 2008 som sänds i 13 delar och handlar om arbetet i en blomsteraffär i Toronto, Kanada. Ägaren Karina Lemke leder sitt team av florister genom de varierande uppdrag de får, allt från vanliga buketter till innovativa blomsterarrangemang. SE 129.35.209.170 58.247.178.245 115.111.227.14 115.111.227.6 25.19.39.117 210.94.41.89 217.67.201.237 217.67.201.162;SE;SE 129.35.209.170 58.247.178.245 115.111.227.14 115.111.227.6 25.19.39.117 210.94.41.89 217.67.201.237 217.67.201.162 Visas i tv4plus true http://cdn01.tv4.se/polopoly_fs/1.2120233.1329925266!image/98819877.jpg http://cdn01.tv4.se/polopoly_fs/1.2120233.1329925266!smallformatimage/538039891.jpg http://cdn01.tv4.se/polopoly_fs/1.2120233.1329925266!categorylarge/3401387991.jpg http://cdn01.tv4.se/polopoly_fs/1.2120233.1329925266!image-large/2660988269.jpg http://cdn01.tv4.se/polopoly_fs/1.2120233.1329925266!image-logo/1696294844.png http://cdn01.tv4.se/polopoly_fs/1.2120233.1329925266!small-image-logo/21163647.png Senaste programmen 12 true false false true Alla 1.2120233 Senaste programmen inom Hem & Fritid 4 true true true false Alla 1.2496849,1.1833763,1.1969971,1.1985464,1.2501348,1.1969891,1.1844807,1.2086492,1.2203988,1.1825110,1.2175713,1.1969875,1.2114429,1.1844773,1.1973674,1.2607835,1.2183904,1.2691648,1.1969952,1.1820955 Fiske-entusiasten och skådespelaren Robson Green jagar de mest svårfångade och farligaste fiskarna världen över. SE 115.111.227.14 115.111.227.6 25.19.39.117 210.94.41.89 217.67.201.237 217.67.201.162;SE Visas i tv4sport true http://cdn01.tv4.se/polopoly_fs/1.1969960.1342611659!image/551211724.jpg http://cdn01.tv4.se/polopoly_fs/1.1969960.1342611659!smallformatimage/931888320.jpg http://cdn01.tv4.se/polopoly_fs/1.1969960.1342611659!categorylarge/3156631128.jpg http://cdn01.tv4.se/polopoly_fs/1.1969960.1342611659!image-large/3892323554.jpg http://cdn01.tv4.se/polopoly_fs/1.1969960.1342611659!image-logo/327169587.png Hela program 12 true true false false 1.1969967 Senaste programmen inom Hem & Fritid 4 true true true false Alla 1.2496849,1.1833763,1.1969971,1.1985464,1.2501348,1.1969891,1.1844807,1.2086492,1.2203988,1.1825110,1.2175713,1.1969875,1.2114429,1.1844773,1.1973674,1.2607835,1.2183904,1.2691648,1.1969952,1.1820955 http://cdn01.tv4.se/polopoly_fs/1.1973415.1342611721!mobileimage/1095659005.jpg http://cdn01.tv4.se/polopoly_fs/1.1973415.1342611721!mobileimage-logo/3456426441.png http://cdn01.tv4.se/polopoly_fs/1.1973415.1342611721!mobileimage-large/636647942.jpg http://cdn01.tv4.se/polopoly_fs/1.1973415.1342611721!mobileimage-highres/3052231985.jpg http://cdn01.tv4.se/polopoly_fs/1.1973415.1342611721!mobileimage-logo-highres/1765500065.png http://cdn01.tv4.se/polopoly_fs/1.1973415.1342611721!mobileimage-large-highres/2194538350.jpg http://cdn01.tv4.se/polopoly_fs/1.1973415.1342611721!originallogoimage/1938299107.png http://cdn01.tv4.se/polopoly_fs/1.1973415.1342611721!originalformatimage/570758924.jpg http://cdn01.tv4.se/polopoly_fs/1.1973415.1342611721!originalcarouselimage/2488537505.jpg Sportfiskaren Mikael Odell reser kors och tvärs över världen i jakt på nya fiskeupplevelser. Det blir bland annat hajfiske längs Afrikas kust. Visas i tv4 true http://cdn01.tv4.se/polopoly_fs/1.1973415.1342611721!image/590632744.jpg http://cdn01.tv4.se/polopoly_fs/1.1973415.1342611721!smallformatimage/3479688517.jpg http://cdn01.tv4.se/polopoly_fs/1.1973415.1342611721!categorylarge/3081720709.jpg http://cdn01.tv4.se/polopoly_fs/1.1973415.1342611721!image-large/4170370136.jpg http://cdn01.tv4.se/polopoly_fs/1.1973415.1342611721!image-logo/764976628.png Hela program 12 true false false true 1.1973418 Senaste programmen inom Hem & Fritid 4 true true true false Alla 1.2496849,1.1833763,1.1969971,1.1985464,1.2501348,1.1969891,1.1844807,1.2086492,1.2203988,1.1825110,1.2175713,1.1969875,1.2114429,1.1844773,1.1973674,1.2607835,1.2183904,1.2691648,1.1969952,1.1820955 http://cdn01.tv4.se/polopoly_fs/1.1920934.1329918196!mobileimage/4143606836.jpg http://cdn01.tv4.se/polopoly_fs/1.1920934.1329918196!mobileimage-logo/578224350.png http://cdn01.tv4.se/polopoly_fs/1.1920934.1329918196!mobileimage-large/558192429.jpg http://cdn01.tv4.se/polopoly_fs/1.1920934.1329918196!mobileimage-highres/2172645666.jpg http://cdn01.tv4.se/polopoly_fs/1.1920934.1329918196!mobileimage-logo-highres/2485246930.png http://cdn01.tv4.se/polopoly_fs/1.1920934.1329918196!mobileimage-large-highres/2045140681.jpg http://cdn01.tv4.se/polopoly_fs/1.1920934.1329918196!originallogoimage/1001256170.png http://cdn01.tv4.se/polopoly_fs/1.1920934.1329918196!originalformatimage/904892691.jpg http://cdn01.tv4.se/polopoly_fs/1.1920934.1329918196!originalcarouselimage/2927204722.jpg Pernilla Wahlgren bjuder in tittarna till sitt hem på Lidingö utanför Stockholm där hon julstökar tillsammans med sina barn. Visas i tv4plus true http://cdn01.tv4.se/polopoly_fs/1.1920934.1329918196!image/843169971.jpg http://cdn01.tv4.se/polopoly_fs/1.1920934.1329918196!smallformatimage/4257745972.jpg http://cdn01.tv4.se/polopoly_fs/1.1920934.1329918196!categorylarge/2934067169.jpg http://cdn01.tv4.se/polopoly_fs/1.1920934.1329918196!image-large/1284489282.jpg http://cdn01.tv4.se/polopoly_fs/1.1920934.1329918196!image-logo/1112468862.png http://cdn01.tv4.se/polopoly_fs/1.1920934.1329918196!small-image-logo/1078405117.png Hela program 12 true false false true 1.1921133 Senaste programmen inom Hem & Fritid 4 true true true false Alla 1.2496849,1.1833763,1.1969971,1.1985464,1.2501348,1.1969891,1.1844807,1.2086492,1.2203988,1.1825110,1.2175713,1.1969875,1.2114429,1.1844773,1.1973674,1.2607835,1.2183904,1.2691648,1.1969952,1.1820955 http://cdn01.tv4.se/polopoly_fs/1.1944937.1342611840!originallogoimage/1260751805.png http://cdn01.tv4.se/polopoly_fs/1.1944937.1342611840!originalformatimage/3753551530.jpg http://cdn01.tv4.se/polopoly_fs/1.1944937.1342611840!originalcarouselimage/3170798974.jpg Leila Lindholm tar med en kasse fylld med de bästa råvarorna hem till en välkänd svensk och lagar mat och godis som hör julen till. Visas i tv4 true http://cdn01.tv4.se/polopoly_fs/1.1944937.1342611840!image/2731427349.jpg http://cdn01.tv4.se/polopoly_fs/1.1944937.1342611840!smallformatimage/3520977242.jpg http://cdn01.tv4.se/polopoly_fs/1.1944937.1342611840!categorylarge/139971999.jpg http://cdn01.tv4.se/polopoly_fs/1.1944937.1342611840!image-large/1093692759.jpg http://cdn01.tv4.se/polopoly_fs/1.1944937.1342611840!image-logo/639547391.png http://cdn01.tv4.se/polopoly_fs/1.1944937.1342611840!small-image-logo/1542268373.png Hela program 4 true false false true 1.1946249 Senaste programmen inom Hem & Fritid 4 true true true false Alla 1.2496849,1.1833763,1.1969971,1.1985464,1.2501348,1.1969891,1.1844807,1.2086492,1.2203988,1.1825110,1.2175713,1.1969875,1.2114429,1.1844773,1.1973674,1.2607835,1.2183904,1.2691648,1.1969952,1.1820955 http://cdn01.tv4.se/polopoly_fs/1.1969926.1342611948!mobileimage/1649723001.jpg http://cdn01.tv4.se/polopoly_fs/1.1969926.1342611948!mobileimage-logo/2944620728.png http://cdn01.tv4.se/polopoly_fs/1.1969926.1342611948!mobileimage-large/1214206458.jpg http://cdn01.tv4.se/polopoly_fs/1.1969926.1342611948!mobileimage-highres/4034063314.jpg http://cdn01.tv4.se/polopoly_fs/1.1969926.1342611948!mobileimage-logo-highres/3964505687.png http://cdn01.tv4.se/polopoly_fs/1.1969926.1342611948!mobileimage-large-highres/194086677.jpg http://cdn01.tv4.se/polopoly_fs/1.1969926.1342611948!originallogoimage/1954880919.png http://cdn01.tv4.se/polopoly_fs/1.1969926.1342611948!originalformatimage/2827833225.jpg http://cdn01.tv4.se/polopoly_fs/1.1969926.1342611948!originalcarouselimage/6078938.jpg Leila Lindholm bakar och lagar sina favoriträtter på både gamla och nya sätt. Visas i tv4plus true http://cdn01.tv4.se/polopoly_fs/1.1969926.1342611948!image/3388400525.jpg http://cdn01.tv4.se/polopoly_fs/1.1969926.1342611948!smallformatimage/803646483.jpg http://cdn01.tv4.se/polopoly_fs/1.1969926.1342611948!categorylarge/1014816329.jpg http://cdn01.tv4.se/polopoly_fs/1.1969926.1342611948!image-large/3293662655.jpg http://cdn01.tv4.se/polopoly_fs/1.1969926.1342611948!image-logo/534587169.png http://cdn01.tv4.se/polopoly_fs/1.1969926.1342611948!small-image-logo/771499064.png Hela program 12 true false false true 1.1969931 Senaste programmen inom Hem & Fritid 4 true true true false Alla 1.2496849,1.1833763,1.1969971,1.1985464,1.2501348,1.1969891,1.1844807,1.2086492,1.2203988,1.1825110,1.2175713,1.1969875,1.2114429,1.1844773,1.1973674,1.2607835,1.2183904,1.2691648,1.1969952,1.1820955 Tina Nordström får hjälp av sin mamma och vännen Caroline Lord att fixa mat och inbjudningskort till årets viktigaste fest Nyårsafton. Visas i tv4 true http://cdn01.tv4.se/polopoly_fs/1.1959999.1342612037!image/1256895389.jpg http://cdn01.tv4.se/polopoly_fs/1.1959999.1342612037!smallformatimage/4029240024.jpg http://cdn01.tv4.se/polopoly_fs/1.1959999.1342612037!categorylarge/1072391300.jpg http://cdn01.tv4.se/polopoly_fs/1.1959999.1342612037!image-large/1798566733.jpg http://cdn01.tv4.se/polopoly_fs/1.1959999.1342612037!image-logo/3027401108.png Hela program 12 true false false true 1.1959999 Senaste programmen inom Hem & Fritid 4 true true true false Alla 1.2496849,1.1833763,1.1969971,1.1985464,1.2501348,1.1969891,1.1844807,1.2086492,1.2203988,1.1825110,1.2175713,1.1969875,1.2114429,1.1844773,1.1973674,1.2607835,1.2183904,1.2691648,1.1969952,1.1820955 http://cdn01.tv4.se/polopoly_fs/1.2391229.1329917989!originallogoimage/3417396482.png http://cdn01.tv4.se/polopoly_fs/1.2391229.1329917989!originalformatimage/3717087435.jpg http://cdn01.tv4.se/polopoly_fs/1.2391229.1329917989!originalcarouselimage/685083367.jpg Kocken Tina Nordström ger oss nya goda mattips i rutan när hon reser runt i landet. torsdagar 21:00 tv4 true Hela program 12 true false false false Alla 1.2391229 Senaste programmen inom Hem & Fritid 4 true true true false Alla 1.2496849,1.1833763,1.1969971,1.1985464,1.2501348,1.1969891,1.1844807,1.2086492,1.2203988,1.1825110,1.2175713,1.1969875,1.2114429,1.1844773,1.1973674,1.2607835,1.2183904,1.2691648,1.1969952,1.1820955 http://cdn01.tv4.se/polopoly_fs/1.1933016.1342612134!originallogoimage/1919712889.png http://cdn01.tv4.se/polopoly_fs/1.1933016.1342612134!originalformatimage/601977238.jpg http://cdn01.tv4.se/polopoly_fs/1.1933016.1342612134!originalcarouselimage/2511370043.jpg Leila Lindholm bakar julens alla bakverk och sötsaker i ett stort och mysigt sekelskifteskök. Visas i tv4plus true http://cdn01.tv4.se/polopoly_fs/1.1933016.1342612134!image/319859040.jpg http://cdn01.tv4.se/polopoly_fs/1.1933016.1342612134!smallformatimage/4110477054.jpg http://cdn01.tv4.se/polopoly_fs/1.1933016.1342612134!categorylarge/3058382111.jpg http://cdn01.tv4.se/polopoly_fs/1.1933016.1342612134!image-large/1093692759.jpg http://cdn01.tv4.se/polopoly_fs/1.1933016.1342612134!image-logo/1090993193.png Hela program 12 true false false true 1.1933016 Senaste klippen 12 false true false false 1.1933052 Senaste programmen inom Hem & Fritid 4 true true true false Alla 1.2496849,1.1833763,1.1969971,1.1985464,1.2501348,1.1969891,1.1844807,1.2086492,1.2203988,1.1825110,1.2175713,1.1969875,1.2114429,1.1844773,1.1973674,1.2607835,1.2183904,1.2691648,1.1969952,1.1820955 http://cdn01.tv4.se/polopoly_fs/1.2179054.1342612184!mobileimage/903774677.jpg http://cdn01.tv4.se/polopoly_fs/1.2179054.1342612184!mobileimage-logo/3937111275.png http://cdn01.tv4.se/polopoly_fs/1.2179054.1342612184!mobileimage-large/2139087219.jpg http://cdn01.tv4.se/polopoly_fs/1.2179054.1342612184!mobileimage-highres/315944148.jpg http://cdn01.tv4.se/polopoly_fs/1.2179054.1342612184!mobileimage-logo-highres/3819673115.png http://cdn01.tv4.se/polopoly_fs/1.2179054.1342612184!mobileimage-large-highres/1988098947.jpg http://cdn01.tv4.se/polopoly_fs/1.2179054.1342612184!originallogoimage/3819673115.png http://cdn01.tv4.se/polopoly_fs/1.2179054.1342612184!originalformatimage/5414418.jpg http://cdn01.tv4.se/polopoly_fs/1.2179054.1342612184!originalcarouselimage/717886228.jpg Trädgårdsexperten Tina Ahlin åker tillsammans med Micke Alinder runt och besöker olika familjer med problem i trädgården. SE 129.35.209.170 58.247.178.245 115.111.227.14 115.111.227.6 25.19.39.117 210.94.41.89 217.67.201.237 217.67.201.162 tv4 true http://cdn01.tv4.se/polopoly_fs/1.2179054.1342612184!image/1463306321.jpg http://cdn01.tv4.se/polopoly_fs/1.2179054.1342612184!smallformatimage/3403914979.jpg http://cdn01.tv4.se/polopoly_fs/1.2179054.1342612184!categorylarge/2786809016.jpg http://cdn01.tv4.se/polopoly_fs/1.2179054.1342612184!image-large/149020302.jpg http://cdn01.tv4.se/polopoly_fs/1.2179054.1342612184!image-logo/1008539374.png http://cdn01.tv4.se/polopoly_fs/1.2179054.1342612184!small-image-logo/1219415486.png Hela program 12 true false false false Alla 1.2179054 Senaste programmen inom Hem & Fritid 4 true true true false Alla 1.2496849,1.1833763,1.1969971,1.1985464,1.2501348,1.1969891,1.1844807,1.2086492,1.2203988,1.1825110,1.2175713,1.1969875,1.2114429,1.1844773,1.1973674,1.2607835,1.2183904,1.2691648,1.1969952,1.1820955 Nigella Lawson älskar nedräkningen till jul och här avslöjar hon några av sina genvägar för att fixa julmaten. SE 129.35.209.170 58.247.178.245;SE 129.35.209.170 58.247.178.245 Programmen finns ute i en vecka efter att de sänts i TV4plus. Visas i tv4plus true http://cdn01.tv4.se/polopoly_fs/1.1955586.1329925163!image/3874868539.jpg http://cdn01.tv4.se/polopoly_fs/1.1955586.1329925163!smallformatimage/3584873229.jpg http://cdn01.tv4.se/polopoly_fs/1.1955586.1329925163!categorylarge/1283208959.jpg http://cdn01.tv4.se/polopoly_fs/1.1955586.1329925163!image-large/3292641658.jpg http://cdn01.tv4.se/polopoly_fs/1.1955586.1329925163!image-logo/2659763103.png http://cdn01.tv4.se/polopoly_fs/1.1955586.1329925163!small-image-logo/1835579199.png Senaste programmen 12 true false false true 1.1955586 Senaste programmen inom Hem & Fritid 4 true true true false Alla 1.2496849,1.1833763,1.1969971,1.1985464,1.2501348,1.1969891,1.1844807,1.2086492,1.2203988,1.1825110,1.2175713,1.1969875,1.2114429,1.1844773,1.1973674,1.2607835,1.2183904,1.2691648,1.1969952,1.1820955 http://cdn01.tv4.se/polopoly_fs/1.1973424.1342612254!mobileimage/898952793.jpg http://cdn01.tv4.se/polopoly_fs/1.1973424.1342612254!mobileimage-logo/4165169304.png http://cdn01.tv4.se/polopoly_fs/1.1973424.1342612254!mobileimage-large/530545114.jpg http://cdn01.tv4.se/polopoly_fs/1.1973424.1342612254!mobileimage-highres/2813510642.jpg http://cdn01.tv4.se/polopoly_fs/1.1973424.1342612254!mobileimage-logo-highres/3146622583.png http://cdn01.tv4.se/polopoly_fs/1.1973424.1342612254!mobileimage-large-highres/1548857141.jpg Thomas Ekberg, en erfaren jägare, och fiskereporter William Moberg-Faulds åker på fiskeäventyr både i exotiska och närliggande vatten. Visas i tv4plus true http://cdn01.tv4.se/polopoly_fs/1.1973424.1342612254!image/2654391213.jpg http://cdn01.tv4.se/polopoly_fs/1.1973424.1342612254!smallformatimage/2015790131.jpg http://cdn01.tv4.se/polopoly_fs/1.1973424.1342612254!categorylarge/1807545961.jpg http://cdn01.tv4.se/polopoly_fs/1.1973424.1342612254!image-large/2475779487.jpg http://cdn01.tv4.se/polopoly_fs/1.1973424.1342612254!image-logo/1209863937.png http://cdn01.tv4.se/polopoly_fs/1.1973424.1342612254!small-image-logo/2050755608.png Hela program 12 true false false true 1.1973431 Senaste programmen inom Hem & Fritid 4 true true true false Alla 1.2496849,1.1833763,1.1969971,1.1985464,1.2501348,1.1969891,1.1844807,1.2086492,1.2203988,1.1825110,1.2175713,1.1969875,1.2114429,1.1844773,1.1973674,1.2607835,1.2183904,1.2691648,1.1969952,1.1820955 http://cdn01.tv4.se/polopoly_fs/1.1973433.1329925371!mobileimage/2726233891.jpg http://cdn01.tv4.se/polopoly_fs/1.1973433.1329925371!mobileimage-logo/46076478.png http://cdn01.tv4.se/polopoly_fs/1.1973433.1329925371!mobileimage-large/1975532602.jpg http://cdn01.tv4.se/polopoly_fs/1.1973433.1329925371!mobileimage-highres/3589970485.jpg http://cdn01.tv4.se/polopoly_fs/1.1973433.1329925371!mobileimage-logo-highres/1511791578.png http://cdn01.tv4.se/polopoly_fs/1.1973433.1329925371!mobileimage-large-highres/761476574.jpg Thomas Ekberg har förmedlat sina kunskaper om jakt och viltvård i olika sammanhang under närmare 20 år. Nu leder han magasinet Jaktlust som blandar spännande jaktäventyr med vacker svensk natur. Det blir bland annat jakt på älg, råbock, vildsvin, gås, mufflon, toppfågel och ripa. Dessutom dyker några kända profiler med stort intresse för jakt upp under säsongen. Visas i tv4sport true http://cdn01.tv4.se/polopoly_fs/1.1973433.1329925371!image/602907389.jpg http://cdn01.tv4.se/polopoly_fs/1.1973433.1329925371!smallformatimage/2840422179.jpg http://cdn01.tv4.se/polopoly_fs/1.1973433.1329925371!categorylarge/4201063670.jpg http://cdn01.tv4.se/polopoly_fs/1.1973433.1329925371!image-large/403352405.jpg http://cdn01.tv4.se/polopoly_fs/1.1973433.1329925371!image-logo/764976628.png http://cdn01.tv4.se/polopoly_fs/1.1973433.1329925371!small-image-logo/877377881.png Hela program 12 true false false true 1.1973460 Senaste programmen inom Hem & Fritid 4 true true true false Alla 1.2496849,1.1833763,1.1969971,1.1985464,1.2501348,1.1969891,1.1844807,1.2086492,1.2203988,1.1825110,1.2175713,1.1969875,1.2114429,1.1844773,1.1973674,1.2607835,1.2183904,1.2691648,1.1969952,1.1820955 http://cdn01.tv4.se/polopoly_fs/1.1981600.1329925388!mobileimage/792226218.jpg http://cdn01.tv4.se/polopoly_fs/1.1981600.1329925388!mobileimage-large/788185461.jpg http://cdn01.tv4.se/polopoly_fs/1.1981600.1329925388!mobileimage-highres/2288913245.jpg http://cdn01.tv4.se/polopoly_fs/1.1981600.1329925388!mobileimage-large-highres/3237038544.jpg Landskapsarkitekten Jamie Durie beger sig ut i världen för att designa trädgårdar. Till sin hjälp har han ett skräddarsytt team av designers, trädgårdsarkitekter och entreprenörer. SE;SE 115.111.227.14 115.111.227.6 25.19.39.117 210.94.41.89 217.67.201.237 217.67.201.162 Visas i tv4plus true http://cdn01.tv4.se/polopoly_fs/1.1981600.1329925388!image/2028318999.jpg http://cdn01.tv4.se/polopoly_fs/1.1981600.1329925388!smallformatimage/2867367337.jpg http://cdn01.tv4.se/polopoly_fs/1.1981600.1329925388!categorylarge/2998751322.jpg http://cdn01.tv4.se/polopoly_fs/1.1981600.1329925388!image-large/1415769769.jpg http://cdn01.tv4.se/polopoly_fs/1.1981600.1329925388!image-logo/1455897924.png Hela program 4 true false false false 1.1981604 Senaste programmen inom Hem & Fritid 4 true true true false Alla 1.2496849,1.1833763,1.1969971,1.1985464,1.2501348,1.1969891,1.1844807,1.2086492,1.2203988,1.1825110,1.2175713,1.1969875,1.2114429,1.1844773,1.1973674,1.2607835,1.2183904,1.2691648,1.1969952,1.1820955 http://cdn01.tv4.se/polopoly_fs/1.2086513.1329925406!mobileimage/1270111141.jpg http://cdn01.tv4.se/polopoly_fs/1.2086513.1329925406!mobileimage-logo/3579613184.png http://cdn01.tv4.se/polopoly_fs/1.2086513.1329925406!mobileimage-large/896646337.jpg http://cdn01.tv4.se/polopoly_fs/1.2086513.1329925406!mobileimage-highres/1134096596.jpg http://cdn01.tv4.se/polopoly_fs/1.2086513.1329925406!mobileimage-logo-highres/1852294318.png http://cdn01.tv4.se/polopoly_fs/1.2086513.1329925406!mobileimage-large-highres/2200397773.jpg Storbritanniens familjer är bland de fetaste i Europa, 25 procent av de vuxna och 16 procent av barnen är överviktiga. I programmet tar sig coachen Steve Miller an sex familjer för att få dem att bryta sina dåliga vanor och lära dem att äta rätt och gå ner i vikt. SE 129.35.209.170 58.247.178.245 115.111.227.14 115.111.227.6 25.19.39.117 210.94.41.89 217.67.201.237 217.67.201.162;SE 129.35.209.170 58.247.178.245;SE 129.35.209.170 58.247.178.245 115.111.227.14 115.111.227.6 25.19.39.117 210.94.41.89 217.67.201.237 217.67.201.162 Visas i tv4 true http://cdn01.tv4.se/polopoly_fs/1.2086513.1329925406!image/1885339897.jpg http://cdn01.tv4.se/polopoly_fs/1.2086513.1329925406!smallformatimage/2042699132.jpg http://cdn01.tv4.se/polopoly_fs/1.2086513.1329925406!categorylarge/2275322664.jpg http://cdn01.tv4.se/polopoly_fs/1.2086513.1329925406!image-large/2893993920.jpg http://cdn01.tv4.se/polopoly_fs/1.2086513.1329925406!image-logo/2803994995.png http://cdn01.tv4.se/polopoly_fs/1.2086513.1329925406!small-image-logo/1329058087.png Hela program 4 true false false false Alla 1.2086514 Senaste programmen inom Hem & Fritid 4 true true true false Alla 1.2496849,1.1833763,1.1969971,1.1985464,1.2501348,1.1969891,1.1844807,1.2086492,1.2203988,1.1825110,1.2175713,1.1969875,1.2114429,1.1844773,1.1973674,1.2607835,1.2183904,1.2691648,1.1969952,1.1820955 http://cdn01.tv4.se/polopoly_fs/1.1981842.1329925424!mobileimage/838683776.jpg http://cdn01.tv4.se/polopoly_fs/1.1981842.1329925424!mobileimage-large/2780027301.jpg http://cdn01.tv4.se/polopoly_fs/1.1981842.1329925424!mobileimage-highres/1188918907.jpg http://cdn01.tv4.se/polopoly_fs/1.1981842.1329925424!mobileimage-large-highres/2897462101.jpg Love it or list it är en australiensisk dokumentärserie. Här försöker fastighetsmäklaren David Visentin och inredningsdesignern Hilary Farr att få husägare på sin sida där David vill få dem att sälja medan Hilary vill övertala dem att renovera. SE 129.35.209.170 58.247.178.245 115.111.227.14 115.111.227.6 25.19.39.117 210.94.41.89 217.67.201.237 217.67.201.162 Visas i tv4plus true http://cdn01.tv4.se/polopoly_fs/1.1981842.1329925424!image/3679120752.jpg http://cdn01.tv4.se/polopoly_fs/1.1981842.1329925424!smallformatimage/4273529862.jpg http://cdn01.tv4.se/polopoly_fs/1.1981842.1329925424!categorylarge/2094492782.jpg http://cdn01.tv4.se/polopoly_fs/1.1981842.1329925424!image-large/3526223448.jpg http://cdn01.tv4.se/polopoly_fs/1.1981842.1329925424!image-logo/1746679136.png Hela program 4 true false false false 1.1981848 Senaste programmen inom Hem & Fritid 4 true true true false Alla 1.2496849,1.1833763,1.1969971,1.1985464,1.2501348,1.1969891,1.1844807,1.2086492,1.2203988,1.1825110,1.2175713,1.1969875,1.2114429,1.1844773,1.1973674,1.2607835,1.2183904,1.2691648,1.1969952,1.1820955 http://cdn01.tv4.se/polopoly_fs/1.2116087.1329925440!mobileimage/3934145528.jpg http://cdn01.tv4.se/polopoly_fs/1.2116087.1329925440!mobileimage-logo/2942038233.png http://cdn01.tv4.se/polopoly_fs/1.2116087.1329925440!mobileimage-large/1486339097.jpg http://cdn01.tv4.se/polopoly_fs/1.2116087.1329925440!mobileimage-highres/1758710777.jpg http://cdn01.tv4.se/polopoly_fs/1.2116087.1329925440!mobileimage-logo-highres/1679689188.png http://cdn01.tv4.se/polopoly_fs/1.2116087.1329925440!mobileimage-large-highres/2480032036.jpg Kocken Annabel visar hur enkelt det är att laga bra mat från grunden. Hon delar med sig av sina hemligheter om hur man lyckas i köket och skapar hemlagad mat med mycket liten ansträngning. SE 129.35.209.170 58.247.178.245 115.111.227.14 115.111.227.6 25.19.39.117 210.94.41.89 217.67.201.237 217.67.201.162;SE 129.35.209.170 58.247.178.245 115.111.227.14 115.111.227.6 25.19.39.117 210.94.41.89 217.67.201.237 217.67.201.162 Visas i tv4plus true http://cdn01.tv4.se/polopoly_fs/1.2116087.1329925440!image/815297537.jpg http://cdn01.tv4.se/polopoly_fs/1.2116087.1329925440!smallformatimage/63007287.jpg http://cdn01.tv4.se/polopoly_fs/1.2116087.1329925440!categorylarge/2584842181.jpg http://cdn01.tv4.se/polopoly_fs/1.2116087.1329925440!image-large/1340356620.jpg http://cdn01.tv4.se/polopoly_fs/1.2116087.1329925440!image-logo/1222998693.png http://cdn01.tv4.se/polopoly_fs/1.2116087.1329925440!small-image-logo/3137670661.png Hela program 4 true false false false Alla 1.2116088 Senaste programmen inom Hem & Fritid 4 true true true false Alla 1.2496849,1.1833763,1.1969971,1.1985464,1.2501348,1.1969891,1.1844807,1.2086492,1.2203988,1.1825110,1.2175713,1.1969875,1.2114429,1.1844773,1.1973674,1.2607835,1.2183904,1.2691648,1.1969952,1.1820955 http://cdn01.tv4.se/polopoly_fs/1.2116082.1329925456!mobileimage/1864752483.jpg http://cdn01.tv4.se/polopoly_fs/1.2116082.1329925456!mobileimage-logo/2068838215.png http://cdn01.tv4.se/polopoly_fs/1.2116082.1329925456!mobileimage-large/4087583445.jpg http://cdn01.tv4.se/polopoly_fs/1.2116082.1329925456!mobileimage-highres/2875475822.jpg http://cdn01.tv4.se/polopoly_fs/1.2116082.1329925456!mobileimage-logo-highres/190401044.png http://cdn01.tv4.se/polopoly_fs/1.2116082.1329925456!mobileimage-large-highres/2209689478.jpg Den före detta modellen Kim Alexis ger sig ut på jakt efter nästa supermodell. Men hon är inte ute efter den vanliga modellen. Det hon söker är en kvinna över 35 år som har utseendet och stjärnkvaliteten att bli det nya ansiktet i modeindustrin. SE 129.35.209.170 58.247.178.245 115.111.227.14 115.111.227.6 25.19.39.117 210.94.41.89 217.67.201.237 217.67.201.162;SE 129.35.209.170 58.247.178.245 115.111.227.14 115.111.227.6 25.19.39.117 210.94.41.89 217.67.201.237 217.67.201.162 Visas i tv4plus true http://cdn01.tv4.se/polopoly_fs/1.2116082.1329925456!image/1254958229.jpg http://cdn01.tv4.se/polopoly_fs/1.2116082.1329925456!smallformatimage/4027499984.jpg http://cdn01.tv4.se/polopoly_fs/1.2116082.1329925456!categorylarge/1070396300.jpg http://cdn01.tv4.se/polopoly_fs/1.2116082.1329925456!image-large/824931946.jpg http://cdn01.tv4.se/polopoly_fs/1.2116082.1329925456!image-logo/3025530524.png http://cdn01.tv4.se/polopoly_fs/1.2116082.1329925456!small-image-logo/125677475.png Hela program 4 true false false false Alla 1.2116084 Senaste programmen inom Hem & Fritid 4 true true true false Alla 1.2496849,1.1833763,1.1969971,1.1985464,1.2501348,1.1969891,1.1844807,1.2086492,1.2203988,1.1825110,1.2175713,1.1969875,1.2114429,1.1844773,1.1973674,1.2607835,1.2183904,1.2691648,1.1969952,1.1820955 http://cdn01.tv4.se/polopoly_fs/1.1967155.1329925474!mobileimage-logo/1246845188.png http://cdn01.tv4.se/polopoly_fs/1.1967155.1329925474!mobileimage-logo-highres/317870304.png Kim Woodburn och Aggie MacKenzie besöker brittiska hem som är i stort behov av städning. De går igenom hemmet med de boende och ger dem råd om hur man håller rent. Sen är det dags att ta på skurhandskarna och sätta igång med att röja upp i röran. SE 129.35.209.170 58.247.178.245 115.111.227.14 115.111.227.6 25.19.39.117 210.94.41.89 217.67.201.237 217.67.201.162;SE 129.35.209.170 58.247.178.245 115.111.227.14 115.111.227.6 25.19.39.117 210.94.41.89 217.67.201.237 217.67.201.162 tv4plus true http://cdn01.tv4.se/polopoly_fs/1.1967155.1329925474!image/721738061.jpg http://cdn01.tv4.se/polopoly_fs/1.1967155.1329925474!smallformatimage/326289228.jpg http://cdn01.tv4.se/polopoly_fs/1.1967155.1329925474!categorylarge/2703644226.jpg http://cdn01.tv4.se/polopoly_fs/1.1967155.1329925474!image-large/1354229435.jpg http://cdn01.tv4.se/polopoly_fs/1.1967155.1329925474!image-logo/4009778479.png http://cdn01.tv4.se/polopoly_fs/1.1967155.1329925474!small-image-logo/4067411676.png Hela program 12 true false false true 1.1967155 Senaste programmen inom Hem & Fritid 4 true true true false Alla 1.2496849,1.1833763,1.1969971,1.1985464,1.2501348,1.1969891,1.1844807,1.2086492,1.2203988,1.1825110,1.2175713,1.1969875,1.2114429,1.1844773,1.1973674,1.2607835,1.2183904,1.2691648,1.1969952,1.1820955 http://cdn01.tv4.se/polopoly_fs/1.1967202.1329925491!mobileimage/3228189945.jpg http://cdn01.tv4.se/polopoly_fs/1.1967202.1329925491!mobileimage-logo/3960257688.png http://cdn01.tv4.se/polopoly_fs/1.1967202.1329925491!mobileimage-large/3199181725.jpg http://cdn01.tv4.se/polopoly_fs/1.1967202.1329925491!mobileimage-highres/3360092040.jpg http://cdn01.tv4.se/polopoly_fs/1.1967202.1329925491!mobileimage-logo-highres/1515874196.png http://cdn01.tv4.se/polopoly_fs/1.1967202.1329925491!mobileimage-large-highres/150567057.jpg Här får tittarna lära sig hur de kan få sitt hem att se ut precis så som de önskar. Man ger råd och tips och experter berättar om trender inom design. Dessutom besöker programledaren Lynda Reevse hem runt om i Kanada. SE 129.35.209.170 58.247.178.245;SE 129.35.209.170 58.247.178.245 115.111.227.14 115.111.227.6 25.19.39.117 210.94.41.89 217.67.201.237 217.67.201.162 Vardagar 15:00 tv4 false http://cdn01.tv4.se/polopoly_fs/1.1967202.1329925491!image/4223541157.jpg http://cdn01.tv4.se/polopoly_fs/1.1967202.1329925491!smallformatimage/4062118432.jpg http://cdn01.tv4.se/polopoly_fs/1.1967202.1329925491!categorylarge/205567092.jpg http://cdn01.tv4.se/polopoly_fs/1.1967202.1329925491!image-large/664848540.jpg http://cdn01.tv4.se/polopoly_fs/1.1967202.1329925491!image-logo/979601972.png http://cdn01.tv4.se/polopoly_fs/1.1967202.1329925491!small-image-logo/946487479.png Hela program 12 true false false true 1.1967202 Senaste programmen inom Hem & Fritid 4 true true true false Alla 1.2496849,1.1833763,1.1969971,1.1985464,1.2501348,1.1969891,1.1844807,1.2086492,1.2203988,1.1825110,1.2175713,1.1969875,1.2114429,1.1844773,1.1973674,1.2607835,1.2183904,1.2691648,1.1969952,1.1820955 http://cdn01.tv4.se/polopoly_fs/1.1999217.1329925515!originallogoimage/3586651286.png http://cdn01.tv4.se/polopoly_fs/1.1999217.1329925515!originalformatimage/878281898.jpg http://cdn01.tv4.se/polopoly_fs/1.1999217.1329925515!originalcarouselimage/3105382853.jpg Jamie Oliver ger handfasta råd och tips om hur alla kan lyckas i köket. Han visar hur man enkelt och snabbt lagar en komplett måltid från grunden på en halvtimme. SE 129.35.209.170 58.247.178.245 58.247.178.244 115.111.227.14 115.111.227.6 25.19.39.117 210.94.41.89 217.67.201.237 217.67.201.162 Visas i tv4plus false Hela program 4 true false false false 1.1999217 Senaste programmen inom Hem & Fritid 4 true true true false Alla 1.2496849,1.1833763,1.1969971,1.1985464,1.2501348,1.1969891,1.1844807,1.2086492,1.2203988,1.1825110,1.2175713,1.1969875,1.2114429,1.1844773,1.1973674,1.2607835,1.2183904,1.2691648,1.1969952,1.1820955 http://cdn01.tv4.se/polopoly_fs/1.2063787.1329925530!mobileimage/758206489.jpg http://cdn01.tv4.se/polopoly_fs/1.2063787.1329925530!mobileimage-logo/4064566567.png http://cdn01.tv4.se/polopoly_fs/1.2063787.1329925530!mobileimage-large/1737502911.jpg http://cdn01.tv4.se/polopoly_fs/1.2063787.1329925530!mobileimage-highres/171654424.jpg http://cdn01.tv4.se/polopoly_fs/1.2063787.1329925530!mobileimage-logo-highres/4215556055.png http://cdn01.tv4.se/polopoly_fs/1.2063787.1329925530!mobileimage-large-highres/1854941775.jpg Jamie Oliver bjuder på enkla recept med tillgängliga ingredienser som frukt och grönsaker från sin egen köksträdgård där han har odlat alla möjliga grödor. Varje program har ett tema kring en huvudingrediens. Han tipsar också om hur enkelt det är att odla kryddor och grönsaker hemma. SE 129.35.209.170 58.247.178.245 115.111.227.14 115.111.227.6 25.19.39.117 210.94.41.89 217.67.201.237 217.67.201.162 tv4plus false http://cdn01.tv4.se/polopoly_fs/1.2063787.1329925530!image/1339529629.jpg http://cdn01.tv4.se/polopoly_fs/1.2063787.1329925530!smallformatimage/3524022063.jpg http://cdn01.tv4.se/polopoly_fs/1.2063787.1329925530!categorylarge/3203695988.jpg http://cdn01.tv4.se/polopoly_fs/1.2063787.1329925530!image-large/269356866.jpg http://cdn01.tv4.se/polopoly_fs/1.2063787.1329925530!image-logo/619890466.png Hela program 12 true false false true Alla 1.2063798 Senaste programmen inom Hem & Fritid 4 true true true false Alla 1.2496849,1.1833763,1.1969971,1.1985464,1.2501348,1.1969891,1.1844807,1.2086492,1.2203988,1.1825110,1.2175713,1.1969875,1.2114429,1.1844773,1.1973674,1.2607835,1.2183904,1.2691648,1.1969952,1.1820955 http://cdn01.tv4.se/polopoly_fs/1.2142089.1329925544!mobileimage/3513842002.jpg http://cdn01.tv4.se/polopoly_fs/1.2142089.1329925544!mobileimage-logo/352441996.png http://cdn01.tv4.se/polopoly_fs/1.2142089.1329925544!mobileimage-large/3501347213.jpg http://cdn01.tv4.se/polopoly_fs/1.2142089.1329925544!mobileimage-highres/1982241701.jpg http://cdn01.tv4.se/polopoly_fs/1.2142089.1329925544!mobileimage-logo-highres/1766328969.png http://cdn01.tv4.se/polopoly_fs/1.2142089.1329925544!mobileimage-large-highres/1052367144.jpg I Jamie Olivers twist lagar Jamie Oliver enkel mat för trevliga tillfällen med familj och vänner. Han ger sig ut i Londonvimlet för att söka efter ingredienser på marknader och möter intressanta människor som han lagar mat tillsammans med. SE 129.35.209.170 58.247.178.245 115.111.227.14 115.111.227.6 25.19.39.117 210.94.41.89 217.67.201.237 217.67.201.162;SE Visas i tv4plus false http://cdn01.tv4.se/polopoly_fs/1.2142089.1329925544!image/2259493359.jpg http://cdn01.tv4.se/polopoly_fs/1.2142089.1329925544!smallformatimage/1419779409.jpg http://cdn01.tv4.se/polopoly_fs/1.2142089.1329925544!categorylarge/1291174050.jpg http://cdn01.tv4.se/polopoly_fs/1.2142089.1329925544!image-large/2854911569.jpg http://cdn01.tv4.se/polopoly_fs/1.2142089.1329925544!image-logo/3045954746.png http://cdn01.tv4.se/polopoly_fs/1.2142089.1329925544!small-image-logo/4223042882.png Hela program 4 true false false false Alla 1.2142097 Senaste programmen inom Hem & Fritid 4 true true true false Alla 1.2496849,1.1833763,1.1969971,1.1985464,1.2501348,1.1969891,1.1844807,1.2086492,1.2203988,1.1825110,1.2175713,1.1969875,1.2114429,1.1844773,1.1973674,1.2607835,1.2183904,1.2691648,1.1969952,1.1820955 I Mamma byter bo byter varje vecka två nya mammor familj och vardag med varandra. Tittarna får följa med när kvinnorna, med olika värderingar och bakgrund, provar på hur det är att leva en annan mammas liv. SE 129.35.209.170 58.247.178.245 115.111.227.14 115.111.227.6 25.19.39.117 210.94.41.89 217.67.201.237 217.67.201.162;SE 129.35.209.170 58.247.178.245 115.111.227.14 115.111.227.6 25.19.39.117 210.94.41.89 217.67.201.237 217.67.201.162;SE 129.35.209.170 58.247.178.245 115.111.227.14 115.111.227.6 25.19.39.117 210.94.41.89 217.67.201.237 217.67.201.162;SE 129.35.209.170 58.247.178.245 115.111.227.14 115.111.227.6 25.19.39.117 210.94.41.89 217.67.201.237 217.67.201.162 tv4 false Hela program 12 true false false false Alla 1.2072000 Senaste klippen 12 true true false false Alla 1.2072002 Senaste programmen inom Hem & Fritid 4 true true true false Alla 1.2496849,1.1833763,1.1969971,1.1985464,1.2501348,1.1969891,1.1844807,1.2086492,1.2203988,1.1825110,1.2175713,1.1969875,1.2114429,1.1844773,1.1973674,1.2607835,1.2183904,1.2691648,1.1969952,1.1820955 Program - Film & Serier 30 false Alla 1.2268365,1.2522584,1.2082509,1.1855803,1.2485710,1.1955342,1.2116013,1.2202874,1.2034627,1.2184339,1.2125466,1.2693237,1.2184477,1.2283814,1.2382093,1.2152099,1.2281961,1.2184397,1.2142079,1.2184376,1.1975146,1.2184361,1.2169423,1.2012818,1.2019475,1.2113689,1.1969797 1.1972146,1.1955342,1.1969840,1.2161452,1.2326293,1.1845449,1.1969868,1.1955301,1.2034642,1.2382065,1.2184397,1.2034627,1.2001379,1.1989423,1.2170926,1.2123689,1.2159898,1.1969847,1.2089805,1.2555393,1.2547750,1.1919111,1.1984952,1.2012839,1.2390634,1.1969858,1.1955284,1.2001050 1.2185975,1.2690213,1.2001050,1.2326293,1.2203976,1.2676183,1.2681510,1.2621798,1.1954254,1.2685868,1.1919111,1.2599742,1.2134569,1.2273007,1.2142056,1.2037911,1.1955246,1.2270229,1.2161452,1.1954412,1.2307860 1.2170705,1.1974783 1.2123689,1.1976702,1.2134569,1.1976613,1.2320431,1.2001379,1.2322202 false http://cdn01.tv4.se/polopoly_fs/1.2242004.1341213165!image/298177630.jpg https://www.tv4play.se/order/produkter?redirect_url=%2F%3F&promo=fiskpinnen&product_group_id=7 Senast tillagt inom Film & Serier 4 true true true false Alla 1.1969858,1.1955301,1.2555393,1.2170705,1.2034642,1.2082509,1.2134569,1.1919111,1.1984952,1.2690213,1.1969847,1.2685868,1.2089805,1.1855803,1.2522584,1.2676183,1.1955342,1.2681510,1.2693237,1.2012839 http://cdn01.tv4.se/polopoly_fs/1.2685868.1342612524!originallogoimage/480926938.png http://cdn01.tv4.se/polopoly_fs/1.2685868.1342612524!originalformatimage/3231846084.jpg http://cdn01.tv4.se/polopoly_fs/1.2685868.1342612524!originalcarouselimage/1752400023.jpg Rättspatologerna vid Londons universitet är oerhört dedikerade och ger sig inte förrän de löst varför och hur personen dött. SE;SE;SE Visas i tv4 false Hela program 12 true false false false Alla 1.2685871 Senast tillagt inom Film & Serier 4 true true true false Alla 1.1969858,1.1955301,1.2555393,1.2170705,1.2034642,1.2082509,1.2134569,1.1919111,1.1984952,1.2690213,1.1969847,1.2685868,1.2089805,1.1855803,1.2522584,1.2676183,1.1955342,1.2681510,1.2693237,1.2012839 http://cdn01.tv4.se/polopoly_fs/1.2690213.1342623967!originallogoimage/2866683973.png http://cdn01.tv4.se/polopoly_fs/1.2690213.1342623967!originalformatimage/3693153763.jpg http://cdn01.tv4.se/polopoly_fs/1.2690213.1342623967!originalcarouselimage/3859794469.jpg Oskyldigt dömd är ett svenskt kriminaldrama från 2009 i 12 avsnitt. SE;SE;SE Visas i sjuan false Hela program 12 true false false false Alla 1.2690223 Senast tillagt inom Film & Serier 4 true true true false Alla 1.1969858,1.1955301,1.2555393,1.2170705,1.2034642,1.2082509,1.2134569,1.1919111,1.1984952,1.2690213,1.1969847,1.2685868,1.2089805,1.1855803,1.2522584,1.2676183,1.1955342,1.2681510,1.2693237,1.2012839 http://cdn01.tv4.se/polopoly_fs/1.2676183.1342617430!originallogoimage/313708135.png http://cdn01.tv4.se/polopoly_fs/1.2676183.1342617430!originalformatimage/585168273.jpg http://cdn01.tv4.se/polopoly_fs/1.2676183.1342617430!originalcarouselimage/4021244703.jpg Kriminalinspektör Tom Thorne jagar en seriemördare som hittills dödat tre personer men hans fjärde offer, Alison, överlevde. SE;SE;SE Visas i tv4 false Kommissarie Thorne: Offerlek 12 true true false false Alla 1.2689463,1.2689465 Kommissarie Thorne: Sömntuta 12 true false false false Alla 1.2676184 Senast tillagt inom Film & Serier 4 true true true false Alla 1.1969858,1.1955301,1.2555393,1.2170705,1.2034642,1.2082509,1.2134569,1.1919111,1.1984952,1.2690213,1.1969847,1.2685868,1.2089805,1.1855803,1.2522584,1.2676183,1.1955342,1.2681510,1.2693237,1.2012839 http://cdn01.tv4.se/polopoly_fs/1.2693237.1343037035!originallogoimage/586813370.png http://cdn01.tv4.se/polopoly_fs/1.2693237.1343037035!originalformatimage/175712159.jpg http://cdn01.tv4.se/polopoly_fs/1.2693237.1343037035!originalcarouselimage/811065433.jpg Matt Lucas och David Walliams spelar över sextio olika karaktärer, allt från flygpersonal till paparazzi och passagerare. SE;SE;SE Visas i sjuan false Hela program 12 true false false false Alla 1.2693239 Senast tillagt inom Film & Serier 4 true true true false Alla 1.1969858,1.1955301,1.2555393,1.2170705,1.2034642,1.2082509,1.2134569,1.1919111,1.1984952,1.2690213,1.1969847,1.2685868,1.2089805,1.1855803,1.2522584,1.2676183,1.1955342,1.2681510,1.2693237,1.2012839 http://cdn01.tv4.se/polopoly_fs/1.2522584.1343658649!originallogoimage/2196328456.png http://cdn01.tv4.se/polopoly_fs/1.2522584.1343658649!originalformatimage/1580489720.jpg http://cdn01.tv4.se/polopoly_fs/1.2522584.1343658649!originalcarouselimage/1763691463.jpg På Svensk kontorshygien AB i Upplands Väsby är osmidiga Ove Sundberg chef. SE 115.111.227.14 115.111.227.6 25.19.39.117 210.94.41.89 217.67.201.237 217.67.201.162;SE 115.111.227.14 115.111.227.6 25.19.39.117 210.94.41.89 217.67.201.237 217.67.201.162;SE 115.111.227.14 115.111.227.6 25.19.39.117 210.94.41.89 217.67.201.237 217.67.201.162;SE;SE 115.111.227.14 115.111.227.6 25.19.39.117 210.94.41.89 217.67.201.237 217.67.201.162 Visas i tv4 false TV4 Play-exklusiva avsnitt 12 true true false false Alla 1.2522593 Klipp 12 false true false false Alla 1.2522591 Senast tillagt inom Film & Serier 4 true true true false Alla 1.1969858,1.1955301,1.2555393,1.2170705,1.2034642,1.2082509,1.2134569,1.1919111,1.1984952,1.2690213,1.1969847,1.2685868,1.2089805,1.1855803,1.2522584,1.2676183,1.1955342,1.2681510,1.2693237,1.2012839 http://cdn01.tv4.se/polopoly_fs/1.1855803.1342617685!mobileimage/1508673667.jpg http://cdn01.tv4.se/polopoly_fs/1.1855803.1342617685!mobileimage-logo/2864852296.png http://cdn01.tv4.se/polopoly_fs/1.1855803.1342617685!mobileimage-large/3720151884.jpg http://cdn01.tv4.se/polopoly_fs/1.1855803.1342617685!mobileimage-highres/3419055400.jpg http://cdn01.tv4.se/polopoly_fs/1.1855803.1342617685!mobileimage-logo-highres/4066452652.png http://cdn01.tv4.se/polopoly_fs/1.1855803.1342617685!mobileimage-large-highres/2233338536.jpg Lyckojakt, livspussel och hets är ledorden för Solsidan. Ord som kan skapa stress och olycka och en rad komiska förvecklingar. SE 129.35.209.170 58.247.178.245 115.111.227.14 115.111.227.6 25.19.39.117 210.94.41.89 217.67.201.237 217.67.201.162;SE 129.35.209.170 58.247.178.245 115.111.227.14 115.111.227.6 25.19.39.117 210.94.41.89 217.67.201.237 217.67.201.162;SE 129.35.209.170 58.247.178.245;SE 129.35.209.170 58.247.178.245;SE 129.35.209.170 58.247.178.245 115.111.227.14 115.111.227.6 25.19.39.117 210.94.41.89 217.67.201.237 217.67.201.162 Visas i tv4 false http://cdn01.tv4.se/polopoly_fs/1.1855803.1342617685!image/4065242487.jpg http://cdn01.tv4.se/polopoly_fs/1.1855803.1342617685!smallformatimage/341762793.jpg http://cdn01.tv4.se/polopoly_fs/1.1855803.1342617685!categorylarge/1377442688.jpg http://cdn01.tv4.se/polopoly_fs/1.1855803.1342617685!image-large/2960626723.jpg http://cdn01.tv4.se/polopoly_fs/1.1855803.1342617685!image-logo/4086738645.png http://cdn01.tv4.se/polopoly_fs/1.1855803.1342617685!small-image-logo/632548681.png Säsong 2 12 true false false false Alla 1.1974597,1.2683724 Säsong 1 12 true true false false Alla 1.1975308 Senaste klippen 12 false true false true 1.1855816 Senast tillagt inom Film & Serier 4 true true true false Alla 1.1969858,1.1955301,1.2555393,1.2170705,1.2034642,1.2082509,1.2134569,1.1919111,1.1984952,1.2690213,1.1969847,1.2685868,1.2089805,1.1855803,1.2522584,1.2676183,1.1955342,1.2681510,1.2693237,1.2012839 http://cdn01.tv4.se/polopoly_fs/1.1845449.1339774338!originallogoimage/1721053781.png http://cdn01.tv4.se/polopoly_fs/1.1845449.1339774338!originalformatimage/4106972041.jpg http://cdn01.tv4.se/polopoly_fs/1.1845449.1339774338!originalcarouselimage/1949883830.jpg Brittisk dramaserie om det dagliga livet i lilla byn Emmerdale i norra England. SE 129.35.209.170 58.247.178.245 115.111.227.14 115.111.227.6 25.19.39.117 210.94.41.89 217.67.201.237 217.67.201.162;SE 129.35.209.170 58.247.178.245;SE 129.35.209.170 58.247.178.245 115.111.227.14 115.111.227.6 25.19.39.117 210.94.41.89 217.67.201.237 217.67.201.162 Hem till gården tar sommaruppehåll och återkommer 20 augusti. Visas i tv4 false Hela program 12 true true false true 1.1845454,1.1845449 Senast tillagt inom Film & Serier 4 true true true false Alla 1.1969858,1.1955301,1.2555393,1.2170705,1.2034642,1.2082509,1.2134569,1.1919111,1.1984952,1.2690213,1.1969847,1.2685868,1.2089805,1.1855803,1.2522584,1.2676183,1.1955342,1.2681510,1.2693237,1.2012839 http://cdn01.tv4.se/polopoly_fs/1.2012839.1341409280!mobileimage/3265214376.jpg http://cdn01.tv4.se/polopoly_fs/1.2012839.1341409280!mobileimage-logo/2850091922.png http://cdn01.tv4.se/polopoly_fs/1.2012839.1341409280!mobileimage-large/3160068300.jpg http://cdn01.tv4.se/polopoly_fs/1.2012839.1341409280!mobileimage-highres/3400768729.jpg http://cdn01.tv4.se/polopoly_fs/1.2012839.1341409280!mobileimage-logo-highres/532031646.png http://cdn01.tv4.se/polopoly_fs/1.2012839.1341409280!mobileimage-large-highres/168561600.jpg http://cdn01.tv4.se/polopoly_fs/1.2012839.1341409280!originallogoimage/1433364378.png http://cdn01.tv4.se/polopoly_fs/1.2012839.1341409280!originalformatimage/4071559181.jpg http://cdn01.tv4.se/polopoly_fs/1.2012839.1341409280!originalcarouselimage/2064611557.jpg Polisen Rick Grimes har legat i koma efter en olycka i arbetet. När han vaknar upp har världen förändrats - en zombieepidemi har brutit ut. SE 129.35.209.170 58.247.178.245;SE 129.35.209.170 58.247.178.245 115.111.227.14 115.111.227.6 25.19.39.117 210.94.41.89 217.67.201.237 217.67.201.162 Visas i tv11 false http://cdn01.tv4.se/polopoly_fs/1.2012839.1341409280!image/4182469876.jpg http://cdn01.tv4.se/polopoly_fs/1.2012839.1341409280!smallformatimage/4041896305.jpg http://cdn01.tv4.se/polopoly_fs/1.2012839.1341409280!categorylarge/246794021.jpg http://cdn01.tv4.se/polopoly_fs/1.2012839.1341409280!image-large/626375629.jpg http://cdn01.tv4.se/polopoly_fs/1.2012839.1341409280!image-logo/3386449458.png http://cdn01.tv4.se/polopoly_fs/1.2012839.1341409280!small-image-logo/3419460785.png Hela program 4 true false false false 1.2012847 Senast tillagt inom Film & Serier 4 true true true false Alla 1.1969858,1.1955301,1.2555393,1.2170705,1.2034642,1.2082509,1.2134569,1.1919111,1.1984952,1.2690213,1.1969847,1.2685868,1.2089805,1.1855803,1.2522584,1.2676183,1.1955342,1.2681510,1.2693237,1.2012839 http://cdn01.tv4.se/polopoly_fs/1.2681510.1342617810!originallogoimage/2634341350.png http://cdn01.tv4.se/polopoly_fs/1.2681510.1342617810!originalformatimage/1091340792.jpg http://cdn01.tv4.se/polopoly_fs/1.2681510.1342617810!originalcarouselimage/3923576747.jpg Om poliserna på Detroits mordrotel som försöker lösatt lösa mord i ett distrikt där flest personer mördas i landet. SE Visas i tv4 true Hela program 12 true false false false Alla 1.2681511,1.2681510 Senast tillagt inom Film & Serier 4 true true true false Alla 1.1969858,1.1955301,1.2555393,1.2170705,1.2034642,1.2082509,1.2134569,1.1919111,1.1984952,1.2690213,1.1969847,1.2685868,1.2089805,1.1855803,1.2522584,1.2676183,1.1955342,1.2681510,1.2693237,1.2012839 http://cdn01.tv4.se/polopoly_fs/1.2089805.1342617843!mobileimage/887640690.jpg http://cdn01.tv4.se/polopoly_fs/1.2089805.1342617843!mobileimage-logo/3320164453.png http://cdn01.tv4.se/polopoly_fs/1.2089805.1342617843!mobileimage-large/1081314175.jpg http://cdn01.tv4.se/polopoly_fs/1.2089805.1342617843!mobileimage-highres/1971195455.jpg http://cdn01.tv4.se/polopoly_fs/1.2089805.1342617843!mobileimage-logo-highres/4111696218.png http://cdn01.tv4.se/polopoly_fs/1.2089805.1342617843!mobileimage-large-highres/815581398.jpg En grupp nyutexaminerade polisaspiranter gör sitt bästa för att klara av sina nya roller i Torontos poliskår. SE 129.35.209.170 58.247.178.245 115.111.227.14 115.111.227.6 25.19.39.117 210.94.41.89 217.67.201.237 217.67.201.162;SE 129.35.209.170 58.247.178.245 Söndagar 20:00 tv11 true http://cdn01.tv4.se/polopoly_fs/1.2089805.1342617843!image/2392049234.jpg http://cdn01.tv4.se/polopoly_fs/1.2089805.1342617843!smallformatimage/2579654750.jpg http://cdn01.tv4.se/polopoly_fs/1.2089805.1342617843!categorylarge/309283526.jpg http://cdn01.tv4.se/polopoly_fs/1.2089805.1342617843!image-large/533035227.jpg http://cdn01.tv4.se/polopoly_fs/1.2089805.1342617843!image-logo/1283900922.png http://cdn01.tv4.se/polopoly_fs/1.2089805.1342617843!small-image-logo/685722681.png Hela program 4 true false false false Alla 1.2089812 Senast tillagt inom Film & Serier 4 true true true false Alla 1.1969858,1.1955301,1.2555393,1.2170705,1.2034642,1.2082509,1.2134569,1.1919111,1.1984952,1.2690213,1.1969847,1.2685868,1.2089805,1.1855803,1.2522584,1.2676183,1.1955342,1.2681510,1.2693237,1.2012839 http://cdn01.tv4.se/polopoly_fs/1.1954254.1342776252!mobileimage/1030002937.jpg http://cdn01.tv4.se/polopoly_fs/1.1954254.1342776252!mobileimage-highres/3385305141.jpg http://cdn01.tv4.se/polopoly_fs/1.1954254.1342776252!originallogoimage/4046362450.png http://cdn01.tv4.se/polopoly_fs/1.1954254.1342776252!originalformatimage/1979348669.jpg http://cdn01.tv4.se/polopoly_fs/1.1954254.1342776252!originalcarouselimage/2253502806.jpg Följ mordrotelns arbete på en polisstation i Glasgow. Kommissarie Matt Burke försöker lösa de mord som inträffar i staden. SE 129.35.209.170 58.247.178.245 115.111.227.14 115.111.227.6 25.19.39.117 210.94.41.89 217.67.201.237 217.67.201.162;SE 129.35.209.170 58.247.178.245 115.111.227.14 115.111.227.6 25.19.39.117 210.94.41.89 217.67.201.237 217.67.201.162 Visas i tv4plus true Hela program 12 true false false true Alla 1.1954267,1.1954254 Senast tillagt inom Film & Serier 4 true true true false Alla 1.1969858,1.1955301,1.2555393,1.2170705,1.2034642,1.2082509,1.2134569,1.1919111,1.1984952,1.2690213,1.1969847,1.2685868,1.2089805,1.1855803,1.2522584,1.2676183,1.1955342,1.2681510,1.2693237,1.2012839 http://cdn01.tv4.se/polopoly_fs/1.2152099.1342776331!mobileimage/87336165.jpg http://cdn01.tv4.se/polopoly_fs/1.2152099.1342776331!mobileimage-logo/2784276984.png http://cdn01.tv4.se/polopoly_fs/1.2152099.1342776331!mobileimage-large/3532365820.jpg http://cdn01.tv4.se/polopoly_fs/1.2152099.1342776331!mobileimage-highres/1924217331.jpg http://cdn01.tv4.se/polopoly_fs/1.2152099.1342776331!mobileimage-logo-highres/4250384412.png http://cdn01.tv4.se/polopoly_fs/1.2152099.1342776331!mobileimage-large-highres/3208710291.jpg Singelkillen Kristians har inte koll på mycket, men hans största önskan är att regissera Danmarks första superhjältefilm. SE 115.111.227.14 115.111.227.6 25.19.39.117 210.94.41.89 217.67.201.237 217.67.201.162;SE Visas i tv4komedi true http://cdn01.tv4.se/polopoly_fs/1.2152099.1342776331!image/3247376482.jpg http://cdn01.tv4.se/polopoly_fs/1.2152099.1342776331!smallformatimage/235324645.jpg http://cdn01.tv4.se/polopoly_fs/1.2152099.1342776331!categorylarge/1563199280.jpg http://cdn01.tv4.se/polopoly_fs/1.2152099.1342776331!image-large/3208710291.jpg http://cdn01.tv4.se/polopoly_fs/1.2152099.1342776331!image-logo/4238357093.png http://cdn01.tv4.se/polopoly_fs/1.2152099.1342776331!small-image-logo/713388537.png Hela program 12 true true false false Alla 1.2152099 Senast tillagt inom Film & Serier 4 true true true false Alla 1.1969858,1.1955301,1.2555393,1.2170705,1.2034642,1.2082509,1.2134569,1.1919111,1.1984952,1.2690213,1.1969847,1.2685868,1.2089805,1.1855803,1.2522584,1.2676183,1.1955342,1.2681510,1.2693237,1.2012839 http://cdn01.tv4.se/polopoly_fs/1.2281961.1342776375!originallogoimage/908604528.png http://cdn01.tv4.se/polopoly_fs/1.2281961.1342776375!originalformatimage/538386873.jpg http://cdn01.tv4.se/polopoly_fs/1.2281961.1342776375!originalcarouselimage/3537760377.jpg Efter 37 år trodde Alan och Elaine Robbins att de skulle bli pensionärer, men deras överarbetade son flyttar tillbaka hem och förändrar allt. SE Visas i tv4komedi true Hela program 12 true false false false Alla 1.2281961 Senast tillagt inom Film & Serier 4 true true true false Alla 1.1969858,1.1955301,1.2555393,1.2170705,1.2034642,1.2082509,1.2134569,1.1919111,1.1984952,1.2690213,1.1969847,1.2685868,1.2089805,1.1855803,1.2522584,1.2676183,1.1955342,1.2681510,1.2693237,1.2012839 http://cdn01.tv4.se/polopoly_fs/1.1976613.1342776431!mobileimage/2510154197.jpg http://cdn01.tv4.se/polopoly_fs/1.1976613.1342776431!mobileimage-logo/1164330966.png http://cdn01.tv4.se/polopoly_fs/1.1976613.1342776431!mobileimage-large/3070458147.jpg http://cdn01.tv4.se/polopoly_fs/1.1976613.1342776431!mobileimage-highres/3957904626.jpg http://cdn01.tv4.se/polopoly_fs/1.1976613.1342776431!mobileimage-logo-highres/3077853477.png http://cdn01.tv4.se/polopoly_fs/1.1976613.1342776431!mobileimage-large-highres/1158770640.jpg Adelsmannen Don Diego de la Vega lever ett dubbelliv som Zorro, den maskerade hämnaren. SE 115.111.227.14 115.111.227.6 25.19.39.117 210.94.41.89 217.67.201.237 217.67.201.162;SE Visas i http://cdn01.tv4.se/polopoly_fs/1.1976613.1342776431!/blank_css.css tv4guld true http://cdn01.tv4.se/polopoly_fs/1.1976613.1342776431!image/3244709381.jpg http://cdn01.tv4.se/polopoly_fs/1.1976613.1342776431!smallformatimage/3345621243.jpg http://cdn01.tv4.se/polopoly_fs/1.1976613.1342776431!categorylarge/2776170258.jpg http://cdn01.tv4.se/polopoly_fs/1.1976613.1342776431!image-large/3961479130.jpg http://cdn01.tv4.se/polopoly_fs/1.1976613.1342776431!image-logo/1420318355.png http://cdn01.tv4.se/polopoly_fs/1.1976613.1342776431!small-image-logo/3799864303.png Hela program 12 true true false false 1.1976652,1.1976613 Senast tillagt inom Film & Serier 4 true true true false Alla 1.1969858,1.1955301,1.2555393,1.2170705,1.2034642,1.2082509,1.2134569,1.1919111,1.1984952,1.2690213,1.1969847,1.2685868,1.2089805,1.1855803,1.2522584,1.2676183,1.1955342,1.2681510,1.2693237,1.2012839 http://cdn01.tv4.se/polopoly_fs/1.2599742.1341227367!originallogoimage/3890578412.png http://cdn01.tv4.se/polopoly_fs/1.2599742.1341227367!originalformatimage/993560604.jpg http://cdn01.tv4.se/polopoly_fs/1.2599742.1341227367!originalcarouselimage/202577955.jpg Serien följer den mystiska återkomsten av över 300 fångar från det ökända fängelset Alcatraz mer än 50 år efter att de försvann i samband med fängelsets nedläggning. SE;SE 115.111.227.14 115.111.227.6 25.19.39.117 210.94.41.89 217.67.201.237 217.67.201.162;SE 115.111.227.14 115.111.227.6 25.19.39.117 210.94.41.89 217.67.201.237 217.67.201.162 TV4 Play använder DRM-skyddet Widevine som kräver en extra installation på datorn. Vid problem att spela upp programmet, se vår supportsida. Visas i tv4 true Hela program 12 true false false false Alla 1.2599742 http://cdn01.tv4.se/polopoly_fs/1.2134569.1342776473!mobileimage/1048160426.jpg http://cdn01.tv4.se/polopoly_fs/1.2134569.1342776473!mobileimage-logo/1263280710.png http://cdn01.tv4.se/polopoly_fs/1.2134569.1342776473!mobileimage-large/1893177341.jpg http://cdn01.tv4.se/polopoly_fs/1.2134569.1342776473!mobileimage-highres/2601347324.jpg http://cdn01.tv4.se/polopoly_fs/1.2134569.1342776473!mobileimage-logo-highres/1862964214.png http://cdn01.tv4.se/polopoly_fs/1.2134569.1342776473!mobileimage-large-highres/3622310549.jpg http://cdn01.tv4.se/polopoly_fs/1.2134569.1342776473!originallogoimage/1133136414.png http://cdn01.tv4.se/polopoly_fs/1.2134569.1342776473!originalformatimage/2256163687.jpg http://cdn01.tv4.se/polopoly_fs/1.2134569.1342776473!originalcarouselimage/3024488158.jpg Polisen Steve McGarett blir övertalad att leda den nya elitstyrka på ön Oahu. SE;SE 129.35.209.170 58.247.178.245 115.111.227.14 115.111.227.6 25.19.39.117 210.94.41.89 217.67.201.237 217.67.201.162 Torsdagar 21:00 tv4 true Hela program 12 true false false true Alla 1.2134569 Senast tillagt inom Film & Serier 4 true true true false Alla 1.1969858,1.1955301,1.2555393,1.2170705,1.2034642,1.2082509,1.2134569,1.1919111,1.1984952,1.2690213,1.1969847,1.2685868,1.2089805,1.1855803,1.2522584,1.2676183,1.1955342,1.2681510,1.2693237,1.2012839 http://cdn01.tv4.se/polopoly_fs/1.2142056.1340695942!originallogoimage/135966064.png http://cdn01.tv4.se/polopoly_fs/1.2142056.1340695942!originalformatimage/2625994855.jpg http://cdn01.tv4.se/polopoly_fs/1.2142056.1340695942!originalcarouselimage/4290882483.jpg Kommissarie Anna Travis är en brittisk kriminaldramaserie från 2010 i tre avsnitt. Baserat på en roman av Lynda La Plante. SE 129.35.209.170 58.247.178.245 115.111.227.14 115.111.227.6 25.19.39.117 210.94.41.89 217.67.201.237 217.67.201.162;SE 129.35.209.170 58.247.178.245 115.111.227.14 115.111.227.6 25.19.39.117 210.94.41.89 217.67.201.237 217.67.201.162;SE;SE;SE Visas i tv4 true Säsong 1 12 true true false false Alla 1.2676171 Säsong 2 12 true true false false Alla 1.2676173 Säsong 3 12 true true false false Alla 1.2676174 Senast tillagt inom Film & Serier 4 true true true false Alla 1.1969858,1.1955301,1.2555393,1.2170705,1.2034642,1.2082509,1.2134569,1.1919111,1.1984952,1.2690213,1.1969847,1.2685868,1.2089805,1.1855803,1.2522584,1.2676183,1.1955342,1.2681510,1.2693237,1.2012839 http://cdn01.tv4.se/polopoly_fs/1.2034642.1338891129!mobileimage/931682072.jpg http://cdn01.tv4.se/polopoly_fs/1.2034642.1338891129!mobileimage-logo/508560861.png http://cdn01.tv4.se/polopoly_fs/1.2034642.1338891129!mobileimage-large/4186705055.jpg http://cdn01.tv4.se/polopoly_fs/1.2034642.1338891129!mobileimage-highres/1067777129.jpg http://cdn01.tv4.se/polopoly_fs/1.2034642.1338891129!mobileimage-logo-highres/1570689842.png http://cdn01.tv4.se/polopoly_fs/1.2034642.1338891129!mobileimage-large-highres/3124943472.jpg Familjen Reagan består av flera generationer av poliser och åklagare som alla lever för att bekämpa brottsligheten i New York. SE 129.35.209.170 58.247.178.245 115.111.227.14 115.111.227.6 25.19.39.117 210.94.41.89 217.67.201.237 217.67.201.162 Onsdagar 21:00 tv4plus true http://cdn01.tv4.se/polopoly_fs/1.2034642.1338891129!image/207359044.jpg http://cdn01.tv4.se/polopoly_fs/1.2034642.1338891129!smallformatimage/100471233.jpg http://cdn01.tv4.se/polopoly_fs/1.2034642.1338891129!categorylarge/2377089836.jpg http://cdn01.tv4.se/polopoly_fs/1.2034642.1338891129!image-large/1971458266.jpg http://cdn01.tv4.se/polopoly_fs/1.2034642.1338891129!image-logo/2920184388.png http://cdn01.tv4.se/polopoly_fs/1.2034642.1338891129!small-image-logo/2620356957.png Hela program 4 true false false false Alla 1.2034647 Senast tillagt inom Film & Serier 4 true true true false Alla 1.1969858,1.1955301,1.2555393,1.2170705,1.2034642,1.2082509,1.2134569,1.1919111,1.1984952,1.2690213,1.1969847,1.2685868,1.2089805,1.1855803,1.2522584,1.2676183,1.1955342,1.2681510,1.2693237,1.2012839 http://cdn01.tv4.se/polopoly_fs/1.1955301.1342776591!originallogoimage/2303047344.png http://cdn01.tv4.se/polopoly_fs/1.1955301.1342776591!originalformatimage/2675614585.jpg http://cdn01.tv4.se/polopoly_fs/1.1955301.1342776591!originalcarouselimage/1840280249.jpg Alicia Florrick tvingas gå tillbaka till sitt yrke som advokat efter att hennes man Peter dömts i en prostitutionshärva. SE 129.35.209.170 58.247.178.245 115.111.227.14 115.111.227.6 25.19.39.117 210.94.41.89 217.67.201.237 217.67.201.162 TV4 Play använder DRM-skyddet Widevine som kräver en extra installation på datorn. Vid problem att spela upp programmet, se vår supportsida. Måndagar 21:00 tv4plus true Senaste programmen 4 true false false true 1.1974583 Senast tillagt inom Film & Serier 4 true true true false Alla 1.1969858,1.1955301,1.2555393,1.2170705,1.2034642,1.2082509,1.2134569,1.1919111,1.1984952,1.2690213,1.1969847,1.2685868,1.2089805,1.1855803,1.2522584,1.2676183,1.1955342,1.2681510,1.2693237,1.2012839 http://cdn01.tv4.se/polopoly_fs/1.2621798.1338809080!originallogoimage/3232292289.png http://cdn01.tv4.se/polopoly_fs/1.2621798.1338809080!originalformatimage/635056659.jpg http://cdn01.tv4.se/polopoly_fs/1.2621798.1338809080!originalcarouselimage/929337601.jpg John Luther är en enastående begåvad mordutredare, vars passion för att sätta dit mördare både gör honom framgångsrik och kontroversiell. SE 115.111.227.14 115.111.227.6 25.19.39.117 210.94.41.89 217.67.201.237 217.67.201.162;SE 115.111.227.14 115.111.227.6 25.19.39.117 210.94.41.89 217.67.201.237 217.67.201.162;SE Visas i tv4 true Hela program 12 true false false false Alla 1.2621798 Senast tillagt inom Film & Serier 4 true true true false Alla 1.1969858,1.1955301,1.2555393,1.2170705,1.2034642,1.2082509,1.2134569,1.1919111,1.1984952,1.2690213,1.1969847,1.2685868,1.2089805,1.1855803,1.2522584,1.2676183,1.1955342,1.2681510,1.2693237,1.2012839 http://cdn01.tv4.se/polopoly_fs/1.1969847.1342776652!originallogoimage/325346607.png http://cdn01.tv4.se/polopoly_fs/1.1969847.1342776652!originalformatimage/2544927936.jpg http://cdn01.tv4.se/polopoly_fs/1.1969847.1342776652!originalcarouselimage/1679510315.jpg Handlingen kretsar kring familjerna Forrester, Logan och Spectra som gör allt för att hålla sig kvar på toppen. SE;SE 115.111.227.14 115.111.227.6 25.19.39.117 210.94.41.89 217.67.201.237 217.67.201.162 Visas i tv4plus http://www.tv4.se/glamour/ true Hela program 12 true true false false 1.1969856 Senast tillagt inom Film & Serier 4 true true true false Alla 1.1969858,1.1955301,1.2555393,1.2170705,1.2034642,1.2082509,1.2134569,1.1919111,1.1984952,1.2690213,1.1969847,1.2685868,1.2089805,1.1855803,1.2522584,1.2676183,1.1955342,1.2681510,1.2693237,1.2012839 http://cdn01.tv4.se/polopoly_fs/1.2555393.1342776814!originallogoimage/2819129589.png http://cdn01.tv4.se/polopoly_fs/1.2555393.1342776814!originalformatimage/1299869479.jpg http://cdn01.tv4.se/polopoly_fs/1.2555393.1342776814!originalcarouselimage/4067167296.jpg Bridget Kelly har varit nykter i sex månader när hon plötsligt blir vittne till ett yrkesmord. SE;SE 115.111.227.14 115.111.227.6 25.19.39.117 210.94.41.89 217.67.201.237 217.67.201.162 Visas i tv11 true Hela program 12 true false false false Alla 1.2555396,1.2555393 Senast tillagt inom Film & Serier 4 true true true false Alla 1.1969858,1.1955301,1.2555393,1.2170705,1.2034642,1.2082509,1.2134569,1.1919111,1.1984952,1.2690213,1.1969847,1.2685868,1.2089805,1.1855803,1.2522584,1.2676183,1.1955342,1.2681510,1.2693237,1.2012839 http://cdn01.tv4.se/polopoly_fs/1.2170705.1336984140!mobileimage/3651416119.jpg http://cdn01.tv4.se/polopoly_fs/1.2170705.1336984140!mobileimage-logo/3452836371.png http://cdn01.tv4.se/polopoly_fs/1.2170705.1336984140!mobileimage-highres/501590586.jpg http://cdn01.tv4.se/polopoly_fs/1.2170705.1336984140!mobileimage-logo-highres/3185092416.png SE 115.111.227.14 115.111.227.6 25.19.39.117 210.94.41.89 217.67.201.237 217.67.201.162;SE;SE 115.111.227.14 115.111.227.6 25.19.39.117 210.94.41.89 217.67.201.237 217.67.201.162 tv4 true http://cdn01.tv4.se/polopoly_fs/1.2170705.1336984140!image/4232890817.jpg http://cdn01.tv4.se/polopoly_fs/1.2170705.1336984140!smallformatimage/1183787140.jpg http://cdn01.tv4.se/polopoly_fs/1.2170705.1336984140!image-large/3844765576.jpg http://cdn01.tv4.se/polopoly_fs/1.2170705.1336984140!image-logo/47449032.png http://cdn01.tv4.se/polopoly_fs/1.2170705.1336984140!small-image-logo/2986099447.png Filmer 12 true false false false Alla 1.2170705 Senast tillagt inom Film & Serier 4 true true true false Alla 1.1969858,1.1955301,1.2555393,1.2170705,1.2034642,1.2082509,1.2134569,1.1919111,1.1984952,1.2690213,1.1969847,1.2685868,1.2089805,1.1855803,1.2522584,1.2676183,1.1955342,1.2681510,1.2693237,1.2012839 http://cdn01.tv4.se/polopoly_fs/1.2547750.1333900134!originallogoimage/1292206574.png http://cdn01.tv4.se/polopoly_fs/1.2547750.1333900134!originalformatimage/3791808666.jpg http://cdn01.tv4.se/polopoly_fs/1.2547750.1333900134!originalcarouselimage/793628180.jpg Adam Dalgliesh har ärvt en gammal kvarn vid kusten och ser en chans att ta semester från sina plikter på Scotland Yard. Men han lyckas ändå inte komma undan från sitt jobb när ett mord inträffar. SE 115.111.227.14 115.111.227.6 25.19.39.117 210.94.41.89 217.67.201.237 217.67.201.162;SE 115.111.227.14 115.111.227.6 25.19.39.117 210.94.41.89 217.67.201.237 217.67.201.162;SE Visas i sjuan true Hela program 12 true false false false Alla 1.2547750 Senast tillagt inom Film & Serier 4 true true true false Alla 1.1969858,1.1955301,1.2555393,1.2170705,1.2034642,1.2082509,1.2134569,1.1919111,1.1984952,1.2690213,1.1969847,1.2685868,1.2089805,1.1855803,1.2522584,1.2676183,1.1955342,1.2681510,1.2693237,1.2012839 http://cdn01.tv4.se/polopoly_fs/1.2082509.1342618780!mobileimage/434868830.jpg http://cdn01.tv4.se/polopoly_fs/1.2082509.1342618780!mobileimage-logo/3106637635.png http://cdn01.tv4.se/polopoly_fs/1.2082509.1342618780!mobileimage-large/3461654855.jpg http://cdn01.tv4.se/polopoly_fs/1.2082509.1342618780!mobileimage-highres/1852706632.jpg http://cdn01.tv4.se/polopoly_fs/1.2082509.1342618780!mobileimage-logo-highres/3783823015.png http://cdn01.tv4.se/polopoly_fs/1.2082509.1342618780!mobileimage-large-highres/2532810915.jpg http://cdn01.tv4.se/polopoly_fs/1.2082509.1342618780!originallogoimage/3783823015.png http://cdn01.tv4.se/polopoly_fs/1.2082509.1342618780!originalformatimage/1425914435.jpg http://cdn01.tv4.se/polopoly_fs/1.2082509.1342618780!originalcarouselimage/1674979964.jpg På Solana al-inclusive resort i Benidorm samlas semesterfirare året om och alla vill få ut det mesta för sina pengar. SE 129.35.209.170 58.247.178.245 115.111.227.14 115.111.227.6 25.19.39.117 210.94.41.89 217.67.201.237 217.67.201.162;SE 129.35.209.170 58.247.178.245;SE 129.35.209.170 58.247.178.245 115.111.227.14 115.111.227.6 25.19.39.117 210.94.41.89 217.67.201.237 217.67.201.162 Visas i sjuan true http://cdn01.tv4.se/polopoly_fs/1.2082509.1342618780!image/3713023705.jpg http://cdn01.tv4.se/polopoly_fs/1.2082509.1342618780!smallformatimage/316273246.jpg http://cdn01.tv4.se/polopoly_fs/1.2082509.1342618780!categorylarge/1106489739.jpg http://cdn01.tv4.se/polopoly_fs/1.2082509.1342618780!image-large/2745056808.jpg http://cdn01.tv4.se/polopoly_fs/1.2082509.1342618780!image-logo/3766420702.png http://cdn01.tv4.se/polopoly_fs/1.2082509.1342618780!small-image-logo/911886146.png Hela program 12 true false false false Alla 1.2082521,1.2082509 Senast tillagt inom Film & Serier 4 true true true false Alla 1.1969858,1.1955301,1.2555393,1.2170705,1.2034642,1.2082509,1.2134569,1.1919111,1.1984952,1.2690213,1.1969847,1.2685868,1.2089805,1.1855803,1.2522584,1.2676183,1.1955342,1.2681510,1.2693237,1.2012839 http://cdn01.tv4.se/polopoly_fs/1.1919111.1337586875!mobileimage/3820970541.jpg http://cdn01.tv4.se/polopoly_fs/1.1919111.1337586875!mobileimage-logo/1867116713.png http://cdn01.tv4.se/polopoly_fs/1.1919111.1337586875!mobileimage-large/2227137382.jpg http://cdn01.tv4.se/polopoly_fs/1.1919111.1337586875!mobileimage-highres/346049617.jpg http://cdn01.tv4.se/polopoly_fs/1.1919111.1337586875!mobileimage-logo-highres/3363206593.png http://cdn01.tv4.se/polopoly_fs/1.1919111.1337586875!mobileimage-large-highres/595652110.jpg http://cdn01.tv4.se/polopoly_fs/1.1919111.1337586875!originallogoimage/3536128387.png http://cdn01.tv4.se/polopoly_fs/1.1919111.1337586875!originalformatimage/2202535532.jpg http://cdn01.tv4.se/polopoly_fs/1.1919111.1337586875!originalcarouselimage/890831041.jpg Om kriminalinspektör Maria Wern som bor och arbetar på Gotland. Baserat på Anna Jansons romaner. SE 129.35.209.170 58.247.178.245;SE 129.35.209.170 58.247.178.245 115.111.227.14 115.111.227.6 25.19.39.117 210.94.41.89 217.67.201.237 217.67.201.162;SE 115.111.227.14 115.111.227.6 25.19.39.117 210.94.41.89 217.67.201.237 217.67.201.162 tv4 true http://cdn01.tv4.se/polopoly_fs/1.1919111.1337586875!image/1935331097.jpg http://cdn01.tv4.se/polopoly_fs/1.1919111.1337586875!smallformatimage/3758640893.jpg http://cdn01.tv4.se/polopoly_fs/1.1919111.1337586875!categorylarge/1122070006.jpg http://cdn01.tv4.se/polopoly_fs/1.1919111.1337586875!image-large/1288811730.jpg http://cdn01.tv4.se/polopoly_fs/1.1919111.1337586875!image-logo/4274002942.png http://cdn01.tv4.se/polopoly_fs/1.1919111.1337586875!small-image-logo/3876798291.png Hela program 12 true true false false Alla 1.1919120 http://cdn01.tv4.se/polopoly_fs/1.1984952.1332241200!mobileimage/2707170061.jpg http://cdn01.tv4.se/polopoly_fs/1.1984952.1332241200!mobileimage-large/1904141918.jpg http://cdn01.tv4.se/polopoly_fs/1.1984952.1332241200!mobileimage-highres/3744013866.jpg http://cdn01.tv4.se/polopoly_fs/1.1984952.1332241200!mobileimage-large-highres/2204954797.jpg http://cdn01.tv4.se/polopoly_fs/1.1984952.1332241200!originallogoimage/676244966.png http://cdn01.tv4.se/polopoly_fs/1.1984952.1332241200!originalformatimage/13479146.jpg http://cdn01.tv4.se/polopoly_fs/1.1984952.1332241200!originalcarouselimage/159903411.jpg Ingen kan beskylla doktor Gregory House för att sakna kreativitet och intelligens, men det där med empati är kanske inte hans största tillgång. Trots att ledningen på sjukhuset för en ständig kamp mot Houses nyckfulla sätt, är hans genialitet ovärderlig. SE 129.35.209.170 58.247.178.245 115.111.227.14 115.111.227.6 25.19.39.117 210.94.41.89 217.67.201.237 217.67.201.162 Tisdagar 21:00 tv4 true Hela program 4 true false false true 1.1984957,1.1984952 Senast tillagt inom Film & Serier 4 true true true false Alla 1.1969858,1.1955301,1.2555393,1.2170705,1.2034642,1.2082509,1.2134569,1.1919111,1.1984952,1.2690213,1.1969847,1.2685868,1.2089805,1.1855803,1.2522584,1.2676183,1.1955342,1.2681510,1.2693237,1.2012839 http://cdn01.tv4.se/polopoly_fs/1.2390634.1329915547!originallogoimage/359722680.png http://cdn01.tv4.se/polopoly_fs/1.2390634.1329915547!originalformatimage/3128362956.jpg http://cdn01.tv4.se/polopoly_fs/1.2390634.1329915547!originalcarouselimage/1009063090.jpg En brittisk dramaserie från 2009 i två delar baserad på Emily Brontës roman med samma namn. Cathy Earnshaw och Heathcliff kommer från familjer med olika bakgrund. Heathcliff hittades då han var barn föräldralös på Liverpools gator medan Cathy kommer från en familj av börd. Det gör att deras passionerade kärlek är omöjlig. SE;SE 115.111.227.14 115.111.227.6 25.19.39.117 210.94.41.89 217.67.201.237 217.67.201.162;SE visas i sjuan false Hela program 12 true true false false Alla 1.2390634 Senast tillagt inom Film & Serier 4 true true true false Alla 1.1969858,1.1955301,1.2555393,1.2170705,1.2034642,1.2082509,1.2134569,1.1919111,1.1984952,1.2690213,1.1969847,1.2685868,1.2089805,1.1855803,1.2522584,1.2676183,1.1955342,1.2681510,1.2693237,1.2012839 http://cdn01.tv4.se/polopoly_fs/1.2485710.1329915613!originallogoimage/3557637714.png http://cdn01.tv4.se/polopoly_fs/1.2485710.1329915613!originalformatimage/2064308006.jpg http://cdn01.tv4.se/polopoly_fs/1.2485710.1329915613!originalcarouselimage/3058004392.jpg Misstag med mening är en amerikansk komediserie om Billie, en 30-årig filmkritiker som bor i San Francisco. Billie träffar den lite yngre Zack på en bar och de tillbringar en natt tillsammans. Strax därpå upptäcker Billie att hon är gravid och bestämmer sig för att behålla barnet. Det innebär att hon måste hantera både sin svartsjuke ex-pojkvän, James, och barnets pappa, Zack, som flyttar hem till Billie. SE;SE 115.111.227.14 115.111.227.6 25.19.39.117 210.94.41.89 217.67.201.237 217.67.201.162 tv11 true Hela program 12 true false false false Alla 1.2485710 Senast tillagt inom Film & Serier 4 true true true false Alla 1.1969858,1.1955301,1.2555393,1.2170705,1.2034642,1.2082509,1.2134569,1.1919111,1.1984952,1.2690213,1.1969847,1.2685868,1.2089805,1.1855803,1.2522584,1.2676183,1.1955342,1.2681510,1.2693237,1.2012839 http://cdn01.tv4.se/polopoly_fs/1.2273007.1329915686!originallogoimage/246537097.png http://cdn01.tv4.se/polopoly_fs/1.2273007.1329915686!originalformatimage/14325616.jpg http://cdn01.tv4.se/polopoly_fs/1.2273007.1329915686!originalcarouselimage/4241810812.jpg Kriminalinspektör Vera Stanhope (Brenda Blethyn) drivs lika mycket av sin vilja att lösa mordfall som av sina egna demoner. Hon har en vass tunga, skarp slutledningsförmåga och mod. SE 115.111.227.14 115.111.227.6 25.19.39.117 210.94.41.89 217.67.201.237 217.67.201.162;SE;SE 115.111.227.14 115.111.227.6 25.19.39.117 210.94.41.89 217.67.201.237 217.67.201.162 Visas i tv4 true Hela program 12 true false false false Alla 1.2273007 Senast tillagt inom Film & Serier 4 true true true false Alla 1.1969858,1.1955301,1.2555393,1.2170705,1.2034642,1.2082509,1.2134569,1.1919111,1.1984952,1.2690213,1.1969847,1.2685868,1.2089805,1.1855803,1.2522584,1.2676183,1.1955342,1.2681510,1.2693237,1.2012839 http://cdn01.tv4.se/polopoly_fs/1.2326293.1329915740!originallogoimage/2436412357.png http://cdn01.tv4.se/polopoly_fs/1.2326293.1329915740!originalformatimage/2675627580.jpg http://cdn01.tv4.se/polopoly_fs/1.2326293.1329915740!originalcarouselimage/82632285.jpg Nick Morelli och Pete Kaczmarek är två färgstarka försvarsadvokater i Las Vegas. Tillsammans driver de advokatbyrån Morelli & Kaczmarek. Nick är hängiven sitt yrke medan Pete är mer för snabba bilar, vackra kvinnor och dyra kläder. SE 115.111.227.14 115.111.227.6 25.19.39.117 210.94.41.89 217.67.201.237 217.67.201.162;SE Visas i tv11 true Hela program 12 true false false false Alla 1.2326293 Senast tillagt inom Film & Serier 4 true true true false Alla 1.1969858,1.1955301,1.2555393,1.2170705,1.2034642,1.2082509,1.2134569,1.1919111,1.1984952,1.2690213,1.1969847,1.2685868,1.2089805,1.1855803,1.2522584,1.2676183,1.1955342,1.2681510,1.2693237,1.2012839 http://cdn01.tv4.se/polopoly_fs/1.1969868.1329915768!originallogoimage/4071537042.png http://cdn01.tv4.se/polopoly_fs/1.1969868.1329915768!originalformatimage/3660429470.jpg http://cdn01.tv4.se/polopoly_fs/1.1969868.1329915768!originalcarouselimage/3546806983.jpg Tittarna möter familjen Wilson som flyttat från Kansas till Beverly Hills för att ta hand om en äldre släkting, en före detta stjärna som har alkoholproblem. SE 129.35.209.170 58.247.178.245 115.111.227.14 115.111.227.6 25.19.39.117 210.94.41.89 217.67.201.237 217.67.201.162 tv11 true http://cdn01.tv4.se/polopoly_fs/1.1969868.1329915768!image/3724270860.jpg http://cdn01.tv4.se/polopoly_fs/1.1969868.1329915768!smallformatimage/3690441714.jpg http://cdn01.tv4.se/polopoly_fs/1.1969868.1329915768!categorylarge/3974295757.jpg http://cdn01.tv4.se/polopoly_fs/1.1969868.1329915768!image-large/1075026965.jpg http://cdn01.tv4.se/polopoly_fs/1.1969868.1329915768!image-logo/2378548451.jpg http://cdn01.tv4.se/polopoly_fs/1.1969868.1329915768!small-image-logo/4276148454.png Program 12 true true false false 1.1969872 Senast tillagt inom Film & Serier 4 true true true false Alla 1.1969858,1.1955301,1.2555393,1.2170705,1.2034642,1.2082509,1.2134569,1.1919111,1.1984952,1.2690213,1.1969847,1.2685868,1.2089805,1.1855803,1.2522584,1.2676183,1.1955342,1.2681510,1.2693237,1.2012839 http://cdn01.tv4.se/polopoly_fs/1.2382093.1329915809!originallogoimage/832245892.png http://cdn01.tv4.se/polopoly_fs/1.2382093.1329915809!originalformatimage/2326823600.jpg http://cdn01.tv4.se/polopoly_fs/1.2382093.1329915809!originalcarouselimage/2155701041.jpg Don Angel har ett litet tidningsförlag och gör tidningar om allt från järnvägar till musik. Han håller sig flytande med att sälja annonser till företag. För att utöka rörelsen har han nu anställd Ray Leonard, en före detta journalist med hopp om att de ska sätta fart på affärerna. SE;SE 115.111.227.14 115.111.227.6 25.19.39.117 210.94.41.89 217.67.201.237 217.67.201.162 Söndagar 21:10 tv4Komedi true Hela program 12 true false false false Alla 1.2382093 Senast tillagt inom Film & Serier 4 true true true false Alla 1.1969858,1.1955301,1.2555393,1.2170705,1.2034642,1.2082509,1.2134569,1.1919111,1.1984952,1.2690213,1.1969847,1.2685868,1.2089805,1.1855803,1.2522584,1.2676183,1.1955342,1.2681510,1.2693237,1.2012839 http://cdn01.tv4.se/polopoly_fs/1.2125466.1329915818!mobileimage/1322955775.jpg http://cdn01.tv4.se/polopoly_fs/1.2125466.1329915818!mobileimage-logo/3629117090.png http://cdn01.tv4.se/polopoly_fs/1.2125466.1329915818!mobileimage-large/438729286.jpg http://cdn01.tv4.se/polopoly_fs/1.2125466.1329915818!mobileimage-highres/3954078633.jpg http://cdn01.tv4.se/polopoly_fs/1.2125466.1329915818!mobileimage-logo-highres/1668594188.png http://cdn01.tv4.se/polopoly_fs/1.2125466.1329915818!mobileimage-large-highres/1046531062.jpg Don är en man med överaktiv fantasi. Han snubblar sig fram genom tillvaron och så fort han hamnar i en generande situation sätter hans fantasi igång. Han ser alla de saker han inte bör göra eller säga men - självklart gör. SE 129.35.209.170 58.247.178.245 115.111.227.14 115.111.227.6 25.19.39.117 210.94.41.89 217.67.201.237 217.67.201.162;SE;SE Visas i tv4komedi true http://cdn01.tv4.se/polopoly_fs/1.2125466.1329915818!image/3361577620.jpg http://cdn01.tv4.se/polopoly_fs/1.2125466.1329915818!smallformatimage/2455652857.jpg http://cdn01.tv4.se/polopoly_fs/1.2125466.1329915818!categorylarge/1273627130.jpg http://cdn01.tv4.se/polopoly_fs/1.2125466.1329915818!image-large/3726388440.jpg http://cdn01.tv4.se/polopoly_fs/1.2125466.1329915818!image-logo/2855464913.png http://cdn01.tv4.se/polopoly_fs/1.2125466.1329915818!small-image-logo/1109700485.png Hela program 12 true false false false Alla 1.2125477 Senast tillagt inom Film & Serier 4 true true true false Alla 1.1969858,1.1955301,1.2555393,1.2170705,1.2034642,1.2082509,1.2134569,1.1919111,1.1984952,1.2690213,1.1969847,1.2685868,1.2089805,1.1855803,1.2522584,1.2676183,1.1955342,1.2681510,1.2693237,1.2012839 http://cdn01.tv4.se/polopoly_fs/1.2382065.1329915494!originallogoimage/1692861372.png http://cdn01.tv4.se/polopoly_fs/1.2382065.1329915494!originalformatimage/2078144822.jpg http://cdn01.tv4.se/polopoly_fs/1.2382065.1329915494!originalcarouselimage/1893116165.jpg I Devils mistress kastas den unga kvinnan Angelica mellan hopp och förtvivlan i inbördeskrigets England på 1600-talet. När landet är i uppror utnyttjar hon situationen och förlägger sina lojaliteter där det bäst passar hennes manipulativa syften. Men hennes val hinner ikapp henne och hon ställs till svars av både rättvisan och kärleken. SE;SE 115.111.227.14 115.111.227.6 25.19.39.117 210.94.41.89 217.67.201.237 217.67.201.162;SE 115.111.227.14 115.111.227.6 25.19.39.117 210.94.41.89 217.67.201.237 217.67.201.162 Visas i Sjuan true Hela program 12 true false false false Alla 1.2382065 Senast tillagt inom Film & Serier 4 true true true false Alla 1.1969858,1.1955301,1.2555393,1.2170705,1.2034642,1.2082509,1.2134569,1.1919111,1.1984952,1.2690213,1.1969847,1.2685868,1.2089805,1.1855803,1.2522584,1.2676183,1.1955342,1.2681510,1.2693237,1.2012839 http://cdn01.tv4.se/polopoly_fs/1.2322202.1342776932!originallogoimage/2585616848.png http://cdn01.tv4.se/polopoly_fs/1.2322202.1342776932!originalformatimage/2489254953.jpg http://cdn01.tv4.se/polopoly_fs/1.2322202.1342776932!originalcarouselimage/264834120.jpg Michel Strogoff är kurir åt tsar Alexander II och får uppdraget att i hemlighet undsätta tsarens bror. SE;SE 115.111.227.14 115.111.227.6 25.19.39.117 210.94.41.89 217.67.201.237 217.67.201.162 Visas i tv4guld true Hela program 12 true false false false Alla 1.2322202 Senast tillagt inom Film & Serier 4 true true true false Alla 1.1969858,1.1955301,1.2555393,1.2170705,1.2034642,1.2082509,1.2134569,1.1919111,1.1984952,1.2690213,1.1969847,1.2685868,1.2089805,1.1855803,1.2522584,1.2676183,1.1955342,1.2681510,1.2693237,1.2012839 http://cdn01.tv4.se/polopoly_fs/1.2307860.1329915624!originallogoimage/1070102488.png http://cdn01.tv4.se/polopoly_fs/1.2307860.1329915624!originalformatimage/831132193.jpg http://cdn01.tv4.se/polopoly_fs/1.2307860.1329915624!originalcarouselimage/2853968448.jpg Den som dräper handlar om en specialenhet inom Köpenhamnspolisen som utreder ouppklarade brott som begåtts av seriemördare. I fokus står kriminalpolisen Katrine Ries Jensen och profileraren Thomas Schaeffer. SE 58.247.178.244 115.111.227.14 115.111.227.6 25.19.39.117 210.94.41.89 217.67.201.237 217.67.201.162;SE 58.247.178.244 115.111.227.14 115.111.227.6 25.19.39.117 210.94.41.89 217.67.201.237 217.67.201.162;SE Måndagar 21:00 tv4 true Hela program 12 true false false false Alla 1.2307860 Senast tillagt inom Film & Serier 4 true true true false Alla 1.1969858,1.1955301,1.2555393,1.2170705,1.2034642,1.2082509,1.2134569,1.1919111,1.1984952,1.2690213,1.1969847,1.2685868,1.2089805,1.1855803,1.2522584,1.2676183,1.1955342,1.2681510,1.2693237,1.2012839 http://cdn01.tv4.se/polopoly_fs/1.2142079.1343647652!mobileimage/1261848075.jpg http://cdn01.tv4.se/polopoly_fs/1.2142079.1343647652!mobileimage-logo/1215259863.png http://cdn01.tv4.se/polopoly_fs/1.2142079.1343647652!mobileimage-large/1391435594.jpg http://cdn01.tv4.se/polopoly_fs/1.2142079.1343647652!mobileimage-highres/2054344943.jpg http://cdn01.tv4.se/polopoly_fs/1.2142079.1343647652!mobileimage-logo-highres/1300688341.png http://cdn01.tv4.se/polopoly_fs/1.2142079.1343647652!mobileimage-large-highres/1460016712.jpg http://cdn01.tv4.se/polopoly_fs/1.2142079.1343647652!originallogoimage/2318500096.png http://cdn01.tv4.se/polopoly_fs/1.2142079.1343647652!originalformatimage/735717772.jpg http://cdn01.tv4.se/polopoly_fs/1.2142079.1343647652!originalcarouselimage/3900296954.jpg Brittisk leranimerad komediserie. Här ger djur på ett brittiskt zoo röster åt vanligt folks synpunkter. De kommenterar allt från boende till bantning och självklart det som diskuteras mest - vädret. SE;SE 115.111.227.14 115.111.227.6 25.19.39.117 210.94.41.89 217.67.201.237 217.67.201.162 Visas i tv4komedi true http://cdn01.tv4.se/polopoly_fs/1.2142079.1343647652!image/4267433599.jpg http://cdn01.tv4.se/polopoly_fs/1.2142079.1343647652!smallformatimage/4276264281.jpg http://cdn01.tv4.se/polopoly_fs/1.2142079.1343647652!categorylarge/477632910.jpg http://cdn01.tv4.se/polopoly_fs/1.2142079.1343647652!image-large/2694507457.jpg http://cdn01.tv4.se/polopoly_fs/1.2142079.1343647652!image-logo/3876115139.png http://cdn01.tv4.se/polopoly_fs/1.2142079.1343647652!small-image-logo/3138388709.png Hela program 16 true false false false Alla 1.2142085 Senast tillagt inom Film & Serier 4 true true true false Alla 1.1969858,1.1955301,1.2555393,1.2170705,1.2034642,1.2082509,1.2134569,1.1919111,1.1984952,1.2690213,1.1969847,1.2685868,1.2089805,1.1855803,1.2522584,1.2676183,1.1955342,1.2681510,1.2693237,1.2012839 Jen lyckas få jobb som chef på på Reynholm Industries IT-avdelning. Det enda problemet är att Jen inte vet någonting om datorer. Till råga på allt huserar avdelningen nere i källaren, långt ifrån de vackra kontoren på övervåningarna. Jen vill inte jobba i källaren och hennes medarbetare, nördarna Moss och Roy, vill inte ha henne där. Nu är frågan om de tre ändå kan jobba tillsammans. SE 115.111.227.14 115.111.227.6 25.19.39.117 210.94.41.89 217.67.201.237 217.67.201.162;SE tv4komedi true http://cdn01.tv4.se/polopoly_fs/1.1975146.1329915890!image/1322226378.jpg http://cdn01.tv4.se/polopoly_fs/1.1975146.1329915890!smallformatimage/1503542470.jpg http://cdn01.tv4.se/polopoly_fs/1.1975146.1329915890!categorylarge/3526565470.jpg http://cdn01.tv4.se/polopoly_fs/1.1975146.1329915890!image-large/2249549028.jpg http://cdn01.tv4.se/polopoly_fs/1.1975146.1329915890!image-logo/3731411663.png http://cdn01.tv4.se/polopoly_fs/1.1975146.1329915890!small-image-logo/763930223.png Hela program 12 true true false false 1.1975155 Senast tillagt inom Film & Serier 4 true true true false Alla 1.1969858,1.1955301,1.2555393,1.2170705,1.2034642,1.2082509,1.2134569,1.1919111,1.1984952,1.2690213,1.1969847,1.2685868,1.2089805,1.1855803,1.2522584,1.2676183,1.1955342,1.2681510,1.2693237,1.2012839 http://cdn01.tv4.se/polopoly_fs/1.2169423.1329915948!mobileimage/3156217411.jpg http://cdn01.tv4.se/polopoly_fs/1.2169423.1329915948!mobileimage-logo/4177900898.png http://cdn01.tv4.se/polopoly_fs/1.2169423.1329915948!mobileimage-large/248117666.jpg http://cdn01.tv4.se/polopoly_fs/1.2169423.1329915948!mobileimage-highres/1049464386.jpg http://cdn01.tv4.se/polopoly_fs/1.2169423.1329915948!mobileimage-logo-highres/843071583.png http://cdn01.tv4.se/polopoly_fs/1.2169423.1329915948!mobileimage-large-highres/3314289823.jpg Miranda är inte en vanlig tjej som ofta gör hennes mor besviken som konstant försöker para ihop Miranda med lämpliga män. Men Miranda har ingen aning om hur hon ska uppföra sig när hon umgås med män. Till och med när hon försöker flörta skapar de stora problem. SE;SE 115.111.227.14 115.111.227.6 25.19.39.117 210.94.41.89 217.67.201.237 217.67.201.162 Visas i tv4komedi true http://cdn01.tv4.se/polopoly_fs/1.2169423.1329915948!image/1724264890.jpg http://cdn01.tv4.se/polopoly_fs/1.2169423.1329915948!smallformatimage/1436495756.jpg http://cdn01.tv4.se/polopoly_fs/1.2169423.1329915948!categorylarge/3427781246.jpg http://cdn01.tv4.se/polopoly_fs/1.2169423.1329915948!image-large/431652279.jpg http://cdn01.tv4.se/polopoly_fs/1.2169423.1329915948!image-logo/515587870.png http://cdn01.tv4.se/polopoly_fs/1.2169423.1329915948!small-image-logo/3982183358.png Hela program 12 true false false false Alla 1.2169423 Senast tillagt inom Film & Serier 4 true true true false Alla 1.1969858,1.1955301,1.2555393,1.2170705,1.2034642,1.2082509,1.2134569,1.1919111,1.1984952,1.2690213,1.1969847,1.2685868,1.2089805,1.1855803,1.2522584,1.2676183,1.1955342,1.2681510,1.2693237,1.2012839 http://cdn01.tv4.se/polopoly_fs/1.2270229.1329915960!originallogoimage/2376153219.png http://cdn01.tv4.se/polopoly_fs/1.2270229.1329915960!originalformatimage/1367094131.jpg http://cdn01.tv4.se/polopoly_fs/1.2270229.1329915960!originalcarouselimage/1717019468.jpg Kriminalaren Jim Bergerac tar till flaskan efter tre nyktra år då han misslyckas med att fälla en misstänkt mordbrännare. Han befinner sig i en kris, både privat och professionellt, och isolerar sig alltmer. SE 115.111.227.14 115.111.227.6 25.19.39.117 210.94.41.89 217.67.201.237 217.67.201.162;SE Visas i tv4guld true Hela program 12 true false false false Alla 1.2270229 Senast tillagt inom Film & Serier 4 true true true false Alla 1.1969858,1.1955301,1.2555393,1.2170705,1.2034642,1.2082509,1.2134569,1.1919111,1.1984952,1.2690213,1.1969847,1.2685868,1.2089805,1.1855803,1.2522584,1.2676183,1.1955342,1.2681510,1.2693237,1.2012839 http://cdn01.tv4.se/polopoly_fs/1.2320431.1329915973!originallogoimage/2414496731.png http://cdn01.tv4.se/polopoly_fs/1.2320431.1329915973!originalformatimage/1788388361.jpg http://cdn01.tv4.se/polopoly_fs/1.2320431.1329915973!originalcarouselimage/2015758107.jpg En amerikansk dramaserie i 13 delar från 2008 som är baserad på Daniel Defoes bok om Robinson Crusoe. Efter ett skeppsbrott är Robinson Crusoe fast på en ö i tropikerna i sex år. Där träffar han öbon Fredag som blir hans följeslagare och som hjälper honom att försöka återvända hem till sin fru och sitt barn. SE;SE 115.111.227.14 115.111.227.6 25.19.39.117 210.94.41.89 217.67.201.237 217.67.201.162 visas i tv4 true Hela program 12 true false false false Alla 1.2320431 Senast tillagt inom Film & Serier 4 true true true false Alla 1.1969858,1.1955301,1.2555393,1.2170705,1.2034642,1.2082509,1.2134569,1.1919111,1.1984952,1.2690213,1.1969847,1.2685868,1.2089805,1.1855803,1.2522584,1.2676183,1.1955342,1.2681510,1.2693237,1.2012839 http://cdn01.tv4.se/polopoly_fs/1.2268365.1329915996!originallogoimage/4193104313.png http://cdn01.tv4.se/polopoly_fs/1.2268365.1329915996!originalformatimage/4023559280.jpg http://cdn01.tv4.se/polopoly_fs/1.2268365.1329915996!originalcarouselimage/488142256.jpg Brittisk komediserie från 2009. I åtta delar. Här följer man den ofta missförstådde Lee, hans bästa vän Tim och föremålet för Lees kärlek, hans hyresvärd Lucy. SE;SE 115.111.227.14 115.111.227.6 25.19.39.117 210.94.41.89 217.67.201.237 217.67.201.162 Visas i tv4komedi true Hela program 12 true false false false Alla 1.2268365 Senast tillagt inom Film & Serier 4 true true true false Alla 1.1969858,1.1955301,1.2555393,1.2170705,1.2034642,1.2082509,1.2134569,1.1919111,1.1984952,1.2690213,1.1969847,1.2685868,1.2089805,1.1855803,1.2522584,1.2676183,1.1955342,1.2681510,1.2693237,1.2012839 http://cdn01.tv4.se/polopoly_fs/1.2001050.1329916058!mobileimage/2134941635.jpg http://cdn01.tv4.se/polopoly_fs/1.2001050.1329916058!mobileimage-logo/4015120016.png http://cdn01.tv4.se/polopoly_fs/1.2001050.1329916058!mobileimage-large/1764594222.jpg http://cdn01.tv4.se/polopoly_fs/1.2001050.1329916058!mobileimage-highres/1547611678.jpg http://cdn01.tv4.se/polopoly_fs/1.2001050.1329916058!mobileimage-logo-highres/1224966783.png http://cdn01.tv4.se/polopoly_fs/1.2001050.1329916058!mobileimage-large-highres/3481259713.jpg http://cdn01.tv4.se/polopoly_fs/1.2001050.1329916058!originallogoimage/915415543.png http://cdn01.tv4.se/polopoly_fs/1.2001050.1329916058!originalformatimage/2576861315.jpg http://cdn01.tv4.se/polopoly_fs/1.2001050.1329916058!originalcarouselimage/1423470093.jpg Den rike Lord Brett Sinclair och mannen av folket, Danny Wilde, bildar tillsammans ett osannolikt playboypar som reser Europa runt i sin jakt på bovar, romanser och äventyr. SE 129.35.209.170 58.247.178.245 Visas i tv4guld true Hela program 4 true false false false 1.2001064 Senast tillagt inom Film & Serier 4 true true true false Alla 1.1969858,1.1955301,1.2555393,1.2170705,1.2034642,1.2082509,1.2134569,1.1919111,1.1984952,1.2690213,1.1969847,1.2685868,1.2089805,1.1855803,1.2522584,1.2676183,1.1955342,1.2681510,1.2693237,1.2012839 http://cdn01.tv4.se/polopoly_fs/1.1969858.1329916167!mobileimage/3599001822.jpg http://cdn01.tv4.se/polopoly_fs/1.1969858.1329916167!mobileimage-highres/4052616671.jpg Tillbaka till Aidensfield är engelsk serie från 2008 och sänds i 24 delar. Det här är säsong 18 om invånarna i staden Aidensfield. SE 129.35.209.170 58.247.178.245 115.111.227.14 115.111.227.6 25.19.39.117 210.94.41.89 217.67.201.237 217.67.201.162 Visas i tv4 true http://cdn01.tv4.se/polopoly_fs/1.1969858.1329916167!image/3026362714.jpg http://cdn01.tv4.se/polopoly_fs/1.1969858.1329916167!smallformatimage/700020712.jpg http://cdn01.tv4.se/polopoly_fs/1.1969858.1329916167!categorylarge/4009851305.jpg http://cdn01.tv4.se/polopoly_fs/1.1969858.1329916167!image-large/561755527.jpg http://cdn01.tv4.se/polopoly_fs/1.1969858.1329916167!image-logo/2431363584.png Hela program 12 true true false false 1.1969866 Senast tillagt inom Film & Serier 4 true true true false Alla 1.1969858,1.1955301,1.2555393,1.2170705,1.2034642,1.2082509,1.2134569,1.1919111,1.1984952,1.2690213,1.1969847,1.2685868,1.2089805,1.1855803,1.2522584,1.2676183,1.1955342,1.2681510,1.2693237,1.2012839 http://cdn01.tv4.se/polopoly_fs/1.2185975.1329916188!mobileimage/3238301591.jpg http://cdn01.tv4.se/polopoly_fs/1.2185975.1329916188!mobileimage-logo/2216768694.png http://cdn01.tv4.se/polopoly_fs/1.2185975.1329916188!mobileimage-large/1944942710.jpg http://cdn01.tv4.se/polopoly_fs/1.2185975.1329916188!mobileimage-highres/1135153046.jpg http://cdn01.tv4.se/polopoly_fs/1.2185975.1329916188!mobileimage-logo-highres/1332003211.png http://cdn01.tv4.se/polopoly_fs/1.2185975.1329916188!mobileimage-large-highres/3098053963.jpg http://cdn01.tv4.se/polopoly_fs/1.2185975.1329916188!originallogoimage/1332003211.png http://cdn01.tv4.se/polopoly_fs/1.2185975.1329916188!originalformatimage/242273676.jpg http://cdn01.tv4.se/polopoly_fs/1.2185975.1329916188!originalcarouselimage/3124642147.jpg Arvsynd är en brittisk kriminalserie från 1997 som sänds i tre avsnitt. Serien bygger på en roman av författaren P.D. James. SE;SE 115.111.227.14 115.111.227.6 25.19.39.117 210.94.41.89 217.67.201.237 217.67.201.162;SE 115.111.227.14 115.111.227.6 25.19.39.117 210.94.41.89 217.67.201.237 217.67.201.162 Visas i tv4plus true http://cdn01.tv4.se/polopoly_fs/1.2185975.1329916188!image/467841134.jpg http://cdn01.tv4.se/polopoly_fs/1.2185975.1329916188!smallformatimage/683388504.jpg http://cdn01.tv4.se/polopoly_fs/1.2185975.1329916188!categorylarge/2976598954.jpg http://cdn01.tv4.se/polopoly_fs/1.2185975.1329916188!image-large/1688140899.jpg http://cdn01.tv4.se/polopoly_fs/1.2185975.1329916188!image-logo/1671413450.png http://cdn01.tv4.se/polopoly_fs/1.2185975.1329916188!small-image-logo/2424293994.png Hela program 12 true false false false Alla 1.2185975 Senast tillagt inom Film & Serier 4 true true true false Alla 1.1969858,1.1955301,1.2555393,1.2170705,1.2034642,1.2082509,1.2134569,1.1919111,1.1984952,1.2690213,1.1969847,1.2685868,1.2089805,1.1855803,1.2522584,1.2676183,1.1955342,1.2681510,1.2693237,1.2012839 tv4 true http://cdn01.tv4.se/polopoly_fs/1.1974783.1329916204!image/2855454329.jpg http://cdn01.tv4.se/polopoly_fs/1.1974783.1329916204!smallformatimage/3642841398.jpg http://cdn01.tv4.se/polopoly_fs/1.1974783.1329916204!image-logo/3632749592.png http://cdn01.tv4.se/polopoly_fs/1.1974783.1329916204!small-image-logo/568895028.png Filmer 16 true false false false 1.1979860,1.1974783 Senast tillagt inom Film & Serier 4 true true true false Alla 1.1969858,1.1955301,1.2555393,1.2170705,1.2034642,1.2082509,1.2134569,1.1919111,1.1984952,1.2690213,1.1969847,1.2685868,1.2089805,1.1855803,1.2522584,1.2676183,1.1955342,1.2681510,1.2693237,1.2012839 http://cdn01.tv4.se/polopoly_fs/1.2161452.1329916217!mobileimage/2344122061.jpg http://cdn01.tv4.se/polopoly_fs/1.2161452.1329916217!mobileimage-logo/2348446605.png http://cdn01.tv4.se/polopoly_fs/1.2161452.1329916217!mobileimage-large/4280528832.jpg http://cdn01.tv4.se/polopoly_fs/1.2161452.1329916217!mobileimage-highres/3392023168.jpg http://cdn01.tv4.se/polopoly_fs/1.2161452.1329916217!mobileimage-logo-highres/3138142898.png http://cdn01.tv4.se/polopoly_fs/1.2161452.1329916217!mobileimage-large-highres/3486883583.jpg http://cdn01.tv4.se/polopoly_fs/1.2161452.1329916217!originallogoimage/552618129.png http://cdn01.tv4.se/polopoly_fs/1.2161452.1329916217!originalformatimage/919559512.jpg http://cdn01.tv4.se/polopoly_fs/1.2161452.1329916217!originalcarouselimage/3288698008.jpg SE 115.111.227.14 115.111.227.6 25.19.39.117 210.94.41.89 217.67.201.237 217.67.201.162;SE Apparitions är en brittisk dramaserie från 2008 i sex delar. Under det senaste århundradet har ondskan vuxit sig starkare än någonsin och i sitt gudomliga kall stöter prästen Jacob på människor besatta av djävulen. För att hindra djävulen att förgöra världen tvingas han ta till exorcism. tv4plus true Hela program 12 true false false false Alla 1.2161452 Senast tillagt inom Film & Serier 4 true true true false Alla 1.1969858,1.1955301,1.2555393,1.2170705,1.2034642,1.2082509,1.2134569,1.1919111,1.1984952,1.2690213,1.1969847,1.2685868,1.2089805,1.1855803,1.2522584,1.2676183,1.1955342,1.2681510,1.2693237,1.2012839 http://cdn01.tv4.se/polopoly_fs/1.2202874.1329916246!originallogoimage/93914209.png http://cdn01.tv4.se/polopoly_fs/1.2202874.1329916246!originalformatimage/3865054312.jpg http://cdn01.tv4.se/polopoly_fs/1.2202874.1329916246!originalcarouselimage/1133895416.jpg Maurice och Syd har levt på brott och har lyckats med några av de mest kända rånen i landet innan de bestämde sig för att gå i pension. Nu är de närmare 60 år och återvänder till Storbritannien för att leva det goda livet. SE 115.111.227.14 115.111.227.6 25.19.39.117 210.94.41.89 217.67.201.237 217.67.201.162;SE 115.111.227.14 115.111.227.6 25.19.39.117 210.94.41.89 217.67.201.237 217.67.201.162;SE visas i tv4+ true Hela program 12 true false false false Alla 1.2202874 Senast tillagt inom Film & Serier 4 true true true false Alla 1.1969858,1.1955301,1.2555393,1.2170705,1.2034642,1.2082509,1.2134569,1.1919111,1.1984952,1.2690213,1.1969847,1.2685868,1.2089805,1.1855803,1.2522584,1.2676183,1.1955342,1.2681510,1.2693237,1.2012839 En rad invånare i Los Angeles möter varandra under olika omständigheter. Några passerar varandra flyktigt medan andra förändrar varandras liv för alltid. SE 129.35.209.170 58.247.178.245 115.111.227.14 115.111.227.6 25.19.39.117 210.94.41.89 217.67.201.237 217.67.201.162 tv4plus true http://cdn01.tv4.se/polopoly_fs/1.1969840.1329916317!image/166793011.jpg http://cdn01.tv4.se/polopoly_fs/1.1969840.1329916317!smallformatimage/268270029.jpg http://cdn01.tv4.se/polopoly_fs/1.1969840.1329916317!categorylarge/1844422180.jpg http://cdn01.tv4.se/polopoly_fs/1.1969840.1329916317!image-large/612894444.jpg http://cdn01.tv4.se/polopoly_fs/1.1969840.1329916317!image-logo/2621378469.png http://cdn01.tv4.se/polopoly_fs/1.1969840.1329916317!small-image-logo/719981273.png Hela program 12 true false false false 1.1969840 Senast tillagt inom Film & Serier 4 true true true false Alla 1.1969858,1.1955301,1.2555393,1.2170705,1.2034642,1.2082509,1.2134569,1.1919111,1.1984952,1.2690213,1.1969847,1.2685868,1.2089805,1.1855803,1.2522584,1.2676183,1.1955342,1.2681510,1.2693237,1.2012839 http://cdn01.tv4.se/polopoly_fs/1.1955342.1329916357!mobileimage/4207972066.jpg http://cdn01.tv4.se/polopoly_fs/1.1955342.1329916357!mobileimage-logo/157458307.png http://cdn01.tv4.se/polopoly_fs/1.1955342.1329916357!mobileimage-large/3701449046.jpg http://cdn01.tv4.se/polopoly_fs/1.1955342.1329916357!mobileimage-highres/1569123349.jpg http://cdn01.tv4.se/polopoly_fs/1.1955342.1329916357!mobileimage-logo-highres/3770453572.png http://cdn01.tv4.se/polopoly_fs/1.1955342.1329916357!mobileimage-large-highres/893497489.jpg Hank föll in i en destruktiv livsstil med vackra kvinnor, alkohol och droger, något som ledde honom allt djupare in i dekadensen, men som också, något oväntat, visade sig berika karriären. SE 129.35.209.170 58.247.178.245 115.111.227.14 115.111.227.6 25.19.39.117 210.94.41.89 217.67.201.237 217.67.201.162;SE 129.35.209.170 58.247.178.245 Visas i tv4 true http://cdn01.tv4.se/polopoly_fs/1.1955342.1329916357!image/2903332447.jpg http://cdn01.tv4.se/polopoly_fs/1.1955342.1329916357!smallformatimage/2130733793.jpg http://cdn01.tv4.se/polopoly_fs/1.1955342.1329916357!categorylarge/130218011.jpg http://cdn01.tv4.se/polopoly_fs/1.1955342.1329916357!image-large/234953092.jpg http://cdn01.tv4.se/polopoly_fs/1.1955342.1329916357!image-logo/1691338538.png http://cdn01.tv4.se/polopoly_fs/1.1955342.1329916357!small-image-logo/3480610193.png Säsong 3 4 true false false false Alla 1.1955342 Senast tillagt inom Film & Serier 4 true true true false Alla 1.1969858,1.1955301,1.2555393,1.2170705,1.2034642,1.2082509,1.2134569,1.1919111,1.1984952,1.2690213,1.1969847,1.2685868,1.2089805,1.1855803,1.2522584,1.2676183,1.1955342,1.2681510,1.2693237,1.2012839 http://cdn01.tv4.se/polopoly_fs/1.2037911.1329916374!mobileimage/3018630976.jpg http://cdn01.tv4.se/polopoly_fs/1.2037911.1329916374!mobileimage-logo/3336121772.png http://cdn01.tv4.se/polopoly_fs/1.2037911.1329916374!mobileimage-large/3876613881.jpg http://cdn01.tv4.se/polopoly_fs/1.2037911.1329916374!mobileimage-highres/379086614.jpg http://cdn01.tv4.se/polopoly_fs/1.2037911.1329916374!mobileimage-logo-highres/3802111004.png http://cdn01.tv4.se/polopoly_fs/1.2037911.1329916374!mobileimage-large-highres/3277250377.jpg http://cdn01.tv4.se/polopoly_fs/1.2037911.1329916374!originallogoimage/3458156020.png http://cdn01.tv4.se/polopoly_fs/1.2037911.1329916374!originalformatimage/728607270.jpg http://cdn01.tv4.se/polopoly_fs/1.2037911.1329916374!originalcarouselimage/970131764.jpg Poirot är en brittisk serie från 1993, baserad på Agatha Christies böcker om den belgiske detektiven Hercule Poirot som utreder avancerade mordgåtor på mer eller mindre exotiska platser men varken kidnappare, tjuvar eller förrädare lyckas lura den skicklige detektiven. SE 115.111.227.14 115.111.227.6 25.19.39.117 210.94.41.89 217.67.201.237 217.67.201.162;SE 129.35.209.170 58.247.178.245 115.111.227.14 115.111.227.6 25.19.39.117 210.94.41.89 217.67.201.237 217.67.201.162 Visas i tv4plus true http://cdn01.tv4.se/polopoly_fs/1.2037911.1329916374!image/896241195.jpg http://cdn01.tv4.se/polopoly_fs/1.2037911.1329916374!smallformatimage/1869110598.jpg http://cdn01.tv4.se/polopoly_fs/1.2037911.1329916374!categorylarge/3067876677.jpg http://cdn01.tv4.se/polopoly_fs/1.2037911.1329916374!image-large/589969511.jpg http://cdn01.tv4.se/polopoly_fs/1.2037911.1329916374!image-logo/3229505186.png http://cdn01.tv4.se/polopoly_fs/1.2037911.1329916374!small-image-logo/2575023792.png Hela program 4 true false false false 1.2037941 Senast tillagt inom Film & Serier 4 true true true false Alla 1.1969858,1.1955301,1.2555393,1.2170705,1.2034642,1.2082509,1.2134569,1.1919111,1.1984952,1.2690213,1.1969847,1.2685868,1.2089805,1.1855803,1.2522584,1.2676183,1.1955342,1.2681510,1.2693237,1.2012839 http://cdn01.tv4.se/polopoly_fs/1.2184339.1332340849!mobileimage/2562361032.jpg http://cdn01.tv4.se/polopoly_fs/1.2184339.1332340849!mobileimage-logo/3517496732.png http://cdn01.tv4.se/polopoly_fs/1.2184339.1332340849!mobileimage-large/3017863782.jpg http://cdn01.tv4.se/polopoly_fs/1.2184339.1332340849!mobileimage-highres/2851999788.jpg http://cdn01.tv4.se/polopoly_fs/1.2184339.1332340849!mobileimage-logo-highres/1067660601.png http://cdn01.tv4.se/polopoly_fs/1.2184339.1332340849!mobileimage-large-highres/1575713475.jpg http://cdn01.tv4.se/polopoly_fs/1.2184339.1332340849!originallogoimage/1067660601.png http://cdn01.tv4.se/polopoly_fs/1.2184339.1332340849!originalformatimage/621725613.jpg http://cdn01.tv4.se/polopoly_fs/1.2184339.1332340849!originalcarouselimage/568485348.jpg Dansk komediserie om Casper och hans kolleger som arbetar med ett danskt tv-program på en tv-station i Köpenhamn. SE;SE 115.111.227.14 115.111.227.6 25.19.39.117 210.94.41.89 217.67.201.237 217.67.201.162 Visas i tv4komedi true http://cdn01.tv4.se/polopoly_fs/1.2184339.1332340849!image/769072828.jpg http://cdn01.tv4.se/polopoly_fs/1.2184339.1332340849!smallformatimage/762207642.jpg http://cdn01.tv4.se/polopoly_fs/1.2184339.1332340849!categorylarge/799499081.jpg http://cdn01.tv4.se/polopoly_fs/1.2184339.1332340849!image-large/3380141498.jpg http://cdn01.tv4.se/polopoly_fs/1.2184339.1332340849!image-logo/3420261975.png http://cdn01.tv4.se/polopoly_fs/1.2184339.1332340849!small-image-logo/428643194.png Hela program 12 true true false false Alla 1.2184339 Senast tillagt inom Film & Serier 4 true true true false Alla 1.1969858,1.1955301,1.2555393,1.2170705,1.2034642,1.2082509,1.2134569,1.1919111,1.1984952,1.2690213,1.1969847,1.2685868,1.2089805,1.1855803,1.2522584,1.2676183,1.1955342,1.2681510,1.2693237,1.2012839 http://cdn01.tv4.se/polopoly_fs/1.2184477.1342776997!mobileimage/612176046.jpg http://cdn01.tv4.se/polopoly_fs/1.2184477.1342776997!mobileimage-logo/656683634.png http://cdn01.tv4.se/polopoly_fs/1.2184477.1342776997!mobileimage-large/1034209775.jpg http://cdn01.tv4.se/polopoly_fs/1.2184477.1342776997!mobileimage-highres/356091466.jpg http://cdn01.tv4.se/polopoly_fs/1.2184477.1342776997!mobileimage-logo-highres/583908208.png http://cdn01.tv4.se/polopoly_fs/1.2184477.1342776997!mobileimage-large-highres/944586989.jpg http://cdn01.tv4.se/polopoly_fs/1.2184477.1342776997!originallogoimage/583908208.png http://cdn01.tv4.se/polopoly_fs/1.2184477.1342776997!originalformatimage/2580107723.jpg http://cdn01.tv4.se/polopoly_fs/1.2184477.1342776997!originalcarouselimage/3988639779.jpg Chefsbibliotekarien Frances O'Briens vars liv raseras när hon tvingas att anställa sin före detta bästa vän, som nu säljer droger, som barnboksbibliotekarie. SE;SE 115.111.227.14 115.111.227.6 25.19.39.117 210.94.41.89 217.67.201.237 217.67.201.162 Visas i tv4komedi true http://cdn01.tv4.se/polopoly_fs/1.2184477.1342776997!image/2433779930.jpg http://cdn01.tv4.se/polopoly_fs/1.2184477.1342776997!smallformatimage/2443824124.jpg http://cdn01.tv4.se/polopoly_fs/1.2184477.1342776997!categorylarge/1932742443.jpg http://cdn01.tv4.se/polopoly_fs/1.2184477.1342776997!image-large/3486629220.jpg http://cdn01.tv4.se/polopoly_fs/1.2184477.1342776997!image-logo/2286126182.png http://cdn01.tv4.se/polopoly_fs/1.2184477.1342776997!small-image-logo/3562755136.png Hela program 12 true false false false Alla 1.2184477 Senast tillagt inom Film & Serier 4 true true true false Alla 1.1969858,1.1955301,1.2555393,1.2170705,1.2034642,1.2082509,1.2134569,1.1919111,1.1984952,1.2690213,1.1969847,1.2685868,1.2089805,1.1855803,1.2522584,1.2676183,1.1955342,1.2681510,1.2693237,1.2012839 http://cdn01.tv4.se/polopoly_fs/1.2170926.1329916558!mobileimage/2791891847.jpg http://cdn01.tv4.se/polopoly_fs/1.2170926.1329916558!mobileimage-logo/1807711558.png http://cdn01.tv4.se/polopoly_fs/1.2170926.1329916558!mobileimage-large/2355328004.jpg http://cdn01.tv4.se/polopoly_fs/1.2170926.1329916558!mobileimage-highres/877579820.jpg http://cdn01.tv4.se/polopoly_fs/1.2170926.1329916558!mobileimage-logo-highres/678538153.png http://cdn01.tv4.se/polopoly_fs/1.2170926.1329916558!mobileimage-large-highres/3484263147.jpg Om den hemliga och otillåtna kärlekshistorien mellan civila Helen Dereham och den amerikanske befälhavaren Jim Kiley i en brittisk by under andra världskriget. När de amerikanska trupperna anländer till byn förändras allt för invånarna både på gott och ont. SE;SE 115.111.227.14 115.111.227.6 25.19.39.117 210.94.41.89 217.67.201.237 217.67.201.162 Visas i tv4guld true http://cdn01.tv4.se/polopoly_fs/1.2170926.1329916558!image/231392883.jpg http://cdn01.tv4.se/polopoly_fs/1.2170926.1329916558!smallformatimage/3956967917.jpg http://cdn01.tv4.se/polopoly_fs/1.2170926.1329916558!categorylarge/4165008311.jpg http://cdn01.tv4.se/polopoly_fs/1.2170926.1329916558!image-large/7170113.jpg http://cdn01.tv4.se/polopoly_fs/1.2170926.1329916558!image-logo/3688956639.png http://cdn01.tv4.se/polopoly_fs/1.2170926.1329916558!small-image-logo/3921674694.png Hela program 12 true false false false Alla 1.2170926 Senast tillagt inom Film & Serier 4 true true true false Alla 1.1969858,1.1955301,1.2555393,1.2170705,1.2034642,1.2082509,1.2134569,1.1919111,1.1984952,1.2690213,1.1969847,1.2685868,1.2089805,1.1855803,1.2522584,1.2676183,1.1955342,1.2681510,1.2693237,1.2012839 http://cdn01.tv4.se/polopoly_fs/1.2184397.1342619088!mobileimage/581243441.jpg http://cdn01.tv4.se/polopoly_fs/1.2184397.1342619088!mobileimage-logo/2918161925.png http://cdn01.tv4.se/polopoly_fs/1.2184397.1342619088!mobileimage-large/1176045002.jpg http://cdn01.tv4.se/polopoly_fs/1.2184397.1342619088!mobileimage-highres/3590726397.jpg http://cdn01.tv4.se/polopoly_fs/1.2184397.1342619088!mobileimage-logo-highres/181410669.png http://cdn01.tv4.se/polopoly_fs/1.2184397.1342619088!mobileimage-large-highres/3777396898.jpg http://cdn01.tv4.se/polopoly_fs/1.2184397.1342619088!originallogoimage/181410669.png Komediserie om familjen Gallaghers och Maguiers galna liv. SE;SE 115.111.227.14 115.111.227.6 25.19.39.117 210.94.41.89 217.67.201.237 217.67.201.162 Visas i tv4komedi true http://cdn01.tv4.se/polopoly_fs/1.2184397.1342619088!image/1371389726.jpg http://cdn01.tv4.se/polopoly_fs/1.2184397.1342619088!smallformatimage/581836881.jpg http://cdn01.tv4.se/polopoly_fs/1.2184397.1342619088!categorylarge/3561237577.jpg http://cdn01.tv4.se/polopoly_fs/1.2184397.1342619088!image-large/2608444308.jpg http://cdn01.tv4.se/polopoly_fs/1.2184397.1342619088!image-logo/587736447.png http://cdn01.tv4.se/polopoly_fs/1.2184397.1342619088!small-image-logo/3664240467.png Hela program 12 true false false false Alla 1.2184397 Senast tillagt inom Film & Serier 4 true true true false Alla 1.1969858,1.1955301,1.2555393,1.2170705,1.2034642,1.2082509,1.2134569,1.1919111,1.1984952,1.2690213,1.1969847,1.2685868,1.2089805,1.1855803,1.2522584,1.2676183,1.1955342,1.2681510,1.2693237,1.2012839 http://cdn01.tv4.se/polopoly_fs/1.2184376.1329916609!mobileimage/8288732.jpg http://cdn01.tv4.se/polopoly_fs/1.2184376.1329916609!mobileimage-logo/2696834241.png http://cdn01.tv4.se/polopoly_fs/1.2184376.1329916609!mobileimage-large/3619766981.jpg http://cdn01.tv4.se/polopoly_fs/1.2184376.1329916609!mobileimage-highres/2012996810.jpg http://cdn01.tv4.se/polopoly_fs/1.2184376.1329916609!mobileimage-logo-highres/4162676005.png http://cdn01.tv4.se/polopoly_fs/1.2184376.1329916609!mobileimage-large-highres/2405583649.jpg http://cdn01.tv4.se/polopoly_fs/1.2184376.1329916609!originallogoimage/4162676005.png http://cdn01.tv4.se/polopoly_fs/1.2184376.1329916609!originalformatimage/2329199730.jpg Australiensisk komediserie från 2006. I 52 avsnitt. I den mytiska förorten Wedgedale bor det en hel del udda karaktärer som visar en väldigt udda lojalitet för stället de kallar sitt hem. SE;SE 115.111.227.14 115.111.227.6 25.19.39.117 210.94.41.89 217.67.201.237 217.67.201.162 tv4komedi true http://cdn01.tv4.se/polopoly_fs/1.2184376.1329916609!image/3301299547.jpg http://cdn01.tv4.se/polopoly_fs/1.2184376.1329916609!smallformatimage/189536732.jpg http://cdn01.tv4.se/polopoly_fs/1.2184376.1329916609!categorylarge/1483102729.jpg http://cdn01.tv4.se/polopoly_fs/1.2184376.1329916609!image-large/3121337770.jpg http://cdn01.tv4.se/polopoly_fs/1.2184376.1329916609!image-logo/4192923484.png http://cdn01.tv4.se/polopoly_fs/1.2184376.1329916609!small-image-logo/802139328.png Hela program 12 true false false false Alla 1.2184376 Senast tillagt inom Film & Serier 4 true true true false Alla 1.1969858,1.1955301,1.2555393,1.2170705,1.2034642,1.2082509,1.2134569,1.1919111,1.1984952,1.2690213,1.1969847,1.2685868,1.2089805,1.1855803,1.2522584,1.2676183,1.1955342,1.2681510,1.2693237,1.2012839 http://cdn01.tv4.se/polopoly_fs/1.2184361.1342777094!mobileimage/3047013812.jpg http://cdn01.tv4.se/polopoly_fs/1.2184361.1342777094!mobileimage-logo/799907545.png http://cdn01.tv4.se/polopoly_fs/1.2184361.1342777094!mobileimage-large/3411565264.jpg http://cdn01.tv4.se/polopoly_fs/1.2184361.1342777094!mobileimage-highres/3182499525.jpg http://cdn01.tv4.se/polopoly_fs/1.2184361.1342777094!mobileimage-logo-highres/2583381461.png http://cdn01.tv4.se/polopoly_fs/1.2184361.1342777094!mobileimage-large-highres/2098102748.jpg http://cdn01.tv4.se/polopoly_fs/1.2184361.1342777094!originallogoimage/2583381461.png http://cdn01.tv4.se/polopoly_fs/1.2184361.1342777094!originalformatimage/2351595676.jpg http://cdn01.tv4.se/polopoly_fs/1.2184361.1342777094!originalcarouselimage/2072777319.jpg Dom Joly driver med allmänheten genom att klä ut sig till olika karaktärer. Ingen går säker för Dom. SE 115.111.227.14 115.111.227.6 25.19.39.117 210.94.41.89 217.67.201.237 217.67.201.162;SE Visas i tv4komedi true http://cdn01.tv4.se/polopoly_fs/1.2184361.1342777094!image/2387207912.jpg http://cdn01.tv4.se/polopoly_fs/1.2184361.1342777094!smallformatimage/2280192877.jpg http://cdn01.tv4.se/polopoly_fs/1.2184361.1342777094!categorylarge/2042055993.jpg http://cdn01.tv4.se/polopoly_fs/1.2184361.1342777094!image-large/1381446097.jpg http://cdn01.tv4.se/polopoly_fs/1.2184361.1342777094!image-logo/1335128953.png http://cdn01.tv4.se/polopoly_fs/1.2184361.1342777094!small-image-logo/1302182394.png Hela program 12 true false false false Alla 1.2184361 Senast tillagt inom Film & Serier 4 true true true false Alla 1.1969858,1.1955301,1.2555393,1.2170705,1.2034642,1.2082509,1.2134569,1.1919111,1.1984952,1.2690213,1.1969847,1.2685868,1.2089805,1.1855803,1.2522584,1.2676183,1.1955342,1.2681510,1.2693237,1.2012839 http://cdn01.tv4.se/polopoly_fs/1.2012818.1329916667!mobileimage/2070976658.jpg http://cdn01.tv4.se/polopoly_fs/1.2012818.1329916667!mobileimage-logo/1657846695.png http://cdn01.tv4.se/polopoly_fs/1.2012818.1329916667!mobileimage-large/4125073488.jpg http://cdn01.tv4.se/polopoly_fs/1.2012818.1329916667!mobileimage-highres/217384324.jpg http://cdn01.tv4.se/polopoly_fs/1.2012818.1329916667!mobileimage-logo-highres/2332994144.png http://cdn01.tv4.se/polopoly_fs/1.2012818.1329916667!mobileimage-large-highres/3318484453.jpg Serien handlar om livet i Midgård, en förort till Birka. Midgårds invånare lever i skarven mellan asatro och kristendom. Medan Birkas invånare redan blivit kristnade lever midgårdarna kvar i sin våldsamma och barbariska asadyrkan. Om grannarna i Birka tycker de inte - de visar bara storstadsfasoner. Visas i tv4komedi true http://cdn01.tv4.se/polopoly_fs/1.2012818.1329916667!image/3217765397.jpg http://cdn01.tv4.se/polopoly_fs/1.2012818.1329916667!smallformatimage/1883437202.jpg http://cdn01.tv4.se/polopoly_fs/1.2012818.1329916667!categorylarge/1623959464.jpg http://cdn01.tv4.se/polopoly_fs/1.2012818.1329916667!image-large/1937993090.jpg http://cdn01.tv4.se/polopoly_fs/1.2012818.1329916667!image-logo/2279287519.png http://cdn01.tv4.se/polopoly_fs/1.2012818.1329916667!small-image-logo/1435154418.png Hela program 4 true false false false 1.2012830 Senast tillagt inom Film & Serier 4 true true true false Alla 1.1969858,1.1955301,1.2555393,1.2170705,1.2034642,1.2082509,1.2134569,1.1919111,1.1984952,1.2690213,1.1969847,1.2685868,1.2089805,1.1855803,1.2522584,1.2676183,1.1955342,1.2681510,1.2693237,1.2012839 http://cdn01.tv4.se/polopoly_fs/1.2019475.1342619291!mobileimage/2168333601.jpg http://cdn01.tv4.se/polopoly_fs/1.2019475.1342619291!mobileimage-logo/453903948.png http://cdn01.tv4.se/polopoly_fs/1.2019475.1342619291!mobileimage-large/4294689349.jpg http://cdn01.tv4.se/polopoly_fs/1.2019475.1342619291!mobileimage-highres/2299694672.jpg http://cdn01.tv4.se/polopoly_fs/1.2019475.1342619291!mobileimage-logo-highres/2908282176.png http://cdn01.tv4.se/polopoly_fs/1.2019475.1342619291!mobileimage-large-highres/1236080969.jpg Sextonårige Will McKenizie tvingas byta från sin fina privatskola till en kommunal skola i en förort. SE 129.35.209.170 58.247.178.245 115.111.227.14 115.111.227.6 25.19.39.117 210.94.41.89 217.67.201.237 217.67.201.162 Visas i tv4komedi true http://cdn01.tv4.se/polopoly_fs/1.2019475.1342619291!image/3135929981.jpg http://cdn01.tv4.se/polopoly_fs/1.2019475.1342619291!smallformatimage/3008062456.jpg http://cdn01.tv4.se/polopoly_fs/1.2019475.1342619291!categorylarge/1293211052.jpg http://cdn01.tv4.se/polopoly_fs/1.2019475.1342619291!image-large/1727310148.jpg http://cdn01.tv4.se/polopoly_fs/1.2019475.1342619291!image-logo/2067262444.png http://cdn01.tv4.se/polopoly_fs/1.2019475.1342619291!small-image-logo/2034114927.png Hela program 12 true false false false Alla 1.2019475 Senast tillagt inom Film & Serier 4 true true true false Alla 1.1969858,1.1955301,1.2555393,1.2170705,1.2034642,1.2082509,1.2134569,1.1919111,1.1984952,1.2690213,1.1969847,1.2685868,1.2089805,1.1855803,1.2522584,1.2676183,1.1955342,1.2681510,1.2693237,1.2012839 http://cdn01.tv4.se/polopoly_fs/1.1976702.1329916871!mobileimage/1374574668.jpg http://cdn01.tv4.se/polopoly_fs/1.1976702.1329916871!mobileimage-logo/348906349.png http://cdn01.tv4.se/polopoly_fs/1.1976702.1329916871!mobileimage-large/3808931757.jpg http://cdn01.tv4.se/polopoly_fs/1.1976702.1329916871!mobileimage-highres/3544438861.jpg http://cdn01.tv4.se/polopoly_fs/1.1976702.1329916871!mobileimage-logo-highres/3750630992.png http://cdn01.tv4.se/polopoly_fs/1.1976702.1329916871!mobileimage-large-highres/675437200.jpg http://cdn01.tv4.se/polopoly_fs/1.1976702.1329916871!originallogoimage/1903426755.png http://cdn01.tv4.se/polopoly_fs/1.1976702.1329916871!originalformatimage/4121369900.jpg http://cdn01.tv4.se/polopoly_fs/1.1976702.1329916871!originalcarouselimage/101503687.jpg Ben Cartwright är en rik änkling och familjen Cartwrights överhuvud. Ben är en hängiven far och tillsammans driver familjen ranchen Pondarosa och försvarar hem och egendom mot alla som vill dem illa. SE 115.111.227.14 115.111.227.6 25.19.39.117 210.94.41.89 217.67.201.237 217.67.201.162;SE Visas i tv4guld true http://cdn01.tv4.se/polopoly_fs/1.1976702.1329916871!image/1324908236.png http://cdn01.tv4.se/polopoly_fs/1.1976702.1329916871!smallformatimage/2107728122.png http://cdn01.tv4.se/polopoly_fs/1.1976702.1329916871!categorylarge/562142321.jpg http://cdn01.tv4.se/polopoly_fs/1.1976702.1329916871!image-large/4101254072.jpg http://cdn01.tv4.se/polopoly_fs/1.1976702.1329916871!image-logo/4084558097.png http://cdn01.tv4.se/polopoly_fs/1.1976702.1329916871!small-image-logo/9772465.png Hela program 12 true false false false 1.1976702 Senast tillagt inom Film & Serier 4 true true true false Alla 1.1969858,1.1955301,1.2555393,1.2170705,1.2034642,1.2082509,1.2134569,1.1919111,1.1984952,1.2690213,1.1969847,1.2685868,1.2089805,1.1855803,1.2522584,1.2676183,1.1955342,1.2681510,1.2693237,1.2012839 Dansk komediserie från 2009. I tio avsnitt. Om stå-up-komikern Frank Hvams liv. Tillsammans med sin vän Casper hamnar Frank ständigt i pinsamma sitautioner som han själv dessutom alltid lyckas förvärra. Franks och Caspers flickvänners tålamod sätts ofta på prov när killarna trasslar in sig i de mest osannolika situtaioner. SE 129.35.209.170 58.247.178.245 115.111.227.14 115.111.227.6 25.19.39.117 210.94.41.89 217.67.201.237 217.67.201.162 Visas i tv4 true http://cdn01.tv4.se/polopoly_fs/1.1969797.1329916971!image/1420464508.jpg http://cdn01.tv4.se/polopoly_fs/1.1969797.1329916971!smallformatimage/1386669954.jpg http://cdn01.tv4.se/polopoly_fs/1.1969797.1329916971!categorylarge/817117291.jpg http://cdn01.tv4.se/polopoly_fs/1.1969797.1329916971!image-large/2043910307.jpg http://cdn01.tv4.se/polopoly_fs/1.1969797.1329916971!image-logo/3244593642.png http://cdn01.tv4.se/polopoly_fs/1.1969797.1329916971!small-image-logo/2008126614.png Hela program 12 true true false false 1.1969807 Senast tillagt inom Film & Serier 4 true true true false Alla 1.1969858,1.1955301,1.2555393,1.2170705,1.2034642,1.2082509,1.2134569,1.1919111,1.1984952,1.2690213,1.1969847,1.2685868,1.2089805,1.1855803,1.2522584,1.2676183,1.1955342,1.2681510,1.2693237,1.2012839 Följ hockeylaget Mustangs spelares, fruars och flickvänners liv utanför isen. De är rika, heta i skvallerpressen och lever ett fabulöst liv men allt är inte en dans på rosor. SE 129.35.209.170 58.247.178.245 115.111.227.14 115.111.227.6 25.19.39.117 210.94.41.89 217.67.201.237 217.67.201.162 Visas i tv4 true http://cdn01.tv4.se/polopoly_fs/1.1955284.1329916989!image/3053209198.jpg http://cdn01.tv4.se/polopoly_fs/1.1955284.1329916989!smallformatimage/4026504451.jpg http://cdn01.tv4.se/polopoly_fs/1.1955284.1329916989!categorylarge/910941440.jpg http://cdn01.tv4.se/polopoly_fs/1.1955284.1329916989!image-large/2747133986.jpg http://cdn01.tv4.se/polopoly_fs/1.1955284.1329916989!image-logo/3817403338.png Hela program 12 true false false true 1.1974580 Senast tillagt inom Film & Serier 4 true true true false Alla 1.1969858,1.1955301,1.2555393,1.2170705,1.2034642,1.2082509,1.2134569,1.1919111,1.1984952,1.2690213,1.1969847,1.2685868,1.2089805,1.1855803,1.2522584,1.2676183,1.1955342,1.2681510,1.2693237,1.2012839 http://cdn01.tv4.se/polopoly_fs/1.2092361.1329917019!mobileimage/893890296.jpg http://cdn01.tv4.se/polopoly_fs/1.2092361.1329917019!mobileimage-logo/1885476313.png http://cdn01.tv4.se/polopoly_fs/1.2092361.1329917019!mobileimage-large/2276350233.jpg http://cdn01.tv4.se/polopoly_fs/1.2092361.1329917019!mobileimage-highres/3085577977.jpg http://cdn01.tv4.se/polopoly_fs/1.2092361.1329917019!mobileimage-logo-highres/3139952868.png http://cdn01.tv4.se/polopoly_fs/1.2092361.1329917019!mobileimage-large-highres/1290513444.jpg Här ger unga brittiska manliga kändisar sin beklämande syn på livet Bland andra Robert Webb, Jack P Shepherd, Robert Kranzinsky, Henry Holland, Russell Kane och Kevin Bridges klagar på allt från att dejta i dagens samhälle till ungdomars hunger efter berömmelse. SE 129.35.209.170 58.247.178.245 115.111.227.14 115.111.227.6 25.19.39.117 210.94.41.89 217.67.201.237 217.67.201.162 Visas i tv4komedi true http://cdn01.tv4.se/polopoly_fs/1.2092361.1329917019!image/4020343041.jpg http://cdn01.tv4.se/polopoly_fs/1.2092361.1329917019!smallformatimage/3707277111.jpg http://cdn01.tv4.se/polopoly_fs/1.2092361.1329917019!categorylarge/1160276677.jpg http://cdn01.tv4.se/polopoly_fs/1.2092361.1329917019!image-large/2430459148.jpg http://cdn01.tv4.se/polopoly_fs/1.2092361.1329917019!image-logo/2547818405.png http://cdn01.tv4.se/polopoly_fs/1.2092361.1329917019!small-image-logo/1681713925.png Hela program 4 true false false false Alla 1.2092363 Senast tillagt inom Film & Serier 4 true true true false Alla 1.1969858,1.1955301,1.2555393,1.2170705,1.2034642,1.2082509,1.2134569,1.1919111,1.1984952,1.2690213,1.1969847,1.2685868,1.2089805,1.1855803,1.2522584,1.2676183,1.1955342,1.2681510,1.2693237,1.2012839 http://cdn01.tv4.se/polopoly_fs/1.2098008.1329917053!mobileimage/2751329545.jpg http://cdn01.tv4.se/polopoly_fs/1.2098008.1329917053!mobileimage-logo/3603464165.png http://cdn01.tv4.se/polopoly_fs/1.2098008.1329917053!mobileimage-large/4144053424.jpg http://cdn01.tv4.se/polopoly_fs/1.2098008.1329917053!mobileimage-highres/109655391.jpg http://cdn01.tv4.se/polopoly_fs/1.2098008.1329917053!mobileimage-logo-highres/4069445205.png http://cdn01.tv4.se/polopoly_fs/1.2098008.1329917053!mobileimage-large-highres/3544681728.jpg Amerikansk dramaserie från 1991. I sex delar. Om Jacqueline Bouvier Kennedy Onassis och hennes fascinerande liv. SE 129.35.209.170 58.247.178.245 115.111.227.14 115.111.227.6 25.19.39.117 210.94.41.89 217.67.201.237 217.67.201.162 Visas i tv4guld true http://cdn01.tv4.se/polopoly_fs/1.2098008.1329917053!image/628808802.jpg http://cdn01.tv4.se/polopoly_fs/1.2098008.1329917053!smallformatimage/2138640143.jpg http://cdn01.tv4.se/polopoly_fs/1.2098008.1329917053!categorylarge/2798470924.jpg http://cdn01.tv4.se/polopoly_fs/1.2098008.1329917053!image-large/859531822.jpg http://cdn01.tv4.se/polopoly_fs/1.2098008.1329917053!image-logo/3496936683.png Hela program 12 true false false true Alla 1.2098021 Senast tillagt inom Film & Serier 4 true true true false Alla 1.1969858,1.1955301,1.2555393,1.2170705,1.2034642,1.2082509,1.2134569,1.1919111,1.1984952,1.2690213,1.1969847,1.2685868,1.2089805,1.1855803,1.2522584,1.2676183,1.1955342,1.2681510,1.2693237,1.2012839 http://cdn01.tv4.se/polopoly_fs/1.2116013.1342777165!mobileimage/1008884656.jpg http://cdn01.tv4.se/polopoly_fs/1.2116013.1342777165!mobileimage-logo/3009992580.png http://cdn01.tv4.se/polopoly_fs/1.2116013.1342777165!mobileimage-large/1486769227.jpg http://cdn01.tv4.se/polopoly_fs/1.2116013.1342777165!mobileimage-highres/3363924860.jpg http://cdn01.tv4.se/polopoly_fs/1.2116013.1342777165!mobileimage-logo-highres/341267180.png http://cdn01.tv4.se/polopoly_fs/1.2116013.1342777165!mobileimage-large-highres/4288792867.jpg Lance praktiserar på en radiostation i Los Angeles, men när en av stationens stjärnor blir förflyttad får han sin chans. SE 129.35.209.170 58.247.178.245 115.111.227.14 115.111.227.6 25.19.39.117 210.94.41.89 217.67.201.237 217.67.201.162 Visas i tv4komedi true http://cdn01.tv4.se/polopoly_fs/1.2116013.1342777165!image/1329264287.jpg http://cdn01.tv4.se/polopoly_fs/1.2116013.1342777165!smallformatimage/1009347024.jpg http://cdn01.tv4.se/polopoly_fs/1.2116013.1342777165!categorylarge/3401803208.jpg http://cdn01.tv4.se/polopoly_fs/1.2116013.1342777165!image-large/2248079893.jpg http://cdn01.tv4.se/polopoly_fs/1.2116013.1342777165!image-logo/1032809726.png http://cdn01.tv4.se/polopoly_fs/1.2116013.1342777165!small-image-logo/3303053010.png Hela program 4 true false false false Alla 1.2116030 Senast tillagt inom Film & Serier 4 true true true false Alla 1.1969858,1.1955301,1.2555393,1.2170705,1.2034642,1.2082509,1.2134569,1.1919111,1.1984952,1.2690213,1.1969847,1.2685868,1.2089805,1.1855803,1.2522584,1.2676183,1.1955342,1.2681510,1.2693237,1.2012839 http://cdn01.tv4.se/polopoly_fs/1.1969759.1329917078!mobileimage/3486218338.jpg http://cdn01.tv4.se/polopoly_fs/1.1969759.1329917078!mobileimage-logo/1863019903.png http://cdn01.tv4.se/polopoly_fs/1.1969759.1329917078!mobileimage-large/2599760917.jpg http://cdn01.tv4.se/polopoly_fs/1.1969759.1329917078!mobileimage-highres/3092178292.jpg http://cdn01.tv4.se/polopoly_fs/1.1969759.1329917078!mobileimage-logo-highres/933782683.png http://cdn01.tv4.se/polopoly_fs/1.1969759.1329917078!mobileimage-large-highres/3199436197.jpg tv4komedi true http://cdn01.tv4.se/polopoly_fs/1.1969759.1329917078!image/191943909.jpg http://cdn01.tv4.se/polopoly_fs/1.1969759.1329917078!smallformatimage/3304659042.jpg http://cdn01.tv4.se/polopoly_fs/1.1969759.1329917078!categorylarge/3409530793.jpg http://cdn01.tv4.se/polopoly_fs/1.1969759.1329917078!image-large/1590649483.jpg http://cdn01.tv4.se/polopoly_fs/1.1969759.1329917078!image-logo/912256738.png http://cdn01.tv4.se/polopoly_fs/1.1969759.1329917078!small-image-logo/3766136190.png Hela program 12 true true false false 1.1969771 Senast tillagt inom Film & Serier 4 true true true false Alla 1.1969858,1.1955301,1.2555393,1.2170705,1.2034642,1.2082509,1.2134569,1.1919111,1.1984952,1.2690213,1.1969847,1.2685868,1.2089805,1.1855803,1.2522584,1.2676183,1.1955342,1.2681510,1.2693237,1.2012839 http://cdn01.tv4.se/polopoly_fs/1.1825058.1329917132!mobileimage/3711578192.png http://cdn01.tv4.se/polopoly_fs/1.1825058.1329917132!mobileimage-logo/3430374421.png http://cdn01.tv4.se/polopoly_fs/1.1825058.1329917132!mobileimage-large/3462358881.jpg http://cdn01.tv4.se/polopoly_fs/1.1825058.1329917132!mobileimage-highres/3276705382.png http://cdn01.tv4.se/polopoly_fs/1.1825058.1329917132!mobileimage-logo-highres/1799936381.png http://cdn01.tv4.se/polopoly_fs/1.1825058.1329917132!mobileimage-large-highres/1533859247.jpg Följ med till varuhuset där de ständigt rivaliserande sminktanterna, den plågade mellanchefen Karin och den spåniga sekreteraren Ingegerd arbetar. Onsdagar 21:30 tv4 false http://cdn01.tv4.se/polopoly_fs/1.1825058.1329917132!image/1750575140.png http://cdn01.tv4.se/polopoly_fs/1.1825058.1329917132!smallformatimage/1435419314.png http://cdn01.tv4.se/polopoly_fs/1.1825058.1329917132!categorylarge/453972741.png http://cdn01.tv4.se/polopoly_fs/1.1825058.1329917132!image-large/356502049.png http://cdn01.tv4.se/polopoly_fs/1.1825058.1329917132!image-logo/555338331.png http://cdn01.tv4.se/polopoly_fs/1.1825058.1329917132!small-image-logo/2325997792.png Senaste klippen 12 false true false false Senast tillagt inom Film & Serier 4 true true true false Alla 1.1969858,1.1955301,1.2555393,1.2170705,1.2034642,1.2082509,1.2134569,1.1919111,1.1984952,1.2690213,1.1969847,1.2685868,1.2089805,1.1855803,1.2522584,1.2676183,1.1955342,1.2681510,1.2693237,1.2012839 Kanadensisk dramaserie om personalen på immigrations- och tullverket i Toronto. SE 129.35.209.170 58.247.178.245;SE 129.35.209.170 58.247.178.245 115.111.227.14 115.111.227.6 25.19.39.117 210.94.41.89 217.67.201.237 217.67.201.162 tv4plus false http://cdn01.tv4.se/polopoly_fs/1.1972146.1329917166!image/489983409.jpg http://cdn01.tv4.se/polopoly_fs/1.1972146.1329917166!smallformatimage/1194811100.jpg http://cdn01.tv4.se/polopoly_fs/1.1972146.1329917166!categorylarge/2659391199.jpg http://cdn01.tv4.se/polopoly_fs/1.1972146.1329917166!image-large/192232445.jpg http://cdn01.tv4.se/polopoly_fs/1.1972146.1329917166!image-logo/3894498616.png http://cdn01.tv4.se/polopoly_fs/1.1972146.1329917166!small-image-logo/2971974954.png Hela program 4 true false false true 1.1972168 Senast tillagt inom Film & Serier 4 true true true false Alla 1.1969858,1.1955301,1.2555393,1.2170705,1.2034642,1.2082509,1.2134569,1.1919111,1.1984952,1.2690213,1.1969847,1.2685868,1.2089805,1.1855803,1.2522584,1.2676183,1.1955342,1.2681510,1.2693237,1.2012839 Allison Dubois är en till ytan alldeles vanlig trebarnsmor som försöker få ihop en stressig familjevardag. Men Allison har en unik förmåga att känna sig förbi människors yttre och i stället se rakt in i deras själ och på det sättet kan Allison tyda mörka hemligheter. SE 129.35.209.170 58.247.178.245 115.111.227.14 115.111.227.6 25.19.39.117 210.94.41.89 217.67.201.237 217.67.201.162 Måndagar 22:00 tv4plus true http://cdn01.tv4.se/polopoly_fs/1.1955246.1329917181!image/1775024115.png http://cdn01.tv4.se/polopoly_fs/1.1955246.1329917181!smallformatimage/2241803678.png http://cdn01.tv4.se/polopoly_fs/1.1955246.1329917181!categorylarge/69334868.png http://cdn01.tv4.se/polopoly_fs/1.1955246.1329917181!image-large/3832423188.jpg http://cdn01.tv4.se/polopoly_fs/1.1955246.1329917181!image-logo/3569727344.png http://cdn01.tv4.se/polopoly_fs/1.1955246.1329917181!small-image-logo/3440808925.png Hela program 12 true false false true 1.1974573 Senast tillagt inom Film & Serier 4 true true true false Alla 1.1969858,1.1955301,1.2555393,1.2170705,1.2034642,1.2082509,1.2134569,1.1919111,1.1984952,1.2690213,1.1969847,1.2685868,1.2089805,1.1855803,1.2522584,1.2676183,1.1955342,1.2681510,1.2693237,1.2012839 En man hittas mördad på ön Sandhamn i Stockholms skärgård och kriminalinspektör Thomas Andreasson från Nackapolisen kallas till platsen. Den döde mannen identifieras men ingenting tyder på att ett brott har begåtts och fallet är på väg att avskrivas då ytterligare en händelse inträffar som pekar på att mannen mördats. SE 129.35.209.170 58.247.178.245;SE 129.35.209.170 58.247.178.245 Måndagar 21:00 tv4 false http://cdn01.tv4.se/polopoly_fs/1.1954412.1329917220!image/3117133587.jpg http://cdn01.tv4.se/polopoly_fs/1.1954412.1329917220!smallformatimage/1984062356.jpg http://cdn01.tv4.se/polopoly_fs/1.1954412.1329917220!categorylarge/627580993.jpg http://cdn01.tv4.se/polopoly_fs/1.1954412.1329917220!image-large/3339038690.jpg http://cdn01.tv4.se/polopoly_fs/1.1954412.1329917220!image-logo/3157947446.png http://cdn01.tv4.se/polopoly_fs/1.1954412.1329917220!small-image-logo/3846151204.png Senaste programmen 12 true true false false 1.1954425 Senast tillagt inom Film & Serier 4 true true true false Alla 1.1969858,1.1955301,1.2555393,1.2170705,1.2034642,1.2082509,1.2134569,1.1919111,1.1984952,1.2690213,1.1969847,1.2685868,1.2089805,1.1855803,1.2522584,1.2676183,1.1955342,1.2681510,1.2693237,1.2012839 Efter att Lux har tillbringat femton år i det ena fosterhemmet efter det andra bestämmer hon sig för att det är dags att ta kontroll över sitt liv. Hon ansöker om att få ta hand om sig själv, vilket leder till att hon för första gången träffar sina biologiska föräldrar. SE 129.35.209.170 58.247.178.245 115.111.227.14 115.111.227.6 25.19.39.117 210.94.41.89 217.67.201.237 217.67.201.162 Tisdagar 20:00 tv11 true http://cdn01.tv4.se/polopoly_fs/1.1989423.1329917233!image/4274977367.jpg http://cdn01.tv4.se/polopoly_fs/1.1989423.1329917233!smallformatimage/3678204705.jpg http://cdn01.tv4.se/polopoly_fs/1.1989423.1329917233!categorylarge/669614999.jpg http://cdn01.tv4.se/polopoly_fs/1.1989423.1329917233!image-large/3908955268.jpg http://cdn01.tv4.se/polopoly_fs/1.1989423.1329917233!image-logo/1234653676.png http://cdn01.tv4.se/polopoly_fs/1.1989423.1329917233!small-image-logo/579384259.png Hela program 4 true false false false 1.1989423 Senast tillagt inom Film & Serier 4 true true true false Alla 1.1969858,1.1955301,1.2555393,1.2170705,1.2034642,1.2082509,1.2134569,1.1919111,1.1984952,1.2690213,1.1969847,1.2685868,1.2089805,1.1855803,1.2522584,1.2676183,1.1955342,1.2681510,1.2693237,1.2012839 http://cdn01.tv4.se/polopoly_fs/1.2034627.1329917299!mobileimage/928041931.jpg http://cdn01.tv4.se/polopoly_fs/1.2034627.1329917299!mobileimage-logo/1742162425.png http://cdn01.tv4.se/polopoly_fs/1.2034627.1329917299!mobileimage-large/1862171240.jpg http://cdn01.tv4.se/polopoly_fs/1.2034627.1329917299!mobileimage-highres/4077998534.jpg http://cdn01.tv4.se/polopoly_fs/1.2034627.1329917299!mobileimage-logo-highres/4075092791.png http://cdn01.tv4.se/polopoly_fs/1.2034627.1329917299!mobileimage-large-highres/4224567462.jpg Stockholm - Båstad är en dramakomediserie i tre delar som utspelar sig på en båtresa genom sommar-Sverige. Peter Magnusson i huvudrollen. tv4 true http://cdn01.tv4.se/polopoly_fs/1.2034627.1329917299!image/314061373.jpg http://cdn01.tv4.se/polopoly_fs/1.2034627.1329917299!smallformatimage/2826687352.jpg http://cdn01.tv4.se/polopoly_fs/1.2034627.1329917299!categorylarge/2120095605.jpg http://cdn01.tv4.se/polopoly_fs/1.2034627.1329917299!image-large/1886309969.jpg http://cdn01.tv4.se/polopoly_fs/1.2034627.1329917299!image-logo/3782674201.png http://cdn01.tv4.se/polopoly_fs/1.2034627.1329917299!small-image-logo/3739593723.png Hela program 4 true false false false Alla 1.2034634 Klipp 4 false true false false Alla 1.2034635 Senast tillagt inom Film & Serier 4 true true true false Alla 1.1969858,1.1955301,1.2555393,1.2170705,1.2034642,1.2082509,1.2134569,1.1919111,1.1984952,1.2690213,1.1969847,1.2685868,1.2089805,1.1855803,1.2522584,1.2676183,1.1955342,1.2681510,1.2693237,1.2012839 http://cdn01.tv4.se/polopoly_fs/1.2001379.1329917314!mobileimage/3105528849.jpg http://cdn01.tv4.se/polopoly_fs/1.2001379.1329917314!mobileimage-logo/577151957.png http://cdn01.tv4.se/polopoly_fs/1.2001379.1329917314!mobileimage-large/3349391878.jpg http://cdn01.tv4.se/polopoly_fs/1.2001379.1329917314!mobileimage-highres/1613662726.jpg http://cdn01.tv4.se/polopoly_fs/1.2001379.1329917314!mobileimage-logo-highres/2714430909.png http://cdn01.tv4.se/polopoly_fs/1.2001379.1329917314!mobileimage-large-highres/3254036681.jpg Den framgångsrika advokaten Catherine Chandlers har efter en brutal misshandel räddats av en stor, stark och mystisk man. En märklig och varm vänskap tar sin början i detta möte. SE 129.35.209.170 58.247.178.245 115.111.227.14 115.111.227.6 25.19.39.117 210.94.41.89 217.67.201.237 217.67.201.162 Visas i tv4guld true http://cdn01.tv4.se/polopoly_fs/1.2001379.1329917314!image/453439827.jpg http://cdn01.tv4.se/polopoly_fs/1.2001379.1329917314!smallformatimage/594603858.jpg http://cdn01.tv4.se/polopoly_fs/1.2001379.1329917314!categorylarge/804598357.jpg http://cdn01.tv4.se/polopoly_fs/1.2001379.1329917314!image-large/267534972.jpg http://cdn01.tv4.se/polopoly_fs/1.2001379.1329917314!image-logo/2388474578.png http://cdn01.tv4.se/polopoly_fs/1.2001379.1329917314!small-image-logo/643173124.png Hela program 4 true false false false 1.2001387 Senast tillagt inom Film & Serier 4 true true true false Alla 1.1969858,1.1955301,1.2555393,1.2170705,1.2034642,1.2082509,1.2134569,1.1919111,1.1984952,1.2690213,1.1969847,1.2685868,1.2089805,1.1855803,1.2522584,1.2676183,1.1955342,1.2681510,1.2693237,1.2012839 http://cdn01.tv4.se/polopoly_fs/1.2113689.1329917326!mobileimage/512981585.jpg http://cdn01.tv4.se/polopoly_fs/1.2113689.1329917326!mobileimage-logo/2122413074.png http://cdn01.tv4.se/polopoly_fs/1.2113689.1329917326!mobileimage-large/2122413074.png http://cdn01.tv4.se/polopoly_fs/1.2113689.1329917326!mobileimage-highres/881553919.jpg http://cdn01.tv4.se/polopoly_fs/1.2113689.1329917326!mobileimage-logo-highres/2539611605.png http://cdn01.tv4.se/polopoly_fs/1.2113689.1329917326!mobileimage-large-highres/2539611605.png Här tar sig komikern Tracy Ullman en satirisk titt på Amerika av i dag. Allt från landets besatthet av kändisar till parodier på de människor som gör Amerika till det land det är. SE 129.35.209.170 58.247.178.245 115.111.227.14 115.111.227.6 25.19.39.117 210.94.41.89 217.67.201.237 217.67.201.162;SE 129.35.209.170 58.247.178.245 115.111.227.14 115.111.227.6 25.19.39.117 210.94.41.89 217.67.201.237 217.67.201.162 Visas i tv4plus true http://cdn01.tv4.se/polopoly_fs/1.2113689.1329917326!image/2747547628.jpg http://cdn01.tv4.se/polopoly_fs/1.2113689.1329917326!smallformatimage/445061612.jpg http://cdn01.tv4.se/polopoly_fs/1.2113689.1329917326!categorylarge/947509797.jpg http://cdn01.tv4.se/polopoly_fs/1.2113689.1329917326!image-large/3154677652.jpg http://cdn01.tv4.se/polopoly_fs/1.2113689.1329917326!image-logo/321662139.png http://cdn01.tv4.se/polopoly_fs/1.2113689.1329917326!small-image-logo/3096841728.png Hela program 12 true false false false Alla 1.2113689 Senast tillagt inom Film & Serier 4 true true true false Alla 1.1969858,1.1955301,1.2555393,1.2170705,1.2034642,1.2082509,1.2134569,1.1919111,1.1984952,1.2690213,1.1969847,1.2685868,1.2089805,1.1855803,1.2522584,1.2676183,1.1955342,1.2681510,1.2693237,1.2012839 http://cdn01.tv4.se/polopoly_fs/1.2159898.1329917372!mobileimage/2144925906.jpg http://cdn01.tv4.se/polopoly_fs/1.2159898.1329917372!mobileimage-logo/689534854.png http://cdn01.tv4.se/polopoly_fs/1.2159898.1329917372!mobileimage-large/3737284933.jpg http://cdn01.tv4.se/polopoly_fs/1.2159898.1329917372!mobileimage-highres/140338628.jpg http://cdn01.tv4.se/polopoly_fs/1.2159898.1329917372!mobileimage-logo-highres/1973143607.png http://cdn01.tv4.se/polopoly_fs/1.2159898.1329917372!mobileimage-large-highres/2185285364.jpg Herrskap och tjänstefolk är en fristående fortsättning på den klassiska brittiska dramaserien från 1970-talet med samma namn. Serien utspelar sig 1936 i London på den välkända adressen 165 Eaton place i den fashionabla stadsdelen Belgravia. Efter att familjen Bellamy flyttat för sex år sedan har huset stått tomt. Nu flyttar diplomaten Sir Hallam Holland in i det välkända huset tillsammans med sin fru Lady Agnes. SE;SE 115.111.227.14 115.111.227.6 25.19.39.117 210.94.41.89 217.67.201.237 217.67.201.162;SE 115.111.227.14 115.111.227.6 25.19.39.117 210.94.41.89 217.67.201.237 217.67.201.162 tv4 true http://cdn01.tv4.se/polopoly_fs/1.2159898.1329917372!image/3143849045.jpg http://cdn01.tv4.se/polopoly_fs/1.2159898.1329917372!smallformatimage/1961531602.jpg http://cdn01.tv4.se/polopoly_fs/1.2159898.1329917372!categorylarge/814616834.jpg http://cdn01.tv4.se/polopoly_fs/1.2159898.1329917372!image-large/1279665217.jpg http://cdn01.tv4.se/polopoly_fs/1.2159898.1329917372!image-logo/1510743896.png http://cdn01.tv4.se/polopoly_fs/1.2159898.1329917372!small-image-logo/4060556942.png Hela program 12 true false false false Alla 1.2159898 Senast tillagt inom Film & Serier 4 true true true false Alla 1.1969858,1.1955301,1.2555393,1.2170705,1.2034642,1.2082509,1.2134569,1.1919111,1.1984952,1.2690213,1.1969847,1.2685868,1.2089805,1.1855803,1.2522584,1.2676183,1.1955342,1.2681510,1.2693237,1.2012839 http://cdn01.tv4.se/polopoly_fs/1.2123689.1329917409!mobileimage/2735602338.jpg http://cdn01.tv4.se/polopoly_fs/1.2123689.1329917409!mobileimage-logo/1264783127.png http://cdn01.tv4.se/polopoly_fs/1.2123689.1329917409!mobileimage-large/1069208410.jpg http://cdn01.tv4.se/polopoly_fs/1.2123689.1329917409!mobileimage-highres/2215090083.jpg http://cdn01.tv4.se/polopoly_fs/1.2123689.1329917409!mobileimage-logo-highres/2073378344.png http://cdn01.tv4.se/polopoly_fs/1.2123689.1329917409!mobileimage-large-highres/256696933.jpg En viruspandemi har slagit ut 90 procent av jordens befolkning. För de som överlevt väntar en osäker framtid men också en värld av möjligheter. Förutom den dagliga utmaningen att hitta mat och vatten finns det ständiga hotet från andra desperata överlevare. SE 129.35.209.170 58.247.178.245 115.111.227.14 115.111.227.6 25.19.39.117 210.94.41.89 217.67.201.237 217.67.201.162;SE Visas i tv4 true http://cdn01.tv4.se/polopoly_fs/1.2123689.1329917409!image/3253416742.jpg http://cdn01.tv4.se/polopoly_fs/1.2123689.1329917409!smallformatimage/1546708372.jpg http://cdn01.tv4.se/polopoly_fs/1.2123689.1329917409!categorylarge/1839600355.jpg http://cdn01.tv4.se/polopoly_fs/1.2123689.1329917409!image-large/964716633.jpg http://cdn01.tv4.se/polopoly_fs/1.2123689.1329917409!image-logo/3254811272.png http://cdn01.tv4.se/polopoly_fs/1.2123689.1329917409!small-image-logo/2790912843.png Hela program 12 true false false false Alla 1.2123700 Senast tillagt inom Film & Serier 4 true true true false Alla 1.1969858,1.1955301,1.2555393,1.2170705,1.2034642,1.2082509,1.2134569,1.1919111,1.1984952,1.2690213,1.1969847,1.2685868,1.2089805,1.1855803,1.2522584,1.2676183,1.1955342,1.2681510,1.2693237,1.2012839 http://cdn01.tv4.se/polopoly_fs/1.2203976.1329917419!originallogoimage/2266298178.png http://cdn01.tv4.se/polopoly_fs/1.2203976.1329917419!originalformatimage/995546542.jpg http://cdn01.tv4.se/polopoly_fs/1.2203976.1329917419!originalcarouselimage/113131976.jpg Under sommaren sänder TV4 den andra säsongen av den brittiska versionen av Wallander med Kenneth Branagh i huvudrollen som kommissarie Wallander. De tre filmerna är inspelade under 2009 och har titlarna Faceless killers, The man who smiled och The fifth woman SE;SE 115.111.227.14 115.111.227.6 25.19.39.117 210.94.41.89 217.67.201.237 217.67.201.162;SE 115.111.227.14 115.111.227.6 25.19.39.117 210.94.41.89 217.67.201.237 217.67.201.162 onsdagar 21:00 tv4 false Hela program 12 true false false false Alla 1.2203976 Senast tillagt inom Film & Serier 4 true true true false Alla 1.1969858,1.1955301,1.2555393,1.2170705,1.2034642,1.2082509,1.2134569,1.1919111,1.1984952,1.2690213,1.1969847,1.2685868,1.2089805,1.1855803,1.2522584,1.2676183,1.1955342,1.2681510,1.2693237,1.2012839 http://cdn01.tv4.se/polopoly_fs/1.2093762.1329917507!mobileimage/1644632308.jpg http://cdn01.tv4.se/polopoly_fs/1.2093762.1329917507!mobileimage-logo/4164369305.png http://cdn01.tv4.se/polopoly_fs/1.2093762.1329917507!mobileimage-large/482541456.jpg http://cdn01.tv4.se/polopoly_fs/1.2093762.1329917507!mobileimage-highres/1781248901.jpg http://cdn01.tv4.se/polopoly_fs/1.2093762.1329917507!mobileimage-logo-highres/1315037333.png http://cdn01.tv4.se/polopoly_fs/1.2093762.1329917507!mobileimage-large-highres/2861835420.jpg Komikerna David Mitchell och Robert Webb bjuder på komiska sketcher där flera löper som en följetong i varje avsnitt. Dessutom bjuder duon på bakom kulisserna reportage där de diskuterar sketchen de precis framfört. SE 129.35.209.170 58.247.178.245 115.111.227.14 115.111.227.6 25.19.39.117 210.94.41.89 217.67.201.237 217.67.201.162;SE Visas i tv4komedi true http://cdn01.tv4.se/polopoly_fs/1.2093762.1329917507!image/1507017640.jpg http://cdn01.tv4.se/polopoly_fs/1.2093762.1329917507!smallformatimage/1349672493.jpg http://cdn01.tv4.se/polopoly_fs/1.2093762.1329917507!categorylarge/2922244217.jpg http://cdn01.tv4.se/polopoly_fs/1.2093762.1329917507!image-large/2244842641.jpg http://cdn01.tv4.se/polopoly_fs/1.2093762.1329917507!image-logo/2551109177.png http://cdn01.tv4.se/polopoly_fs/1.2093762.1329917507!small-image-logo/2584157370.png Hela program 4 true false false false Alla 1.2093766 Senast tillagt inom Film & Serier 4 true true true false Alla 1.1969858,1.1955301,1.2555393,1.2170705,1.2034642,1.2082509,1.2134569,1.1919111,1.1984952,1.2690213,1.1969847,1.2685868,1.2089805,1.1855803,1.2522584,1.2676183,1.1955342,1.2681510,1.2693237,1.2012839 http://cdn01.tv4.se/polopoly_fs/1.2283814.1332149750!originallogoimage/486476077.png http://cdn01.tv4.se/polopoly_fs/1.2283814.1332149750!originalformatimage/1748714597.jpg http://cdn01.tv4.se/polopoly_fs/1.2283814.1332149750!originalcarouselimage/712788344.jpg Robert Gustafsson spelar tre olika figurer från lika olika generationer, alla boende i samma bostadsrättsförening. SE 115.111.227.14 115.111.227.6 25.19.39.117 210.94.41.89 217.67.201.237 217.67.201.162;SE 115.111.227.14 115.111.227.6 25.19.39.117 210.94.41.89 217.67.201.237 217.67.201.162;SE Visas i tv4 true Hela program 12 true false false false Alla 1.2283824,1.2283814 Klipp 4 false true false false Alla 1.2297973 Senast tillagt inom Film & Serier 4 true true true false Alla 1.1969858,1.1955301,1.2555393,1.2170705,1.2034642,1.2082509,1.2134569,1.1919111,1.1984952,1.2690213,1.1969847,1.2685868,1.2089805,1.1855803,1.2522584,1.2676183,1.1955342,1.2681510,1.2693237,1.2012839 Sport - hela program och klipp - TV4 Play Senast tillagt inom Sport 8 true true true false Alla 1.2493064,1.1878278,1.2527371,1.1828786,1.1878293,1.1968362,1.1854613,1.2649871,1.1854138,1.2625985,1.2361595,1.1828779,1.2009707,1.1845111,1.2084439,1.2503717,1.2655039,1.2682582,1.1915797,1.1883387 Program - Sport 30 false 1.2493064,1.1878278,1.2154006,1.1878293,1.2154006,1.1968362,1.2154006,1.2154006,1.2596045,1.2154006,1.2649871,1.2564392,1.2154006,1.1854138,1.2154006,1.2620467,1.2361595,1.2009707,1.2154006,1.2527371,1.1828786,1.2263922,1.1854613,1.1881234,1.2689437,1.2625985,1.1828779,1.1845111,1.2084439,1.2154006,1.2503717,1.2655039,1.2154006,1.2154006,1.2682582,1.1915797,1.1883387,1.2154006 false http://cdn01.tv4.se/polopoly_fs/1.2242004.1341213165!image/298177630.jpg https://www.tv4play.se/order/produkter?redirect_url=%2F%3F&promo=fiskpinnen&product_group_id=7 http://cdn01.tv4.se/polopoly_fs/1.1828779.1329831464!mobileimage/2375821204.jpg http://cdn01.tv4.se/polopoly_fs/1.1828779.1329831464!mobileimage-logo/1567066519.png http://cdn01.tv4.se/polopoly_fs/1.1828779.1329831464!mobileimage-large/2936190818.jpg http://cdn01.tv4.se/polopoly_fs/1.1828779.1329831464!mobileimage-highres/4092140211.jpg http://cdn01.tv4.se/polopoly_fs/1.1828779.1329831464!mobileimage-logo-highres/2943721316.png http://cdn01.tv4.se/polopoly_fs/1.1828779.1329831464!mobileimage-large-highres/1561371025.jpg http://cdn01.tv4.se/polopoly_fs/1.1828779.1329831464!originallogoimage/4130536666.png http://cdn01.tv4.se/polopoly_fs/1.1828779.1329831464!originalformatimage/3736206806.jpg http://cdn01.tv4.se/polopoly_fs/1.1828779.1329831464!originalcarouselimage/3623600015.jpg Det senaste inom sportnyheter. SE 115.111.227.14 115.111.227.6 25.19.39.117 210.94.41.89 217.67.201.237 217.67.201.162;SE Visas i tv4 false http://cdn01.tv4.se/polopoly_fs/1.1828779.1329831464!image/3647445060.jpg http://cdn01.tv4.se/polopoly_fs/1.1828779.1329831464!smallformatimage/3748392634.jpg http://cdn01.tv4.se/polopoly_fs/1.1828779.1329831464!categorylarge/3178836307.jpg http://cdn01.tv4.se/polopoly_fs/1.1828779.1329831464!image-large/4095644059.jpg http://cdn01.tv4.se/polopoly_fs/1.1828779.1329831464!image-logo/1286183122.png http://cdn01.tv4.se/polopoly_fs/1.1828779.1329831464!small-image-logo/4202470830.png TV4 Sporten 8 true false false false Alla 1.1855460,1.1828779,1.1855460,1.1855460,1.1855460,1.1855460 Klipp 12 false true true false Alla 1.1855454,1.1855453,1.1855462,1.1855459,1.1855458,1.1855456,1.1855463 Senast tillagt inom Sport 8 true true true false Alla 1.2493064,1.1878278,1.2527371,1.1828786,1.1878293,1.1968362,1.1854613,1.2649871,1.1854138,1.2625985,1.2361595,1.1828779,1.2009707,1.1845111,1.2084439,1.2503717,1.2655039,1.2682582,1.1915797,1.1883387 http://cdn01.tv4.se/polopoly_fs/1.2625985.1341223170!originallogoimage/2829991805.png http://cdn01.tv4.se/polopoly_fs/1.2625985.1341223170!originalformatimage/2800507524.jpg http://cdn01.tv4.se/polopoly_fs/1.2625985.1341223170!originalcarouselimage/1031426789.jpg Den nya sportkanalen TV4 Sport Xtra bjuder på toppmatcher från internationella fotbollsligor och stora mästerskap i olika sporter. SE 115.111.227.14 115.111.227.6 25.19.39.117 210.94.41.89 217.67.201.237 217.67.201.162;SE 115.111.227.14 115.111.227.6 25.19.39.117 210.94.41.89 217.67.201.237 217.67.201.162;SE Visas i tv4sportxtra true TV4 Sport Xtra live 12 true false false false Alla 1.2625985 http://cdn01.tv4.se/polopoly_fs/1.2503717.1338905115!originallogoimage/2209745948.png http://cdn01.tv4.se/polopoly_fs/1.2503717.1338905115!originalformatimage/2508790229.jpg http://cdn01.tv4.se/polopoly_fs/1.2503717.1338905115!originalcarouselimage/1732495381.jpg SE 115.111.227.14 115.111.227.6 25.19.39.117 210.94.41.89 217.67.201.237 217.67.201.162;SE;SE 115.111.227.14 115.111.227.6 25.19.39.117 210.94.41.89 217.67.201.237 217.67.201.162 Visas i tv4sport true Fotbollsmatcher 12 true true false false Alla 1.2503720 Senast tillagt inom Sport 8 true true true false Alla 1.2493064,1.1878278,1.2527371,1.1828786,1.1878293,1.1968362,1.1854613,1.2649871,1.1854138,1.2625985,1.2361595,1.1828779,1.2009707,1.1845111,1.2084439,1.2503717,1.2655039,1.2682582,1.1915797,1.1883387 http://cdn01.tv4.se/polopoly_fs/1.2084439.1336650902!mobileimage/1947525972.jpg http://cdn01.tv4.se/polopoly_fs/1.2084439.1336650902!mobileimage-logo/335998231.png http://cdn01.tv4.se/polopoly_fs/1.2084439.1336650902!mobileimage-large/3254506434.jpg http://cdn01.tv4.se/polopoly_fs/1.2084439.1336650902!mobileimage-highres/1577904378.jpg http://cdn01.tv4.se/polopoly_fs/1.2084439.1336650902!mobileimage-logo-highres/4258856144.png http://cdn01.tv4.se/polopoly_fs/1.2084439.1336650902!mobileimage-large-highres/673563141.jpg http://cdn01.tv4.se/polopoly_fs/1.2084439.1336650902!originallogoimage/2051026404.png http://cdn01.tv4.se/polopoly_fs/1.2084439.1336650902!originalformatimage/3716176499.jpg http://cdn01.tv4.se/polopoly_fs/1.2084439.1336650902!originalcarouselimage/2948404017.jpg Här diskuteras och analyseras matcher från Allsvenskan och Superettan med bilder, intervjuer och reportage. Programledare: Patrick Ekwall och Anna Brolin. Måndagar 22:40 tv4 false http://cdn01.tv4.se/polopoly_fs/1.2084439.1336650902!image/3376654057.jpg http://cdn01.tv4.se/polopoly_fs/1.2084439.1336650902!smallformatimage/1879081193.jpg http://cdn01.tv4.se/polopoly_fs/1.2084439.1336650902!categorylarge/1392395040.jpg http://cdn01.tv4.se/polopoly_fs/1.2084439.1336650902!image-large/3599701649.jpg http://cdn01.tv4.se/polopoly_fs/1.2084439.1336650902!image-logo/2041296318.png Hela program 12 true false false false Alla 1.2084439 Senast tillagt inom Sport 8 true true true false Alla 1.2493064,1.1878278,1.2527371,1.1828786,1.1878293,1.1968362,1.1854613,1.2649871,1.1854138,1.2625985,1.2361595,1.1828779,1.2009707,1.1845111,1.2084439,1.2503717,1.2655039,1.2682582,1.1915797,1.1883387 http://cdn01.tv4.se/polopoly_fs/1.1883387.1329831526!mobileimage/3002428821.jpg http://cdn01.tv4.se/polopoly_fs/1.1883387.1329831526!mobileimage-logo/398597249.png http://cdn01.tv4.se/polopoly_fs/1.1883387.1329831526!mobileimage-large/111141910.jpg http://cdn01.tv4.se/polopoly_fs/1.1883387.1329831526!mobileimage-highres/1178898524.jpg http://cdn01.tv4.se/polopoly_fs/1.1883387.1329831526!mobileimage-logo-highres/4263251270.png http://cdn01.tv4.se/polopoly_fs/1.1883387.1329831526!mobileimage-large-highres/584668582.jpg http://cdn01.tv4.se/polopoly_fs/1.1883387.1329831526!originallogoimage/3866864056.png http://cdn01.tv4.se/polopoly_fs/1.1883387.1329831526!originalformatimage/1927578799.jpg http://cdn01.tv4.se/polopoly_fs/1.1883387.1329831526!originalcarouselimage/2948404017.jpg Det viktigaste som hänt i den europeiska fotbollen under den senaste veckan och helgen. SE 87.83.15.144 87.83.15.150 87.83.15.156 87.83.15.145 129.35.209.170 58.247.178.245 91.225.128.1-91.225.131.254 115.111.227.14 115.111.227.6 25.19.39.117 210.94.41.89 217.67.201.237 217.67.201.162;SE 129.35.209.170 58.247.178.245 Visas i tv4 http://www.tv4.se/1.1414136/fotbollskanalen_europa false http://cdn01.tv4.se/polopoly_fs/1.1883387.1329831526!image/535748703.jpg http://cdn01.tv4.se/polopoly_fs/1.1883387.1329831526!smallformatimage/306251959.jpg http://cdn01.tv4.se/polopoly_fs/1.1883387.1329831526!categorylarge/913010555.jpg http://cdn01.tv4.se/polopoly_fs/1.1883387.1329831526!image-large/3265639048.jpg http://cdn01.tv4.se/polopoly_fs/1.1883387.1329831526!image-logo/2943306099.jpg http://cdn01.tv4.se/polopoly_fs/1.1883387.1329831526!small-image-logo/2627688330.png Hela program 4 true false false false 1.1883397 Senaste klippen 8 true true false false 1.1883399 Senast tillagt inom Sport 8 true true true false Alla 1.2493064,1.1878278,1.2527371,1.1828786,1.1878293,1.1968362,1.1854613,1.2649871,1.1854138,1.2625985,1.2361595,1.1828779,1.2009707,1.1845111,1.2084439,1.2503717,1.2655039,1.2682582,1.1915797,1.1883387 http://cdn01.tv4.se/polopoly_fs/1.1915797.1329831515!mobileimage/698345290.jpg http://cdn01.tv4.se/polopoly_fs/1.1915797.1329831515!mobileimage-logo/3829954955.png http://cdn01.tv4.se/polopoly_fs/1.1915797.1329831515!mobileimage-highres/3149515489.jpg http://cdn01.tv4.se/polopoly_fs/1.1915797.1329831515!mobileimage-logo-highres/2810621796.png http://cdn01.tv4.se/polopoly_fs/1.1915797.1329831515!originallogoimage/1062091940.png http://cdn01.tv4.se/polopoly_fs/1.1915797.1329831515!originalformatimage/3813043898.jpg http://cdn01.tv4.se/polopoly_fs/1.1915797.1329831515!originalcarouselimage/1268244713.jpg Studioprogram med intervjuer och analyser av helgens matcher i Serie A. Programledare är Jesper Hussfelt. SE;SE 91.225.128.1-91.225.131.254 115.111.227.14 115.111.227.6 25.19.39.117 210.94.41.89 217.67.201.237 217.67.201.162 Visas i tv4sport false http://cdn01.tv4.se/polopoly_fs/1.1915797.1329831515!image/2185085630.jpg http://cdn01.tv4.se/polopoly_fs/1.1915797.1329831515!smallformatimage/1680706848.jpg http://cdn01.tv4.se/polopoly_fs/1.1915797.1329831515!image-logo/3753978930.png http://cdn01.tv4.se/polopoly_fs/1.1915797.1329831515!small-image-logo/3763568848.png Hela program 12 true false false false 1.1915809 Senast tillagt inom Sport 8 true true true false Alla 1.2493064,1.1878278,1.2527371,1.1828786,1.1878293,1.1968362,1.1854613,1.2649871,1.1854138,1.2625985,1.2361595,1.1828779,1.2009707,1.1845111,1.2084439,1.2503717,1.2655039,1.2682582,1.1915797,1.1883387 http://cdn01.tv4.se/polopoly_fs/1.1845111.1329831619!mobileimage/879402644.png http://cdn01.tv4.se/polopoly_fs/1.1845111.1329831619!mobileimage-logo/2793165068.png http://cdn01.tv4.se/polopoly_fs/1.1845111.1329831619!mobileimage-highres/510825786.png http://cdn01.tv4.se/polopoly_fs/1.1845111.1329831619!mobileimage-logo-highres/2944158716.png http://cdn01.tv4.se/polopoly_fs/1.1845111.1329831619!originallogoimage/4043329151.png http://cdn01.tv4.se/polopoly_fs/1.1845111.1329831619!originalformatimage/3649267290.jpg http://cdn01.tv4.se/polopoly_fs/1.1845111.1329831619!originalcarouselimage/1003660072.jpg Patrick Ekwall och Olof Lundh diskuterar och analyserar det senaste i fotbollsvärlden. Visas i tv4sport false http://cdn01.tv4.se/polopoly_fs/1.1845111.1329831619!image/1288553040.jpg http://cdn01.tv4.se/polopoly_fs/1.1845111.1329831619!smallformatimage/1288553040.jpg http://cdn01.tv4.se/polopoly_fs/1.1845111.1329831619!categorylarge/310394592.png http://cdn01.tv4.se/polopoly_fs/1.1845111.1329831619!image-large/2532404049.png http://cdn01.tv4.se/polopoly_fs/1.1845111.1329831619!image-logo/2348200152.png http://cdn01.tv4.se/polopoly_fs/1.1845111.1329831619!small-image-logo/2451936373.png Hela program 12 true true true true Alla 1.1845111 Senast tillagt inom Sport 8 true true true false Alla 1.2493064,1.1878278,1.2527371,1.1828786,1.1878293,1.1968362,1.1854613,1.2649871,1.1854138,1.2625985,1.2361595,1.1828779,1.2009707,1.1845111,1.2084439,1.2503717,1.2655039,1.2682582,1.1915797,1.1883387 http://cdn01.tv4.se/polopoly_fs/1.1854138.1329831660!mobileimage/1757942171.jpg http://cdn01.tv4.se/polopoly_fs/1.1854138.1329831660!mobileimage-highres/1338145946.jpg http://cdn01.tv4.se/polopoly_fs/1.1854138.1329831660!originallogoimage/3770745814.png http://cdn01.tv4.se/polopoly_fs/1.1854138.1329831660!originalformatimage/3359779827.jpg http://cdn01.tv4.se/polopoly_fs/1.1854138.1329831660!originalcarouselimage/4067224629.jpg Här kan du se fotbollsklipp från hela världen. SE 91.225.128.1-91.225.131.254 115.111.227.14 115.111.227.6 25.19.39.117 210.94.41.89 217.67.201.237 217.67.201.162;SE 129.35.209.170 58.247.178.245 91.225.128.1-91.225.131.254 115.111.227.14 115.111.227.6 25.19.39.117 210.94.41.89 217.67.201.237 217.67.201.162;SE 129.35.209.170 58.247.178.245 91.225.128.1-91.225.131.254 Visas i tv4 http://www.fotbollskanalen.se false http://cdn01.tv4.se/polopoly_fs/1.1854138.1329831660!image/170842143.jpg http://cdn01.tv4.se/polopoly_fs/1.1854138.1329831660!smallformatimage/2549419693.jpg http://cdn01.tv4.se/polopoly_fs/1.1854138.1329831660!categorylarge/288528739.png Fotbollsklipp 12 false true true false Alla 1.1867485,1.1906932,1.1867482,1.1867488,1.1867471,1.1867473,1.1854249,1.1867604,1.1867468,1.1867577,1.1854350,1.1854348,1.1854337,1.1867467,1.1854352 Senast tillagt inom Sport 8 true true true false Alla 1.2493064,1.1878278,1.2527371,1.1828786,1.1878293,1.1968362,1.1854613,1.2649871,1.1854138,1.2625985,1.2361595,1.1828779,1.2009707,1.1845111,1.2084439,1.2503717,1.2655039,1.2682582,1.1915797,1.1883387 http://cdn01.tv4.se/polopoly_fs/1.2620467.1337939446!originallogoimage/142952732.png http://cdn01.tv4.se/polopoly_fs/1.2620467.1337939446!originalformatimage/3562554092.jpg http://cdn01.tv4.se/polopoly_fs/1.2620467.1337939446!originalcarouselimage/3816018643.jpg Ishockey-VM för herrar 2012 spelas i Finland och Sverige 4-20 maj. Här ser du alla matcher live och klipp på alla mål. SE;SE 115.111.227.14 115.111.227.6 25.19.39.117 210.94.41.89 217.67.201.237 217.67.201.162;SE 115.111.227.14 115.111.227.6 25.19.39.117 210.94.41.89 217.67.201.237 217.67.201.162;SE 115.111.227.14 115.111.227.6 25.19.39.117 210.94.41.89 217.67.201.237 217.67.201.162 Visas i tv4 http://www.tv4.se/hockey-vm false Klipp 8 false true false false Alla 1.2620471 Matcher 12 true false matcher false false Alla 1.2620470 VM-program 4 true true vm-program false false Alla 1.2650101 Exklusivt Ekwall 4 true true Patrick Ekwall false false Alla 1.2622100 http://cdn01.tv4.se/polopoly_fs/1.2649871.1337772806!originallogoimage/2572399352.png http://cdn01.tv4.se/polopoly_fs/1.2649871.1337772806!originalformatimage/3370040599.jpg http://cdn01.tv4.se/polopoly_fs/1.2649871.1337772806!originalcarouselimage/2123348922.jpg SE 115.111.227.14 115.111.227.6 25.19.39.117 210.94.41.89 217.67.201.237 217.67.201.162;SE Visas i tv4 false Livesport premium 12 true false false false Alla 1.2649875 Klipp 12 false true false false Alla 1.2649882 http://cdn01.tv4.se/polopoly_fs/1.2564392.1336721258!originallogoimage/20577232.png http://cdn01.tv4.se/polopoly_fs/1.2564392.1336721258!originalformatimage/2199461304.jpg http://cdn01.tv4.se/polopoly_fs/1.2564392.1336721258!originalcarouselimage/2388569121.jpg Jessica Almenäs äter middag på Solvalla med en högaktuell person i ett försök att lära känna denne lite närmare. SE;SE 115.111.227.14 115.111.227.6 25.19.39.117 210.94.41.89 217.67.201.237 217.67.201.162;SE 115.111.227.14 115.111.227.6 25.19.39.117 210.94.41.89 217.67.201.237 217.67.201.162 tv4 false Hela program 12 true false false false Alla 1.2564392 Senast tillagt inom Sport 8 true true true false Alla 1.2493064,1.1878278,1.2527371,1.1828786,1.1878293,1.1968362,1.1854613,1.2649871,1.1854138,1.2625985,1.2361595,1.1828779,1.2009707,1.1845111,1.2084439,1.2503717,1.2655039,1.2682582,1.1915797,1.1883387 http://cdn01.tv4.se/polopoly_fs/1.1968362.1343746557!originallogoimage/966931627.png http://cdn01.tv4.se/polopoly_fs/1.1968362.1343746557!originalformatimage/3853149877.jpg http://cdn01.tv4.se/polopoly_fs/1.1968362.1343746557!originalcarouselimage/1258978278.jpg Svensk trav- och galopp-sport. Visas i tv4 false Senaste sändningarna 12 true false false true Alla 1.1968362 Senast tillagt inom Sport 8 true true true false Alla 1.2493064,1.1878278,1.2527371,1.1828786,1.1878293,1.1968362,1.1854613,1.2649871,1.1854138,1.2625985,1.2361595,1.1828779,1.2009707,1.1845111,1.2084439,1.2503717,1.2655039,1.2682582,1.1915797,1.1883387 http://cdn01.tv4.se/polopoly_fs/1.2655039.1343658867!originallogoimage/1240915938.png http://cdn01.tv4.se/polopoly_fs/1.2655039.1343658867!originalformatimage/1203026459.jpg http://cdn01.tv4.se/polopoly_fs/1.2655039.1343658867!originalcarouselimage/3693261434.jpg Uefa Euro 2012 spelas i Ukraina och Polen fram till 1 Juli. Här ser du som premiumkund alla matcherna live. SE 115.111.227.14 115.111.227.6 25.19.39.117 210.94.41.89 217.67.201.237 217.67.201.162;SE 115.111.227.14 115.111.227.6 25.19.39.117 210.94.41.89 217.67.201.237 217.67.201.162;SE 115.111.227.14 115.111.227.6 25.19.39.117 210.94.41.89 217.67.201.237 217.67.201.162 Matcher, magasin och de flesta klipp är inte tillgängliga utanför Sverige. tv4 false EM-magasin 4 true false em-magasin false false Alla 1.2657398 Exklusivt Ekwall: Fotbolls-EM 4 true false false false Alla 1.2661734 Klipp 12 false true false false Alla 1.2655329,1.2655039 http://cdn01.tv4.se/polopoly_fs/1.2596045.1342777283!originallogoimage/930813553.png http://cdn01.tv4.se/polopoly_fs/1.2596045.1342777283!originalformatimage/3953532289.jpg http://cdn01.tv4.se/polopoly_fs/1.2596045.1342777283!originalcarouselimage/3700264382.jpg Svensk dokumentärserie från 2012 som följer några personer, både nybörjare och proffs, som älskar motorcyklar av olika slag. SE 115.111.227.14 115.111.227.6 25.19.39.117 210.94.41.89 217.67.201.237 217.67.201.162;SE Visas i tv4sport true Hela program 12 true false false false Alla 1.2596045 Senast tillagt inom Sport 8 true true true false Alla 1.2493064,1.1878278,1.2527371,1.1828786,1.1878293,1.1968362,1.1854613,1.2649871,1.1854138,1.2625985,1.2361595,1.1828779,1.2009707,1.1845111,1.2084439,1.2503717,1.2655039,1.2682582,1.1915797,1.1883387 http://cdn01.tv4.se/polopoly_fs/1.1878278.1337773416!originallogoimage/3780284123.png http://cdn01.tv4.se/polopoly_fs/1.1878278.1337773416!originalformatimage/1032815915.jpg http://cdn01.tv4.se/polopoly_fs/1.1878278.1337773416!originalcarouselimage/178525460.jpg Allt om handboll. Matcherna är av rättighetsskäl blockerade för användare utanför Sverige. Visas i tv4 true http://cdn01.tv4.se/polopoly_fs/1.1878278.1337773416!image/831636203.jpg http://cdn01.tv4.se/polopoly_fs/1.1878278.1337773416!smallformatimage/1115839908.jpg http://cdn01.tv4.se/polopoly_fs/1.1878278.1337773416!categorylarge/3658171443.jpg http://cdn01.tv4.se/polopoly_fs/1.1878278.1337773416!image-large/2503400430.jpg http://cdn01.tv4.se/polopoly_fs/1.1878278.1337773416!image-logo/892277811.png Livematcher 4 true true live false false Alla 1.2384877 Hela handbollsmatcher 4 true true Hela handbollsmatcher false false Alla 1.2417052 Handbollsklipp 12 true true false false Alla 1.1878288,1.1878278 Senast tillagt inom Sport 8 true true true false Alla 1.2493064,1.1878278,1.2527371,1.1828786,1.1878293,1.1968362,1.1854613,1.2649871,1.1854138,1.2625985,1.2361595,1.1828779,1.2009707,1.1845111,1.2084439,1.2503717,1.2655039,1.2682582,1.1915797,1.1883387 http://cdn01.tv4.se/polopoly_fs/1.1878293.1335449723!originalcarouselimage/3220551971.jpg Allt om innebandy. Visas i tv4sport false http://cdn01.tv4.se/polopoly_fs/1.1878293.1335449723!image/4292821382.jpg http://cdn01.tv4.se/polopoly_fs/1.1878293.1335449723!smallformatimage/432999960.jpg Senaste klippen 12 true true false false Alla 1.1879443 Senast tillagt inom Sport 8 true true true false Alla 1.2493064,1.1878278,1.2527371,1.1828786,1.1878293,1.1968362,1.1854613,1.2649871,1.1854138,1.2625985,1.2361595,1.1828779,1.2009707,1.1845111,1.2084439,1.2503717,1.2655039,1.2682582,1.1915797,1.1883387 http://cdn01.tv4.se/polopoly_fs/1.2493064.1336721461!originallogoimage/3108201219.png http://cdn01.tv4.se/polopoly_fs/1.2493064.1336721461!originalformatimage/1125019457.jpg http://cdn01.tv4.se/polopoly_fs/1.2493064.1336721461!originalcarouselimage/3063619176.jpg Niklas Wikegård diskuterar den gångna veckan i elitserien i ishockey tillsammans med en expertpanel, och bjuder på reportage från arenorna. SE 115.111.227.14 115.111.227.6 25.19.39.117 210.94.41.89 217.67.201.237 217.67.201.162;SE Tisdagar 22:00 tv4sport false Hela program 12 true false false false Alla 1.2493064 Senast tillagt inom Sport 8 true true true false Alla 1.2493064,1.1878278,1.2527371,1.1828786,1.1878293,1.1968362,1.1854613,1.2649871,1.1854138,1.2625985,1.2361595,1.1828779,1.2009707,1.1845111,1.2084439,1.2503717,1.2655039,1.2682582,1.1915797,1.1883387 http://cdn01.tv4.se/polopoly_fs/1.2009707.1336721578!mobileimage/2407284930.jpg http://cdn01.tv4.se/polopoly_fs/1.2009707.1336721578!mobileimage-logo/4199139886.png http://cdn01.tv4.se/polopoly_fs/1.2009707.1336721578!mobileimage-large/1236052170.jpg http://cdn01.tv4.se/polopoly_fs/1.2009707.1336721578!mobileimage-highres/705200276.jpg http://cdn01.tv4.se/polopoly_fs/1.2009707.1336721578!mobileimage-logo-highres/3725556638.png http://cdn01.tv4.se/polopoly_fs/1.2009707.1336721578!mobileimage-large-highres/1236052170.jpg http://cdn01.tv4.se/polopoly_fs/1.2009707.1336721578!originallogoimage/1947195648.png http://cdn01.tv4.se/polopoly_fs/1.2009707.1336721578!originalformatimage/1053299618.jpg http://cdn01.tv4.se/polopoly_fs/1.2009707.1336721578!originalcarouselimage/1621831550.jpg Allt inom vintersport. AL AD BE BA BG DK EE FI FR GR IE IS IT HR LV LI LT LU MK MT MD MC ME NL NO PL PT AT BY VA HU UA DE CZ SE GB ES SI SK RS CH SM RU RO AX SJ IM JE GG GI FO AZ KZ TR GL 115.111.227.14 115.111.227.6 25.19.39.117 210.94.41.89 217.67.201.237 217.67.201.162;SE 129.35.209.170 58.247.178.245 115.111.227.14 115.111.227.6 25.19.39.117 210.94.41.89 217.67.201.237 217.67.201.162 Livesändningarna är endast tillgängliga inom Europa. Visas i tv4 false Klipp 12 false true false false Alla 1.2009712 Senast tillagt inom Sport 8 true true true false Alla 1.2493064,1.1878278,1.2527371,1.1828786,1.1878293,1.1968362,1.1854613,1.2649871,1.1854138,1.2625985,1.2361595,1.1828779,1.2009707,1.1845111,1.2084439,1.2503717,1.2655039,1.2682582,1.1915797,1.1883387 http://cdn01.tv4.se/polopoly_fs/1.2361595.1336721620!originallogoimage/1574828300.png http://cdn01.tv4.se/polopoly_fs/1.2361595.1336721620!originalformatimage/4196241051.jpg http://cdn01.tv4.se/polopoly_fs/1.2361595.1336721620!originalcarouselimage/2283849689.jpg Sportcentralen ramar in helgernas livesända sport, med sportnyheter, stjärnintervjuer och rapporter från TV4:s utsända. SE 115.111.227.14 115.111.227.6 25.19.39.117 210.94.41.89 217.67.201.237 217.67.201.162;SE tv4 true Livesport Premium 4 true true false false Alla 1.2361604 Klipp 8 true true sportcentralen false false Alla 1.2410306 Senast tillagt inom Sport 8 true true true false Alla 1.2493064,1.1878278,1.2527371,1.1828786,1.1878293,1.1968362,1.1854613,1.2649871,1.1854138,1.2625985,1.2361595,1.1828779,1.2009707,1.1845111,1.2084439,1.2503717,1.2655039,1.2682582,1.1915797,1.1883387 http://cdn01.tv4.se/polopoly_fs/1.2527371.1333351423!originallogoimage/1995486686.png http://cdn01.tv4.se/polopoly_fs/1.2527371.1333351423!originalformatimage/1584641234.jpg http://cdn01.tv4.se/polopoly_fs/1.2527371.1333351423!originalcarouselimage/1463416459.jpg Följ Elitserien i bandy här. Visas i tv4 false Klipp bandy 8 true true bandy false false Alla 1.2577773 Senast tillagt inom Sport 8 true true true false Alla 1.2493064,1.1878278,1.2527371,1.1828786,1.1878293,1.1968362,1.1854613,1.2649871,1.1854138,1.2625985,1.2361595,1.1828779,1.2009707,1.1845111,1.2084439,1.2503717,1.2655039,1.2682582,1.1915797,1.1883387 http://cdn01.tv4.se/polopoly_fs/1.1828786.1329831741!mobileimage/2396477649.png http://cdn01.tv4.se/polopoly_fs/1.1828786.1329831741!mobileimage-highres/2765050751.png http://cdn01.tv4.se/polopoly_fs/1.1828786.1329831741!originallogoimage/2721005399.png http://cdn01.tv4.se/polopoly_fs/1.1828786.1329831741!originalformatimage/537909567.jpg http://cdn01.tv4.se/polopoly_fs/1.1828786.1329831741!originalcarouselimage/3098526922.jpg Programledaren Andreas Odén och experten Anders Szalkai ger konkreta tips och träningsråd till utövare i en av Sveriges största folkrörelser - löpning. Visas i tv4sport true http://cdn01.tv4.se/polopoly_fs/1.1828786.1329831741!image/864034156.png http://cdn01.tv4.se/polopoly_fs/1.1828786.1329831741!smallformatimage/2328050540.png http://cdn01.tv4.se/polopoly_fs/1.1828786.1329831741!categorylarge/2194241791.jpg http://cdn01.tv4.se/polopoly_fs/1.1828786.1329831741!image-large/1043040944.jpg http://cdn01.tv4.se/polopoly_fs/1.1828786.1329831741!image-logo/409614219.png http://cdn01.tv4.se/polopoly_fs/1.1828786.1329831741!small-image-logo/1148381101.png Hela program 12 true false false true 1.1828786 Senast tillagt inom Sport 8 true true true false Alla 1.2493064,1.1878278,1.2527371,1.1828786,1.1878293,1.1968362,1.1854613,1.2649871,1.1854138,1.2625985,1.2361595,1.1828779,1.2009707,1.1845111,1.2084439,1.2503717,1.2655039,1.2682582,1.1915797,1.1883387 http://cdn01.tv4.se/polopoly_fs/1.2263922.1329831750!originallogoimage/1283970857.png http://cdn01.tv4.se/polopoly_fs/1.2263922.1329831750!originalformatimage/3360896710.jpg http://cdn01.tv4.se/polopoly_fs/1.2263922.1329831750!originalcarouselimage/322847053.jpg Här kan du se de senaste löptävlingarna. SE 115.111.227.14 115.111.227.6 25.19.39.117 210.94.41.89 217.67.201.237 217.67.201.162;SE Visas i tv4 false Hela program 12 true false false false Alla 1.2263934 Senast tillagt inom Sport 8 true true true false Alla 1.2493064,1.1878278,1.2527371,1.1828786,1.1878293,1.1968362,1.1854613,1.2649871,1.1854138,1.2625985,1.2361595,1.1828779,1.2009707,1.1845111,1.2084439,1.2503717,1.2655039,1.2682582,1.1915797,1.1883387 http://cdn01.tv4.se/polopoly_fs/1.1854613.1336722213!mobileimage/3214471335.jpg http://cdn01.tv4.se/polopoly_fs/1.1854613.1336722213!mobileimage-logo/1917808230.png http://cdn01.tv4.se/polopoly_fs/1.1854613.1336722213!mobileimage-highres/767483148.jpg http://cdn01.tv4.se/polopoly_fs/1.1854613.1336722213!mobileimage-logo-highres/830584969.png http://cdn01.tv4.se/polopoly_fs/1.1854613.1336722213!originallogoimage/2840144713.png http://cdn01.tv4.se/polopoly_fs/1.1854613.1336722213!originalformatimage/1967225175.jpg http://cdn01.tv4.se/polopoly_fs/1.1854613.1336722213!originalcarouselimage/3717265156.jpg Spektakulär monstertruck-racing från olika arenor runt om i USA. Visas i tv4sport false http://cdn01.tv4.se/polopoly_fs/1.1854613.1336722213!image/339400019.jpg http://cdn01.tv4.se/polopoly_fs/1.1854613.1336722213!smallformatimage/4062878413.jpg http://cdn01.tv4.se/polopoly_fs/1.1854613.1336722213!categorylarge/3786467479.jpg Hela program 8 true true false true 1.1854727 Senast tillagt inom Sport 8 true true true false Alla 1.2493064,1.1878278,1.2527371,1.1828786,1.1878293,1.1968362,1.1854613,1.2649871,1.1854138,1.2625985,1.2361595,1.1828779,1.2009707,1.1845111,1.2084439,1.2503717,1.2655039,1.2682582,1.1915797,1.1883387 http://cdn01.tv4.se/polopoly_fs/1.1881234.1336722367!originallogoimage/1022967174.png http://cdn01.tv4.se/polopoly_fs/1.1881234.1336722367!originalformatimage/3649819220.jpg http://cdn01.tv4.se/polopoly_fs/1.1881234.1336722367!originalcarouselimage/3409277254.jpg Dragracing - världens snabbaste motorsport. Racers följer tre svenska dragracingteam och eldsjälarna som leder dem. Visas i tv4sport false http://cdn01.tv4.se/polopoly_fs/1.1881234.1336722367!image/1593308639.jpg http://cdn01.tv4.se/polopoly_fs/1.1881234.1336722367!smallformatimage/911402812.jpg Hela program 4 true true false false 1.1881239 Motorbloggen 12 false true false false 1.1881240 Senast tillagt inom Sport 8 true true true false Alla 1.2493064,1.1878278,1.2527371,1.1828786,1.1878293,1.1968362,1.1854613,1.2649871,1.1854138,1.2625985,1.2361595,1.1828779,1.2009707,1.1845111,1.2084439,1.2503717,1.2655039,1.2682582,1.1915797,1.1883387 http://cdn01.tv4.se/polopoly_fs/1.2540070.1329831802!originallogoimage/2828923879.png http://cdn01.tv4.se/polopoly_fs/1.2540070.1329831802!originalformatimage/2693295657.jpg http://cdn01.tv4.se/polopoly_fs/1.2540070.1329831802!originalcarouselimage/1573352207.jpg Live från XL-galan i Globen i Stockholm där några av de bästa svenska friidrottarna och en rad internationella stjärnor tävlar. SE;SE 115.111.227.14 115.111.227.6 25.19.39.117 210.94.41.89 217.67.201.237 217.67.201.162;SE 115.111.227.14 115.111.227.6 25.19.39.117 210.94.41.89 217.67.201.237 217.67.201.162 tv4 false Hela program 12 true false false false Alla 1.2540070 Senast tillagt inom Sport 8 true true true false Alla 1.2493064,1.1878278,1.2527371,1.1828786,1.1878293,1.1968362,1.1854613,1.2649871,1.1854138,1.2625985,1.2361595,1.1828779,1.2009707,1.1845111,1.2084439,1.2503717,1.2655039,1.2682582,1.1915797,1.1883387 http://cdn01.tv4.se/polopoly_fs/1.1845423.1336722994!mobileimage/1663187898.jpg http://cdn01.tv4.se/polopoly_fs/1.1845423.1336722994!mobileimage-logo/2105820666.png http://cdn01.tv4.se/polopoly_fs/1.1845423.1336722994!mobileimage-highres/3923142757.jpg http://cdn01.tv4.se/polopoly_fs/1.1845423.1336722994!mobileimage-logo-highres/2408993545.png http://cdn01.tv4.se/polopoly_fs/1.1845423.1336722994!originallogoimage/3236669162.png http://cdn01.tv4.se/polopoly_fs/1.1845423.1336722994!originalformatimage/630802744.jpg http://cdn01.tv4.se/polopoly_fs/1.1845423.1336722994!originalcarouselimage/3892170365.jpg Det senaste inom hockeyvärlden. Visas i tv4 false http://cdn01.tv4.se/polopoly_fs/1.1845423.1336722994!image/2822779944.jpg http://cdn01.tv4.se/polopoly_fs/1.1845423.1336722994!smallformatimage/3923142757.jpg http://cdn01.tv4.se/polopoly_fs/1.1845423.1336722994!categorylarge/2395417756.jpg http://cdn01.tv4.se/polopoly_fs/1.1845423.1336722994!image-large/3672200742.jpg http://cdn01.tv4.se/polopoly_fs/1.1845423.1336722994!image-logo/1816810687.png http://cdn01.tv4.se/polopoly_fs/1.1845423.1336722994!small-image-logo/3667874243.png Hockeyklipp 12 true true true false Alla 1.1845428,1.1845426,1.1845423,1.2085647,1.2049126 Senast tillagt inom Sport 8 true true true false Alla 1.2493064,1.1878278,1.2527371,1.1828786,1.1878293,1.1968362,1.1854613,1.2649871,1.1854138,1.2625985,1.2361595,1.1828779,1.2009707,1.1845111,1.2084439,1.2503717,1.2655039,1.2682582,1.1915797,1.1883387 http://cdn01.tv4.se/polopoly_fs/1.2689437.1342525709!originallogoimage/3962527528.png http://cdn01.tv4.se/polopoly_fs/1.2689437.1342525709!originalformatimage/1761328839.jpg http://cdn01.tv4.se/polopoly_fs/1.2689437.1342525709!originalcarouselimage/2605740332.jpg Här hittar du det senaste inom segling. SE;SE Visas i tv4sport true Hela program 12 true false false false Alla 1.2689439 http://cdn01.tv4.se/polopoly_fs/1.2682582.1343658918!originallogoimage/2618863550.png http://cdn01.tv4.se/polopoly_fs/1.2682582.1343658918!originalformatimage/2037006444.jpg http://cdn01.tv4.se/polopoly_fs/1.2682582.1343658918!originalcarouselimage/1809113982.jpg Från den årliga tennisturneringen, Swedish open, i Båstad. SE 115.111.227.14 115.111.227.6 25.19.39.117 210.94.41.89 217.67.201.237 217.67.201.162;SE Visas i tv4sport true Livematcher 12 true true false false Alla 1.2682588 Senast tillagt inom Sport 8 true true true false Alla 1.2493064,1.1878278,1.2527371,1.1828786,1.1878293,1.1968362,1.1854613,1.2649871,1.1854138,1.2625985,1.2361595,1.1828779,1.2009707,1.1845111,1.2084439,1.2503717,1.2655039,1.2682582,1.1915797,1.1883387 Program - Nyheter & debatt 30 false 1.1829176,1.2509817,1.1831595,1.1831673,1.1856339,1.1856331,1.1855882,1.1831988,1.1832125 false http://cdn01.tv4.se/polopoly_fs/1.2242004.1341213165!image/298177630.jpg https://www.tv4play.se/order/produkter?redirect_url=%2F%3F&promo=fiskpinnen&product_group_id=7 Lokala nyheter 20 true 1.1846706,1.1848725,1.1846676,1.1848727,1.1846697,1.1848719,1.1848721,1.1846663,1.1848736,1.1848732,1.1848734,1.1848485,1.1848481,1.1848741,1.1848490,1.1848501,1.1848529,1.1848596,1.1848605,1.1848610,1.1848690,1.1848694,1.1848702,1.1848717,1.1848714 http://cdn01.tv4.se/polopoly_fs/1.2509817.1341767038!originallogoimage/1986921195.png http://cdn01.tv4.se/polopoly_fs/1.2509817.1341767038!originalformatimage/4072334084.jpg http://cdn01.tv4.se/polopoly_fs/1.2509817.1341767038!originalcarouselimage/17902831.jpg Senaste nytt från Sverige och världen – ständigt uppdaterade sändningar med nyheter, ekonomi, sport, nöje och väder. tv4 http://www.tv4news.se/ true TV4 News live 12 true false false false Alla 1.2509823,1.2509827 Nöjet 4 true true false false Alla 1.2514276 Veckans politik 4 true false veckans politik false false Alla 1.2657803 Rosenberg 4 true false Göran Rosenberg false false Alla 1.2629019 TV4News Vetenskap 4 true true TV4News Vetenskap false false Alla 1.2629019 Klipp 12 false true false false Alla 1.2650883 http://cdn01.tv4.se/polopoly_fs/1.1829176.1338189501!mobileimage/2370580873.jpg http://cdn01.tv4.se/polopoly_fs/1.1829176.1338189501!mobileimage-logo/33996221.png http://cdn01.tv4.se/polopoly_fs/1.1829176.1338189501!mobileimage-large/3924829810.jpg http://cdn01.tv4.se/polopoly_fs/1.1829176.1338189501!mobileimage-highres/2045706565.jpg http://cdn01.tv4.se/polopoly_fs/1.1829176.1338189501!mobileimage-logo-highres/2771990741.png http://cdn01.tv4.se/polopoly_fs/1.1829176.1338189501!mobileimage-large-highres/1322230554.jpg http://cdn01.tv4.se/polopoly_fs/1.1829176.1338189501!originallogoimage/2771990741.png http://cdn01.tv4.se/polopoly_fs/1.1829176.1338189501!originalformatimage/3993455480.jpg http://cdn01.tv4.se/polopoly_fs/1.1829176.1338189501!originalcarouselimage/1482051029.jpg Senaste nytt från TV4Nyheterna. Visas i tv4 http://nyhetskanalen.se false http://cdn01.tv4.se/polopoly_fs/1.1829176.1338189501!image/4266957990.jpg http://cdn01.tv4.se/polopoly_fs/1.1829176.1338189501!smallformatimage/2370241513.jpg http://cdn01.tv4.se/polopoly_fs/1.1829176.1338189501!categorylarge/2074939377.jpg http://cdn01.tv4.se/polopoly_fs/1.1829176.1338189501!image-large/881889324.jpg http://cdn01.tv4.se/polopoly_fs/1.1829176.1338189501!image-logo/2363557575.png http://cdn01.tv4.se/polopoly_fs/1.1829176.1338189501!small-image-logo/1972305131.png Senaste sändningar 4 true false false true 1.1829199 Senaste nyhetsklippen 12 true true true false Alla 1.1829200,1.1911000,1.1911000,1.1911000,1.1911000 http://cdn01.tv4.se/polopoly_fs/1.1856331.1336723070!mobileimage/934385932.jpg http://cdn01.tv4.se/polopoly_fs/1.1856331.1336723070!mobileimage-logo/1922310701.png http://cdn01.tv4.se/polopoly_fs/1.1856331.1336723070!mobileimage-large/2237165293.jpg http://cdn01.tv4.se/polopoly_fs/1.1856331.1336723070!mobileimage-highres/3038517517.jpg http://cdn01.tv4.se/polopoly_fs/1.1856331.1336723070!mobileimage-logo-highres/3117537040.png http://cdn01.tv4.se/polopoly_fs/1.1856331.1336723070!mobileimage-large-highres/1310563280.jpg http://cdn01.tv4.se/polopoly_fs/1.1856331.1336723070!originallogoimage/388775299.png http://cdn01.tv4.se/polopoly_fs/1.1856331.1336723070!originalformatimage/2482560108.jpg http://cdn01.tv4.se/polopoly_fs/1.1856331.1336723070!originalcarouselimage/1616057223.jpg Senaste nyheterna från börs- och finansvärlden. Visas i tv4 false http://cdn01.tv4.se/polopoly_fs/1.1856331.1336723070!image/3981944565.jpg http://cdn01.tv4.se/polopoly_fs/1.1856331.1336723070!smallformatimage/3725506755.jpg http://cdn01.tv4.se/polopoly_fs/1.1856331.1336723070!categorylarge/1205755185.jpg http://cdn01.tv4.se/polopoly_fs/1.1856331.1336723070!image-large/2452351736.jpg http://cdn01.tv4.se/polopoly_fs/1.1856331.1336723070!image-logo/2502600785.png http://cdn01.tv4.se/polopoly_fs/1.1856331.1336723070!small-image-logo/1724570865.png Ekonominyheterna 12 true true true true 1.1856412,1.1856408 Senaste radionyheterna 4 true true true false Alla 1.2623217 http://cdn01.tv4.se/polopoly_fs/1.1856339.1343818936!mobileimage/3834560535.jpg http://cdn01.tv4.se/polopoly_fs/1.1856339.1343818936!mobileimage-logo/880111124.png http://cdn01.tv4.se/polopoly_fs/1.1856339.1343818936!mobileimage-large/3322958049.jpg http://cdn01.tv4.se/polopoly_fs/1.1856339.1343818936!mobileimage-highres/2600205616.jpg http://cdn01.tv4.se/polopoly_fs/1.1856339.1343818936!mobileimage-logo-highres/3328669927.png http://cdn01.tv4.se/polopoly_fs/1.1856339.1343818936!mobileimage-large-highres/872564242.jpg http://cdn01.tv4.se/polopoly_fs/1.1856339.1343818936!originallogoimage/2669681497.png http://cdn01.tv4.se/polopoly_fs/1.1856339.1343818936!originalformatimage/3080919637.jpg http://cdn01.tv4.se/polopoly_fs/1.1856339.1343818936!originalcarouselimage/3202963468.jpg De senaste väderprognoserna. Visas i tv4 false http://cdn01.tv4.se/polopoly_fs/1.1856339.1343818936!image/2960490439.jpg http://cdn01.tv4.se/polopoly_fs/1.1856339.1343818936!smallformatimage/3061385529.jpg http://cdn01.tv4.se/polopoly_fs/1.1856339.1343818936!categorylarge/3563837136.jpg http://cdn01.tv4.se/polopoly_fs/1.1856339.1343818936!image-large/2634839576.jpg http://cdn01.tv4.se/polopoly_fs/1.1856339.1343818936!image-logo/633044817.png http://cdn01.tv4.se/polopoly_fs/1.1856339.1343818936!small-image-logo/2473490989.png Prognoser 4 true true false false Alla 1.1856415 http://cdn01.tv4.se/polopoly_fs/1.1831673.1338281371!mobileimage/566995249.jpg http://cdn01.tv4.se/polopoly_fs/1.1831673.1338281371!mobileimage-logo/2617029326.png http://cdn01.tv4.se/polopoly_fs/1.1831673.1338281371!mobileimage-large/1089659679.jpg http://cdn01.tv4.se/polopoly_fs/1.1831673.1338281371!mobileimage-highres/1616770428.jpg http://cdn01.tv4.se/polopoly_fs/1.1831673.1338281371!mobileimage-logo-highres/3627181089.png http://cdn01.tv4.se/polopoly_fs/1.1831673.1338281371!mobileimage-large-highres/1879364128.jpg http://cdn01.tv4.se/polopoly_fs/1.1831673.1338281371!originallogoimage/1090189281.png http://cdn01.tv4.se/polopoly_fs/1.1831673.1338281371!originalformatimage/2300449159.jpg http://cdn01.tv4.se/polopoly_fs/1.1831673.1338281371!originalcarouselimage/2077540423.jpg Kalla faktas redaktion granskar och avslöjar politiker, makthavare och samhällsfenomen. Visas i tv4 http://www.tv4.se/kalla_fakta false http://cdn01.tv4.se/polopoly_fs/1.1831673.1338281371!image/2612018449.jpg http://cdn01.tv4.se/polopoly_fs/1.1831673.1338281371!smallformatimage/2363593501.jpg http://cdn01.tv4.se/polopoly_fs/1.1831673.1338281371!categorylarge/134427711.jpg http://cdn01.tv4.se/polopoly_fs/1.1831673.1338281371!image-large/1399507775.jpg http://cdn01.tv4.se/polopoly_fs/1.1831673.1338281371!image-logo/732089687.png http://cdn01.tv4.se/polopoly_fs/1.1831673.1338281371!small-image-logo/428068430.png Hela program 4 true false false true Alla 1.1831690 Säsong 2010 4 true false false true Alla 1.2039506 Tidigare säsonger 4 true false false true 1.1889084 Senaste radionyheterna 4 true true true false Alla 1.2623217 http://cdn01.tv4.se/polopoly_fs/1.1831595.1328788639!mobileimage/3980830200.jpg http://cdn01.tv4.se/polopoly_fs/1.1831595.1328788639!mobileimage-logo/722858792.png http://cdn01.tv4.se/polopoly_fs/1.1831595.1328788639!mobileimage-large/4104092857.jpg http://cdn01.tv4.se/polopoly_fs/1.1831595.1328788639!mobileimage-highres/3691131676.jpg http://cdn01.tv4.se/polopoly_fs/1.1831595.1328788639!mobileimage-logo-highres/467911191.png http://cdn01.tv4.se/polopoly_fs/1.1831595.1328788639!mobileimage-large-highres/4051105211.jpg http://cdn01.tv4.se/polopoly_fs/1.1831595.1328788639!originallogoimage/2149566516.png http://cdn01.tv4.se/polopoly_fs/1.1831595.1328788639!originalformatimage/2518736381.jpg http://cdn01.tv4.se/polopoly_fs/1.1831595.1328788639!originalcarouselimage/1693060157.jpg Debattprogram direkt från Stockholm. Thomas Ritter uppmärksammar aktuella frågor och placerar händelser i ett bredare sammanhang. Onsdagar 23:00 tv4 http://www.tv4.se/kvallsoppet_med_ekdal false http://cdn01.tv4.se/polopoly_fs/1.1831595.1328788639!image/1479228812.jpg http://cdn01.tv4.se/polopoly_fs/1.1831595.1328788639!smallformatimage/1485995690.jpg http://cdn01.tv4.se/polopoly_fs/1.1831595.1328788639!categorylarge/3121150589.jpg http://cdn01.tv4.se/polopoly_fs/1.1831595.1328788639!image-large/116000818.jpg http://cdn01.tv4.se/polopoly_fs/1.1831595.1328788639!image-logo/482607458.png http://cdn01.tv4.se/polopoly_fs/1.1831595.1328788639!small-image-logo/3078497241.png Hela program 12 true false false true 1.1831607 Klipp 12 false true false false 1.1831607,1.1831605,1.1831595 Senaste radionyheterna 4 true true true false Alla 1.2623217 http://cdn01.tv4.se/polopoly_fs/1.1832125.1340378748!originallogoimage/1385835600.png http://cdn01.tv4.se/polopoly_fs/1.1832125.1340378748!originalformatimage/1557678505.jpg http://cdn01.tv4.se/polopoly_fs/1.1832125.1340378748!originalcarouselimage/3343794632.jpg Nyheter, sport och väder varje halvtimme samt lokala nyheter. Dessutom aktuella gäster och musik samt trisskrap. Vardagar 05:50 och helger 07:58 tv4 http://www.tv4.se/nyhetsmorgon false Senaste klippen 12 true true true false Alla 1.1855559,1.1855558,1.1855713,1.1832125,1.1855706,1.1855703,1.1855702,1.1855562,1.1855712,1.1855707,1.1855714,1.2512768 Senaste radionyheterna 4 true true true false Alla 1.2623217 http://cdn01.tv4.se/polopoly_fs/1.1831988.1334565661!mobileimage/3985601851.png http://cdn01.tv4.se/polopoly_fs/1.1831988.1334565661!mobileimage-logo/1312144216.png http://cdn01.tv4.se/polopoly_fs/1.1831988.1334565661!mobileimage-large/208378032.jpg http://cdn01.tv4.se/polopoly_fs/1.1831988.1334565661!mobileimage-highres/2584406061.png http://cdn01.tv4.se/polopoly_fs/1.1831988.1334565661!mobileimage-logo-highres/378974908.png http://cdn01.tv4.se/polopoly_fs/1.1831988.1334565661!mobileimage-large-highres/1422430548.jpg http://cdn01.tv4.se/polopoly_fs/1.1831988.1334565661!originallogoimage/2134805928.png http://cdn01.tv4.se/polopoly_fs/1.1831988.1334565661!originalformatimage/2749597272.jpg http://cdn01.tv4.se/polopoly_fs/1.1831988.1334565661!originalcarouselimage/2496140903.jpg Svenskt magasin, där Malou von Sivers tar upp aktuella ämnen och trender samt trädgård, relationer och hälsa. Vardagar 10:05 tv4 http://www.tv4.se/efter_tio false Hela program 8 true false false true 1.1832009 Senaste klippen 12 false true false false 1.1832008 Senaste radionyheterna 4 true true true false Alla 1.2623217 http://cdn01.tv4.se/polopoly_fs/1.1846663.1341922839!mobileimage/2775002173.jpg http://cdn01.tv4.se/polopoly_fs/1.1846663.1341922839!mobileimage-logo/2775002173.jpg http://cdn01.tv4.se/polopoly_fs/1.1846663.1341922839!mobileimage-highres/786709423.jpg http://cdn01.tv4.se/polopoly_fs/1.1846663.1341922839!mobileimage-logo-highres/786709423.jpg http://cdn01.tv4.se/polopoly_fs/1.1846663.1341922839!originallogoimage/3911440996.png http://cdn01.tv4.se/polopoly_fs/1.1846663.1341922839!originalformatimage/2737274333.jpg http://cdn01.tv4.se/polopoly_fs/1.1846663.1341922839!originalcarouselimage/1863054373.jpg Senaste nytt från TV4:s lokala station. Visas i tv4 false Senaste inslagen 8 false true false false Alla 1.1846663 Senaste sändningarna 4 true false false false Alla 1.2685889,1.2654892 http://cdn01.tv4.se/polopoly_fs/1.1846676.1319019671!mobileimage/3593309539.jpg http://cdn01.tv4.se/polopoly_fs/1.1846676.1319019671!mobileimage-logo/3593309539.jpg http://cdn01.tv4.se/polopoly_fs/1.1846676.1319019671!mobileimage-highres/2867218886.jpg http://cdn01.tv4.se/polopoly_fs/1.1846676.1319019671!mobileimage-logo-highres/2867218886.jpg http://cdn01.tv4.se/polopoly_fs/1.1846676.1319019671!originallogoimage/3604197563.png http://cdn01.tv4.se/polopoly_fs/1.1846676.1319019671!originalformatimage/3834054413.jpg http://cdn01.tv4.se/polopoly_fs/1.1846676.1319019671!originalcarouselimage/248910155.jpg Senaste nytt från TV4:s lokala station. Visas i tv4 false Senaste inslagen 8 false true false false Alla 1.1846676 Senaste sändningarna 4 true false false false Alla 1.1846676 http://cdn01.tv4.se/polopoly_fs/1.1846697.1319019682!mobileimage/3232763645.jpg http://cdn01.tv4.se/polopoly_fs/1.1846697.1319019682!mobileimage-logo/3232763645.jpg http://cdn01.tv4.se/polopoly_fs/1.1846697.1319019682!mobileimage-highres/3809932668.jpg http://cdn01.tv4.se/polopoly_fs/1.1846697.1319019682!mobileimage-logo-highres/3809932668.jpg http://cdn01.tv4.se/polopoly_fs/1.1846697.1319019682!originallogoimage/1726108186.png http://cdn01.tv4.se/polopoly_fs/1.1846697.1319019682!originalformatimage/3655806653.jpg http://cdn01.tv4.se/polopoly_fs/1.1846697.1319019682!originalcarouselimage/3842075434.jpg Senaste nytt från TV4:s lokala station. Visas i tv4 false Senaste inslagen 8 false true false false Alla 1.1846697 Senaste sändningarna 4 true false false false Alla 1.1846697 http://cdn01.tv4.se/polopoly_fs/1.1846706.1319019691!mobileimage/3536718936.jpg http://cdn01.tv4.se/polopoly_fs/1.1846706.1319019691!mobileimage-logo/3536718936.jpg http://cdn01.tv4.se/polopoly_fs/1.1846706.1319019691!mobileimage-highres/3072997532.jpg http://cdn01.tv4.se/polopoly_fs/1.1846706.1319019691!mobileimage-logo-highres/3072997532.jpg http://cdn01.tv4.se/polopoly_fs/1.1846706.1319019691!originallogoimage/1150362023.png http://cdn01.tv4.se/polopoly_fs/1.1846706.1319019691!originalformatimage/1808265901.jpg http://cdn01.tv4.se/polopoly_fs/1.1846706.1319019691!originalcarouselimage/369267148.jpg Senaste nytt från TV4:s lokala station. Visas i tv4 false Senaste inslagen 8 false true false false Alla 1.1846706 Senaste sändningarna 4 true false false false Alla 1.1846706 http://cdn01.tv4.se/polopoly_fs/1.1848481.1319019704!mobileimage/3510174355.jpg http://cdn01.tv4.se/polopoly_fs/1.1848481.1319019704!mobileimage-logo/3510174355.jpg http://cdn01.tv4.se/polopoly_fs/1.1848481.1319019704!mobileimage-highres/1316657275.jpg http://cdn01.tv4.se/polopoly_fs/1.1848481.1319019704!mobileimage-logo-highres/1316657275.jpg http://cdn01.tv4.se/polopoly_fs/1.1848481.1319019704!originallogoimage/3642375822.png http://cdn01.tv4.se/polopoly_fs/1.1848481.1319019704!originalformatimage/1453841181.jpg http://cdn01.tv4.se/polopoly_fs/1.1848481.1319019704!originalcarouselimage/2819579588.jpg Senaste nytt från TV4:s lokala station. Visas i tv4 false Senaste inslagen 8 false true false false 1.1848481 Senaste sändningarna 4 true false false true Alla 1.1848481 http://cdn01.tv4.se/polopoly_fs/1.1848485.1319019716!mobileimage/2941230813.jpg http://cdn01.tv4.se/polopoly_fs/1.1848485.1319019716!mobileimage-logo/2941230813.jpg http://cdn01.tv4.se/polopoly_fs/1.1848485.1319019716!mobileimage-highres/2603599000.jpg http://cdn01.tv4.se/polopoly_fs/1.1848485.1319019716!mobileimage-logo-highres/2603599000.jpg http://cdn01.tv4.se/polopoly_fs/1.1848485.1319019716!originallogoimage/243244505.png http://cdn01.tv4.se/polopoly_fs/1.1848485.1319019716!originalformatimage/285712845.jpg http://cdn01.tv4.se/polopoly_fs/1.1848485.1319019716!originalcarouselimage/1667626992.jpg Senaste nytt från TV4:s lokala station. Visas i tv4 false Senaste inslagen 8 false true false false Alla 1.1848485 Senaste sändningarna 4 true false false false Alla 1.1848485 http://cdn01.tv4.se/polopoly_fs/1.1848490.1319019726!mobileimage/3502511415.jpg http://cdn01.tv4.se/polopoly_fs/1.1848490.1319019726!mobileimage-logo/3502511415.jpg http://cdn01.tv4.se/polopoly_fs/1.1848490.1319019726!mobileimage-highres/3256218289.jpg http://cdn01.tv4.se/polopoly_fs/1.1848490.1319019726!mobileimage-logo-highres/3256218289.jpg http://cdn01.tv4.se/polopoly_fs/1.1848490.1319019726!originallogoimage/1070122176.png http://cdn01.tv4.se/polopoly_fs/1.1848490.1319019726!originalformatimage/3180336730.jpg http://cdn01.tv4.se/polopoly_fs/1.1848490.1319019726!originalcarouselimage/2265633070.jpg Senaste nytt från TV4:s lokala station. Visas i tv4 false Senaste inslagen 8 false true false false Alla 1.1848490 Senaste sändningarna 4 true false false true Alla 1.1848490 http://cdn01.tv4.se/polopoly_fs/1.1848501.1319019736!mobileimage/222143567.jpg http://cdn01.tv4.se/polopoly_fs/1.1848501.1319019736!mobileimage-logo/222143567.jpg http://cdn01.tv4.se/polopoly_fs/1.1848501.1319019736!mobileimage-highres/1857770376.jpg http://cdn01.tv4.se/polopoly_fs/1.1848501.1319019736!mobileimage-logo-highres/1857770376.jpg http://cdn01.tv4.se/polopoly_fs/1.1848501.1319019736!originallogoimage/340317188.png http://cdn01.tv4.se/polopoly_fs/1.1848501.1319019736!originalformatimage/2922848172.jpg http://cdn01.tv4.se/polopoly_fs/1.1848501.1319019736!originalcarouselimage/2449532372.jpg Senaste nytt från TV4:s lokala station. Visas i tv4 false Senaste inslagen 8 false true false false Senaste sändningarna 4 true false false false 1.1848501 http://cdn01.tv4.se/polopoly_fs/1.1848529.1330000085!mobileimage/2403169205.jpg http://cdn01.tv4.se/polopoly_fs/1.1848529.1330000085!mobileimage-logo/2403169205.jpg http://cdn01.tv4.se/polopoly_fs/1.1848529.1330000085!mobileimage-highres/3726905275.jpg http://cdn01.tv4.se/polopoly_fs/1.1848529.1330000085!mobileimage-logo-highres/3726905275.jpg http://cdn01.tv4.se/polopoly_fs/1.1848529.1330000085!originallogoimage/606077419.png http://cdn01.tv4.se/polopoly_fs/1.1848529.1330000085!originalformatimage/2425618692.jpg http://cdn01.tv4.se/polopoly_fs/1.1848529.1330000085!originalcarouselimage/103976605.jpg Senaste nytt från TV4:s lokala station. Visas i tv4 false Senaste inslagen 8 false true false false Alla 1.1848529 Senaste sändningarna 4 true false false false Alla 1.1848529 http://cdn01.tv4.se/polopoly_fs/1.1848596.1338277662!mobileimage/1679682458.jpg http://cdn01.tv4.se/polopoly_fs/1.1848596.1338277662!mobileimage-logo/1679682458.jpg http://cdn01.tv4.se/polopoly_fs/1.1848596.1338277662!mobileimage-highres/3374345367.jpg http://cdn01.tv4.se/polopoly_fs/1.1848596.1338277662!mobileimage-logo-highres/3374345367.jpg http://cdn01.tv4.se/polopoly_fs/1.1848596.1338277662!originallogoimage/4215561064.png http://cdn01.tv4.se/polopoly_fs/1.1848596.1338277662!originalformatimage/646043355.jpg http://cdn01.tv4.se/polopoly_fs/1.1848596.1338277662!originalcarouselimage/1940852674.jpg Senaste nytt från TV4:s lokala station. Visas i tv4 false Senaste inslagen 8 false true false false Alla 1.1848596 Senaste sändningarna 4 true false false false Alla 1.1848596 http://cdn01.tv4.se/polopoly_fs/1.1848605.1319019768!mobileimage/2039426191.jpg http://cdn01.tv4.se/polopoly_fs/1.1848605.1319019768!mobileimage-logo/2039426191.jpg http://cdn01.tv4.se/polopoly_fs/1.1848605.1319019768!mobileimage-highres/1883354642.jpg http://cdn01.tv4.se/polopoly_fs/1.1848605.1319019768!mobileimage-logo-highres/1883354642.jpg http://cdn01.tv4.se/polopoly_fs/1.1848605.1319019768!originallogoimage/1532395979.png http://cdn01.tv4.se/polopoly_fs/1.1848605.1319019768!originalformatimage/467795819.jpg http://cdn01.tv4.se/polopoly_fs/1.1848605.1319019768!originalcarouselimage/77584456.jpg Senaste nytt från TV4:s lokala station. Visas i tv4 false Senaste inslagen 8 false true false false Alla 1.1848605 Senaste sändningarna 4 true false false false Alla 1.1848605 http://cdn01.tv4.se/polopoly_fs/1.1848610.1319019781!mobileimage/3388538377.jpg http://cdn01.tv4.se/polopoly_fs/1.1848610.1319019781!mobileimage-logo/3388538377.jpg http://cdn01.tv4.se/polopoly_fs/1.1848610.1319019781!mobileimage-highres/1602556847.jpg http://cdn01.tv4.se/polopoly_fs/1.1848610.1319019781!mobileimage-logo-highres/1602556847.jpg http://cdn01.tv4.se/polopoly_fs/1.1848610.1319019781!originallogoimage/1360485053.png http://cdn01.tv4.se/polopoly_fs/1.1848610.1319019781!originalformatimage/1547797947.jpg http://cdn01.tv4.se/polopoly_fs/1.1848610.1319019781!originalcarouselimage/218254376.jpg Senaste nytt från TV4:s lokala station. Visas i tv4 false Senaste inslagen 8 false true false false Alla 1.1848610 Senaste sändningarna 4 true false false false Alla 1.1848610 http://cdn01.tv4.se/polopoly_fs/1.1848690.1319019789!mobileimage/1161338519.jpg http://cdn01.tv4.se/polopoly_fs/1.1848690.1319019789!mobileimage-logo/1161338519.jpg http://cdn01.tv4.se/polopoly_fs/1.1848690.1319019789!mobileimage-highres/783446400.jpg http://cdn01.tv4.se/polopoly_fs/1.1848690.1319019789!mobileimage-logo-highres/783446400.jpg http://cdn01.tv4.se/polopoly_fs/1.1848690.1319019789!originallogoimage/85645795.png http://cdn01.tv4.se/polopoly_fs/1.1848690.1319019789!originalformatimage/1629596683.jpg http://cdn01.tv4.se/polopoly_fs/1.1848690.1319019789!originalcarouselimage/3444347879.jpg Senaste nytt från TV4:s lokala station. Visas i tv4 false Senaste inslagen 8 false true false false Alla 1.1848690 Senaste sändningarna 4 true false false false Alla 1.1848690 http://cdn01.tv4.se/polopoly_fs/1.1848694.1319019797!mobileimage/169753991.jpg http://cdn01.tv4.se/polopoly_fs/1.1848694.1319019797!mobileimage-logo/169753991.jpg http://cdn01.tv4.se/polopoly_fs/1.1848694.1319019797!mobileimage-highres/3236200439.jpg http://cdn01.tv4.se/polopoly_fs/1.1848694.1319019797!mobileimage-logo-highres/3236200439.jpg http://cdn01.tv4.se/polopoly_fs/1.1848694.1319019797!originallogoimage/943977342.png http://cdn01.tv4.se/polopoly_fs/1.1848694.1319019797!originalformatimage/3540086811.jpg http://cdn01.tv4.se/polopoly_fs/1.1848694.1319019797!originalcarouselimage/1985107022.jpg Senaste nytt från TV4:s lokala station. Visas i tv4 false Senaste inslagen 8 false true false false Alla 1.1848694 Senaste sändningarna 4 true false false false Alla 1.1848694 http://cdn01.tv4.se/polopoly_fs/1.1848702.1319019821!mobileimage/3723464595.jpg http://cdn01.tv4.se/polopoly_fs/1.1848702.1319019821!mobileimage-logo/3723464595.jpg http://cdn01.tv4.se/polopoly_fs/1.1848702.1319019821!mobileimage-highres/408193179.jpg http://cdn01.tv4.se/polopoly_fs/1.1848702.1319019821!mobileimage-logo-highres/408193179.jpg http://cdn01.tv4.se/polopoly_fs/1.1848702.1319019821!originallogoimage/1681970930.png http://cdn01.tv4.se/polopoly_fs/1.1848702.1319019821!originalformatimage/3999357355.jpg http://cdn01.tv4.se/polopoly_fs/1.1848702.1319019821!originalcarouselimage/2209147201.jpg Senaste nytt från TV4:s lokala station. Visas i tv4 false Senaste inslagen 8 false true false false Alla 1.1848702 Senaste sändningarna 4 true false false false Alla 1.1848702 http://cdn01.tv4.se/polopoly_fs/1.1848714.1319019828!mobileimage/3878932978.jpg http://cdn01.tv4.se/polopoly_fs/1.1848714.1319019828!mobileimage-logo/3878932978.jpg http://cdn01.tv4.se/polopoly_fs/1.1848714.1319019828!mobileimage-highres/442847285.jpg http://cdn01.tv4.se/polopoly_fs/1.1848714.1319019828!mobileimage-logo-highres/442847285.jpg http://cdn01.tv4.se/polopoly_fs/1.1848714.1319019828!originallogoimage/2874649919.png http://cdn01.tv4.se/polopoly_fs/1.1848714.1319019828!originalformatimage/2848007035.jpg http://cdn01.tv4.se/polopoly_fs/1.1848714.1319019828!originalcarouselimage/1953529095.jpg Senaste nytt från TV4:s lokala station. Visas i tv4 false Senaste inslagen 8 false true false false Alla 1.1848714 Senaste sändningarna 4 true false false false Alla 1.1848714 http://cdn01.tv4.se/polopoly_fs/1.1848717.1319019848!mobileimage/1079666527.jpg http://cdn01.tv4.se/polopoly_fs/1.1848717.1319019848!mobileimage-logo/1079666527.jpg http://cdn01.tv4.se/polopoly_fs/1.1848717.1319019848!mobileimage-highres/1357114378.jpg http://cdn01.tv4.se/polopoly_fs/1.1848717.1319019848!mobileimage-logo-highres/1357114378.jpg http://cdn01.tv4.se/polopoly_fs/1.1848717.1319019848!originallogoimage/14070900.png http://cdn01.tv4.se/polopoly_fs/1.1848717.1319019848!originalformatimage/2493582027.jpg http://cdn01.tv4.se/polopoly_fs/1.1848717.1319019848!originalcarouselimage/1208936878.jpg Senaste nytt från TV4:s lokala station. Visas i tv4 false Senaste inslagen 8 false true false false Alla 1.1848717 Senaste sändningarna 4 true false false false Alla 1.1848717 http://cdn01.tv4.se/polopoly_fs/1.1848719.1319019858!mobileimage/3789234382.jpg http://cdn01.tv4.se/polopoly_fs/1.1848719.1319019858!mobileimage-logo/3789234382.jpg http://cdn01.tv4.se/polopoly_fs/1.1848719.1319019858!mobileimage-highres/2618942747.jpg http://cdn01.tv4.se/polopoly_fs/1.1848719.1319019858!mobileimage-logo-highres/2618942747.jpg http://cdn01.tv4.se/polopoly_fs/1.1848719.1319019858!originallogoimage/2503014524.png http://cdn01.tv4.se/polopoly_fs/1.1848719.1319019858!originalformatimage/384933146.jpg http://cdn01.tv4.se/polopoly_fs/1.1848719.1319019858!originalcarouselimage/1859958362.jpg Senaste nytt från TV4:s lokala station. Visas i tv4 false Senaste inslagen 8 false true false false Alla 1.1873271,1.1873270,1.1848719 Senaste sändningarna 4 true false false false Alla 1.1848719 http://cdn01.tv4.se/polopoly_fs/1.1848721.1319019865!mobileimage/2995242059.jpg http://cdn01.tv4.se/polopoly_fs/1.1848721.1319019865!mobileimage-logo/2995242059.jpg http://cdn01.tv4.se/polopoly_fs/1.1848721.1319019865!mobileimage-highres/1065244527.jpg http://cdn01.tv4.se/polopoly_fs/1.1848721.1319019865!mobileimage-logo-highres/1065244527.jpg http://cdn01.tv4.se/polopoly_fs/1.1848721.1319019865!originallogoimage/508813581.png http://cdn01.tv4.se/polopoly_fs/1.1848721.1319019865!originalformatimage/730969258.jpg http://cdn01.tv4.se/polopoly_fs/1.1848721.1319019865!originalcarouselimage/4119696963.jpg Senaste nytt från TV4:s lokala station. Visas i tv4 false Senaste inslagen 8 false true false false Alla 1.1848721 Senaste sändningarna 4 true false false false Alla 1.1848721 http://cdn01.tv4.se/polopoly_fs/1.1848725.1319019873!mobileimage/1571554910.jpg http://cdn01.tv4.se/polopoly_fs/1.1848725.1319019873!mobileimage-logo/1571554910.jpg http://cdn01.tv4.se/polopoly_fs/1.1848725.1319019873!mobileimage-highres/991747246.jpg http://cdn01.tv4.se/polopoly_fs/1.1848725.1319019873!mobileimage-logo-highres/991747246.jpg http://cdn01.tv4.se/polopoly_fs/1.1848725.1319019873!originallogoimage/459088114.png http://cdn01.tv4.se/polopoly_fs/1.1848725.1319019873!originalformatimage/2685772917.jpg http://cdn01.tv4.se/polopoly_fs/1.1848725.1319019873!originalcarouselimage/2930187222.jpg Senaste nytt från TV4:s lokala station. Visas i tv4 false Senaste inslagen 8 false true false false Alla 1.1848725 Senaste sändningarna 4 true false false false Alla 1.1848725 http://cdn01.tv4.se/polopoly_fs/1.1848727.1319019887!mobileimage/1446209208.jpg http://cdn01.tv4.se/polopoly_fs/1.1848727.1319019887!mobileimage-logo/1446209208.jpg http://cdn01.tv4.se/polopoly_fs/1.1848727.1319019887!mobileimage-highres/2167671541.jpg http://cdn01.tv4.se/polopoly_fs/1.1848727.1319019887!mobileimage-logo-highres/2167671541.jpg http://cdn01.tv4.se/polopoly_fs/1.1848727.1319019887!originallogoimage/3612336292.png http://cdn01.tv4.se/polopoly_fs/1.1848727.1319019887!originalformatimage/2641726917.jpg http://cdn01.tv4.se/polopoly_fs/1.1848727.1319019887!originalcarouselimage/2493141606.jpg Senaste nytt från TV4:s lokala station. Visas i tv4 false Senaste inslagen 8 false true false false Alla 1.1848727 Senaste sändningarna 4 true false false false Alla 1.1848727 http://cdn01.tv4.se/polopoly_fs/1.1848732.1319019897!mobileimage/770684020.jpg http://cdn01.tv4.se/polopoly_fs/1.1848732.1319019897!mobileimage-logo/770684020.jpg http://cdn01.tv4.se/polopoly_fs/1.1848732.1319019897!mobileimage-highres/2700950885.jpg http://cdn01.tv4.se/polopoly_fs/1.1848732.1319019897!mobileimage-logo-highres/2700950885.jpg http://cdn01.tv4.se/polopoly_fs/1.1848732.1319019897!originallogoimage/3325892976.png http://cdn01.tv4.se/polopoly_fs/1.1848732.1319019897!originalformatimage/2335838613.jpg http://cdn01.tv4.se/polopoly_fs/1.1848732.1319019897!originalcarouselimage/2469247740.jpg Senaste nytt från TV4:s lokala station. Visas i tv4 false Senaste inslagen 8 false true false false Alla 1.1848732 Senaste sändningarna 4 true false false false Alla 1.1848732 http://cdn01.tv4.se/polopoly_fs/1.1848734.1319019907!mobileimage/3845031034.jpg http://cdn01.tv4.se/polopoly_fs/1.1848734.1319019907!mobileimage-logo/3845031034.jpg http://cdn01.tv4.se/polopoly_fs/1.1848734.1319019907!mobileimage-highres/2893947021.jpg http://cdn01.tv4.se/polopoly_fs/1.1848734.1319019907!mobileimage-logo-highres/2893947021.jpg http://cdn01.tv4.se/polopoly_fs/1.1848734.1319019907!originallogoimage/661254109.png http://cdn01.tv4.se/polopoly_fs/1.1848734.1319019907!originalformatimage/3671455509.jpg http://cdn01.tv4.se/polopoly_fs/1.1848734.1319019907!originalcarouselimage/2722101601.jpg Senaste nytt från TV4:s lokala station. Visas i tv4 false Senaste inslag 8 false true false false 1.1848734 Senaste sändningar 4 true false false false 1.1848734 http://cdn01.tv4.se/polopoly_fs/1.1848736.1319019914!mobileimage/1369978483.jpg http://cdn01.tv4.se/polopoly_fs/1.1848736.1319019914!mobileimage-logo/1369978483.jpg http://cdn01.tv4.se/polopoly_fs/1.1848736.1319019914!mobileimage-highres/3141200971.jpg http://cdn01.tv4.se/polopoly_fs/1.1848736.1319019914!mobileimage-logo-highres/3141200971.jpg http://cdn01.tv4.se/polopoly_fs/1.1848736.1319019914!originallogoimage/4293590038.png http://cdn01.tv4.se/polopoly_fs/1.1848736.1319019914!originalformatimage/1435828917.jpg http://cdn01.tv4.se/polopoly_fs/1.1848736.1319019914!originalcarouselimage/489091393.jpg Senaste nytt från TV4:s lokala station. Visas i tv4 false Senaste inslagen 8 false true false false Alla 1.1848736 Senaste sändningarna 4 true false false false Alla 1.1848736 http://cdn01.tv4.se/polopoly_fs/1.1848741.1319019922!mobileimage/3011325866.jpg http://cdn01.tv4.se/polopoly_fs/1.1848741.1319019922!mobileimage-logo/3011325866.jpg http://cdn01.tv4.se/polopoly_fs/1.1848741.1319019922!mobileimage-highres/80847977.jpg http://cdn01.tv4.se/polopoly_fs/1.1848741.1319019922!mobileimage-logo-highres/80847977.jpg http://cdn01.tv4.se/polopoly_fs/1.1848741.1319019922!originallogoimage/3939680435.png http://cdn01.tv4.se/polopoly_fs/1.1848741.1319019922!originalformatimage/1760897797.jpg http://cdn01.tv4.se/polopoly_fs/1.1848741.1319019922!originalcarouselimage/3280148912.jpg Senaste nytt från TV4:s lokala station. Visas i tv4 false Senaste inslagen 8 false true false false Alla 1.1848741 Senaste sändningarna 4 true false false false Alla 1.1848741 http://cdn01.tv4.se/polopoly_fs/1.1855882.1327335253!mobileimage/2004320068.jpg http://cdn01.tv4.se/polopoly_fs/1.1855882.1327335253!mobileimage-logo/2818732666.png http://cdn01.tv4.se/polopoly_fs/1.1855882.1327335253!mobileimage-large/1037443042.jpg http://cdn01.tv4.se/polopoly_fs/1.1855882.1327335253!mobileimage-highres/1350373957.jpg http://cdn01.tv4.se/polopoly_fs/1.1855882.1327335253!mobileimage-logo-highres/2701289610.png http://cdn01.tv4.se/polopoly_fs/1.1855882.1327335253!mobileimage-large-highres/886441234.jpg Nyheter dygnet runt på webben. tv4 http://nyhetskanalen.se false http://cdn01.tv4.se/polopoly_fs/1.1855882.1327335253!image/361871040.jpg http://cdn01.tv4.se/polopoly_fs/1.1855882.1327335253!smallformatimage/2286575730.jpg http://cdn01.tv4.se/polopoly_fs/1.1855882.1327335253!categorylarge/3836914217.jpg http://cdn01.tv4.se/polopoly_fs/1.1855882.1327335253!image-large/1246240799.jpg http://cdn01.tv4.se/polopoly_fs/1.1855882.1327335253!image-logo/2125785215.png http://cdn01.tv4.se/polopoly_fs/1.1855882.1327335253!small-image-logo/168244015.png Senaste radionyheterna 4 true true true false Alla 1.2623217 Program - Dokumentärer 30 false Alla 1.1984974,1.1955544,1.1955529,1.2473115,1.1955529,1.1955522,1.1973474,1.1955529,1.1955529,1.2159840,1.1955529,1.1848699,1.1955529,1.1963182,1.2070213,1.2082526,1.1963171,1.1968367 1.1848699,1.1965484,1.2361258,1.1981625,1.1981543,1.1981550,1.1981524,1.1981534,1.2437873,1.1837607,1.1963195,1.1965542,1.2151061,1.1963229,1.2002727,1.1965713,1.1965516,1.2550922,1.2615840,1.1915491,1.2452689,1.2161481,1.2527876,1.1965494,1.2001393,1.2491463,1.1965523,1.2271871,1.2172863,1.1973493 1.1959920,1.1959927,1.1981839,1.1981835,1.1981581,1.1965573,1.1965664,1.1981519,1.1854520,1.2486341,1.1968482,1.1965584,1.2070124,1.1833796,1.1973168,1.1973152,1.1965613,1.2588900,1.2588849,1.2027277,1.1965625,1.2174923,1.1959890,1.1973138,1.1968469,1.2063725,1.1848699,1.1968480,1.2473495,1.2624242,1.1973196,1.1973316,1.2268354,1.1973512,1.2256101,1.2239210,1.1968495,1.1968388,1.1968508,1.2257308,1.1980389,1.2008590,1.2239238,1.2341194,1.1968484,1.1965594,1.2290344,1.2293959,1.2287197,1.2030572,1.1983487 1.2550922,1.1968501,1.2361258,1.2573609,1.1968501,1.1968501,1.1968501,1.1968501,1.1968501,1.2488522,1.1968501,1.1968501,1.1968501,1.2358826,1.1968501,1.1973518,1.2161418,1.2039629,1.1969816,1.1973512,1.1965695,1.1973322,1.1978203,1.1968501,1.1848699,1.1968501,1.2496859,1.1968501,1.2047721,1.2161481,1.1968373,1.2496855,1.1981637,1.2113830,1.1915482,1.1968501 1.1968456,1.2185960,1.2290379,1.2161491,1.2150391,1.1973612,1.2358748,1.1973561,1.1965798 1.1959899,1.1959894,1.1968254,1.1959887,1.2172863,1.2301959,1.1968516,1.1965629,1.1968511,1.2457570,1.2473115,1.2063725,1.1854778,1.1848699,1.2102834,1.1968476,1.1959897,1.1968396,1.1973649,1.1973474 1.1959903,1.2624242,1.1981568,1.1845430,1.2293959,1.2266615,1.1968484 1.1968434,1.1981617,1.1968426,1.1973625,1.2012853,1.1968401,1.1848699,1.2452689,1.2581108,1.2473495,1.2681630,1.1981565,1.1965494,1.2027277,1.2361258,1.2530679,1.2488522,1.2138346,1.2030572,1.1973481 false http://cdn01.tv4.se/polopoly_fs/1.2242004.1341213165!image/298177630.jpg https://www.tv4play.se/order/produkter?redirect_url=%2F%3F&promo=fiskpinnen&product_group_id=7 Senast tillagt inom Dokumentärer 4 true true true false Alla 1.2063725,1.2544107,1.2301959,1.2496859,1.2668676,1.2437873,1.2496855,1.2588849,1.1973474,1.2615840,1.2530679,1.2486341,1.2588900,1.2527876,1.2457570,1.2681630,1.1854778,1.2624242,1.1848699 http://cdn01.tv4.se/polopoly_fs/1.2681630.1342777517!originallogoimage/280482415.png http://cdn01.tv4.se/polopoly_fs/1.2681630.1342777517!originalformatimage/2237969211.jpg http://cdn01.tv4.se/polopoly_fs/1.2681630.1342777517!originalcarouselimage/1814924931.jpg Hem till Tyringe skildrar vardagen i en helt vanlig sydsvensk småstad. Ortsbefolkningen bjuder av sin vardag med både glädje och motgångar. Visas i tv4 false Hela program 12 true false false false Alla 1.2681630 Klipp 12 false true false false Alla 1.2686468 Senast tillagt inom Dokumentärer 4 true true true false Alla 1.2063725,1.2544107,1.2301959,1.2496859,1.2668676,1.2437873,1.2496855,1.2588849,1.1973474,1.2615840,1.2530679,1.2486341,1.2588900,1.2527876,1.2457570,1.2681630,1.1854778,1.2624242,1.1848699 http://cdn01.tv4.se/polopoly_fs/1.2491463.1337599074!originallogoimage/3688960676.png http://cdn01.tv4.se/polopoly_fs/1.2491463.1337599074!originalformatimage/1505883340.jpg http://cdn01.tv4.se/polopoly_fs/1.2491463.1337599074!originalcarouselimage/3244419385.jpg Nutritionisten Nathalie Savona och psykologicoachen Benjamin Fry tar sig an sju personer som alla har extrema problem med maten. SE 115.111.227.14 115.111.227.6 25.19.39.117 210.94.41.89 217.67.201.237 217.67.201.162;SE 115.111.227.14 115.111.227.6 25.19.39.117 210.94.41.89 217.67.201.237 217.67.201.162;SE tv4 false Hela program 12 true false false false Alla 1.2491463 Senast tillagt inom Dokumentärer 4 true true true false Alla 1.2063725,1.2544107,1.2301959,1.2496859,1.2668676,1.2437873,1.2496855,1.2588849,1.1973474,1.2615840,1.2530679,1.2486341,1.2588900,1.2527876,1.2457570,1.2681630,1.1854778,1.2624242,1.1848699 http://cdn01.tv4.se/polopoly_fs/1.2581108.1338821988!originallogoimage/2629708162.png http://cdn01.tv4.se/polopoly_fs/1.2581108.1338821988!originalformatimage/513724394.jpg http://cdn01.tv4.se/polopoly_fs/1.2581108.1338821988!originalcarouselimage/1732243044.png Svensk dokumentärserie från 2011 i åtta avsnitt som handlar om sex glada och lite dementa pensionärer på äldreboendet Distansgatan. SE 115.111.227.14 115.111.227.6 25.19.39.117 210.94.41.89 217.67.201.237 217.67.201.162;SE;SE 115.111.227.14 115.111.227.6 25.19.39.117 210.94.41.89 217.67.201.237 217.67.201.162 Visas i tv4 false Hela program 12 true false false false Alla 1.2581108 Senast tillagt inom Dokumentärer 4 true true true false Alla 1.2063725,1.2544107,1.2301959,1.2496859,1.2668676,1.2437873,1.2496855,1.2588849,1.1973474,1.2615840,1.2530679,1.2486341,1.2588900,1.2527876,1.2457570,1.2681630,1.1854778,1.2624242,1.1848699 http://cdn01.tv4.se/polopoly_fs/1.2361258.1342767975!originallogoimage/3042905905.png http://cdn01.tv4.se/polopoly_fs/1.2361258.1342767975!originalformatimage/173289941.jpg http://cdn01.tv4.se/polopoly_fs/1.2361258.1342767975!originalcarouselimage/1794304423.jpg Extremt överviktiga personer får hjälp att förändra sina vanor och gå ner i vikt. SE;SE 115.111.227.14 115.111.227.6 25.19.39.117 210.94.41.89 217.67.201.237 217.67.201.162;SE 115.111.227.14 115.111.227.6 25.19.39.117 210.94.41.89 217.67.201.237 217.67.201.162 visas i tv4 false Hela program 12 true false false false Alla 1.2361258 Senast tillagt inom Dokumentärer 4 true true true false Alla 1.2063725,1.2544107,1.2301959,1.2496859,1.2668676,1.2437873,1.2496855,1.2588849,1.1973474,1.2615840,1.2530679,1.2486341,1.2588900,1.2527876,1.2457570,1.2681630,1.1854778,1.2624242,1.1848699 http://cdn01.tv4.se/polopoly_fs/1.2573609.1336726532!originallogoimage/2455733275.png http://cdn01.tv4.se/polopoly_fs/1.2573609.1336726532!originalformatimage/695473711.jpg http://cdn01.tv4.se/polopoly_fs/1.2573609.1336726532!originalcarouselimage/599390126.jpg Serien följer par som precis ska föda barn, vilket för många blir en omvälvande resa både fysiskt och psykiskt. SE;SE 115.111.227.14 115.111.227.6 25.19.39.117 210.94.41.89 217.67.201.237 217.67.201.162;SE 115.111.227.14 115.111.227.6 25.19.39.117 210.94.41.89 217.67.201.237 217.67.201.162 Visas i sjuan false Hela program 12 true false false false Alla 1.2573609 Senast tillagt inom Dokumentärer 4 true true true false Alla 1.2063725,1.2544107,1.2301959,1.2496859,1.2668676,1.2437873,1.2496855,1.2588849,1.1973474,1.2615840,1.2530679,1.2486341,1.2588900,1.2527876,1.2457570,1.2681630,1.1854778,1.2624242,1.1848699 http://cdn01.tv4.se/polopoly_fs/1.2624242.1336726598!originallogoimage/1092968892.png http://cdn01.tv4.se/polopoly_fs/1.2624242.1336726598!originalformatimage/1772505497.jpg http://cdn01.tv4.se/polopoly_fs/1.2624242.1336726598!originalcarouselimage/1401458271.jpg Medierna Jackie Dennison och Alison Wynne-Rider besöker hem som misstänks vara hemsökta av andar och spöken. SE 115.111.227.14 115.111.227.6 25.19.39.117 210.94.41.89 217.67.201.237 217.67.201.162;SE 115.111.227.14 115.111.227.6 25.19.39.117 210.94.41.89 217.67.201.237 217.67.201.162;SE sjuan false Hela program 12 true false false false Alla 1.2624242 Senast tillagt inom Dokumentärer 4 true true true false Alla 1.2063725,1.2544107,1.2301959,1.2496859,1.2668676,1.2437873,1.2496855,1.2588849,1.1973474,1.2615840,1.2530679,1.2486341,1.2588900,1.2527876,1.2457570,1.2681630,1.1854778,1.2624242,1.1848699 http://cdn01.tv4.se/polopoly_fs/1.2668676.1343719652!originallogoimage/832366323.png http://cdn01.tv4.se/polopoly_fs/1.2668676.1343719652!originalformatimage/3015442587.jpg http://cdn01.tv4.se/polopoly_fs/1.2668676.1343719652!originalcarouselimage/723262830.jpg Här får människor hjälp att hitta försvunna familjemedlemmar. SE;SE;SE Visas i sjuan true Hela program 12 true false false false Alla 1.2668679 Sju kändisar som fastnat i drogmissbruk följs i kampen mot sitt destruktiva beteende. Platsen är rehabiliteringskliniken Passages i Kalifornien. SE 115.111.227.14 115.111.227.6 25.19.39.117 210.94.41.89 217.67.201.237 217.67.201.162;SE 115.111.227.14 115.111.227.6 25.19.39.117 210.94.41.89 217.67.201.237 217.67.201.162 tv4fakta true http://cdn01.tv4.se/polopoly_fs/1.1965494.1341216443!image/1426235345.jpg http://cdn01.tv4.se/polopoly_fs/1.1965494.1341216443!smallformatimage/1426235345.jpg http://cdn01.tv4.se/polopoly_fs/1.1965494.1341216443!categorylarge/823932614.jpg http://cdn01.tv4.se/polopoly_fs/1.1965494.1341216443!image-large/2021365262.jpg http://cdn01.tv4.se/polopoly_fs/1.1965494.1341216443!image-logo/3234635591.png Hela program 12 true false false true 1.1971987 Senast tillagt inom Dokumentärer 4 true true true false Alla 1.2063725,1.2544107,1.2301959,1.2496859,1.2668676,1.2437873,1.2496855,1.2588849,1.1973474,1.2615840,1.2530679,1.2486341,1.2588900,1.2527876,1.2457570,1.2681630,1.1854778,1.2624242,1.1848699 http://cdn01.tv4.se/polopoly_fs/1.1848699.1336726701!originallogoimage/2516268721.png http://cdn01.tv4.se/polopoly_fs/1.1848699.1336726701!originalformatimage/400281817.jpg http://cdn01.tv4.se/polopoly_fs/1.1848699.1336726701!originalcarouselimage/2407255340.jpg Svenska och internationella dokumentärfilmer om olika ämnen. SE;SE 115.111.227.14 115.111.227.6 25.19.39.117 210.94.41.89 217.67.201.237 217.67.201.162;SE 115.111.227.14 115.111.227.6 25.19.39.117 210.94.41.89 217.67.201.237 217.67.201.162 tv4 true http://cdn01.tv4.se/polopoly_fs/1.1848699.1336726701!image/2875839407.jpg http://cdn01.tv4.se/polopoly_fs/1.1848699.1336726701!smallformatimage/2904821116.jpg http://cdn01.tv4.se/polopoly_fs/1.1848699.1336726701!categorylarge/3252471591.jpg http://cdn01.tv4.se/polopoly_fs/1.1848699.1336726701!image-logo/1900813988.png Hela program 12 true false true false Alla 1.2044300,1.1848699,1.2044332,1.2044318,1.2044315,1.2044304,1.2044345,1.2044338 Senast tillagt inom Dokumentärer 4 true true true false Alla 1.2063725,1.2544107,1.2301959,1.2496859,1.2668676,1.2437873,1.2496855,1.2588849,1.1973474,1.2615840,1.2530679,1.2486341,1.2588900,1.2527876,1.2457570,1.2681630,1.1854778,1.2624242,1.1848699 http://cdn01.tv4.se/polopoly_fs/1.2473495.1336726763!originallogoimage/1030557766.png http://cdn01.tv4.se/polopoly_fs/1.2473495.1336726763!originalformatimage/1235836174.jpg http://cdn01.tv4.se/polopoly_fs/1.2473495.1336726763!originalcarouselimage/200167443.jpg Om människor som kämpar med ovanliga missbruk som hotar att ta över deras liv. SE 115.111.227.14 115.111.227.6 25.19.39.117 210.94.41.89 217.67.201.237 217.67.201.162;SE 115.111.227.14 115.111.227.6 25.19.39.117 210.94.41.89 217.67.201.237 217.67.201.162;SE visas i tv4 true Hela program 12 true false false false Alla 1.2473495 Senast tillagt inom Dokumentärer 4 true true true false Alla 1.2063725,1.2544107,1.2301959,1.2496859,1.2668676,1.2437873,1.2496855,1.2588849,1.1973474,1.2615840,1.2530679,1.2486341,1.2588900,1.2527876,1.2457570,1.2681630,1.1854778,1.2624242,1.1848699 http://cdn01.tv4.se/polopoly_fs/1.1854778.1336726852!mobileimage/826284658.jpg http://cdn01.tv4.se/polopoly_fs/1.1854778.1336726852!mobileimage-logo/3588534191.png http://cdn01.tv4.se/polopoly_fs/1.1854778.1336726852!mobileimage-large/3188262326.jpg http://cdn01.tv4.se/polopoly_fs/1.1854778.1336726852!mobileimage-highres/294694795.jpg http://cdn01.tv4.se/polopoly_fs/1.1854778.1336726852!mobileimage-logo-highres/2846716842.png http://cdn01.tv4.se/polopoly_fs/1.1854778.1336726852!mobileimage-large-highres/3259029939.jpg http://cdn01.tv4.se/polopoly_fs/1.1854778.1336726852!originallogoimage/2888980701.png http://cdn01.tv4.se/polopoly_fs/1.1854778.1336726852!originalformatimage/332120747.jpg http://cdn01.tv4.se/polopoly_fs/1.1854778.1336726852!originalcarouselimage/1221041364.jpg Följ brandmän, ambulanspersonal och poliser i deras dagliga arbete som är fyllt av dramatik i båda stort och smått. Visas i tv4plus true Hela program 8 true true false true Alla 1.1854781 Senast tillagt inom Dokumentärer 4 true true true false Alla 1.2063725,1.2544107,1.2301959,1.2496859,1.2668676,1.2437873,1.2496855,1.2588849,1.1973474,1.2615840,1.2530679,1.2486341,1.2588900,1.2527876,1.2457570,1.2681630,1.1854778,1.2624242,1.1848699 http://cdn01.tv4.se/polopoly_fs/1.1959903.1337865031!originallogoimage/2844990292.png http://cdn01.tv4.se/polopoly_fs/1.1959903.1337865031!originalformatimage/545984535.jpg http://cdn01.tv4.se/polopoly_fs/1.1959903.1337865031!originalcarouselimage/447076305.jpg Spökjägaren Zak Bagans och hans medhjälpare jagar spöken på några av världens ondaste platser, som gamla slakthus och mentalsjukhus. SE Visas i tv4fakta true http://cdn01.tv4.se/polopoly_fs/1.1959903.1337865031!image/979697861.jpg http://cdn01.tv4.se/polopoly_fs/1.1959903.1337865031!smallformatimage/1013544507.jpg http://cdn01.tv4.se/polopoly_fs/1.1959903.1337865031!categorylarge/2241308968.jpg http://cdn01.tv4.se/polopoly_fs/1.1959903.1337865031!image-large/31915161.jpg http://cdn01.tv4.se/polopoly_fs/1.1959903.1337865031!image-logo/4274002942.png Hela program 12 true false false false 1.1971962 Senast tillagt inom Dokumentärer 4 true true true false Alla 1.2063725,1.2544107,1.2301959,1.2496859,1.2668676,1.2437873,1.2496855,1.2588849,1.1973474,1.2615840,1.2530679,1.2486341,1.2588900,1.2527876,1.2457570,1.2681630,1.1854778,1.2624242,1.1848699 http://cdn01.tv4.se/polopoly_fs/1.2527876.1336727470!originallogoimage/684795722.png http://cdn01.tv4.se/polopoly_fs/1.2527876.1336727470!originalformatimage/4107892052.jpg http://cdn01.tv4.se/polopoly_fs/1.2527876.1336727470!originalcarouselimage/1544092423.jpg För personalen på det danska sjukhuset Hillerød är glädje och sorg, liv och död, en del av den hektiska vardagen. SE;SE 115.111.227.14 115.111.227.6 25.19.39.117 210.94.41.89 217.67.201.237 217.67.201.162 Visas i tv4fakta true Hela program 12 true false false false Alla 1.2527876 Senast tillagt inom Dokumentärer 4 true true true false Alla 1.2063725,1.2544107,1.2301959,1.2496859,1.2668676,1.2437873,1.2496855,1.2588849,1.1973474,1.2615840,1.2530679,1.2486341,1.2588900,1.2527876,1.2457570,1.2681630,1.1854778,1.2624242,1.1848699 http://cdn01.tv4.se/polopoly_fs/1.2615840.1337275583!originallogoimage/3167293084.png http://cdn01.tv4.se/polopoly_fs/1.2615840.1337275583!originalformatimage/1183056606.jpg http://cdn01.tv4.se/polopoly_fs/1.2615840.1337275583!originalcarouselimage/3004265463.jpg AT-läkarnas vardag innebär ofta dramatiska situationer när de kämpar med att bota sjukdomar och rädda liv. SE;SE 115.111.227.14 115.111.227.6 25.19.39.117 210.94.41.89 217.67.201.237 217.67.201.162 Vi har tyvärr haft problem med tekniken gällande Läkarpraktikanterna del 5, men vi arbetar på att lösa det så fort vi kan. Visas i tv4fakta true Hela program 12 true false false false Alla 1.2615840 http://cdn01.tv4.se/polopoly_fs/1.2588900.1336727665!originallogoimage/3571928102.png http://cdn01.tv4.se/polopoly_fs/1.2588900.1336727665!originalformatimage/138037206.jpg http://cdn01.tv4.se/polopoly_fs/1.2588900.1336727665!originalcarouselimage/1058133993.jpg Somliga gör allt för pengar. De giriga tar upp olika exempel, från de mest raffinerade kupperna till hänsynslösa bedragare. SE;SE 115.111.227.14 115.111.227.6 25.19.39.117 210.94.41.89 217.67.201.237 217.67.201.162 Visas i tv4fakta true Hela program 12 true false false false Alla 1.2588900 Senast tillagt inom Dokumentärer 4 true true true false Alla 1.2063725,1.2544107,1.2301959,1.2496859,1.2668676,1.2437873,1.2496855,1.2588849,1.1973474,1.2615840,1.2530679,1.2486341,1.2588900,1.2527876,1.2457570,1.2681630,1.1854778,1.2624242,1.1848699 http://cdn01.tv4.se/polopoly_fs/1.2588849.1336727783!originallogoimage/3374148101.png http://cdn01.tv4.se/polopoly_fs/1.2588849.1336727783!originalformatimage/860907079.jpg http://cdn01.tv4.se/polopoly_fs/1.2588849.1336727783!originalcarouselimage/595012451.jpg Om kriminella kvinnors sätt att tänka och vara. Serien porträtterar kvinnor som sitter i amerikanska fängelser och som mördat närstående. SE;SE 115.111.227.14 115.111.227.6 25.19.39.117 210.94.41.89 217.67.201.237 217.67.201.162 Visas i tv4fakta true Hela program 12 true false false false Alla 1.2588849 Senast tillagt inom Dokumentärer 4 true true true false Alla 1.2063725,1.2544107,1.2301959,1.2496859,1.2668676,1.2437873,1.2496855,1.2588849,1.1973474,1.2615840,1.2530679,1.2486341,1.2588900,1.2527876,1.2457570,1.2681630,1.1854778,1.2624242,1.1848699 http://cdn01.tv4.se/polopoly_fs/1.2550922.1331049197!originallogoimage/2700329518.png http://cdn01.tv4.se/polopoly_fs/1.2550922.1331049197!originalformatimage/2096861232.jpg http://cdn01.tv4.se/polopoly_fs/1.2550922.1331049197!originalcarouselimage/3559530083.jpg Här avslöjar man den nakna sanningen om att gå ner i vikt med alla fallgroppar som finns. SE 115.111.227.14 115.111.227.6 25.19.39.117 210.94.41.89 217.67.201.237 217.67.201.162;SE;SE 115.111.227.14 115.111.227.6 25.19.39.117 210.94.41.89 217.67.201.237 217.67.201.162 Pga tekniska problem saknas episod 1 & 6. Vi jobbar på att lösa detta så snart som möjligt. Visas i sjuan false Hela program 12 true false false false Alla 1.2550922 Senast tillagt inom Dokumentärer 4 true true true false Alla 1.2063725,1.2544107,1.2301959,1.2496859,1.2668676,1.2437873,1.2496855,1.2588849,1.1973474,1.2615840,1.2530679,1.2486341,1.2588900,1.2527876,1.2457570,1.2681630,1.1854778,1.2624242,1.1848699 http://cdn01.tv4.se/polopoly_fs/1.2488522.1336727988!originallogoimage/122006906.png http://cdn01.tv4.se/polopoly_fs/1.2488522.1336727988!originalformatimage/1937891378.jpg http://cdn01.tv4.se/polopoly_fs/1.2488522.1336727988!originalcarouselimage/835120431.jpg Brittisk dokumentärserie från 2009 som följer välbärgade familjer som hjälper fattiga familjer med ekonomiska bidrag. SE 115.111.227.14 115.111.227.6 25.19.39.117 210.94.41.89 217.67.201.237 217.67.201.162;SE;SE 115.111.227.14 115.111.227.6 25.19.39.117 210.94.41.89 217.67.201.237 217.67.201.162 Visas i sjuan true Hela program 12 true false false false Alla 1.2488524 Senast tillagt inom Dokumentärer 4 true true true false Alla 1.2063725,1.2544107,1.2301959,1.2496859,1.2668676,1.2437873,1.2496855,1.2588849,1.1973474,1.2615840,1.2530679,1.2486341,1.2588900,1.2527876,1.2457570,1.2681630,1.1854778,1.2624242,1.1848699 http://cdn01.tv4.se/polopoly_fs/1.2301959.1336737770!originallogoimage/3726302752.png http://cdn01.tv4.se/polopoly_fs/1.2301959.1336737770!originalformatimage/46650832.jpg http://cdn01.tv4.se/polopoly_fs/1.2301959.1336737770!originalcarouselimage/904676847.jpg Människor som överlevt det osannolika berättar om hur de konfronterats med döden och hur de hittat styrkan att överleva. SE Visas i tv4fakta true Hela program 12 true false false false Alla 1.2301959 Senast tillagt inom Dokumentärer 4 true true true false Alla 1.2063725,1.2544107,1.2301959,1.2496859,1.2668676,1.2437873,1.2496855,1.2588849,1.1973474,1.2615840,1.2530679,1.2486341,1.2588900,1.2527876,1.2457570,1.2681630,1.1854778,1.2624242,1.1848699 http://cdn01.tv4.se/polopoly_fs/1.2544107.1329834335!originallogoimage/1303710214.png http://cdn01.tv4.se/polopoly_fs/1.2544107.1329834335!originalformatimage/2396506121.jpg http://cdn01.tv4.se/polopoly_fs/1.2544107.1329834335!originalcarouselimage/1398273317.jpg Om några av de mest ovanliga brott som begåtts och om hur vetenskap, skicklighet och ibland tur spelat in när brotten fått sin lösning. SE;SE 115.111.227.14 115.111.227.6 25.19.39.117 210.94.41.89 217.67.201.237 217.67.201.162 tv4fakta true Hela program 12 true false false false Alla 1.2544107 Senast tillagt inom Dokumentärer 4 true true true false Alla 1.2063725,1.2544107,1.2301959,1.2496859,1.2668676,1.2437873,1.2496855,1.2588849,1.1973474,1.2615840,1.2530679,1.2486341,1.2588900,1.2527876,1.2457570,1.2681630,1.1854778,1.2624242,1.1848699 http://cdn01.tv4.se/polopoly_fs/1.1978203.1329830974!mobileimage/2456779936.jpg http://cdn01.tv4.se/polopoly_fs/1.1978203.1329830974!mobileimage-large/3093621539.jpg http://cdn01.tv4.se/polopoly_fs/1.1978203.1329830974!mobileimage-highres/4804875.jpg http://cdn01.tv4.se/polopoly_fs/1.1978203.1329830974!mobileimage-large-highres/2887520799.jpg Familjen Hughs i Storbritannien har låtit ett filmteam följa dem under fyra månader dygnet runt. Programmen ger en närgången inblick i familjens liv. SE 115.111.227.14 115.111.227.6 25.19.39.117 210.94.41.89 217.67.201.237 217.67.201.162;SE 115.111.227.14 115.111.227.6 25.19.39.117 210.94.41.89 217.67.201.237 217.67.201.162 Lördagar 14:00 tv4plus false http://cdn01.tv4.se/polopoly_fs/1.1978203.1329830974!image/969759060.jpg http://cdn01.tv4.se/polopoly_fs/1.1978203.1329830974!smallformatimage/3755808458.jpg http://cdn01.tv4.se/polopoly_fs/1.1978203.1329830974!categorylarge/3427230864.jpg http://cdn01.tv4.se/polopoly_fs/1.1978203.1329830974!image-large/879425382.jpg http://cdn01.tv4.se/polopoly_fs/1.1978203.1329830974!image-logo/1235777226.png Hela program 4 true false false true 1.1978203 Senast tillagt inom Dokumentärer 4 true true true false Alla 1.2063725,1.2544107,1.2301959,1.2496859,1.2668676,1.2437873,1.2496855,1.2588849,1.1973474,1.2615840,1.2530679,1.2486341,1.2588900,1.2527876,1.2457570,1.2681630,1.1854778,1.2624242,1.1848699 http://cdn01.tv4.se/polopoly_fs/1.2457570.1329831015!originallogoimage/3490983780.png http://cdn01.tv4.se/polopoly_fs/1.2457570.1329831015!originalformatimage/2132002320.jpg http://cdn01.tv4.se/polopoly_fs/1.2457570.1329831015!originalcarouselimage/2992398494.jpg Här berättar människor som hamnat i farliga situationer om hur de lyckades överleva. Genom intervjuer och dramatiserade förlopp ges en bild av hur deras agerande höll dem vid liv. SE 115.111.227.14 115.111.227.6 25.19.39.117 210.94.41.89 217.67.201.237 217.67.201.162;SE;SE 115.111.227.14 115.111.227.6 25.19.39.117 210.94.41.89 217.67.201.237 217.67.201.162 visas i tv4 false Hela program 12 true false false false Alla 1.2457570 Senast tillagt inom Dokumentärer 4 true true true false Alla 1.2063725,1.2544107,1.2301959,1.2496859,1.2668676,1.2437873,1.2496855,1.2588849,1.1973474,1.2615840,1.2530679,1.2486341,1.2588900,1.2527876,1.2457570,1.2681630,1.1854778,1.2624242,1.1848699 http://cdn01.tv4.se/polopoly_fs/1.2452689.1329830963!originallogoimage/3540490930.png http://cdn01.tv4.se/polopoly_fs/1.2452689.1329830963!originalformatimage/4219777687.jpg http://cdn01.tv4.se/polopoly_fs/1.2452689.1329830963!originalcarouselimage/3249173841.jpg Personer med kraftig övervikt hamnar ofta i en ond cirkel där deras syn på livet kan kännas hopplös. Här får de hjälp av experter att ändra sitt synsätt och att gå ner i vikt. SE;SE 115.111.227.14 115.111.227.6 25.19.39.117 210.94.41.89 217.67.201.237 217.67.201.162 Visas i tv4 false Hela program 12 true false false false Alla 1.2452689 Senast tillagt inom Dokumentärer 4 true true true false Alla 1.2063725,1.2544107,1.2301959,1.2496859,1.2668676,1.2437873,1.2496855,1.2588849,1.1973474,1.2615840,1.2530679,1.2486341,1.2588900,1.2527876,1.2457570,1.2681630,1.1854778,1.2624242,1.1848699 http://cdn01.tv4.se/polopoly_fs/1.2496859.1342777748!originallogoimage/1086967196.png http://cdn01.tv4.se/polopoly_fs/1.2496859.1342777748!originalformatimage/3982296923.jpg http://cdn01.tv4.se/polopoly_fs/1.2496859.1342777748!originalcarouselimage/2349137252.jpg Modellen Katie Piper fick ansiktet förstört i en syraattack. Nu möter hon andra som gått igenom trauman och försöker hjälpa dem. SE 115.111.227.14 115.111.227.6 25.19.39.117 210.94.41.89 217.67.201.237 217.67.201.162;SE 115.111.227.14 115.111.227.6 25.19.39.117 210.94.41.89 217.67.201.237 217.67.201.162;SE Visas i sjuan true Hela program 12 true false false false Alla 1.2496859 Senast tillagt inom Dokumentärer 4 true true true false Alla 1.2063725,1.2544107,1.2301959,1.2496859,1.2668676,1.2437873,1.2496855,1.2588849,1.1973474,1.2615840,1.2530679,1.2486341,1.2588900,1.2527876,1.2457570,1.2681630,1.1854778,1.2624242,1.1848699 http://cdn01.tv4.se/polopoly_fs/1.2496855.1336737132!originallogoimage/3705857780.png http://cdn01.tv4.se/polopoly_fs/1.2496855.1336737132!originalformatimage/3007962342.jpg http://cdn01.tv4.se/polopoly_fs/1.2496855.1336737132!originalcarouselimage/848596480.jpg Brittisk dokumentärserie i åtta delar från 2010. Här tittar man närmare på skönhetstävlingar för barn. SE 115.111.227.14 115.111.227.6 25.19.39.117 210.94.41.89 217.67.201.237 217.67.201.162;SE;SE 115.111.227.14 115.111.227.6 25.19.39.117 210.94.41.89 217.67.201.237 217.67.201.162 Visas i sjuan true Hela program 12 true false false false Alla 1.2496855 Senast tillagt inom Dokumentärer 4 true true true false Alla 1.2063725,1.2544107,1.2301959,1.2496859,1.2668676,1.2437873,1.2496855,1.2588849,1.1973474,1.2615840,1.2530679,1.2486341,1.2588900,1.2527876,1.2457570,1.2681630,1.1854778,1.2624242,1.1848699 http://cdn01.tv4.se/polopoly_fs/1.1973474.1336737226!originallogoimage/3529631461.png http://cdn01.tv4.se/polopoly_fs/1.1973474.1336737226!originalformatimage/2213341450.jpg http://cdn01.tv4.se/polopoly_fs/1.1973474.1336737226!originalcarouselimage/901640103.jpg Dokumentärserie om Buffalo Airways i staden Yellowknife, Kanada, som använder propellerplan från andra världskriget för att transportera gods och passagerare. SE;SE 115.111.227.14 115.111.227.6 25.19.39.117 210.94.41.89 217.67.201.237 217.67.201.162 Visas i tv4 true Hela program 12 true false false true 1.1973477 Senast tillagt inom Dokumentärer 4 true true true false Alla 1.2063725,1.2544107,1.2301959,1.2496859,1.2668676,1.2437873,1.2496855,1.2588849,1.1973474,1.2615840,1.2530679,1.2486341,1.2588900,1.2527876,1.2457570,1.2681630,1.1854778,1.2624242,1.1848699 http://cdn01.tv4.se/polopoly_fs/1.2530679.1336740955!originallogoimage/506277676.png http://cdn01.tv4.se/polopoly_fs/1.2530679.1336740955!originalformatimage/3553546483.jpg http://cdn01.tv4.se/polopoly_fs/1.2530679.1336740955!originalcarouselimage/1232842404.jpg Stansted är en av Storbritanniens största flygplatser. Det krävs tusentals anställda för att hålla igång ruljansen. SE;SE 115.111.227.14 115.111.227.6 25.19.39.117 210.94.41.89 217.67.201.237 217.67.201.162 Visas i tv4fakta true Hela program 12 true false false false Alla 1.2530679 Senast tillagt inom Dokumentärer 4 true true true false Alla 1.2063725,1.2544107,1.2301959,1.2496859,1.2668676,1.2437873,1.2496855,1.2588849,1.1973474,1.2615840,1.2530679,1.2486341,1.2588900,1.2527876,1.2457570,1.2681630,1.1854778,1.2624242,1.1848699 http://cdn01.tv4.se/polopoly_fs/1.2486341.1336740986!originallogoimage/3675194769.png http://cdn01.tv4.se/polopoly_fs/1.2486341.1336740986!originalformatimage/2093969926.jpg http://cdn01.tv4.se/polopoly_fs/1.2486341.1336740986!originalcarouselimage/250755908.jpg Erin Brockovich är känd för sitt engagemang för mänskliga rättigheter. Här skildrar hon olika kvinnors hårda kamp mot orättvisor av olika slag. SE;SE 115.111.227.14 115.111.227.6 25.19.39.117 210.94.41.89 217.67.201.237 217.67.201.162 Visas i tv4fakta true Hela program 12 true false false false Alla 1.2486341 Senast tillagt inom Dokumentärer 4 true true true false Alla 1.2063725,1.2544107,1.2301959,1.2496859,1.2668676,1.2437873,1.2496855,1.2588849,1.1973474,1.2615840,1.2530679,1.2486341,1.2588900,1.2527876,1.2457570,1.2681630,1.1854778,1.2624242,1.1848699 http://cdn01.tv4.se/polopoly_fs/1.1854520.1336741024!mobileimage/391018121.jpg http://cdn01.tv4.se/polopoly_fs/1.1854520.1336741024!mobileimage-logo/3305884275.png http://cdn01.tv4.se/polopoly_fs/1.1854520.1336741024!mobileimage-large/378330710.jpg http://cdn01.tv4.se/polopoly_fs/1.1854520.1336741024!mobileimage-highres/2954368126.jpg http://cdn01.tv4.se/polopoly_fs/1.1854520.1336741024!mobileimage-logo-highres/2261064860.png http://cdn01.tv4.se/polopoly_fs/1.1854520.1336741024!mobileimage-large-highres/4169619187.jpg Sju procent av alla mördare i USA är kvinnor. Här tar man reda på vilka de är och vad som drev dem till att mord. SE 115.111.227.14 115.111.227.6 25.19.39.117 210.94.41.89 217.67.201.237 217.67.201.162;SE 115.111.227.14 115.111.227.6 25.19.39.117 210.94.41.89 217.67.201.237 217.67.201.162;SE 129.35.209.170 58.247.178.245 Visas i sjuan true http://cdn01.tv4.se/polopoly_fs/1.1854520.1336741024!image/2238999476.jpg http://cdn01.tv4.se/polopoly_fs/1.1854520.1336741024!smallformatimage/2843736067.jpg http://cdn01.tv4.se/polopoly_fs/1.1854520.1336741024!categorylarge/2328579961.jpg http://cdn01.tv4.se/polopoly_fs/1.1854520.1336741024!image-large/1813311882.jpg http://cdn01.tv4.se/polopoly_fs/1.1854520.1336741024!image-logo/1968551402.png Hela program 12 true true false true 1.1854529 Senast tillagt inom Dokumentärer 4 true true true false Alla 1.2063725,1.2544107,1.2301959,1.2496859,1.2668676,1.2437873,1.2496855,1.2588849,1.1973474,1.2615840,1.2530679,1.2486341,1.2588900,1.2527876,1.2457570,1.2681630,1.1854778,1.2624242,1.1848699 http://cdn01.tv4.se/polopoly_fs/1.2473115.1329830706!originallogoimage/417684913.png http://cdn01.tv4.se/polopoly_fs/1.2473115.1329830706!originalformatimage/380057672.jpg http://cdn01.tv4.se/polopoly_fs/1.2473115.1329830706!originalcarouselimage/2368811049.jpg Äventyrare från hela världen tar sig an utmaningen att bestiga K2, världens nästa högsta berg. Med sina dryga 8 600 meter över havet har K2 krävt mer människoliv än något annat berg i världen. Här berättar bergsklättrare om sina upplevelser och om hur de ofta tvingar sina kroppar till extrema gränser. SE 115.111.227.14 115.111.227.6 25.19.39.117 210.94.41.89 217.67.201.237 217.67.201.162;SE visas i tv4Fakta true Hela program 12 true false false false Alla 1.2473115 Senast tillagt inom Dokumentärer 4 true true true false Alla 1.2063725,1.2544107,1.2301959,1.2496859,1.2668676,1.2437873,1.2496855,1.2588849,1.1973474,1.2615840,1.2530679,1.2486341,1.2588900,1.2527876,1.2457570,1.2681630,1.1854778,1.2624242,1.1848699 http://cdn01.tv4.se/polopoly_fs/1.2341194.1336737947!originallogoimage/1893449624.png http://cdn01.tv4.se/polopoly_fs/1.2341194.1336737947!originalformatimage/2325132250.jpg http://cdn01.tv4.se/polopoly_fs/1.2341194.1336737947!originalcarouselimage/1339020039.jpg Brittisk dokumentärserie i fem delar. från 2010. Här följer man polisernas dagliga arbete runt om i Storbritannien. SE;SE 115.111.227.14 115.111.227.6 25.19.39.117 210.94.41.89 217.67.201.237 217.67.201.162;SE 115.111.227.14 115.111.227.6 25.19.39.117 210.94.41.89 217.67.201.237 217.67.201.162 Visas i tv4 true Hela program 12 true false false false Alla 1.2341194 Senast tillagt inom Dokumentärer 4 true true true false Alla 1.2063725,1.2544107,1.2301959,1.2496859,1.2668676,1.2437873,1.2496855,1.2588849,1.1973474,1.2615840,1.2530679,1.2486341,1.2588900,1.2527876,1.2457570,1.2681630,1.1854778,1.2624242,1.1848699 http://cdn01.tv4.se/polopoly_fs/1.2239238.1342777851!originallogoimage/3803158994.png http://cdn01.tv4.se/polopoly_fs/1.2239238.1342777851!originalformatimage/4254425944.jpg http://cdn01.tv4.se/polopoly_fs/1.2239238.1342777851!originalcarouselimage/3028154695.jpg Vi återvänder till mordplatser för att söka efter nya ledtrådar med hopp om att kunna lösa mord som begåtts. SE 115.111.227.14 115.111.227.6 25.19.39.117 210.94.41.89 217.67.201.237 217.67.201.162;SE Visas i tv4 false Hela program 12 true false false false Alla 1.2239238 Senast tillagt inom Dokumentärer 4 true true true false Alla 1.2063725,1.2544107,1.2301959,1.2496859,1.2668676,1.2437873,1.2496855,1.2588849,1.1973474,1.2615840,1.2530679,1.2486341,1.2588900,1.2527876,1.2457570,1.2681630,1.1854778,1.2624242,1.1848699 http://cdn01.tv4.se/polopoly_fs/1.2437873.1336738024!originallogoimage/2992571580.png http://cdn01.tv4.se/polopoly_fs/1.2437873.1336738024!originalformatimage/1462627182.jpg http://cdn01.tv4.se/polopoly_fs/1.2437873.1336738024!originalcarouselimage/1167280252.jpg Brittisk dokumentärserie från 2010 där vi får följa den dramatiska vardagen för läkarna, ambulanspersonalen och piloterna i ambulansflygteamet Anglia One. SE 115.111.227.14 115.111.227.6 25.19.39.117 210.94.41.89 217.67.201.237 217.67.201.162;SE visas i tv4Fakta true Hela program 12 true false false false Alla 1.2437873 Senast tillagt inom Dokumentärer 4 true true true false Alla 1.2063725,1.2544107,1.2301959,1.2496859,1.2668676,1.2437873,1.2496855,1.2588849,1.1973474,1.2615840,1.2530679,1.2486341,1.2588900,1.2527876,1.2457570,1.2681630,1.1854778,1.2624242,1.1848699 http://cdn01.tv4.se/polopoly_fs/1.1981617.1336740050!mobileimage/2757034968.jpg http://cdn01.tv4.se/polopoly_fs/1.1981617.1336740050!mobileimage-large/2778180359.jpg http://cdn01.tv4.se/polopoly_fs/1.1981617.1336740050!mobileimage-highres/50553135.jpg http://cdn01.tv4.se/polopoly_fs/1.1981617.1336740050!mobileimage-large-highres/1268523938.jpg Dokumentärserie om hälsoinspektörer och tulltjänstemän som ser till att maten som hamnar på våra butikshyllor är säker att äta. SE;SE 115.111.227.14 115.111.227.6 25.19.39.117 210.94.41.89 217.67.201.237 217.67.201.162 Visas i tv4fakta true http://cdn01.tv4.se/polopoly_fs/1.1981617.1336740050!image/4085832549.jpg http://cdn01.tv4.se/polopoly_fs/1.1981617.1336740050!smallformatimage/562423771.jpg http://cdn01.tv4.se/polopoly_fs/1.1981617.1336740050!categorylarge/969947688.jpg http://cdn01.tv4.se/polopoly_fs/1.1981617.1336740050!image-large/3742336219.jpg http://cdn01.tv4.se/polopoly_fs/1.1981617.1336740050!image-logo/3718928182.png Hela program 4 true false false false 1.1981622 Senast tillagt inom Dokumentärer 4 true true true false Alla 1.2063725,1.2544107,1.2301959,1.2496859,1.2668676,1.2437873,1.2496855,1.2588849,1.1973474,1.2615840,1.2530679,1.2486341,1.2588900,1.2527876,1.2457570,1.2681630,1.1854778,1.2624242,1.1848699 http://cdn01.tv4.se/polopoly_fs/1.2358826.1336740111!originallogoimage/1983223581.png http://cdn01.tv4.se/polopoly_fs/1.2358826.1336740111!originalformatimage/3441296681.jpg http://cdn01.tv4.se/polopoly_fs/1.2358826.1336740111!originalcarouselimage/3352552616.jpg Dokumentärserie om flickor i åldrarna fem till tio år som ägnar sin fritid åt att ställa upp i skönhetstävlingar. SE;SE 115.111.227.14 115.111.227.6 25.19.39.117 210.94.41.89 217.67.201.237 217.67.201.162;SE 115.111.227.14 115.111.227.6 25.19.39.117 210.94.41.89 217.67.201.237 217.67.201.162 tv4plus true Hela Program 12 true false false false Alla 1.2358826 Senast tillagt inom Dokumentärer 4 true true true false Alla 1.2063725,1.2544107,1.2301959,1.2496859,1.2668676,1.2437873,1.2496855,1.2588849,1.1973474,1.2615840,1.2530679,1.2486341,1.2588900,1.2527876,1.2457570,1.2681630,1.1854778,1.2624242,1.1848699 http://cdn01.tv4.se/polopoly_fs/1.2102834.1332334281!mobileimage/826284658.jpg http://cdn01.tv4.se/polopoly_fs/1.2102834.1332334281!mobileimage-logo/3588534191.png http://cdn01.tv4.se/polopoly_fs/1.2102834.1332334281!mobileimage-large/3188262326.jpg http://cdn01.tv4.se/polopoly_fs/1.2102834.1332334281!mobileimage-highres/294694795.jpg http://cdn01.tv4.se/polopoly_fs/1.2102834.1332334281!mobileimage-logo-highres/2846716842.png http://cdn01.tv4.se/polopoly_fs/1.2102834.1332334281!mobileimage-large-highres/3259029939.jpg http://cdn01.tv4.se/polopoly_fs/1.2102834.1332334281!originallogoimage/1689270501.png http://cdn01.tv4.se/polopoly_fs/1.2102834.1332334281!originalformatimage/3278917490.jpg http://cdn01.tv4.se/polopoly_fs/1.2102834.1332334281!originalcarouselimage/2974615088.jpg I programmet får tittarna följa den luftburna ambulanspersonalen i Norrland. Med helikoptern till hjälp utför personalen räddningsuppdrag under extrema förhållanden. Visas i tv4plus true Hela program 12 true false false true Alla 1.2102834 Senast tillagt inom Dokumentärer 4 true true true false Alla 1.2063725,1.2544107,1.2301959,1.2496859,1.2668676,1.2437873,1.2496855,1.2588849,1.1973474,1.2615840,1.2530679,1.2486341,1.2588900,1.2527876,1.2457570,1.2681630,1.1854778,1.2624242,1.1848699 http://cdn01.tv4.se/polopoly_fs/1.2358748.1329830583!originallogoimage/3141202837.png http://cdn01.tv4.se/polopoly_fs/1.2358748.1329830583!originalformatimage/458654416.jpg http://cdn01.tv4.se/polopoly_fs/1.2358748.1329830583!originalcarouselimage/518050487.jpg Med hjälp av dataanimerade specialeffekter kan några av världens mest välkända händelser upplevas på ett helt nytt vis, ur varje tänkbar vinkel. Med hjälp av vittnen och besök på de olika platserna har en grupp experter kunnat rekonstruera bland annat Hindenburgolyckan 1937, atombomberna över Hiroshima 1945, invasionen av Pearl Harbor 1941 och den stora jordbävningen i San Francisco 1906. SE;SE 115.111.227.14 115.111.227.6 25.19.39.117 210.94.41.89 217.67.201.237 217.67.201.162 söndag 20:00 tv4Fakta true Hela program 12 true false false false Alla 1.2358748 Senast tillagt inom Dokumentärer 4 true true true false Alla 1.2063725,1.2544107,1.2301959,1.2496859,1.2668676,1.2437873,1.2496855,1.2588849,1.1973474,1.2615840,1.2530679,1.2486341,1.2588900,1.2527876,1.2457570,1.2681630,1.1854778,1.2624242,1.1848699 Om polisernas vardag med att skydda allmänheten från Londons värsta brottslingar. SE 115.111.227.14 115.111.227.6 25.19.39.117 210.94.41.89 217.67.201.237 217.67.201.162;SE Visas i tv4fakta true http://cdn01.tv4.se/polopoly_fs/1.1965594.1336740217!image/457735679.jpg http://cdn01.tv4.se/polopoly_fs/1.1965594.1336740217!smallformatimage/2718653439.jpg http://cdn01.tv4.se/polopoly_fs/1.1965594.1336740217!categorylarge/2163578934.jpg http://cdn01.tv4.se/polopoly_fs/1.1965594.1336740217!image-large/75812231.jpg http://cdn01.tv4.se/polopoly_fs/1.1965594.1336740217!image-logo/2879418024.png Hela program 12 true false false true 1.1972055 Senast tillagt inom Dokumentärer 4 true true true false Alla 1.2063725,1.2544107,1.2301959,1.2496859,1.2668676,1.2437873,1.2496855,1.2588849,1.1973474,1.2615840,1.2530679,1.2486341,1.2588900,1.2527876,1.2457570,1.2681630,1.1854778,1.2624242,1.1848699 http://cdn01.tv4.se/polopoly_fs/1.2290344.1336740196!originallogoimage/954479544.png http://cdn01.tv4.se/polopoly_fs/1.2290344.1336740196!originalformatimage/4110928999.jpg http://cdn01.tv4.se/polopoly_fs/1.2290344.1336740196!originalcarouselimage/1356928524.jpg Om amerikanska polisers vardag. De har ett tufft jobb och här har man dokumenterat deras arbete. SE;SE 115.111.227.14 115.111.227.6 25.19.39.117 210.94.41.89 217.67.201.237 217.67.201.162 Visas i tv4fakta true Hela program 12 true false false false Alla 1.2290344 Senast tillagt inom Dokumentärer 4 true true true false Alla 1.2063725,1.2544107,1.2301959,1.2496859,1.2668676,1.2437873,1.2496855,1.2588849,1.1973474,1.2615840,1.2530679,1.2486341,1.2588900,1.2527876,1.2457570,1.2681630,1.1854778,1.2624242,1.1848699 http://cdn01.tv4.se/polopoly_fs/1.2293959.1329830106!originallogoimage/3109958349.png http://cdn01.tv4.se/polopoly_fs/1.2293959.1329830106!originalformatimage/998167717.jpg http://cdn01.tv4.se/polopoly_fs/1.2293959.1329830106!originalcarouselimage/195677565.jpg Kriminalpoliser tar hjälp av medier för att lösa svåra brottsfall genom en kombination av högteknologiskt detektivarbete och övernaturliga förmågor. SE 115.111.227.14 115.111.227.6 25.19.39.117 210.94.41.89 217.67.201.237 217.67.201.162;SE;SE 115.111.227.14 115.111.227.6 25.19.39.117 210.94.41.89 217.67.201.237 217.67.201.162 Visas i sjuan true Hela program 12 true false false false Alla 1.2293959 Senast tillagt inom Dokumentärer 4 true true true false Alla 1.2063725,1.2544107,1.2301959,1.2496859,1.2668676,1.2437873,1.2496855,1.2588849,1.1973474,1.2615840,1.2530679,1.2486341,1.2588900,1.2527876,1.2457570,1.2681630,1.1854778,1.2624242,1.1848699 http://cdn01.tv4.se/polopoly_fs/1.2287197.1336740287!originallogoimage/1448391356.png http://cdn01.tv4.se/polopoly_fs/1.2287197.1336740287!originalformatimage/3984531592.jpg http://cdn01.tv4.se/polopoly_fs/1.2287197.1336740287!originalcarouselimage/3887251721.jpg För kriminalvårdarna i Las Vegas är varje dag en ny utmaning med en ständig ström av nyligen gripna misstänkta. SE 115.111.227.14 115.111.227.6 25.19.39.117 210.94.41.89 217.67.201.237 217.67.201.162;SE 115.111.227.14 115.111.227.6 25.19.39.117 210.94.41.89 217.67.201.237 217.67.201.162;SE Visas i tv4 true Hela program 12 true false false false Alla 1.2287197 Senast tillagt inom Dokumentärer 4 true true true false Alla 1.2063725,1.2544107,1.2301959,1.2496859,1.2668676,1.2437873,1.2496855,1.2588849,1.1973474,1.2615840,1.2530679,1.2486341,1.2588900,1.2527876,1.2457570,1.2681630,1.1854778,1.2624242,1.1848699 http://cdn01.tv4.se/polopoly_fs/1.1973561.1336741201!mobileimage/147806485.jpg http://cdn01.tv4.se/polopoly_fs/1.1973561.1336741201!mobileimage-logo/761745752.png http://cdn01.tv4.se/polopoly_fs/1.1973561.1336741201!mobileimage-large/609116873.jpg http://cdn01.tv4.se/polopoly_fs/1.1973561.1336741201!mobileimage-highres/3086947168.jpg http://cdn01.tv4.se/polopoly_fs/1.1973561.1336741201!mobileimage-logo-highres/3092571030.png http://cdn01.tv4.se/polopoly_fs/1.1973561.1336741201!mobileimage-large-highres/2977812487.jpg http://cdn01.tv4.se/polopoly_fs/1.1973561.1336741201!originallogoimage/2578437652.png http://cdn01.tv4.se/polopoly_fs/1.1973561.1336741201!originalformatimage/4216967614.jpg http://cdn01.tv4.se/polopoly_fs/1.1973561.1336741201!originalcarouselimage/907441968.jpg Dick Harrison och Martin Timell skildrar den svenska historien under 15 000 år fram till i dag. Visas i tv4 http://www.tv4.se/sveriges_historia true Hela program 4 true false false true 1.1973569 Klipp 4 false true false false Alla 1.2266384 Senast tillagt inom Dokumentärer 4 true true true false Alla 1.2063725,1.2544107,1.2301959,1.2496859,1.2668676,1.2437873,1.2496855,1.2588849,1.1973474,1.2615840,1.2530679,1.2486341,1.2588900,1.2527876,1.2457570,1.2681630,1.1854778,1.2624242,1.1848699 http://cdn01.tv4.se/polopoly_fs/1.2271871.1336741251!originallogoimage/2117132378.png http://cdn01.tv4.se/polopoly_fs/1.2271871.1336741251!originalformatimage/3937389901.jpg http://cdn01.tv4.se/polopoly_fs/1.2271871.1336741251!originalcarouselimage/2313938585.jpg Amerikansk dokumentärserie från 2010 om nyutbildade läkares specialistutbildningar på kliniker och sjukhus. SE;SE 115.111.227.14 115.111.227.6 25.19.39.117 210.94.41.89 217.67.201.237 217.67.201.162 Visas i tv4fakta true Hela program 12 true false false false Alla 1.2271871 Senast tillagt inom Dokumentärer 4 true true true false Alla 1.2063725,1.2544107,1.2301959,1.2496859,1.2668676,1.2437873,1.2496855,1.2588849,1.1973474,1.2615840,1.2530679,1.2486341,1.2588900,1.2527876,1.2457570,1.2681630,1.1854778,1.2624242,1.1848699 http://cdn01.tv4.se/polopoly_fs/1.2012853.1329830012!mobileimage/2375706532.jpg http://cdn01.tv4.se/polopoly_fs/1.2012853.1329830012!mobileimage-logo/1519857428.png http://cdn01.tv4.se/polopoly_fs/1.2012853.1329830012!mobileimage-large/3621614032.jpg http://cdn01.tv4.se/polopoly_fs/1.2012853.1329830012!mobileimage-highres/718013779.jpg http://cdn01.tv4.se/polopoly_fs/1.2012853.1329830012!mobileimage-logo-highres/3030165425.png http://cdn01.tv4.se/polopoly_fs/1.2012853.1329830012!mobileimage-large-highres/1649625054.jpg http://cdn01.tv4.se/polopoly_fs/1.2012853.1329830012!originallogoimage/2789581152.png http://cdn01.tv4.se/polopoly_fs/1.2012853.1329830012!originalformatimage/610617096.jpg http://cdn01.tv4.se/polopoly_fs/1.2012853.1329830012!originalcarouselimage/3167050493.jpg Under två månader varje år beger sig en grupp män ut på ett av de farligaste uppdragen i världen. De ska färdas i lastbilar under hemska väderförhållanden på isvägar och frusna sjöar i snöstormar för att förse arbetare på en oljeplattform med viktiga förnödenheter. SE 129.35.209.170 58.247.178.245;SE 129.35.209.170 58.247.178.245 115.111.227.14 115.111.227.6 25.19.39.117 210.94.41.89 217.67.201.237 217.67.201.162 Visas i tv4 false Hela program 4 true false false false 1.2012859 Senast tillagt inom Dokumentärer 4 true true true false Alla 1.2063725,1.2544107,1.2301959,1.2496859,1.2668676,1.2437873,1.2496855,1.2588849,1.1973474,1.2615840,1.2530679,1.2486341,1.2588900,1.2527876,1.2457570,1.2681630,1.1854778,1.2624242,1.1848699 http://cdn01.tv4.se/polopoly_fs/1.2063725.1338297100!originallogoimage/773013973.png http://cdn01.tv4.se/polopoly_fs/1.2063725.1338297100!originalformatimage/4061860811.jpg http://cdn01.tv4.se/polopoly_fs/1.2063725.1338297100!originalcarouselimage/1523228056.jpg Svensk dokumentärserie som följer poliserna dygnet runt och får en unik inblick i en polis vardag. Del 1 är borttagen pga rättigheter. Visas i tv4plus true Hela program 12 true false false true Alla 1.2063742 Senast tillagt inom Dokumentärer 4 true true true false Alla 1.2063725,1.2544107,1.2301959,1.2496859,1.2668676,1.2437873,1.2496855,1.2588849,1.1973474,1.2615840,1.2530679,1.2486341,1.2588900,1.2527876,1.2457570,1.2681630,1.1854778,1.2624242,1.1848699 http://cdn01.tv4.se/polopoly_fs/1.1981637.1329829983!mobileimage/3330534863.jpg http://cdn01.tv4.se/polopoly_fs/1.1981637.1329829983!mobileimage-logo/805521618.png http://cdn01.tv4.se/polopoly_fs/1.1981637.1329829983!mobileimage-large/728592625.jpg http://cdn01.tv4.se/polopoly_fs/1.1981637.1329829983!mobileimage-highres/841014531.jpg http://cdn01.tv4.se/polopoly_fs/1.1981637.1329829983!mobileimage-logo-highres/2335710332.png http://cdn01.tv4.se/polopoly_fs/1.1981637.1329829983!mobileimage-large-highres/780466675.jpg http://cdn01.tv4.se/polopoly_fs/1.1981637.1329829983!originallogoimage/1022136395.png http://cdn01.tv4.se/polopoly_fs/1.1981637.1329829983!originalformatimage/4044320660.jpg http://cdn01.tv4.se/polopoly_fs/1.1981637.1329829983!originalcarouselimage/1807356355.jpg Jenny och Bryan var ett vanligt amerikanskt par, de arbetade båda heltid och hade tid för sina egna fritidsintressen. Men när de fick sexlingar förändrades deras liv drastiskt. Deras liv har vänts upp och ner i och med barnens ankomst. Här följer man Jenny, Bryan och deras sex barn som är 16 månader gamla i deras vardag under ett halvår. SE 115.111.227.14 115.111.227.6 25.19.39.117 210.94.41.89 217.67.201.237 217.67.201.162 Visas i tv4plus false Hela program 4 true false false true Alla 1.1981641 Senast tillagt inom Dokumentärer 4 true true true false Alla 1.2063725,1.2544107,1.2301959,1.2496859,1.2668676,1.2437873,1.2496855,1.2588849,1.1973474,1.2615840,1.2530679,1.2486341,1.2588900,1.2527876,1.2457570,1.2681630,1.1854778,1.2624242,1.1848699 http://cdn01.tv4.se/polopoly_fs/1.2290379.1336741422!originallogoimage/3719503324.png http://cdn01.tv4.se/polopoly_fs/1.2290379.1336741422!originalformatimage/3414951957.jpg http://cdn01.tv4.se/polopoly_fs/1.2290379.1336741422!originalcarouselimage/960944597.jpg Kaffets historia från upptäckten av den första kaffebönan till kaffets betydelse för den ekonomiska, politiska och sociala strukturen. SE 115.111.227.14 115.111.227.6 25.19.39.117 210.94.41.89 217.67.201.237 217.67.201.162;SE Visas i tv4fakta true Hela program 12 true false false false Alla 1.2290379 Senast tillagt inom Dokumentärer 4 true true true false Alla 1.2063725,1.2544107,1.2301959,1.2496859,1.2668676,1.2437873,1.2496855,1.2588849,1.1973474,1.2615840,1.2530679,1.2486341,1.2588900,1.2527876,1.2457570,1.2681630,1.1854778,1.2624242,1.1848699 http://cdn01.tv4.se/polopoly_fs/1.2257308.1329829913!originallogoimage/2516903221.png http://cdn01.tv4.se/polopoly_fs/1.2257308.1329829913!originalformatimage/834966178.jpg http://cdn01.tv4.se/polopoly_fs/1.2257308.1329829913!originalcarouselimage/1140448224.jpg Knarkbaronerna är en australiensisk dokumentärserie från 2010. Om en specialstyrkas arbete med att kartlägga och spränga drogligor i Australien. SE 115.111.227.14 115.111.227.6 25.19.39.117 210.94.41.89 217.67.201.237 217.67.201.162;SE Visas i tv4fakta true Hela program 4 true false false false Alla 1.2257329 Senast tillagt inom Dokumentärer 4 true true true false Alla 1.2063725,1.2544107,1.2301959,1.2496859,1.2668676,1.2437873,1.2496855,1.2588849,1.1973474,1.2615840,1.2530679,1.2486341,1.2588900,1.2527876,1.2457570,1.2681630,1.1854778,1.2624242,1.1848699 http://cdn01.tv4.se/polopoly_fs/1.2266615.1336741520!originallogoimage/2138413432.png http://cdn01.tv4.se/polopoly_fs/1.2266615.1336741520!originalformatimage/2717845158.jpg http://cdn01.tv4.se/polopoly_fs/1.2266615.1336741520!originalcarouselimage/3552727012.jpg En djupdykning i det okändas värld där vi tittar närmare på astrologi, vidskepelse och mediala fenomen. SE 115.111.227.14 115.111.227.6 25.19.39.117 210.94.41.89 217.67.201.237 217.67.201.162;SE 115.111.227.14 115.111.227.6 25.19.39.117 210.94.41.89 217.67.201.237 217.67.201.162 Visas i tv4fakta true Hela program 12 true false false false Alla 1.2266615 Senast tillagt inom Dokumentärer 4 true true true false Alla 1.2063725,1.2544107,1.2301959,1.2496859,1.2668676,1.2437873,1.2496855,1.2588849,1.1973474,1.2615840,1.2530679,1.2486341,1.2588900,1.2527876,1.2457570,1.2681630,1.1854778,1.2624242,1.1848699 http://cdn01.tv4.se/polopoly_fs/1.2239210.1334664462!originallogoimage/1495985422.png http://cdn01.tv4.se/polopoly_fs/1.2239210.1334664462!originalformatimage/4276787865.jpg http://cdn01.tv4.se/polopoly_fs/1.2239210.1334664462!originalcarouselimage/2362954715.jpg Om rangers, medborgare som hjälper polisen att upprätthålla lag och ordning i Australien. Här följer man deras dagliga arbete när de patrullerar på gator och torg. Jobbet innefattar allt från utdelning av parkeringsböter till hantering av illegal sopsortering. SE;SE 115.111.227.14 115.111.227.6 25.19.39.117 210.94.41.89 217.67.201.237 217.67.201.162 Visas i tv4fakta true Hela program 12 true false false false Alla 1.2239210 Senast tillagt inom Dokumentärer 4 true true true false Alla 1.2063725,1.2544107,1.2301959,1.2496859,1.2668676,1.2437873,1.2496855,1.2588849,1.1973474,1.2615840,1.2530679,1.2486341,1.2588900,1.2527876,1.2457570,1.2681630,1.1854778,1.2624242,1.1848699 http://cdn01.tv4.se/polopoly_fs/1.2268354.1336741572!originallogoimage/4053351108.png http://cdn01.tv4.se/polopoly_fs/1.2268354.1336741572!originalformatimage/4292566845.jpg http://cdn01.tv4.se/polopoly_fs/1.2268354.1336741572!originalcarouselimage/1682790236.jpg Här följer man en specialstyrka inom den australiensiska polisen som utreder allvarliga trafikolyckor. SE 115.111.227.14 115.111.227.6 25.19.39.117 210.94.41.89 217.67.201.237 217.67.201.162;SE Visas i tv4fakta true Hela program 12 true false false false Alla 1.2268354 Senast tillagt inom Dokumentärer 4 true true true false Alla 1.2063725,1.2544107,1.2301959,1.2496859,1.2668676,1.2437873,1.2496855,1.2588849,1.1973474,1.2615840,1.2530679,1.2486341,1.2588900,1.2527876,1.2457570,1.2681630,1.1854778,1.2624242,1.1848699 http://cdn01.tv4.se/polopoly_fs/1.2256101.1329829785!originallogoimage/2225812084.png http://cdn01.tv4.se/polopoly_fs/1.2256101.1329829785!originalformatimage/732748544.jpg http://cdn01.tv4.se/polopoly_fs/1.2256101.1329829785!originalcarouselimage/3873668494.jpg Här skildras olika kriminella syndikat och gäng som tillsammans bildar många storstäders brutala undre värld. Varje avsnitt fokuserar på en stad och hur dess historia, kultur och geografiska läge har påverkat brottsligheten. SE;SE 115.111.227.14 115.111.227.6 25.19.39.117 210.94.41.89 217.67.201.237 217.67.201.162 Visas i tv4fakta true Hela program 12 true false false false Alla 1.2256101 Senast tillagt inom Dokumentärer 4 true true true false Alla 1.2063725,1.2544107,1.2301959,1.2496859,1.2668676,1.2437873,1.2496855,1.2588849,1.1973474,1.2615840,1.2530679,1.2486341,1.2588900,1.2527876,1.2457570,1.2681630,1.1854778,1.2624242,1.1848699 http://cdn01.tv4.se/polopoly_fs/1.2039629.1336741681!mobileimage/3469174027.jpg http://cdn01.tv4.se/polopoly_fs/1.2039629.1336741681!mobileimage-logo/3818204501.png http://cdn01.tv4.se/polopoly_fs/1.2039629.1336741681!mobileimage-large/4047028918.jpg http://cdn01.tv4.se/polopoly_fs/1.2039629.1336741681!mobileimage-highres/3118948336.jpg http://cdn01.tv4.se/polopoly_fs/1.2039629.1336741681!mobileimage-logo-highres/1579278163.png http://cdn01.tv4.se/polopoly_fs/1.2039629.1336741681!mobileimage-large-highres/1284255920.jpg http://cdn01.tv4.se/polopoly_fs/1.2039629.1336741681!originallogoimage/718172620.png http://cdn01.tv4.se/polopoly_fs/1.2039629.1336741681!originalformatimage/2366506587.jpg http://cdn01.tv4.se/polopoly_fs/1.2039629.1336741681!originalcarouselimage/4281552665.jpg Svensk dokumentärserie om blivande föräldrar och personal på förlossningsavdelningen vid Västerås sjukhus. Visas i tv4 true http://cdn01.tv4.se/polopoly_fs/1.2039629.1336741681!image/611370235.jpg http://cdn01.tv4.se/polopoly_fs/1.2039629.1336741681!smallformatimage/25349517.jpg http://cdn01.tv4.se/polopoly_fs/1.2039629.1336741681!categorylarge/4250385723.jpg http://cdn01.tv4.se/polopoly_fs/1.2039629.1336741681!image-large/843305512.jpg http://cdn01.tv4.se/polopoly_fs/1.2039629.1336741681!image-logo/2468966208.png http://cdn01.tv4.se/polopoly_fs/1.2039629.1336741681!small-image-logo/4164324719.png Hela program 4 true false false true Alla 1.2039647 Senaste klippen 12 false true false true Alla 1.2039647 Senast tillagt inom Dokumentärer 4 true true true false Alla 1.2063725,1.2544107,1.2301959,1.2496859,1.2668676,1.2437873,1.2496855,1.2588849,1.1973474,1.2615840,1.2530679,1.2486341,1.2588900,1.2527876,1.2457570,1.2681630,1.1854778,1.2624242,1.1848699 http://cdn01.tv4.se/polopoly_fs/1.1837607.1330418196!mobileimage/2704854230.jpg http://cdn01.tv4.se/polopoly_fs/1.1837607.1330418196!mobileimage-logo/3827136503.png http://cdn01.tv4.se/polopoly_fs/1.1837607.1330418196!mobileimage-large/332479287.jpg http://cdn01.tv4.se/polopoly_fs/1.1837607.1330418196!mobileimage-highres/596987095.jpg http://cdn01.tv4.se/polopoly_fs/1.1837607.1330418196!mobileimage-logo-highres/794329802.png http://cdn01.tv4.se/polopoly_fs/1.1837607.1330418196!mobileimage-large-highres/3633630730.jpg http://cdn01.tv4.se/polopoly_fs/1.1837607.1330418196!originallogoimage/128377458.png http://cdn01.tv4.se/polopoly_fs/1.1837607.1330418196!originalformatimage/3163385926.jpg http://cdn01.tv4.se/polopoly_fs/1.1837607.1330418196!originalcarouselimage/3057684935.jpg I Plastikkirurgerna får vi följa med bakom kulisserna på Akademikliniken i Stockholm. Tisdagar 21:00 tv4plus true http://cdn01.tv4.se/polopoly_fs/1.1837607.1330418196!image/2078208815.jpg http://cdn01.tv4.se/polopoly_fs/1.1837607.1330418196!smallformatimage/1216867609.jpg http://cdn01.tv4.se/polopoly_fs/1.1837607.1330418196!categorylarge/3512142059.jpg http://cdn01.tv4.se/polopoly_fs/1.1837607.1330418196!image-large/77774626.jpg http://cdn01.tv4.se/polopoly_fs/1.1837607.1330418196!image-logo/61078923.png http://cdn01.tv4.se/polopoly_fs/1.1837607.1330418196!small-image-logo/4030957867.png Hela program 4 true false false true 1.1837621 Senaste klippen 4 false true false true Alla 1.1837620 Senast tillagt inom Dokumentärer 4 true true true false Alla 1.2063725,1.2544107,1.2301959,1.2496859,1.2668676,1.2437873,1.2496855,1.2588849,1.1973474,1.2615840,1.2530679,1.2486341,1.2588900,1.2527876,1.2457570,1.2681630,1.1854778,1.2624242,1.1848699 http://cdn01.tv4.se/polopoly_fs/1.2161418.1329829725!mobileimage/3374450031.jpg http://cdn01.tv4.se/polopoly_fs/1.2161418.1329829725!mobileimage-logo/3397068723.png http://cdn01.tv4.se/polopoly_fs/1.2161418.1329829725!mobileimage-large/3506166830.jpg http://cdn01.tv4.se/polopoly_fs/1.2161418.1329829725!mobileimage-highres/4167472011.jpg http://cdn01.tv4.se/polopoly_fs/1.2161418.1329829725!mobileimage-logo-highres/3482496689.png http://cdn01.tv4.se/polopoly_fs/1.2161418.1329829725!mobileimage-large-highres/3574748460.jpg Många människor har blivit beroende av att shoppa och här har det gått så långt att de behöver hjälp . Fyra personer får behandling med hjälp av stylisten Faye Sawyer och coachen Nick Jankel. SE;SE 115.111.227.14 115.111.227.6 25.19.39.117 210.94.41.89 217.67.201.237 217.67.201.162 Lördagar 15:50 tv4plus false http://cdn01.tv4.se/polopoly_fs/1.2161418.1329829725!image/2085592347.jpg http://cdn01.tv4.se/polopoly_fs/1.2161418.1329829725!smallformatimage/2096553533.jpg http://cdn01.tv4.se/polopoly_fs/1.2161418.1329829725!categorylarge/2657901290.jpg http://cdn01.tv4.se/polopoly_fs/1.2161418.1329829725!image-large/579774629.jpg http://cdn01.tv4.se/polopoly_fs/1.2161418.1329829725!image-logo/1696371111.png http://cdn01.tv4.se/polopoly_fs/1.2161418.1329829725!small-image-logo/956580225.png Hela program 12 true false false false Alla 1.2161418 Senast tillagt inom Dokumentärer 4 true true true false Alla 1.2063725,1.2544107,1.2301959,1.2496859,1.2668676,1.2437873,1.2496855,1.2588849,1.1973474,1.2615840,1.2530679,1.2486341,1.2588900,1.2527876,1.2457570,1.2681630,1.1854778,1.2624242,1.1848699 Brittisk dokumentärserie från 2010 om det dagliga arbetet för personalen på en ambulanshelikopter i Yorkshire, Storbritannien. SE 115.111.227.14 115.111.227.6 25.19.39.117 210.94.41.89 217.67.201.237 217.67.201.162 Visas i tv4fakta true http://cdn01.tv4.se/polopoly_fs/1.1968476.1336741813!image/2233741730.jpg http://cdn01.tv4.se/polopoly_fs/1.1968476.1336741813!smallformatimage/3176279971.jpg http://cdn01.tv4.se/polopoly_fs/1.1968476.1336741813!categorylarge/2983719588.jpg http://cdn01.tv4.se/polopoly_fs/1.1968476.1336741813!image-large/1585326779.jpg http://cdn01.tv4.se/polopoly_fs/1.1968476.1336741813!image-logo/3344339646.png Hela program 12 true false false true 1.1983562 Senast tillagt inom Dokumentärer 4 true true true false Alla 1.2063725,1.2544107,1.2301959,1.2496859,1.2668676,1.2437873,1.2496855,1.2588849,1.1973474,1.2615840,1.2530679,1.2486341,1.2588900,1.2527876,1.2457570,1.2681630,1.1854778,1.2624242,1.1848699 http://cdn01.tv4.se/polopoly_fs/1.1981568.1329829695!mobileimage/303499510.jpg http://cdn01.tv4.se/polopoly_fs/1.1981568.1329829695!mobileimage-logo/307563958.png http://cdn01.tv4.se/polopoly_fs/1.1981568.1329829695!mobileimage-large/1720504827.jpg http://cdn01.tv4.se/polopoly_fs/1.1981568.1329829695!mobileimage-highres/1400984763.jpg http://cdn01.tv4.se/polopoly_fs/1.1981568.1329829695!mobileimage-logo-highres/581123209.png http://cdn01.tv4.se/polopoly_fs/1.1981568.1329829695!mobileimage-large-highres/1450893508.jpg Här försöker man ta reda på sanningen om rapporterade paranormala aktiviteter från kända hemsökta platser. SE 129.35.209.170 58.247.178.245 115.111.227.14 115.111.227.6 25.19.39.117 210.94.41.89 217.67.201.237 217.67.201.162;SE 129.35.209.170 58.247.178.245 115.111.227.14 115.111.227.6 25.19.39.117 210.94.41.89 217.67.201.237 217.67.201.162 Visas i tv4plus true http://cdn01.tv4.se/polopoly_fs/1.1981568.1329829695!image/2825690326.jpg http://cdn01.tv4.se/polopoly_fs/1.1981568.1329829695!smallformatimage/3208458970.jpg http://cdn01.tv4.se/polopoly_fs/1.1981568.1329829695!categorylarge/881856578.jpg http://cdn01.tv4.se/polopoly_fs/1.1981568.1329829695!image-large/1622567672.jpg http://cdn01.tv4.se/polopoly_fs/1.1981568.1329829695!image-logo/2604038185.png http://cdn01.tv4.se/polopoly_fs/1.1981568.1329829695!small-image-logo/4285526506.png Hela program 4 true false false true Alla 1.1981570,1.1981568 Senast tillagt inom Dokumentärer 4 true true true false Alla 1.2063725,1.2544107,1.2301959,1.2496859,1.2668676,1.2437873,1.2496855,1.2588849,1.1973474,1.2615840,1.2530679,1.2486341,1.2588900,1.2527876,1.2457570,1.2681630,1.1854778,1.2624242,1.1848699 http://cdn01.tv4.se/polopoly_fs/1.2225919.1342778064!originallogoimage/3877579993.png http://cdn01.tv4.se/polopoly_fs/1.2225919.1342778064!originalformatimage/3964841995.jpg http://cdn01.tv4.se/polopoly_fs/1.2225919.1342778064!originalcarouselimage/1220451570.jpg Om en prematuravdelning på ett sjukhus i USA. Här följer man personalens intensiva och livsavgörande insatser och föräldrarnas kamp för sina efterlängtade barns överlevnad. SE 115.111.227.14 115.111.227.6 25.19.39.117 210.94.41.89 217.67.201.237 217.67.201.162;SE visas i tv4fakta true Hela program 12 true false false false Alla 1.2225919 Senast tillagt inom Dokumentärer 4 true true true false Alla 1.2063725,1.2544107,1.2301959,1.2496859,1.2668676,1.2437873,1.2496855,1.2588849,1.1973474,1.2615840,1.2530679,1.2486341,1.2588900,1.2527876,1.2457570,1.2681630,1.1854778,1.2624242,1.1848699 http://cdn01.tv4.se/polopoly_fs/1.2174923.1336741993!mobileimage/1441144167.jpg http://cdn01.tv4.se/polopoly_fs/1.2174923.1336741993!mobileimage-logo/1455374267.png http://cdn01.tv4.se/polopoly_fs/1.2174923.1336741993!mobileimage-large/1279247398.jpg http://cdn01.tv4.se/polopoly_fs/1.2174923.1336741993!mobileimage-highres/1688374147.jpg http://cdn01.tv4.se/polopoly_fs/1.2174923.1336741993!mobileimage-logo-highres/1398191801.png http://cdn01.tv4.se/polopoly_fs/1.2174923.1336741993!mobileimage-large-highres/1238781220.jpg Anerikanska dokumentärserie om kvinnor som är gifta med män som begått mord. SE Visas i tv4fakta true http://cdn01.tv4.se/polopoly_fs/1.2174923.1336741993!image/3767239955.jpg http://cdn01.tv4.se/polopoly_fs/1.2174923.1336741993!smallformatimage/3761423925.jpg http://cdn01.tv4.se/polopoly_fs/1.2174923.1336741993!categorylarge/44581602.jpg http://cdn01.tv4.se/polopoly_fs/1.2174923.1336741993!image-large/3192565933.jpg http://cdn01.tv4.se/polopoly_fs/1.2174923.1336741993!image-logo/4191717807.png http://cdn01.tv4.se/polopoly_fs/1.2174923.1336741993!small-image-logo/2780846473.png Hela program 12 true false false false Alla 1.2174923 Senast tillagt inom Dokumentärer 4 true true true false Alla 1.2063725,1.2544107,1.2301959,1.2496859,1.2668676,1.2437873,1.2496855,1.2588849,1.1973474,1.2615840,1.2530679,1.2486341,1.2588900,1.2527876,1.2457570,1.2681630,1.1854778,1.2624242,1.1848699 http://cdn01.tv4.se/polopoly_fs/1.1959890.1329829605!originallogoimage/150166108.png http://cdn01.tv4.se/polopoly_fs/1.1959890.1329829605!originalformatimage/3017328744.jpg http://cdn01.tv4.se/polopoly_fs/1.1959890.1329829605!originalcarouselimage/3105171945.jpg Här följer man polisens utredare de första kritiska timmarna när de kämpar mot klockan för att hinna lösa brotten innan det är för sent. Visas i tv4 true Hela program 4 true false false false 1.1971952 Senast tillagt inom Dokumentärer 4 true true true false Alla 1.2063725,1.2544107,1.2301959,1.2496859,1.2668676,1.2437873,1.2496855,1.2588849,1.1973474,1.2615840,1.2530679,1.2486341,1.2588900,1.2527876,1.2457570,1.2681630,1.1854778,1.2624242,1.1848699 http://cdn01.tv4.se/polopoly_fs/1.2185960.1329829589!mobileimage/544195323.jpg http://cdn01.tv4.se/polopoly_fs/1.2185960.1329829589!mobileimage-logo/4279947205.png http://cdn01.tv4.se/polopoly_fs/1.2185960.1329829589!mobileimage-large/1791926877.jpg http://cdn01.tv4.se/polopoly_fs/1.2185960.1329829589!mobileimage-highres/124104698.jpg http://cdn01.tv4.se/polopoly_fs/1.2185960.1329829589!mobileimage-logo-highres/4128953653.png http://cdn01.tv4.se/polopoly_fs/1.2185960.1329829589!mobileimage-large-highres/1674492077.jpg http://cdn01.tv4.se/polopoly_fs/1.2185960.1329829589!originallogoimage/4128953653.png http://cdn01.tv4.se/polopoly_fs/1.2185960.1329829589!originalformatimage/367254844.jpg http://cdn01.tv4.se/polopoly_fs/1.2185960.1329829589!originalcarouselimage/1065046074.jpg Inside vietnam är en amerikansk dokumentärserie från 2007 i tre delar om kriget i Vietnam och dess följder. SE;SE 115.111.227.14 115.111.227.6 25.19.39.117 210.94.41.89 217.67.201.237 217.67.201.162 Visas i tv4fakta true http://cdn01.tv4.se/polopoly_fs/1.2185960.1329829589!image/1116277631.jpg http://cdn01.tv4.se/polopoly_fs/1.2185960.1329829589!smallformatimage/3746749901.jpg http://cdn01.tv4.se/polopoly_fs/1.2185960.1329829589!categorylarge/3014268822.jpg http://cdn01.tv4.se/polopoly_fs/1.2185960.1329829589!image-large/491822496.jpg http://cdn01.tv4.se/polopoly_fs/1.2185960.1329829589!image-logo/699160000.png http://cdn01.tv4.se/polopoly_fs/1.2185960.1329829589!small-image-logo/1562349200.png Hela program 12 true false false false Alla 1.2185960 Senast tillagt inom Dokumentärer 4 true true true false Alla 1.2063725,1.2544107,1.2301959,1.2496859,1.2668676,1.2437873,1.2496855,1.2588849,1.1973474,1.2615840,1.2530679,1.2486341,1.2588900,1.2527876,1.2457570,1.2681630,1.1854778,1.2624242,1.1848699 http://cdn01.tv4.se/polopoly_fs/1.2070213.1329829571!mobileimage/3105526944.jpg http://cdn01.tv4.se/polopoly_fs/1.2070213.1329829571!mobileimage-logo/4231999361.png http://cdn01.tv4.se/polopoly_fs/1.2070213.1329829571!mobileimage-large/200500033.jpg http://cdn01.tv4.se/polopoly_fs/1.2070213.1329829571!mobileimage-highres/1001854113.jpg http://cdn01.tv4.se/polopoly_fs/1.2070213.1329829571!mobileimage-logo-highres/930798268.png http://cdn01.tv4.se/polopoly_fs/1.2070213.1329829571!mobileimage-large-highres/3233191548.jpg Om arbetet på Dog town, ett av de största centren för herrelösa hundar i Amerika. SE 129.35.209.170 58.247.178.245;SE 129.35.209.170 58.247.178.245 115.111.227.14 115.111.227.6 25.19.39.117 210.94.41.89 217.67.201.237 217.67.201.162 Visas i tv4fakta true http://cdn01.tv4.se/polopoly_fs/1.2070213.1329829571!image/1677503321.jpg http://cdn01.tv4.se/polopoly_fs/1.2070213.1329829571!smallformatimage/1353037167.jpg http://cdn01.tv4.se/polopoly_fs/1.2070213.1329829571!categorylarge/3379908765.jpg http://cdn01.tv4.se/polopoly_fs/1.2070213.1329829571!image-large/478209876.jpg http://cdn01.tv4.se/polopoly_fs/1.2070213.1329829571!image-logo/461481469.png Hela program 4 true false false false Alla 1.2070214 Senast tillagt inom Dokumentärer 4 true true true false Alla 1.2063725,1.2544107,1.2301959,1.2496859,1.2668676,1.2437873,1.2496855,1.2588849,1.1973474,1.2615840,1.2530679,1.2486341,1.2588900,1.2527876,1.2457570,1.2681630,1.1854778,1.2624242,1.1848699 http://cdn01.tv4.se/polopoly_fs/1.2082526.1336742114!mobileimage/2078037683.jpg http://cdn01.tv4.se/polopoly_fs/1.2082526.1336742114!mobileimage-logo/3790370270.png http://cdn01.tv4.se/polopoly_fs/1.2082526.1336742114!mobileimage-large/85570007.jpg http://cdn01.tv4.se/polopoly_fs/1.2082526.1336742114!mobileimage-highres/1945173442.jpg http://cdn01.tv4.se/polopoly_fs/1.2082526.1336742114!mobileimage-logo-highres/1471852242.png http://cdn01.tv4.se/polopoly_fs/1.2082526.1336742114!mobileimage-large-highres/3008326363.jpg http://cdn01.tv4.se/polopoly_fs/1.2082526.1336742114!originallogoimage/4115014570.png http://cdn01.tv4.se/polopoly_fs/1.2082526.1336742114!originalformatimage/4211361363.jpg http://cdn01.tv4.se/polopoly_fs/1.2082526.1336742114!originalcarouselimage/1620201010.jpg Viltvårdaren Gary Saurages äger en äventyrspark som erbjuder nytt hem åt alligatorer som skadats eller riskerar att dödas. SE 129.35.209.170 58.247.178.245 115.111.227.14 115.111.227.6 25.19.39.117 210.94.41.89 217.67.201.237 217.67.201.162;SE 129.35.209.170 58.247.178.245 115.111.227.14 115.111.227.6 25.19.39.117 210.94.41.89 217.67.201.237 217.67.201.162;SE 129.35.209.170 58.247.178.245 Visas i tv4 true http://cdn01.tv4.se/polopoly_fs/1.2082526.1336742114!image/1074269679.jpg http://cdn01.tv4.se/polopoly_fs/1.2082526.1336742114!smallformatimage/1235816554.jpg http://cdn01.tv4.se/polopoly_fs/1.2082526.1336742114!categorylarge/3086394942.jpg http://cdn01.tv4.se/polopoly_fs/1.2082526.1336742114!image-large/2618743510.jpg http://cdn01.tv4.se/polopoly_fs/1.2082526.1336742114!image-logo/2178259070.png Hela program 12 true false false false Alla 1.2082526 Senast tillagt inom Dokumentärer 4 true true true false Alla 1.2063725,1.2544107,1.2301959,1.2496859,1.2668676,1.2437873,1.2496855,1.2588849,1.1973474,1.2615840,1.2530679,1.2486341,1.2588900,1.2527876,1.2457570,1.2681630,1.1854778,1.2624242,1.1848699 http://cdn01.tv4.se/polopoly_fs/1.2172863.1336742190!mobileimage/755094282.jpg http://cdn01.tv4.se/polopoly_fs/1.2172863.1336742190!mobileimage-logo/2347182575.png http://cdn01.tv4.se/polopoly_fs/1.2172863.1336742190!mobileimage-large/3879255228.jpg http://cdn01.tv4.se/polopoly_fs/1.2172863.1336742190!mobileimage-highres/3696638969.jpg http://cdn01.tv4.se/polopoly_fs/1.2172863.1336742190!mobileimage-logo-highres/798027247.png http://cdn01.tv4.se/polopoly_fs/1.2172863.1336742190!mobileimage-large-highres/3442014938.jpg Serien följer en helikopter-besättning som tillsammans med läkare och sjukvårdare räddar liv på människor i Australiens mest avlägsna områden. SE 115.111.227.14 115.111.227.6 25.19.39.117 210.94.41.89 217.67.201.237 217.67.201.162;SE Visas i tv4fakta true http://cdn01.tv4.se/polopoly_fs/1.2172863.1336742190!image/3696050548.jpg http://cdn01.tv4.se/polopoly_fs/1.2172863.1336742190!smallformatimage/1062827296.jpg http://cdn01.tv4.se/polopoly_fs/1.2172863.1336742190!categorylarge/2289713419.jpg http://cdn01.tv4.se/polopoly_fs/1.2172863.1336742190!image-large/3442014938.jpg http://cdn01.tv4.se/polopoly_fs/1.2172863.1336742190!image-logo/3423155426.png http://cdn01.tv4.se/polopoly_fs/1.2172863.1336742190!small-image-logo/344105970.png Hela program 12 true false false false Alla 1.2172863 Senast tillagt inom Dokumentärer 4 true true true false Alla 1.2063725,1.2544107,1.2301959,1.2496859,1.2668676,1.2437873,1.2496855,1.2588849,1.1973474,1.2615840,1.2530679,1.2486341,1.2588900,1.2527876,1.2457570,1.2681630,1.1854778,1.2624242,1.1848699 http://cdn01.tv4.se/polopoly_fs/1.2161491.1329829496!mobileimage/2033880737.jpg http://cdn01.tv4.se/polopoly_fs/1.2161491.1329829496!mobileimage-logo/422084834.png http://cdn01.tv4.se/polopoly_fs/1.2161491.1329829496!mobileimage-large/3436559927.jpg http://cdn01.tv4.se/polopoly_fs/1.2161491.1329829496!mobileimage-highres/1394771215.jpg http://cdn01.tv4.se/polopoly_fs/1.2161491.1329829496!mobileimage-logo-highres/4042690853.png http://cdn01.tv4.se/polopoly_fs/1.2161491.1329829496!mobileimage-large-highres/621522928.jpg Här får man uppleva andra världskriget genom amerikanska vittnens ögon. Programmen innehåller material som aldrig tidigare visats, som arkiverade bilder, intervjuer och utdrag ur dagböcker och journaler från krigstiden. SE;SE 115.111.227.14 115.111.227.6 25.19.39.117 210.94.41.89 217.67.201.237 217.67.201.162 tv4fakta true http://cdn01.tv4.se/polopoly_fs/1.2161491.1329829496!image/3295529756.jpg http://cdn01.tv4.se/polopoly_fs/1.2161491.1329829496!smallformatimage/2100227356.jpg http://cdn01.tv4.se/polopoly_fs/1.2161491.1329829496!categorylarge/1607478997.jpg http://cdn01.tv4.se/polopoly_fs/1.2161491.1329829496!image-large/3684793188.jpg http://cdn01.tv4.se/polopoly_fs/1.2161491.1329829496!image-logo/1954928715.png http://cdn01.tv4.se/polopoly_fs/1.2161491.1329829496!small-image-logo/3745512176.png Hela program 12 true false false false Alla 1.2161491 Senast tillagt inom Dokumentärer 4 true true true false Alla 1.2063725,1.2544107,1.2301959,1.2496859,1.2668676,1.2437873,1.2496855,1.2588849,1.1973474,1.2615840,1.2530679,1.2486341,1.2588900,1.2527876,1.2457570,1.2681630,1.1854778,1.2624242,1.1848699 http://cdn01.tv4.se/polopoly_fs/1.2150391.1329829478!mobileimage/837798874.jpg http://cdn01.tv4.se/polopoly_fs/1.2150391.1329829478!mobileimage-logo/3834681278.png http://cdn01.tv4.se/polopoly_fs/1.2150391.1329829478!mobileimage-large/2990733099.jpg http://cdn01.tv4.se/polopoly_fs/1.2150391.1329829478!mobileimage-highres/3001383435.jpg http://cdn01.tv4.se/polopoly_fs/1.2150391.1329829478!mobileimage-logo-highres/1116797656.png http://cdn01.tv4.se/polopoly_fs/1.2150391.1329829478!mobileimage-large-highres/339909197.jpg Om Adolf Hitlers tid i Tyskland. Den 30 januari 1933 utsågs Adolf Hitler till rikskansler i Tyskland och hans tid vid makten pågick i drygt tolv år. Det började med ett enastående jubel och slutade efter ett världskrig där 50 miljoner människor fick sätta livet till. SE 129.35.209.170 58.247.178.245 115.111.227.14 115.111.227.6 25.19.39.117 210.94.41.89 217.67.201.237 217.67.201.162;SE Visas i tv4fakta true http://cdn01.tv4.se/polopoly_fs/1.2150391.1329829478!image/2845832971.jpg http://cdn01.tv4.se/polopoly_fs/1.2150391.1329829478!smallformatimage/3735073155.jpg http://cdn01.tv4.se/polopoly_fs/1.2150391.1329829478!categorylarge/1086890493.jpg http://cdn01.tv4.se/polopoly_fs/1.2150391.1329829478!image-large/3442410960.jpg http://cdn01.tv4.se/polopoly_fs/1.2150391.1329829478!image-logo/3091391824.png http://cdn01.tv4.se/polopoly_fs/1.2150391.1329829478!small-image-logo/1056845816.png Hela program 12 true true false false Alla 1.2150391 Senast tillagt inom Dokumentärer 4 true true true false Alla 1.2063725,1.2544107,1.2301959,1.2496859,1.2668676,1.2437873,1.2496855,1.2588849,1.1973474,1.2615840,1.2530679,1.2486341,1.2588900,1.2527876,1.2457570,1.2681630,1.1854778,1.2624242,1.1848699 http://cdn01.tv4.se/polopoly_fs/1.2113830.1329829456!mobileimage/1727101148.jpg http://cdn01.tv4.se/polopoly_fs/1.2113830.1329829456!mobileimage-logo/4109790742.png http://cdn01.tv4.se/polopoly_fs/1.2113830.1329829456!mobileimage-large/406101944.jpg http://cdn01.tv4.se/polopoly_fs/1.2113830.1329829456!mobileimage-highres/1860031405.jpg http://cdn01.tv4.se/polopoly_fs/1.2113830.1329829456!mobileimage-logo-highres/4260787430.png http://cdn01.tv4.se/polopoly_fs/1.2113830.1329829456!mobileimage-large-highres/2925675700.jpg Gail Vaz-Oxlade hjälper par som har skulder och relationsproblem. De medverkande får varje vecka en utmaning som att få ordning på sin ekonomi eller att jobba på sin relation. Efter tre veckor får paret en belöning vars storlek beror på hur de klarat uppgiften. SE 129.35.209.170 58.247.178.245;SE 129.35.209.170 58.247.178.245 115.111.227.14 115.111.227.6 25.19.39.117 210.94.41.89 217.67.201.237 217.67.201.162;SE 129.35.209.170 58.247.178.245 115.111.227.14 115.111.227.6 25.19.39.117 210.94.41.89 217.67.201.237 217.67.201.162 Visas i tv4plus true http://cdn01.tv4.se/polopoly_fs/1.2113830.1329829456!image/1562715008.jpg http://cdn01.tv4.se/polopoly_fs/1.2113830.1329829456!smallformatimage/1417952773.jpg http://cdn01.tv4.se/polopoly_fs/1.2113830.1329829456!categorylarge/2866514001.jpg http://cdn01.tv4.se/polopoly_fs/1.2113830.1329829456!image-large/2168190137.jpg http://cdn01.tv4.se/polopoly_fs/1.2113830.1329829456!image-logo/574682131.png http://cdn01.tv4.se/polopoly_fs/1.2113830.1329829456!small-image-logo/1458777923.png Hela program 12 true false false false Alla 1.2113830 Senast tillagt inom Dokumentärer 4 true true true false Alla 1.2063725,1.2544107,1.2301959,1.2496859,1.2668676,1.2437873,1.2496855,1.2588849,1.1973474,1.2615840,1.2530679,1.2486341,1.2588900,1.2527876,1.2457570,1.2681630,1.1854778,1.2624242,1.1848699 http://cdn01.tv4.se/polopoly_fs/1.1965584.1329829439!mobileimage/3182297884.jpg http://cdn01.tv4.se/polopoly_fs/1.1965584.1329829439!mobileimage-logo/2136143837.png http://cdn01.tv4.se/polopoly_fs/1.1965584.1329829439!mobileimage-large/1040400365.jpg http://cdn01.tv4.se/polopoly_fs/1.1965584.1329829439!mobileimage-highres/1050981069.jpg http://cdn01.tv4.se/polopoly_fs/1.1965584.1329829439!mobileimage-logo-highres/2369839406.png http://cdn01.tv4.se/polopoly_fs/1.1965584.1329829439!mobileimage-large-highres/2550354571.jpg Journalisten Dominick Dunne går igenom uppmärksammade rättsfall och stora skandaler där kändisar varit inblandade. SE 129.35.209.170 58.247.178.245 115.111.227.14 115.111.227.6 25.19.39.117 210.94.41.89 217.67.201.237 217.67.201.162 Visas i tv4fakta true http://cdn01.tv4.se/polopoly_fs/1.1965584.1329829439!image/635322317.jpg http://cdn01.tv4.se/polopoly_fs/1.1965584.1329829439!smallformatimage/1390508357.jpg http://cdn01.tv4.se/polopoly_fs/1.1965584.1329829439!categorylarge/3431557435.jpg http://cdn01.tv4.se/polopoly_fs/1.1965584.1329829439!image-large/1097780502.jpg http://cdn01.tv4.se/polopoly_fs/1.1965584.1329829439!image-logo/2631800204.png Hela program 12 true false false false 1.1972050 Senast tillagt inom Dokumentärer 4 true true true false Alla 1.2063725,1.2544107,1.2301959,1.2496859,1.2668676,1.2437873,1.2496855,1.2588849,1.1973474,1.2615840,1.2530679,1.2486341,1.2588900,1.2527876,1.2457570,1.2681630,1.1854778,1.2624242,1.1848699 http://cdn01.tv4.se/polopoly_fs/1.1963195.1336742333!mobileimage/2928371754.jpg http://cdn01.tv4.se/polopoly_fs/1.1963195.1336742333!mobileimage-logo/631313123.png http://cdn01.tv4.se/polopoly_fs/1.1963195.1336742333!mobileimage-large/1223070480.jpg http://cdn01.tv4.se/polopoly_fs/1.1963195.1336742333!mobileimage-highres/3598762937.jpg http://cdn01.tv4.se/polopoly_fs/1.1963195.1336742333!mobileimage-logo-highres/2551570661.png http://cdn01.tv4.se/polopoly_fs/1.1963195.1336742333!mobileimage-large-highres/706538873.jpg Dokumentärserie om kosmetiska ingrepp och vår tids fixering vid kroppsliga renoveringar. Allt från nya tekniker till kontroversiella ingrepp avhandlas. SE;SE 115.111.227.14 115.111.227.6 25.19.39.117 210.94.41.89 217.67.201.237 217.67.201.162 Visas i tv4 true http://cdn01.tv4.se/polopoly_fs/1.1963195.1336742333!image/2332539891.jpg http://cdn01.tv4.se/polopoly_fs/1.1963195.1336742333!smallformatimage/1470174861.jpg http://cdn01.tv4.se/polopoly_fs/1.1963195.1336742333!categorylarge/259434408.jpg http://cdn01.tv4.se/polopoly_fs/1.1963195.1336742333!image-large/2477160772.jpg http://cdn01.tv4.se/polopoly_fs/1.1963195.1336742333!image-logo/3377872121.png Hela program 12 true true false true 1.1971974 Senast tillagt inom Dokumentärer 4 true true true false Alla 1.2063725,1.2544107,1.2301959,1.2496859,1.2668676,1.2437873,1.2496855,1.2588849,1.1973474,1.2615840,1.2530679,1.2486341,1.2588900,1.2527876,1.2457570,1.2681630,1.1854778,1.2624242,1.1848699 Detektiverna på brittiska polisens avdelning för saknade personer utreder försvinnanden med de senaste kriminaltekniska teknikerna. Visas i tv4 true http://cdn01.tv4.se/polopoly_fs/1.1968482.1337003199!image/2757753831.jpg http://cdn01.tv4.se/polopoly_fs/1.1968482.1337003199!smallformatimage/2533811665.jpg http://cdn01.tv4.se/polopoly_fs/1.1968482.1337003199!categorylarge/248905763.jpg http://cdn01.tv4.se/polopoly_fs/1.1968482.1337003199!image-large/3676551146.jpg http://cdn01.tv4.se/polopoly_fs/1.1968482.1337003199!image-logo/1530540294.png Hela program 12 true false false true 1.1972203 Senast tillagt inom Dokumentärer 4 true true true false Alla 1.2063725,1.2544107,1.2301959,1.2496859,1.2668676,1.2437873,1.2496855,1.2588849,1.1973474,1.2615840,1.2530679,1.2486341,1.2588900,1.2527876,1.2457570,1.2681630,1.1854778,1.2624242,1.1848699 http://cdn01.tv4.se/polopoly_fs/1.1973481.1337003261!mobileimage/867036239.jpg http://cdn01.tv4.se/polopoly_fs/1.1973481.1337003261!mobileimage-logo/3607714194.png http://cdn01.tv4.se/polopoly_fs/1.1973481.1337003261!mobileimage-large/3169121163.jpg http://cdn01.tv4.se/polopoly_fs/1.1973481.1337003261!mobileimage-highres/3570307800.jpg http://cdn01.tv4.se/polopoly_fs/1.1973481.1337003261!mobileimage-logo-highres/2873132439.png http://cdn01.tv4.se/polopoly_fs/1.1973481.1337003261!mobileimage-large-highres/3232575374.jpg http://cdn01.tv4.se/polopoly_fs/1.1973481.1337003261!originallogoimage/2258187407.png http://cdn01.tv4.se/polopoly_fs/1.1973481.1337003261!originalformatimage/1519478417.jpg http://cdn01.tv4.se/polopoly_fs/1.1973481.1337003261!originalcarouselimage/4064340162.jpg I CPH - Kastrup följer vi personal och resenärer på Nordens största flygplats. SE 129.35.209.170 58.247.178.245 115.111.227.14 115.111.227.6 25.19.39.117 210.94.41.89 217.67.201.237 217.67.201.162 Visas i tv4fakta true http://cdn01.tv4.se/polopoly_fs/1.1973481.1337003261!image/790846133.jpg http://cdn01.tv4.se/polopoly_fs/1.1973481.1337003261!smallformatimage/947057849.jpg http://cdn01.tv4.se/polopoly_fs/1.1973481.1337003261!categorylarge/3757195071.jpg http://cdn01.tv4.se/polopoly_fs/1.1973481.1337003261!image-large/3825199927.jpg http://cdn01.tv4.se/polopoly_fs/1.1973481.1337003261!image-logo/764976628.png Hela program 12 true false false true 1.1973484 Senast tillagt inom Dokumentärer 4 true true true false Alla 1.2063725,1.2544107,1.2301959,1.2496859,1.2668676,1.2437873,1.2496855,1.2588849,1.1973474,1.2615840,1.2530679,1.2486341,1.2588900,1.2527876,1.2457570,1.2681630,1.1854778,1.2624242,1.1848699 http://cdn01.tv4.se/polopoly_fs/1.2138346.1329829369!mobileimage/2019839857.jpg http://cdn01.tv4.se/polopoly_fs/1.2138346.1329829369!mobileimage-logo/1429604143.png http://cdn01.tv4.se/polopoly_fs/1.2138346.1329829369!mobileimage-large/1201400012.jpg http://cdn01.tv4.se/polopoly_fs/1.2138346.1329829369!mobileimage-highres/256144778.jpg http://cdn01.tv4.se/polopoly_fs/1.2138346.1329829369!mobileimage-logo-highres/3900896553.png http://cdn01.tv4.se/polopoly_fs/1.2138346.1329829369!mobileimage-large-highres/4197391050.jpg http://cdn01.tv4.se/polopoly_fs/1.2138346.1329829369!originallogoimage/2624412598.png http://cdn01.tv4.se/polopoly_fs/1.2138346.1329829369!originalformatimage/3584319647.jpg http://cdn01.tv4.se/polopoly_fs/1.2138346.1329829369!originalcarouselimage/1234199907.jpg Om Saabs kris, deras förluster, underleverantörer som inte fått betalt och avslöjanden om ägarnas förflutna. Motorjournalisten Christer Gerlach berättar om hur Saab hittills lyckats överleva sig själv. SE 129.35.209.170 58.247.178.245 115.111.227.14 115.111.227.6 25.19.39.117 210.94.41.89 217.67.201.237 217.67.201.162;SE;SE 129.35.209.170 58.247.178.245 115.111.227.14 115.111.227.6 25.19.39.117 210.94.41.89 217.67.201.237 217.67.201.162 Visas i tv4fakta true http://cdn01.tv4.se/polopoly_fs/1.2138346.1329829369!image/2463362689.jpg http://cdn01.tv4.se/polopoly_fs/1.2138346.1329829369!smallformatimage/3072452599.jpg http://cdn01.tv4.se/polopoly_fs/1.2138346.1329829369!categorylarge/1274320705.jpg http://cdn01.tv4.se/polopoly_fs/1.2138346.1329829369!image-large/2229336146.jpg http://cdn01.tv4.se/polopoly_fs/1.2138346.1329829369!image-logo/629818682.png Hela program 4 true false false false Alla 1.2138353 Senast tillagt inom Dokumentärer 4 true true true false Alla 1.2063725,1.2544107,1.2301959,1.2496859,1.2668676,1.2437873,1.2496855,1.2588849,1.1973474,1.2615840,1.2530679,1.2486341,1.2588900,1.2527876,1.2457570,1.2681630,1.1854778,1.2624242,1.1848699 http://cdn01.tv4.se/polopoly_fs/1.2151061.1337004591!mobileimage/918090972.jpg http://cdn01.tv4.se/polopoly_fs/1.2151061.1337004591!mobileimage-logo/3897172083.png http://cdn01.tv4.se/polopoly_fs/1.2151061.1337004591!mobileimage-large/142525114.jpg http://cdn01.tv4.se/polopoly_fs/1.2151061.1337004591!mobileimage-highres/2990035670.jpg http://cdn01.tv4.se/polopoly_fs/1.2151061.1337004591!mobileimage-logo-highres/1442763381.png http://cdn01.tv4.se/polopoly_fs/1.2151061.1337004591!mobileimage-large-highres/25090122.jpg Följ danska läkare och sjuksköterskor som lämnat familj och arbete hemma för att rädda liv i Afghanistan. SE 115.111.227.14 115.111.227.6 25.19.39.117 210.94.41.89 217.67.201.237 217.67.201.162;SE Visas i tv4fakta true http://cdn01.tv4.se/polopoly_fs/1.2151061.1337004591!image/800049629.jpg http://cdn01.tv4.se/polopoly_fs/1.2151061.1337004591!smallformatimage/173916331.jpg http://cdn01.tv4.se/polopoly_fs/1.2151061.1337004591!categorylarge/3508172657.jpg http://cdn01.tv4.se/polopoly_fs/1.2151061.1337004591!image-large/2145451335.jpg http://cdn01.tv4.se/polopoly_fs/1.2151061.1337004591!image-logo/2566283878.png http://cdn01.tv4.se/polopoly_fs/1.2151061.1337004591!small-image-logo/4092166217.png Hela program 12 true true false false Alla 1.2151061 Senast tillagt inom Dokumentärer 4 true true true false Alla 1.2063725,1.2544107,1.2301959,1.2496859,1.2668676,1.2437873,1.2496855,1.2588849,1.1973474,1.2615840,1.2530679,1.2486341,1.2588900,1.2527876,1.2457570,1.2681630,1.1854778,1.2624242,1.1848699 http://cdn01.tv4.se/polopoly_fs/1.2070124.1337003422!mobileimage/1850606159.jpg http://cdn01.tv4.se/polopoly_fs/1.2070124.1337003422!mobileimage-logo/2330638226.png http://cdn01.tv4.se/polopoly_fs/1.2070124.1337003422!mobileimage-large/3775339915.jpg http://cdn01.tv4.se/polopoly_fs/1.2070124.1337003422!mobileimage-highres/1319024566.jpg http://cdn01.tv4.se/polopoly_fs/1.2070124.1337003422!mobileimage-logo-highres/4137905047.png http://cdn01.tv4.se/polopoly_fs/1.2070124.1337003422!mobileimage-large-highres/2639184270.jpg Dansk dokumentärserie. Vad driver en människa att döda? Här granskas sju mord med olika motiv. SE 129.35.209.170 58.247.178.245;SE 129.35.209.170 58.247.178.245 115.111.227.14 115.111.227.6 25.19.39.117 210.94.41.89 217.67.201.237 217.67.201.162 Visas i tv4fakta true http://cdn01.tv4.se/polopoly_fs/1.2070124.1337003422!image/3915732221.jpg http://cdn01.tv4.se/polopoly_fs/1.2070124.1337003422!smallformatimage/4205974537.jpg http://cdn01.tv4.se/polopoly_fs/1.2070124.1337003422!categorylarge/2182205759.jpg http://cdn01.tv4.se/polopoly_fs/1.2070124.1337003422!image-large/3189507383.jpg http://cdn01.tv4.se/polopoly_fs/1.2070124.1337003422!image-logo/711390628.png Hela program 4 true false false false Alla 1.2070127 Senast tillagt inom Dokumentärer 4 true true true false Alla 1.2063725,1.2544107,1.2301959,1.2496859,1.2668676,1.2437873,1.2496855,1.2588849,1.1973474,1.2615840,1.2530679,1.2486341,1.2588900,1.2527876,1.2457570,1.2681630,1.1854778,1.2624242,1.1848699 http://cdn01.tv4.se/polopoly_fs/1.2030572.1337003515!mobileimage/2338733824.jpg http://cdn01.tv4.se/polopoly_fs/1.2030572.1337003515!mobileimage-logo/2334407232.png http://cdn01.tv4.se/polopoly_fs/1.2030572.1337003515!mobileimage-large/4294829581.jpg http://cdn01.tv4.se/polopoly_fs/1.2030572.1337003515!mobileimage-highres/3404751693.jpg http://cdn01.tv4.se/polopoly_fs/1.2030572.1337003515!mobileimage-logo-highres/3151104895.png http://cdn01.tv4.se/polopoly_fs/1.2030572.1337003515!mobileimage-large-highres/3473659698.jpg Tjänstemännen på Nya Zeelands immigrationsmyndighet arbetar för att stoppa illegal invandring och kriminella aktiviteter. SE 129.35.209.170 58.247.178.245 115.111.227.14 115.111.227.6 25.19.39.117 210.94.41.89 217.67.201.237 217.67.201.162 Visas i tv4fakta true http://cdn01.tv4.se/polopoly_fs/1.2030572.1337003515!image/824027936.jpg http://cdn01.tv4.se/polopoly_fs/1.2030572.1337003515!smallformatimage/642516268.jpg http://cdn01.tv4.se/polopoly_fs/1.2030572.1337003515!categorylarge/2917214132.jpg http://cdn01.tv4.se/polopoly_fs/1.2030572.1337003515!image-large/4190592270.jpg http://cdn01.tv4.se/polopoly_fs/1.2030572.1337003515!image-logo/38227935.png Hela program 4 true false false false Alla 1.2030582 Senast tillagt inom Dokumentärer 4 true true true false Alla 1.2063725,1.2544107,1.2301959,1.2496859,1.2668676,1.2437873,1.2496855,1.2588849,1.1973474,1.2615840,1.2530679,1.2486341,1.2588900,1.2527876,1.2457570,1.2681630,1.1854778,1.2624242,1.1848699 http://cdn01.tv4.se/polopoly_fs/1.1983487.1329829292!mobileimage/2503376593.jpg http://cdn01.tv4.se/polopoly_fs/1.1983487.1329829292!mobileimage-logo/252075452.png http://cdn01.tv4.se/polopoly_fs/1.1983487.1329829292!mobileimage-large/2141526448.jpg http://cdn01.tv4.se/polopoly_fs/1.1983487.1329829292!mobileimage-highres/2635781536.jpg http://cdn01.tv4.se/polopoly_fs/1.1983487.1329829292!mobileimage-logo-highres/3109062320.png http://cdn01.tv4.se/polopoly_fs/1.1983487.1329829292!mobileimage-large-highres/2141526448.jpg http://cdn01.tv4.se/polopoly_fs/1.1983487.1329829292!originallogoimage/464260040.png http://cdn01.tv4.se/polopoly_fs/1.1983487.1329829292!originalformatimage/367947313.jpg http://cdn01.tv4.se/polopoly_fs/1.1983487.1329829292!originalcarouselimage/2390255184.jpg I dokumentärserien Svensk maffia ges en unik inblick i de kriminella nätverk som styr den undre världen i Sverige. Del 2 av Svensk maffia visas inte pga känsligt material. Visas i tv4 true http://cdn01.tv4.se/polopoly_fs/1.1983487.1329829292!image/2934056333.jpg http://cdn01.tv4.se/polopoly_fs/1.1983487.1329829292!smallformatimage/2806200328.jpg http://cdn01.tv4.se/polopoly_fs/1.1983487.1329829292!categorylarge/2141526448.jpg http://cdn01.tv4.se/polopoly_fs/1.1983487.1329829292!image-large/2141526448.jpg http://cdn01.tv4.se/polopoly_fs/1.1983487.1329829292!image-logo/1866444828.png http://cdn01.tv4.se/polopoly_fs/1.1983487.1329829292!small-image-logo/1832286879.png Hela program 4 true false false true 1.1983508 Senaste klippen 12 false true false true 1.1983508 Senast tillagt inom Dokumentärer 4 true true true false Alla 1.2063725,1.2544107,1.2301959,1.2496859,1.2668676,1.2437873,1.2496855,1.2588849,1.1973474,1.2615840,1.2530679,1.2486341,1.2588900,1.2527876,1.2457570,1.2681630,1.1854778,1.2624242,1.1848699 http://cdn01.tv4.se/polopoly_fs/1.1968484.1337004643!mobileimage/3035860266.jpg http://cdn01.tv4.se/polopoly_fs/1.1968484.1337004643!mobileimage-logo/1803976724.png http://cdn01.tv4.se/polopoly_fs/1.1968484.1337004643!mobileimage-large/4266847628.jpg http://cdn01.tv4.se/polopoly_fs/1.1968484.1337004643!mobileimage-highres/2482626603.jpg http://cdn01.tv4.se/polopoly_fs/1.1968484.1337004643!mobileimage-logo-highres/1652988644.png http://cdn01.tv4.se/polopoly_fs/1.1968484.1337004643!mobileimage-large-highres/4149409660.jpg Nyazeeländsk dokumentärserie. Medier försöker få kontakt med andar till mordoffer i ett försök att lösa ouppklarade fall. SE;SE 115.111.227.14 115.111.227.6 25.19.39.117 210.94.41.89 217.67.201.237 217.67.201.162 Visas i tv4plus true http://cdn01.tv4.se/polopoly_fs/1.1968484.1337004643!image/3591718062.jpg http://cdn01.tv4.se/polopoly_fs/1.1968484.1337004643!smallformatimage/1271829020.jpg http://cdn01.tv4.se/polopoly_fs/1.1968484.1337004643!categorylarge/657872967.jpg http://cdn01.tv4.se/polopoly_fs/1.1968484.1337004643!image-large/2311901809.jpg http://cdn01.tv4.se/polopoly_fs/1.1968484.1337004643!image-logo/3174046225.png http://cdn01.tv4.se/polopoly_fs/1.1968484.1337004643!small-image-logo/3380855105.png Hela program 4 true false false false 1.1971800 Senast tillagt inom Dokumentärer 4 true true true false Alla 1.2063725,1.2544107,1.2301959,1.2496859,1.2668676,1.2437873,1.2496855,1.2588849,1.1973474,1.2615840,1.2530679,1.2486341,1.2588900,1.2527876,1.2457570,1.2681630,1.1854778,1.2624242,1.1848699 http://cdn01.tv4.se/polopoly_fs/1.1968367.1337004409!mobileimage/343009633.jpg http://cdn01.tv4.se/polopoly_fs/1.1968367.1337004409!mobileimage-logo/3548396723.png http://cdn01.tv4.se/polopoly_fs/1.1968367.1337004409!mobileimage-large/2794987136.jpg http://cdn01.tv4.se/polopoly_fs/1.1968367.1337004409!mobileimage-highres/2531027296.jpg http://cdn01.tv4.se/polopoly_fs/1.1968367.1337004409!mobileimage-logo-highres/3665831491.png http://cdn01.tv4.se/polopoly_fs/1.1968367.1337004409!mobileimage-large-highres/1843260349.jpg Brittisk dokumentärserie om udda djurolyckor, bisarra djursjukdomar och andra underliga djurproblem. SE 129.35.209.170 58.247.178.245 115.111.227.14 115.111.227.6 25.19.39.117 210.94.41.89 217.67.201.237 217.67.201.162;SE 129.35.209.170 58.247.178.245 115.111.227.14 115.111.227.6 25.19.39.117 210.94.41.89 217.67.201.237 217.67.201.162 Visas i tv4plus true http://cdn01.tv4.se/polopoly_fs/1.1968367.1337004409!image/3466057368.jpg http://cdn01.tv4.se/polopoly_fs/1.1968367.1337004409!smallformatimage/4258187438.jpg http://cdn01.tv4.se/polopoly_fs/1.1968367.1337004409!categorylarge/1679699292.jpg http://cdn01.tv4.se/polopoly_fs/1.1968367.1337004409!image-large/2985007765.jpg http://cdn01.tv4.se/polopoly_fs/1.1968367.1337004409!image-logo/3068844092.png http://cdn01.tv4.se/polopoly_fs/1.1968367.1337004409!small-image-logo/1158327452.png Hela program 12 true false false false 1.1968370 Senast tillagt inom Dokumentärer 4 true true true false Alla 1.2063725,1.2544107,1.2301959,1.2496859,1.2668676,1.2437873,1.2496855,1.2588849,1.1973474,1.2615840,1.2530679,1.2486341,1.2588900,1.2527876,1.2457570,1.2681630,1.1854778,1.2624242,1.1848699 http://cdn01.tv4.se/polopoly_fs/1.1965516.1337067881!mobileimage/3871552976.jpg http://cdn01.tv4.se/polopoly_fs/1.1965516.1337067881!mobileimage-logo/3819858567.png http://cdn01.tv4.se/polopoly_fs/1.1965516.1337067881!mobileimage-large/1395393862.jpg http://cdn01.tv4.se/polopoly_fs/1.1965516.1337067881!mobileimage-highres/3436920446.jpg http://cdn01.tv4.se/polopoly_fs/1.1965516.1337067881!mobileimage-logo-highres/1578801281.png http://cdn01.tv4.se/polopoly_fs/1.1965516.1337067881!mobileimage-large-highres/3136427137.jpg Forskare och läkare berättar hur de försöker bota sjukdomar genom vård och utveckling av nya tekniker. SE 115.111.227.14 115.111.227.6 25.19.39.117 210.94.41.89 217.67.201.237 217.67.201.162;SE Visas i tv4fakta true http://cdn01.tv4.se/polopoly_fs/1.1965516.1337067881!image/1536454765.jpg http://cdn01.tv4.se/polopoly_fs/1.1965516.1337067881!smallformatimage/1536454765.jpg http://cdn01.tv4.se/polopoly_fs/1.1965516.1337067881!categorylarge/3223950756.jpg http://cdn01.tv4.se/polopoly_fs/1.1965516.1337067881!image-large/1146667029.jpg http://cdn01.tv4.se/polopoly_fs/1.1965516.1337067881!image-logo/739519847.png Hela program 12 true false false true 1.1972003 Senast tillagt inom Dokumentärer 4 true true true false Alla 1.2063725,1.2544107,1.2301959,1.2496859,1.2668676,1.2437873,1.2496855,1.2588849,1.1973474,1.2615840,1.2530679,1.2486341,1.2588900,1.2527876,1.2457570,1.2681630,1.1854778,1.2624242,1.1848699 http://cdn01.tv4.se/polopoly_fs/1.1845430.1329829098!mobileimage/1698007256.png http://cdn01.tv4.se/polopoly_fs/1.1845430.1329829098!mobileimage-highres/1328382838.png Serien handlar om en grupp elever som studerar på Penn State University i Pennsylvania. De två killarna och tre tjejerna är medlemmar i universitetets paranormala forskningssällskap. SE 129.35.209.170 58.247.178.245;SE 129.35.209.170 58.247.178.245 115.111.227.14 115.111.227.6 25.19.39.117 210.94.41.89 217.67.201.237 217.67.201.162;SE 129.35.209.170 58.247.178.245 Visas i tv4plus true http://cdn01.tv4.se/polopoly_fs/1.1845430.1329829098!image/3630353765.png http://cdn01.tv4.se/polopoly_fs/1.1845430.1329829098!smallformatimage/1629612901.png http://cdn01.tv4.se/polopoly_fs/1.1845430.1329829098!categorylarge/2227238321.png http://cdn01.tv4.se/polopoly_fs/1.1845430.1329829098!image-large/1687101937.jpg http://cdn01.tv4.se/polopoly_fs/1.1845430.1329829098!image-logo/1263665294.png Hela program 12 true true false true Alla 1.1845430 Senast tillagt inom Dokumentärer 4 true true true false Alla 1.2063725,1.2544107,1.2301959,1.2496859,1.2668676,1.2437873,1.2496855,1.2588849,1.1973474,1.2615840,1.2530679,1.2486341,1.2588900,1.2527876,1.2457570,1.2681630,1.1854778,1.2624242,1.1848699 http://cdn01.tv4.se/polopoly_fs/1.2008590.1337004730!mobileimage/580686307.jpg http://cdn01.tv4.se/polopoly_fs/1.2008590.1337004730!mobileimage-logo/1740188354.png http://cdn01.tv4.se/polopoly_fs/1.2008590.1337004730!mobileimage-large/2423612930.jpg http://cdn01.tv4.se/polopoly_fs/1.2008590.1337004730!mobileimage-highres/2687570402.jpg http://cdn01.tv4.se/polopoly_fs/1.2008590.1337004730!mobileimage-logo-highres/2902253567.png http://cdn01.tv4.se/polopoly_fs/1.2008590.1337004730!mobileimage-large-highres/1529910079.jpg Serien granskar förföljares beteende. Var fjärde kvinna och var tjugonde man kommer någon gång att utsättas för en förföljare. SE 129.35.209.170 58.247.178.245;SE 129.35.209.170 58.247.178.245 115.111.227.14 115.111.227.6 25.19.39.117 210.94.41.89 217.67.201.237 217.67.201.162 Visas i tv4fakta true http://cdn01.tv4.se/polopoly_fs/1.2008590.1337004730!image/4168789530.jpg http://cdn01.tv4.se/polopoly_fs/1.2008590.1337004730!smallformatimage/3408113708.jpg http://cdn01.tv4.se/polopoly_fs/1.2008590.1337004730!categorylarge/1391678942.jpg http://cdn01.tv4.se/polopoly_fs/1.2008590.1337004730!image-large/2265375255.jpg http://cdn01.tv4.se/polopoly_fs/1.2008590.1337004730!image-logo/2147983550.png Alla program 12 true false false false Alla 1.2008590 Senast tillagt inom Dokumentärer 4 true true true false Alla 1.2063725,1.2544107,1.2301959,1.2496859,1.2668676,1.2437873,1.2496855,1.2588849,1.1973474,1.2615840,1.2530679,1.2486341,1.2588900,1.2527876,1.2457570,1.2681630,1.1854778,1.2624242,1.1848699 http://cdn01.tv4.se/polopoly_fs/1.1915482.1337004828!originallogoimage/836636751.png http://cdn01.tv4.se/polopoly_fs/1.1915482.1337004828!originalformatimage/3415415821.jpg http://cdn01.tv4.se/polopoly_fs/1.1915482.1337004828!originalcarouselimage/1040608548.jpg Om livet på ett gruppboende för funktionshindrade i Köping med glädje, sorg och vardagsbekymmer. Visas i tv4 true http://cdn01.tv4.se/polopoly_fs/1.1915482.1337004828!image/2387602008.jpg http://cdn01.tv4.se/polopoly_fs/1.1915482.1337004828!smallformatimage/3172398190.jpg http://cdn01.tv4.se/polopoly_fs/1.1915482.1337004828!categorylarge/616960412.jpg http://cdn01.tv4.se/polopoly_fs/1.1915482.1337004828!image-large/4046693973.jpg http://cdn01.tv4.se/polopoly_fs/1.1915482.1337004828!image-logo/4130530556.png Hela program 12 true false false true 1.1915482 Senast tillagt inom Dokumentärer 4 true true true false Alla 1.2063725,1.2544107,1.2301959,1.2496859,1.2668676,1.2437873,1.2496855,1.2588849,1.1973474,1.2615840,1.2530679,1.2486341,1.2588900,1.2527876,1.2457570,1.2681630,1.1854778,1.2624242,1.1848699 http://cdn01.tv4.se/polopoly_fs/1.2002727.1337004940!mobileimage/1934352658.jpg http://cdn01.tv4.se/polopoly_fs/1.2002727.1337004940!mobileimage-logo/584554811.png http://cdn01.tv4.se/polopoly_fs/1.2002727.1337004940!mobileimage-large/3861513827.jpg http://cdn01.tv4.se/polopoly_fs/1.2002727.1337004940!mobileimage-highres/369326340.jpg http://cdn01.tv4.se/polopoly_fs/1.2002727.1337004940!mobileimage-logo-highres/2582433173.png http://cdn01.tv4.se/polopoly_fs/1.2002727.1337004940!mobileimage-large-highres/1561416397.jpg Om personalen, patienterna och deras familjer på intensivvårdsavdelningen på Alfred hospital i Australien. SE 129.35.209.170 58.247.178.245 115.111.227.14 115.111.227.6 25.19.39.117 210.94.41.89 217.67.201.237 217.67.201.162 Visas i tv4fakta true http://cdn01.tv4.se/polopoly_fs/1.2002727.1337004940!image/256798072.jpg http://cdn01.tv4.se/polopoly_fs/1.2002727.1337004940!smallformatimage/357454711.jpg http://cdn01.tv4.se/polopoly_fs/1.2002727.1337004940!categorylarge/1440311370.jpg http://cdn01.tv4.se/polopoly_fs/1.2002727.1337004940!image-large/2389829974.jpg http://cdn01.tv4.se/polopoly_fs/1.2002727.1337004940!image-logo/1353357384.png Hela program 4 true false false false 1.2002744 Senast tillagt inom Dokumentärer 4 true true true false Alla 1.2063725,1.2544107,1.2301959,1.2496859,1.2668676,1.2437873,1.2496855,1.2588849,1.1973474,1.2615840,1.2530679,1.2486341,1.2588900,1.2527876,1.2457570,1.2681630,1.1854778,1.2624242,1.1848699 http://cdn01.tv4.se/polopoly_fs/1.1968254.1337005014!mobileimage-logo/3314903854.png http://cdn01.tv4.se/polopoly_fs/1.1968254.1337005014!mobileimage-logo-highres/4116929041.png På Bondi beach i Australien samsas de vackra och berömda med vanliga semesterfirare. Professionella strandvakter vakar över dem dygnet runt. SE;SE 115.111.227.14 115.111.227.6 25.19.39.117 210.94.41.89 217.67.201.237 217.67.201.162;SE 115.111.227.14 115.111.227.6 25.19.39.117 210.94.41.89 217.67.201.237 217.67.201.162 Visas i tv4 true http://cdn01.tv4.se/polopoly_fs/1.1968254.1337005014!image/3545762993.png http://cdn01.tv4.se/polopoly_fs/1.1968254.1337005014!smallformatimage/810301669.png http://cdn01.tv4.se/polopoly_fs/1.1968254.1337005014!categorylarge/2272201934.png http://cdn01.tv4.se/polopoly_fs/1.1968254.1337005014!image-large/3258824479.png http://cdn01.tv4.se/polopoly_fs/1.1968254.1337005014!image-logo/2915011424.png http://cdn01.tv4.se/polopoly_fs/1.1968254.1337005014!small-image-logo/1427314644.png Hela program 12 true true false false 1.1968258 Senast tillagt inom Dokumentärer 4 true true true false Alla 1.2063725,1.2544107,1.2301959,1.2496859,1.2668676,1.2437873,1.2496855,1.2588849,1.1973474,1.2615840,1.2530679,1.2486341,1.2588900,1.2527876,1.2457570,1.2681630,1.1854778,1.2624242,1.1848699 http://cdn01.tv4.se/polopoly_fs/1.1980389.1337067985!mobileimage/372854228.jpg http://cdn01.tv4.se/polopoly_fs/1.1980389.1337067985!mobileimage-large/2748742978.jpg http://cdn01.tv4.se/polopoly_fs/1.1980389.1337067985!mobileimage-highres/1008813690.jpg http://cdn01.tv4.se/polopoly_fs/1.1980389.1337067985!mobileimage-large-highres/1242066053.jpg Om kvarterspolisers arbete i Nya Zeeland med vanliga problem som inbrott, trafikolyckor och skadegörelse. SE 115.111.227.14 115.111.227.6 25.19.39.117 210.94.41.89 217.67.201.237 217.67.201.162;SE Visas i tv4fakta true http://cdn01.tv4.se/polopoly_fs/1.1980389.1337067985!image/2876115049.jpg http://cdn01.tv4.se/polopoly_fs/1.1980389.1337067985!smallformatimage/304950889.jpg http://cdn01.tv4.se/polopoly_fs/1.1980389.1337067985!categorylarge/819195296.jpg http://cdn01.tv4.se/polopoly_fs/1.1980389.1337067985!image-large/3030562833.jpg http://cdn01.tv4.se/polopoly_fs/1.1980389.1337067985!image-logo/461773630.png Hela program 4 true false false false 1.1980396 Senast tillagt inom Dokumentärer 4 true true true false Alla 1.2063725,1.2544107,1.2301959,1.2496859,1.2668676,1.2437873,1.2496855,1.2588849,1.1973474,1.2615840,1.2530679,1.2486341,1.2588900,1.2527876,1.2457570,1.2681630,1.1854778,1.2624242,1.1848699 http://cdn01.tv4.se/polopoly_fs/1.1968388.1329828973!mobileimage/2886333550.jpg http://cdn01.tv4.se/polopoly_fs/1.1968388.1329828973!mobileimage-logo/1937570128.png http://cdn01.tv4.se/polopoly_fs/1.1968388.1329828973!mobileimage-large/3869807816.jpg http://cdn01.tv4.se/polopoly_fs/1.1968388.1329828973!mobileimage-highres/2332268911.jpg http://cdn01.tv4.se/polopoly_fs/1.1968388.1329828973!mobileimage-logo-highres/2055005088.png http://cdn01.tv4.se/polopoly_fs/1.1968388.1329828973!mobileimage-large-highres/4020801080.jpg Programserien följer hårt arbetade hundar på Nya Zeeland. De utför viktiga uppdrag för bland andra tull, fängelse, poliskår och spårenheter. SE;SE Visas i tv4plus true http://cdn01.tv4.se/polopoly_fs/1.1968388.1329828973!image/3471785450.jpg http://cdn01.tv4.se/polopoly_fs/1.1968388.1329828973!smallformatimage/1395977048.jpg http://cdn01.tv4.se/polopoly_fs/1.1968388.1329828973!categorylarge/1070342403.jpg http://cdn01.tv4.se/polopoly_fs/1.1968388.1329828973!image-large/2436279093.jpg http://cdn01.tv4.se/polopoly_fs/1.1968388.1329828973!image-logo/2781504341.png Hela program 12 true true false false 1.1968392 Senast tillagt inom Dokumentärer 4 true true true false Alla 1.2063725,1.2544107,1.2301959,1.2496859,1.2668676,1.2437873,1.2496855,1.2588849,1.1973474,1.2615840,1.2530679,1.2486341,1.2588900,1.2527876,1.2457570,1.2681630,1.1854778,1.2624242,1.1848699 Om ambulanspersonal i Danmark och deras viktiga och ibland livsfarliga arbete som rymmer allt från bilolyckor till dödsskjutningar. Visas i tv4fakta true http://cdn01.tv4.se/polopoly_fs/1.1959897.1337068163!image/1362623636.jpg http://cdn01.tv4.se/polopoly_fs/1.1959897.1337068163!smallformatimage/2663264275.jpg http://cdn01.tv4.se/polopoly_fs/1.1959897.1337068163!categorylarge/3449058246.jpg http://cdn01.tv4.se/polopoly_fs/1.1959897.1337068163!image-large/804912229.jpg http://cdn01.tv4.se/polopoly_fs/1.1959897.1337068163!image-logo/1813563027.png http://cdn01.tv4.se/polopoly_fs/1.1959897.1337068163!small-image-logo/3124593935.png Hela program 12 true false false false 1.1971958 Senast tillagt inom Dokumentärer 4 true true true false Alla 1.2063725,1.2544107,1.2301959,1.2496859,1.2668676,1.2437873,1.2496855,1.2588849,1.1973474,1.2615840,1.2530679,1.2486341,1.2588900,1.2527876,1.2457570,1.2681630,1.1854778,1.2624242,1.1848699 http://cdn01.tv4.se/polopoly_fs/1.1963182.1342778235!originallogoimage/2828601189.png http://cdn01.tv4.se/polopoly_fs/1.1963182.1342778235!originalformatimage/3697101357.jpg http://cdn01.tv4.se/polopoly_fs/1.1963182.1342778235!originalcarouselimage/2652522288.jpg Timothy Treadwell tillbringade 13 somrar bland Alaskas grizzlybjörnar innan han själv föll offer för dem. Här skildras hans liv genom hans filmer. SE;SE 115.111.227.14 115.111.227.6 25.19.39.117 210.94.41.89 217.67.201.237 217.67.201.162 Visas i tv4fakta true http://cdn01.tv4.se/polopoly_fs/1.1963182.1342778235!image/857373900.jpg http://cdn01.tv4.se/polopoly_fs/1.1963182.1342778235!smallformatimage/1052087332.jpg http://cdn01.tv4.se/polopoly_fs/1.1963182.1342778235!image-logo/902708096.png Hela program 12 true false false true 1.1971969 Senast tillagt inom Dokumentärer 4 true true true false Alla 1.2063725,1.2544107,1.2301959,1.2496859,1.2668676,1.2437873,1.2496855,1.2588849,1.1973474,1.2615840,1.2530679,1.2486341,1.2588900,1.2527876,1.2457570,1.2681630,1.1854778,1.2624242,1.1848699 Om familjer där en närstående har fallit offer för en mördare. Sex brittiska familjer berättar om sin förlust. SE 129.35.209.170 58.247.178.245 115.111.227.14 115.111.227.6 25.19.39.117 210.94.41.89 217.67.201.237 217.67.201.162;SE 129.35.209.170 58.247.178.245 Visas i tv4fakta true http://cdn01.tv4.se/polopoly_fs/1.1968495.1337068649!image/643106887.jpg http://cdn01.tv4.se/polopoly_fs/1.1968495.1337068649!smallformatimage/822388299.jpg http://cdn01.tv4.se/polopoly_fs/1.1968495.1337068649!categorylarge/3412338226.jpg http://cdn01.tv4.se/polopoly_fs/1.1968495.1337068649!image-large/1704897540.jpg http://cdn01.tv4.se/polopoly_fs/1.1968495.1337068649!image-logo/353365176.png Hela program 4 true false false true 1.1968499 Senast tillagt inom Dokumentärer 4 true true true false Alla 1.2063725,1.2544107,1.2301959,1.2496859,1.2668676,1.2437873,1.2496855,1.2588849,1.1973474,1.2615840,1.2530679,1.2486341,1.2588900,1.2527876,1.2457570,1.2681630,1.1854778,1.2624242,1.1848699 http://cdn01.tv4.se/polopoly_fs/1.1963171.1329828878!originallogoimage/1977732302.png http://cdn01.tv4.se/polopoly_fs/1.1963171.1329828878!originalformatimage/1792751172.jpg http://cdn01.tv4.se/polopoly_fs/1.1963171.1329828878!originalcarouselimage/590589019.jpg Veterinären Chris Brown bor och arbetar vid Bondi Beach i Sydney, Australien. Lisa en av Chris veterinärkollegor som delar passionen för djur med honom. SE;SE 115.111.227.14 115.111.227.6 25.19.39.117 210.94.41.89 217.67.201.237 217.67.201.162 Visas i tv4 true http://cdn01.tv4.se/polopoly_fs/1.1963171.1329828878!image/3570436630.jpg http://cdn01.tv4.se/polopoly_fs/1.1963171.1329828878!smallformatimage/458835601.jpg http://cdn01.tv4.se/polopoly_fs/1.1963171.1329828878!image-logo/491387313.png Hela program 12 true true false false 1.1963174 Senast tillagt inom Dokumentärer 4 true true true false Alla 1.2063725,1.2544107,1.2301959,1.2496859,1.2668676,1.2437873,1.2496855,1.2588849,1.1973474,1.2615840,1.2530679,1.2486341,1.2588900,1.2527876,1.2457570,1.2681630,1.1854778,1.2624242,1.1848699 Programmet undersöker flygkatastrofer för att försöka ta reda på varför de inträffade. Man intervjuar piloter, analytiker och ögonvittnen. SE 129.35.209.170 58.247.178.245 115.111.227.14 115.111.227.6 25.19.39.117 210.94.41.89 217.67.201.237 217.67.201.162 Visas i tv4 true http://cdn01.tv4.se/polopoly_fs/1.1968396.1337068734!image/2513855231.jpg http://cdn01.tv4.se/polopoly_fs/1.1968396.1337068734!smallformatimage/3486888338.jpg http://cdn01.tv4.se/polopoly_fs/1.1968396.1337068734!categorylarge/375519633.jpg http://cdn01.tv4.se/polopoly_fs/1.1968396.1337068734!image-large/2207765683.jpg http://cdn01.tv4.se/polopoly_fs/1.1968396.1337068734!image-logo/1623439990.png http://cdn01.tv4.se/polopoly_fs/1.1968396.1337068734!small-image-logo/969298532.png Hela program 12 true true false false 1.1968398 Senast tillagt inom Dokumentärer 4 true true true false Alla 1.2063725,1.2544107,1.2301959,1.2496859,1.2668676,1.2437873,1.2496855,1.2588849,1.1973474,1.2615840,1.2530679,1.2486341,1.2588900,1.2527876,1.2457570,1.2681630,1.1854778,1.2624242,1.1848699 http://cdn01.tv4.se/polopoly_fs/1.1965542.1337068820!mobileimage/3283253254.png http://cdn01.tv4.se/polopoly_fs/1.1965542.1337068820!mobileimage-logo/518312012.png http://cdn01.tv4.se/polopoly_fs/1.1965542.1337068820!mobileimage-large/3178733410.png http://cdn01.tv4.se/polopoly_fs/1.1965542.1337068820!mobileimage-highres/242141710.jpg http://cdn01.tv4.se/polopoly_fs/1.1965542.1337068820!mobileimage-logo-highres/772989299.png http://cdn01.tv4.se/polopoly_fs/1.1965542.1337068820!mobileimage-large-highres/186729582.png Små mirakel är en serie om ett barnsjukhus där vetenskapliga framsteg och barnens mod bidrar till tillfrisknanden från diverse åkommor. SE;SE 115.111.227.14 115.111.227.6 25.19.39.117 210.94.41.89 217.67.201.237 217.67.201.162 Visas i tv4fakta true http://cdn01.tv4.se/polopoly_fs/1.1965542.1337068820!image/1033255459.jpg http://cdn01.tv4.se/polopoly_fs/1.1965542.1337068820!smallformatimage/876029862.jpg http://cdn01.tv4.se/polopoly_fs/1.1965542.1337068820!categorylarge/3395850738.jpg http://cdn01.tv4.se/polopoly_fs/1.1965542.1337068820!image-large/3783847194.jpg http://cdn01.tv4.se/polopoly_fs/1.1965542.1337068820!image-logo/2542249427.png Hela program 12 true true false false 1.1965552 Senast tillagt inom Dokumentärer 4 true true true false Alla 1.2063725,1.2544107,1.2301959,1.2496859,1.2668676,1.2437873,1.2496855,1.2588849,1.1973474,1.2615840,1.2530679,1.2486341,1.2588900,1.2527876,1.2457570,1.2681630,1.1854778,1.2624242,1.1848699 Om kvinnor och män som lever i ett förhållande där den ena partnern sitter i fängelse. SE;SE 115.111.227.14 115.111.227.6 25.19.39.117 210.94.41.89 217.67.201.237 217.67.201.162 Visas i tv4fakta true http://cdn01.tv4.se/polopoly_fs/1.1973512.1337068930!image/626989035.jpg http://cdn01.tv4.se/polopoly_fs/1.1973512.1337068930!smallformatimage/11345565.jpg http://cdn01.tv4.se/polopoly_fs/1.1973512.1337068930!image-logo/1106045713.png Hela program 12 true false false true 1.1973513 Senast tillagt inom Dokumentärer 4 true true true false Alla 1.2063725,1.2544107,1.2301959,1.2496859,1.2668676,1.2437873,1.2496855,1.2588849,1.1973474,1.2615840,1.2530679,1.2486341,1.2588900,1.2527876,1.2457570,1.2681630,1.1854778,1.2624242,1.1848699 http://cdn01.tv4.se/polopoly_fs/1.1973612.1337604431!mobileimage/1052008322.jpg http://cdn01.tv4.se/polopoly_fs/1.1973612.1337604431!mobileimage-logo/1571290046.png http://cdn01.tv4.se/polopoly_fs/1.1973612.1337604431!mobileimage-large/3759778890.jpg http://cdn01.tv4.se/polopoly_fs/1.1973612.1337604431!mobileimage-highres/3337981914.jpg http://cdn01.tv4.se/polopoly_fs/1.1973612.1337604431!mobileimage-logo-highres/569255867.png http://cdn01.tv4.se/polopoly_fs/1.1973612.1337604431!mobileimage-large-highres/3490316799.jpg Dokumentärserie av Gustav Fridolin om rasismens rötter och de kapitel i den svenska historien han inte fick lära sig i skolan. Visas i tv4 true http://cdn01.tv4.se/polopoly_fs/1.1973612.1337604431!image/3889660492.jpg http://cdn01.tv4.se/polopoly_fs/1.1973612.1337604431!smallformatimage/3003035632.jpg http://cdn01.tv4.se/polopoly_fs/1.1973612.1337604431!categorylarge/1963830194.jpg http://cdn01.tv4.se/polopoly_fs/1.1973612.1337604431!image-large/1715823000.jpg http://cdn01.tv4.se/polopoly_fs/1.1973612.1337604431!image-logo/764976628.png http://cdn01.tv4.se/polopoly_fs/1.1973612.1337604431!small-image-logo/877377881.png Hela program 4 true false false true 1.1973619 Senast tillagt inom Dokumentärer 4 true true true false Alla 1.2063725,1.2544107,1.2301959,1.2496859,1.2668676,1.2437873,1.2496855,1.2588849,1.1973474,1.2615840,1.2530679,1.2486341,1.2588900,1.2527876,1.2457570,1.2681630,1.1854778,1.2624242,1.1848699 Amerikansk dokumentärserie om den lokala polisstyrkan i Arizona som kämpar mot ökande kriminalitet. SE 115.111.227.14 115.111.227.6 25.19.39.117 210.94.41.89 217.67.201.237 217.67.201.162;SE Visas i tv4fakta true http://cdn01.tv4.se/polopoly_fs/1.1973316.1337069204!image/4168641586.jpg http://cdn01.tv4.se/polopoly_fs/1.1973316.1337069204!smallformatimage/1094404658.jpg http://cdn01.tv4.se/polopoly_fs/1.1973316.1337069204!categorylarge/1673890299.jpg http://cdn01.tv4.se/polopoly_fs/1.1973316.1337069204!image-large/3887389770.jpg http://cdn01.tv4.se/polopoly_fs/1.1973316.1337069204!image-logo/3619798912.png Hela program 12 true false false true 1.1973317 Senast tillagt inom Dokumentärer 4 true true true false Alla 1.2063725,1.2544107,1.2301959,1.2496859,1.2668676,1.2437873,1.2496855,1.2588849,1.1973474,1.2615840,1.2530679,1.2486341,1.2588900,1.2527876,1.2457570,1.2681630,1.1854778,1.2624242,1.1848699 Den röda insatsstyrkan är en kanadensisk dokumentärserie om männen och kvinnorna i Kanadas nationella polisstyrka, den ridande polisen. SE 115.111.227.14 115.111.227.6 25.19.39.117 210.94.41.89 217.67.201.237 217.67.201.162;SE Visas i tv4fakta true http://cdn01.tv4.se/polopoly_fs/1.1973196.1329828769!image/3100303185.jpg http://cdn01.tv4.se/polopoly_fs/1.1973196.1329828769!smallformatimage/370547443.jpg http://cdn01.tv4.se/polopoly_fs/1.1973196.1329828769!categorylarge/634398008.jpg http://cdn01.tv4.se/polopoly_fs/1.1973196.1329828769!image-large/1494749307.jpg http://cdn01.tv4.se/polopoly_fs/1.1973196.1329828769!image-logo/4146953034.png Hela program 12 true false false true 1.1973211 Senast tillagt inom Dokumentärer 4 true true true false Alla 1.2063725,1.2544107,1.2301959,1.2496859,1.2668676,1.2437873,1.2496855,1.2588849,1.1973474,1.2615840,1.2530679,1.2486341,1.2588900,1.2527876,1.2457570,1.2681630,1.1854778,1.2624242,1.1848699 http://cdn01.tv4.se/polopoly_fs/1.1965798.1337069322!originallogoimage/3562358511.png http://cdn01.tv4.se/polopoly_fs/1.1965798.1337069322!originalformatimage/431405360.jpg http://cdn01.tv4.se/polopoly_fs/1.1965798.1337069322!originalcarouselimage/2198062951.jpg När Sverige blev rikt skildrar Sveriges förvandling från fattigt u-land till ett av världens rikaste länder på drygt 100 år. Visas i tv4fakta true http://cdn01.tv4.se/polopoly_fs/1.1965798.1337069322!image/4929478.jpg http://cdn01.tv4.se/polopoly_fs/1.1965798.1337069322!smallformatimage/2929193572.jpg http://cdn01.tv4.se/polopoly_fs/1.1965798.1337069322!image-logo/3099130150.png Hela program 12 true false false true 1.1972089 Senast tillagt inom Dokumentärer 4 true true true false Alla 1.2063725,1.2544107,1.2301959,1.2496859,1.2668676,1.2437873,1.2496855,1.2588849,1.1973474,1.2615840,1.2530679,1.2486341,1.2588900,1.2527876,1.2457570,1.2681630,1.1854778,1.2624242,1.1848699 Världens adoptioner är en amerikansk dokumentärserie från 2004 som sänds i 30 delar. Här följer man familjer som adopterat. Föräldrarna berättar öppet om sina liv och anledningen till adoptionen. De biologiska föräldrarna kommer också till tals och berättar sin historia om varför de adopterar bort sitt barn, SE 115.111.227.14 115.111.227.6 25.19.39.117 210.94.41.89 217.67.201.237 217.67.201.162;SE Visas i tv4fakta true http://cdn01.tv4.se/polopoly_fs/1.1973518.1329828732!image/1133865482.jpg http://cdn01.tv4.se/polopoly_fs/1.1973518.1329828732!smallformatimage/381437878.jpg http://cdn01.tv4.se/polopoly_fs/1.1973518.1329828732!image-logo/4233258278.png Hela program 12 true false false true 1.1973521 Senast tillagt inom Dokumentärer 4 true true true false Alla 1.2063725,1.2544107,1.2301959,1.2496859,1.2668676,1.2437873,1.2496855,1.2588849,1.1973474,1.2615840,1.2530679,1.2486341,1.2588900,1.2527876,1.2457570,1.2681630,1.1854778,1.2624242,1.1848699 Dokumentärserie om sanningen bakom amerikansk media och hur den undersökande journalistiken påverkar människans syn på världen. SE 129.35.209.170 58.247.178.245 115.111.227.14 115.111.227.6 25.19.39.117 210.94.41.89 217.67.201.237 217.67.201.162 Visas i tv4fakta true http://cdn01.tv4.se/polopoly_fs/1.1968401.1337070473!image/1528083365.jpg http://cdn01.tv4.se/polopoly_fs/1.1968401.1337070473!smallformatimage/2129050323.jpg http://cdn01.tv4.se/polopoly_fs/1.1968401.1337070473!categorylarge/2184432229.jpg http://cdn01.tv4.se/polopoly_fs/1.1968401.1337070473!image-large/1294443894.jpg http://cdn01.tv4.se/polopoly_fs/1.1968401.1337070473!image-logo/3964475422.png Hela program 12 true true false false 1.1968424 Senast tillagt inom Dokumentärer 4 true true true false Alla 1.2063725,1.2544107,1.2301959,1.2496859,1.2668676,1.2437873,1.2496855,1.2588849,1.1973474,1.2615840,1.2530679,1.2486341,1.2588900,1.2527876,1.2457570,1.2681630,1.1854778,1.2624242,1.1848699 Äkta makarna Eric och Lisa Kelly hör till världens bästa sprängexperter och demolerar byggnader världen runt. SE 129.35.209.170 58.247.178.245 115.111.227.14 115.111.227.6 25.19.39.117 210.94.41.89 217.67.201.237 217.67.201.162 Visas i tv4plus true http://cdn01.tv4.se/polopoly_fs/1.1968426.1337604362!image/1979790995.jpg http://cdn01.tv4.se/polopoly_fs/1.1968426.1337604362!smallformatimage/1632671903.jpg http://cdn01.tv4.se/polopoly_fs/1.1968426.1337604362!categorylarge/3942496775.jpg http://cdn01.tv4.se/polopoly_fs/1.1968426.1337604362!image-large/3202072765.jpg http://cdn01.tv4.se/polopoly_fs/1.1968426.1337604362!image-logo/1163645548.png Hela program 12 true true false false 1.1968430 Senast tillagt inom Dokumentärer 4 true true true false Alla 1.2063725,1.2544107,1.2301959,1.2496859,1.2668676,1.2437873,1.2496855,1.2588849,1.1973474,1.2615840,1.2530679,1.2486341,1.2588900,1.2527876,1.2457570,1.2681630,1.1854778,1.2624242,1.1848699 Bakom kulisserna på en hektisk akutmottagning där personalen kämpar både med den egna vardagen och för att rädda patienternas liv. SE 115.111.227.14 115.111.227.6 25.19.39.117 210.94.41.89 217.67.201.237 217.67.201.162;SE Visas i tv4fakta true http://cdn01.tv4.se/polopoly_fs/1.1959894.1337070687!image/1986722767.jpg http://cdn01.tv4.se/polopoly_fs/1.1959894.1337070687!smallformatimage/1993586921.jpg http://cdn01.tv4.se/polopoly_fs/1.1959894.1337070687!image-logo/1866069875.png Hela program 12 true false false false 1.1971956 Senast tillagt inom Dokumentärer 4 true true true false Alla 1.2063725,1.2544107,1.2301959,1.2496859,1.2668676,1.2437873,1.2496855,1.2588849,1.1973474,1.2615840,1.2530679,1.2486341,1.2588900,1.2527876,1.2457570,1.2681630,1.1854778,1.2624242,1.1848699 Om den lokala polisen på några karibiska öar. På Jamaica, i Trinidad och Tobago och St Lucia följer ett kamerateam poliserna när de bekämpar olika brott. De möter allt från drogsmuggling och mord till problem som är direktlänkade till den växande turismen. Visas i tv4 true http://cdn01.tv4.se/polopoly_fs/1.1968453.1329828663!image/3222119898.jpg http://cdn01.tv4.se/polopoly_fs/1.1968453.1329828663!smallformatimage/2502199398.jpg http://cdn01.tv4.se/polopoly_fs/1.1968453.1329828663!categorylarge/1389857828.jpg http://cdn01.tv4.se/polopoly_fs/1.1968453.1329828663!image-large/1100957198.jpg http://cdn01.tv4.se/polopoly_fs/1.1968453.1329828663!image-logo/1014478218.png Hela program 12 true false false true 1.1972131 Senast tillagt inom Dokumentärer 4 true true true false Alla 1.2063725,1.2544107,1.2301959,1.2496859,1.2668676,1.2437873,1.2496855,1.2588849,1.1973474,1.2615840,1.2530679,1.2486341,1.2588900,1.2527876,1.2457570,1.2681630,1.1854778,1.2624242,1.1848699 Bedrägerier för många miljarder dollar sker varje år. Programserien tar upp olika sorters bedrägerier, från pyramidspel till identitetsstölder. SE 129.35.209.170 58.247.178.245 115.111.227.14 115.111.227.6 25.19.39.117 210.94.41.89 217.67.201.237 217.67.201.162 Visas i tv4fakta true http://cdn01.tv4.se/polopoly_fs/1.1959920.1337071047!image/1701044755.jpg http://cdn01.tv4.se/polopoly_fs/1.1959920.1337071047!smallformatimage/2205396365.jpg http://cdn01.tv4.se/polopoly_fs/1.1959920.1337071047!categorylarge/2431246295.jpg http://cdn01.tv4.se/polopoly_fs/1.1959920.1337071047!image-large/1757695009.jpg http://cdn01.tv4.se/polopoly_fs/1.1959920.1337071047!image-logo/3007850175.png Hela program 12 true false false true 1.1971967 Senast tillagt inom Dokumentärer 4 true true true false Alla 1.2063725,1.2544107,1.2301959,1.2496859,1.2668676,1.2437873,1.2496855,1.2588849,1.1973474,1.2615840,1.2530679,1.2486341,1.2588900,1.2527876,1.2457570,1.2681630,1.1854778,1.2624242,1.1848699 Om en saneringsfirma som städar upp på brottsplatser och tar hand om allt från blodspår till ruttna lik. SE 129.35.209.170 58.247.178.245 115.111.227.14 115.111.227.6 25.19.39.117 210.94.41.89 217.67.201.237 217.67.201.162 Visas i tv4fakta true http://cdn01.tv4.se/polopoly_fs/1.1959927.1337604319!image/3147012768.jpg http://cdn01.tv4.se/polopoly_fs/1.1959927.1337604319!smallformatimage/1772004894.jpg http://cdn01.tv4.se/polopoly_fs/1.1959927.1337604319!categorylarge/149524091.jpg http://cdn01.tv4.se/polopoly_fs/1.1959927.1337604319!image-large/750514787.jpg http://cdn01.tv4.se/polopoly_fs/1.1959927.1337604319!image-logo/2511410931.png Hela program 12 true false false false 1.1971824 Senast tillagt inom Dokumentärer 4 true true true false Alla 1.2063725,1.2544107,1.2301959,1.2496859,1.2668676,1.2437873,1.2496855,1.2588849,1.1973474,1.2615840,1.2530679,1.2486341,1.2588900,1.2527876,1.2457570,1.2681630,1.1854778,1.2624242,1.1848699 Amerikansk serie om poliser som utreder brott begångna i den amerikanska marinen. SE Visas i tv4fakta true http://cdn01.tv4.se/polopoly_fs/1.1965573.1329828614!image/3957217111.jpg http://cdn01.tv4.se/polopoly_fs/1.1965573.1329828614!smallformatimage/2631995871.jpg http://cdn01.tv4.se/polopoly_fs/1.1965573.1329828614!categorylarge/42533281.jpg http://cdn01.tv4.se/polopoly_fs/1.1965573.1329828614!image-large/2406393228.jpg http://cdn01.tv4.se/polopoly_fs/1.1965573.1329828614!image-logo/1106439849.png Hela program 12 true false false true 1.1972021 Senast tillagt inom Dokumentärer 4 true true true false Alla 1.2063725,1.2544107,1.2301959,1.2496859,1.2668676,1.2437873,1.2496855,1.2588849,1.1973474,1.2615840,1.2530679,1.2486341,1.2588900,1.2527876,1.2457570,1.2681630,1.1854778,1.2624242,1.1848699 Genom intervjuer och reportage får vi inblick i komplicerade rättsfall och får höra från alla berörda sidor. Visas i tv4 true http://cdn01.tv4.se/polopoly_fs/1.1965664.1337604267!image/1233162471.jpg http://cdn01.tv4.se/polopoly_fs/1.1965664.1337604267!smallformatimage/2945507193.jpg http://cdn01.tv4.se/polopoly_fs/1.1965664.1337604267!categorylarge/558914958.jpg http://cdn01.tv4.se/polopoly_fs/1.1965664.1337604267!image-large/1852686931.jpg http://cdn01.tv4.se/polopoly_fs/1.1965664.1337604267!image-logo/2678805579.png http://cdn01.tv4.se/polopoly_fs/1.1965664.1337604267!small-image-logo/2911524690.png Senaste programmen 12 true false false true 1.1972077 Senast tillagt inom Dokumentärer 4 true true true false Alla 1.2063725,1.2544107,1.2301959,1.2496859,1.2668676,1.2437873,1.2496855,1.2588849,1.1973474,1.2615840,1.2530679,1.2486341,1.2588900,1.2527876,1.2457570,1.2681630,1.1854778,1.2624242,1.1848699 Tre mödrar försöker berätta hur det är att ha ett barn som är dömt för mord. SE 115.111.227.14 115.111.227.6 25.19.39.117 210.94.41.89 217.67.201.237 217.67.201.162;SE Visas i tv4fakta true http://cdn01.tv4.se/polopoly_fs/1.1965625.1337604227!image/1085502648.jpg http://cdn01.tv4.se/polopoly_fs/1.1965625.1337604227!smallformatimage/4000297242.jpg http://cdn01.tv4.se/polopoly_fs/1.1965625.1337604227!categorylarge/1666771104.jpg http://cdn01.tv4.se/polopoly_fs/1.1965625.1337604227!image-large/2364616895.jpg http://cdn01.tv4.se/polopoly_fs/1.1965625.1337604227!image-logo/1436911889.png Hela program 12 true false false true 1.1972062 Senast tillagt inom Dokumentärer 4 true true true false Alla 1.2063725,1.2544107,1.2301959,1.2496859,1.2668676,1.2437873,1.2496855,1.2588849,1.1973474,1.2615840,1.2530679,1.2486341,1.2588900,1.2527876,1.2457570,1.2681630,1.1854778,1.2624242,1.1848699 Med dold kamera undersöker programmet hur stort inflytande auktoriteter har på människors handlingar. SE 115.111.227.14 115.111.227.6 25.19.39.117 210.94.41.89 217.67.201.237 217.67.201.162;SE Visas i tv4fakta true http://cdn01.tv4.se/polopoly_fs/1.1965523.1337071744!image/2457529474.jpg http://cdn01.tv4.se/polopoly_fs/1.1965523.1337071744!smallformatimage/725207682.jpg http://cdn01.tv4.se/polopoly_fs/1.1965523.1337071744!categorylarge/164038987.jpg http://cdn01.tv4.se/polopoly_fs/1.1965523.1337071744!image-large/2377538810.jpg http://cdn01.tv4.se/polopoly_fs/1.1965523.1337071744!image-logo/580059093.png Hela program 12 true false false true 1.1972014 Senast tillagt inom Dokumentärer 4 true true true false Alla 1.2063725,1.2544107,1.2301959,1.2496859,1.2668676,1.2437873,1.2496855,1.2588849,1.1973474,1.2615840,1.2530679,1.2486341,1.2588900,1.2527876,1.2457570,1.2681630,1.1854778,1.2624242,1.1848699 Här tar man upp svårförklarliga dödsfall och försöker med vetenskapliga metoder förklara hur de har inträffat. SE;SE 115.111.227.14 115.111.227.6 25.19.39.117 210.94.41.89 217.67.201.237 217.67.201.162 Visas i tv4 true http://cdn01.tv4.se/polopoly_fs/1.1965713.1329828461!image/2828115140.jpg http://cdn01.tv4.se/polopoly_fs/1.1965713.1329828461!smallformatimage/2224689011.jpg http://cdn01.tv4.se/polopoly_fs/1.1965713.1329828461!categorylarge/2687957256.jpg http://cdn01.tv4.se/polopoly_fs/1.1965713.1329828461!image-large/2221180176.jpg http://cdn01.tv4.se/polopoly_fs/1.1965713.1329828461!image-logo/3056705278.png Hela program 12 true false false true 1.1972086 Senast tillagt inom Dokumentärer 4 true true true false Alla 1.2063725,1.2544107,1.2301959,1.2496859,1.2668676,1.2437873,1.2496855,1.2588849,1.1973474,1.2615840,1.2530679,1.2486341,1.2588900,1.2527876,1.2457570,1.2681630,1.1854778,1.2624242,1.1848699 Australiensisk dokumentärserie om semesterfirare som hamnat i skrämmande och farliga situationer utomlands. SE;SE 115.111.227.14 115.111.227.6 25.19.39.117 210.94.41.89 217.67.201.237 217.67.201.162 Visas i tv4fakta true http://cdn01.tv4.se/polopoly_fs/1.1973152.1337073050!image/3389474317.jpg http://cdn01.tv4.se/polopoly_fs/1.1973152.1337073050!smallformatimage/2670619569.jpg http://cdn01.tv4.se/polopoly_fs/1.1973152.1337073050!categorylarge/1490907123.jpg http://cdn01.tv4.se/polopoly_fs/1.1973152.1337073050!image-large/1268098521.jpg http://cdn01.tv4.se/polopoly_fs/1.1973152.1337073050!image-logo/532033680.png Hela program 12 true false false true 1.1973156 Senast tillagt inom Dokumentärer 4 true true true false Alla 1.2063725,1.2544107,1.2301959,1.2496859,1.2668676,1.2437873,1.2496855,1.2588849,1.1973474,1.2615840,1.2530679,1.2486341,1.2588900,1.2527876,1.2457570,1.2681630,1.1854778,1.2624242,1.1848699 Polisens egna filmer visar hur en förhörsprocess går till och hur olika förhörsmetoder kan få fram värdefull information. SE 115.111.227.14 115.111.227.6 25.19.39.117 210.94.41.89 217.67.201.237 217.67.201.162;SE Visas i tv4fakta true http://cdn01.tv4.se/polopoly_fs/1.1965613.1337073145!image/659824325.jpg http://cdn01.tv4.se/polopoly_fs/1.1965613.1337073145!smallformatimage/2419450963.jpg http://cdn01.tv4.se/polopoly_fs/1.1965613.1337073145!categorylarge/3681150885.jpg http://cdn01.tv4.se/polopoly_fs/1.1965613.1337073145!image-large/1917425960.jpg http://cdn01.tv4.se/polopoly_fs/1.1965613.1337073145!image-logo/1076239025.png Hela program 12 true false false true 1.1972059 Senast tillagt inom Dokumentärer 4 true true true false Alla 1.2063725,1.2544107,1.2301959,1.2496859,1.2668676,1.2437873,1.2496855,1.2588849,1.1973474,1.2615840,1.2530679,1.2486341,1.2588900,1.2527876,1.2457570,1.2681630,1.1854778,1.2624242,1.1848699 http://cdn01.tv4.se/polopoly_fs/1.1833796.1337073383!mobileimage/67018385.png http://cdn01.tv4.se/polopoly_fs/1.1833796.1337073383!mobileimage-highres/2762538086.png Tre före detta brittiska poliser har rest till Thailand för att arbeta tillsammans med den thailändska turistpolisstyrkan. SE 115.111.227.14 115.111.227.6 25.19.39.117 210.94.41.89 217.67.201.237 217.67.201.162;SE;SE 115.111.227.14 115.111.227.6 25.19.39.117 210.94.41.89 217.67.201.237 217.67.201.162 Visas i tv4 true http://cdn01.tv4.se/polopoly_fs/1.1833796.1337073383!image/1411597868.png http://cdn01.tv4.se/polopoly_fs/1.1833796.1337073383!smallformatimage/2251192978.png http://cdn01.tv4.se/polopoly_fs/1.1833796.1337073383!categorylarge/1040586431.png http://cdn01.tv4.se/polopoly_fs/1.1833796.1337073383!image-large/3890107259.png http://cdn01.tv4.se/polopoly_fs/1.1833796.1337073383!image-logo/3220296454.png http://cdn01.tv4.se/polopoly_fs/1.1833796.1337073383!small-image-logo/1839222315.png Hela program 12 true true false true Alla 1.1833825 Senast tillagt inom Dokumentärer 4 true true true false Alla 1.2063725,1.2544107,1.2301959,1.2496859,1.2668676,1.2437873,1.2496855,1.2588849,1.1973474,1.2615840,1.2530679,1.2486341,1.2588900,1.2527876,1.2457570,1.2681630,1.1854778,1.2624242,1.1848699 Kanadensisk dokumentärserie om par som hittat nya vägar att bygga ett varaktigt förhållande i dagens samhälle. SE;SE 115.111.227.14 115.111.227.6 25.19.39.117 210.94.41.89 217.67.201.237 217.67.201.162 Visas i tv4fakta true http://cdn01.tv4.se/polopoly_fs/1.1965695.1337073443!image/1195390020.jpg http://cdn01.tv4.se/polopoly_fs/1.1965695.1337073443!smallformatimage/1343330888.jpg http://cdn01.tv4.se/polopoly_fs/1.1965695.1337073443!categorylarge/3609564600.jpg http://cdn01.tv4.se/polopoly_fs/1.1965695.1337073443!image-large/789055054.jpg http://cdn01.tv4.se/polopoly_fs/1.1965695.1337073443!image-logo/4102319312.png Hela program 12 true false false true 1.1972080 Senast tillagt inom Dokumentärer 4 true true true false Alla 1.2063725,1.2544107,1.2301959,1.2496859,1.2668676,1.2437873,1.2496855,1.2588849,1.1973474,1.2615840,1.2530679,1.2486341,1.2588900,1.2527876,1.2457570,1.2681630,1.1854778,1.2624242,1.1848699 Här följer man sjukvårdare i England som använder motorcykel för att snabbt ta sig till olycksplatsen när de rycker ut. SE 115.111.227.14 115.111.227.6 25.19.39.117 210.94.41.89 217.67.201.237 217.67.201.162;SE Visas i tv4fakta true http://cdn01.tv4.se/polopoly_fs/1.1965629.1337073526!image/1598336060.jpg http://cdn01.tv4.se/polopoly_fs/1.1965629.1337073526!smallformatimage/679209652.jpg http://cdn01.tv4.se/polopoly_fs/1.1965629.1337073526!categorylarge/1515513744.png http://cdn01.tv4.se/polopoly_fs/1.1965629.1337073526!image-large/3371216639.png http://cdn01.tv4.se/polopoly_fs/1.1965629.1337073526!image-logo/4135626071.png Hela program 12 true false false true 1.1972068 Senast tillagt inom Dokumentärer 4 true true true false Alla 1.2063725,1.2544107,1.2301959,1.2496859,1.2668676,1.2437873,1.2496855,1.2588849,1.1973474,1.2615840,1.2530679,1.2486341,1.2588900,1.2527876,1.2457570,1.2681630,1.1854778,1.2624242,1.1848699 Om 15 kvinnor i Maricona-fängelset i Arizona, USA:s enda fängelse med fastkedjade brottslingar. SE 115.111.227.14 115.111.227.6 25.19.39.117 210.94.41.89 217.67.201.237 217.67.201.162;SE Visas i tv4fakta true http://cdn01.tv4.se/polopoly_fs/1.1973168.1337604540!image/1649156184.jpg http://cdn01.tv4.se/polopoly_fs/1.1973168.1337604540!smallformatimage/3675194968.jpg http://cdn01.tv4.se/polopoly_fs/1.1973168.1337604540!categorylarge/4193371537.jpg http://cdn01.tv4.se/polopoly_fs/1.1973168.1337604540!image-logo/774374547.png Hela program 12 true false false true 1.1973179 Senast tillagt inom Dokumentärer 4 true true true false Alla 1.2063725,1.2544107,1.2301959,1.2496859,1.2668676,1.2437873,1.2496855,1.2588849,1.1973474,1.2615840,1.2530679,1.2486341,1.2588900,1.2527876,1.2457570,1.2681630,1.1854778,1.2624242,1.1848699 Om fyra familjer och de vedermödor som det innebär att fostra flera barn samtidigt. SE 115.111.227.14 115.111.227.6 25.19.39.117 210.94.41.89 217.67.201.237 217.67.201.162;SE Visas i tv4fakta true http://cdn01.tv4.se/polopoly_fs/1.1973322.1337604680!image/475889318.jpg http://cdn01.tv4.se/polopoly_fs/1.1973322.1337604680!smallformatimage/4199362872.jpg http://cdn01.tv4.se/polopoly_fs/1.1973322.1337604680!categorylarge/635008761.jpg http://cdn01.tv4.se/polopoly_fs/1.1973322.1337604680!image-large/301650068.jpg http://cdn01.tv4.se/polopoly_fs/1.1973322.1337604680!image-logo/3396778506.png Hela program 4 true false false true 1.1973323 Senast tillagt inom Dokumentärer 4 true true true false Alla 1.2063725,1.2544107,1.2301959,1.2496859,1.2668676,1.2437873,1.2496855,1.2588849,1.1973474,1.2615840,1.2530679,1.2486341,1.2588900,1.2527876,1.2457570,1.2681630,1.1854778,1.2624242,1.1848699 Följ actionstjärnan Steven Seagal i en helt ny roll, som vice sheriff i Louisiana. SE 115.111.227.14 115.111.227.6 25.19.39.117 210.94.41.89 217.67.201.237 217.67.201.162;SE;SE 115.111.227.14 115.111.227.6 25.19.39.117 210.94.41.89 217.67.201.237 217.67.201.162;SE Visas i tv4 true http://cdn01.tv4.se/polopoly_fs/1.1968508.1337604810!image/1333096667.jpg http://cdn01.tv4.se/polopoly_fs/1.1968508.1337604810!smallformatimage/2083286765.jpg http://cdn01.tv4.se/polopoly_fs/1.1968508.1337604810!categorylarge/3858533151.jpg http://cdn01.tv4.se/polopoly_fs/1.1968508.1337604810!image-logo/1731540034.png Hela program 12 true true false false 1.1968514 Senast tillagt inom Dokumentärer 4 true true true false Alla 1.2063725,1.2544107,1.2301959,1.2496859,1.2668676,1.2437873,1.2496855,1.2588849,1.1973474,1.2615840,1.2530679,1.2486341,1.2588900,1.2527876,1.2457570,1.2681630,1.1854778,1.2624242,1.1848699 Mobila intensivvårdsteam förflyttar kritiskt sjuka barn till specialiserade sjukhus runt om i Storbritannien. SE 115.111.227.14 115.111.227.6 25.19.39.117 210.94.41.89 217.67.201.237 217.67.201.162;SE Visas i tv4fakta true http://cdn01.tv4.se/polopoly_fs/1.1959887.1337604912!image/1013449686.jpg http://cdn01.tv4.se/polopoly_fs/1.1959887.1337604912!smallformatimage/3665316936.jpg http://cdn01.tv4.se/polopoly_fs/1.1959887.1337604912!categorylarge/3387047442.jpg http://cdn01.tv4.se/polopoly_fs/1.1959887.1337604912!image-large/835694052.jpg http://cdn01.tv4.se/polopoly_fs/1.1959887.1337604912!image-logo/2750728073.png Hela program 4 true false false false 1.1971945 Senast tillagt inom Dokumentärer 4 true true true false Alla 1.2063725,1.2544107,1.2301959,1.2496859,1.2668676,1.2437873,1.2496855,1.2588849,1.1973474,1.2615840,1.2530679,1.2486341,1.2588900,1.2527876,1.2457570,1.2681630,1.1854778,1.2624242,1.1848699 Polisen i Kalifornien försöker förebygga och lösa uppblossande konflikter när frigivna fångar släpps ut i samhället igen. SE 115.111.227.14 115.111.227.6 25.19.39.117 210.94.41.89 217.67.201.237 217.67.201.162 Visas i tv4fakta true http://cdn01.tv4.se/polopoly_fs/1.1973138.1337606949!image/3088961396.jpg http://cdn01.tv4.se/polopoly_fs/1.1973138.1337606949!smallformatimage/1908689668.jpg http://cdn01.tv4.se/polopoly_fs/1.1973138.1337606949!categorylarge/2366716850.jpg http://cdn01.tv4.se/polopoly_fs/1.1973138.1337606949!image-logo/2147634130.png Hela program 12 true false false true 1.1973146 Senast tillagt inom Dokumentärer 4 true true true false Alla 1.2063725,1.2544107,1.2301959,1.2496859,1.2668676,1.2437873,1.2496855,1.2588849,1.1973474,1.2615840,1.2530679,1.2486341,1.2588900,1.2527876,1.2457570,1.2681630,1.1854778,1.2624242,1.1848699 Serien följer blivande och nyutbildade poliser i australiska New South Wales, en av de största polisstyrkorna i världen. SE 115.111.227.14 115.111.227.6 25.19.39.117 210.94.41.89 217.67.201.237 217.67.201.162;SE Visas i tv4fakta true http://cdn01.tv4.se/polopoly_fs/1.1968469.1337607115!image/532872178.jpg http://cdn01.tv4.se/polopoly_fs/1.1968469.1337607115!smallformatimage/4191335532.jpg http://cdn01.tv4.se/polopoly_fs/1.1968469.1337607115!categorylarge/3930637878.jpg http://cdn01.tv4.se/polopoly_fs/1.1968469.1337607115!image-large/308630976.jpg http://cdn01.tv4.se/polopoly_fs/1.1968469.1337607115!image-logo/3387506526.png Hela program 12 true false false true 1.1972143 Senast tillagt inom Dokumentärer 4 true true true false Alla 1.2063725,1.2544107,1.2301959,1.2496859,1.2668676,1.2437873,1.2496855,1.2588849,1.1973474,1.2615840,1.2530679,1.2486341,1.2588900,1.2527876,1.2457570,1.2681630,1.1854778,1.2624242,1.1848699 Övervakningskameror fångar olämpliga och omoraliska beteenden på olika arbetsplatser. SE 129.35.209.170 58.247.178.245 115.111.227.14 115.111.227.6 25.19.39.117 210.94.41.89 217.67.201.237 217.67.201.162 Visas i tv4plus true http://cdn01.tv4.se/polopoly_fs/1.1968434.1337607214!image/1611578156.jpg http://cdn01.tv4.se/polopoly_fs/1.1968434.1337607214!smallformatimage/973957185.jpg http://cdn01.tv4.se/polopoly_fs/1.1968434.1337607214!image-logo/2501600165.png Hela program 12 true false false true 1.1972109 Senast tillagt inom Dokumentärer 4 true true true false Alla 1.2063725,1.2544107,1.2301959,1.2496859,1.2668676,1.2437873,1.2496855,1.2588849,1.1973474,1.2615840,1.2530679,1.2486341,1.2588900,1.2527876,1.2457570,1.2681630,1.1854778,1.2624242,1.1848699 http://cdn01.tv4.se/polopoly_fs/1.1969816.1337607312!originallogoimage/2640786964.png http://cdn01.tv4.se/polopoly_fs/1.1969816.1337607312!originalformatimage/845209440.jpg http://cdn01.tv4.se/polopoly_fs/1.1969816.1337607312!originalcarouselimage/1902714742.jpg Svensk dokumentärserie om sju barn som alla satsar på att bli stjärnor inom olika områden. Visas i tv4 http://www.tv4.se/jag_ska_bli_stjarna true http://cdn01.tv4.se/polopoly_fs/1.1969816.1337607312!image/4063584224.jpg http://cdn01.tv4.se/polopoly_fs/1.1969816.1337607312!smallformatimage/3848597996.jpg http://cdn01.tv4.se/polopoly_fs/1.1969816.1337607312!categorylarge/3387699130.png http://cdn01.tv4.se/polopoly_fs/1.1969816.1337607312!image-large/729915417.png http://cdn01.tv4.se/polopoly_fs/1.1969816.1337607312!image-logo/2911929238.png Hela program 4 true false false false 1.1971788 Senast tillagt inom Dokumentärer 4 true true true false Alla 1.2063725,1.2544107,1.2301959,1.2496859,1.2668676,1.2437873,1.2496855,1.2588849,1.1973474,1.2615840,1.2530679,1.2486341,1.2588900,1.2527876,1.2457570,1.2681630,1.1854778,1.2624242,1.1848699 http://cdn01.tv4.se/polopoly_fs/1.1968456.1329828126!mobileimage/1752771424.jpg http://cdn01.tv4.se/polopoly_fs/1.1968456.1329828126!mobileimage-logo/3306686814.png http://cdn01.tv4.se/polopoly_fs/1.1968456.1329828126!mobileimage-large/4246260753.jpg http://cdn01.tv4.se/polopoly_fs/1.1968456.1329828126!mobileimage-highres/221361014.jpg http://cdn01.tv4.se/polopoly_fs/1.1968456.1329828126!mobileimage-logo-highres/241040483.png http://cdn01.tv4.se/polopoly_fs/1.1968456.1329828126!mobileimage-large-highres/1176737983.jpg I programserien Prinsar och prinsessors andra säsong står några av Europas mest omskrivna och populära prinsessor i strålkastarljuset. Visas i tv4plus true http://cdn01.tv4.se/polopoly_fs/1.1968456.1329828126!image/343713546.jpg http://cdn01.tv4.se/polopoly_fs/1.1968456.1329828126!smallformatimage/3606999424.jpg http://cdn01.tv4.se/polopoly_fs/1.1968456.1329828126!categorylarge/1324065336.jpg http://cdn01.tv4.se/polopoly_fs/1.1968456.1329828126!image-large/2504205092.jpg http://cdn01.tv4.se/polopoly_fs/1.1968456.1329828126!image-logo/581337890.png Hela program 12 true false false true 1.1972134 Senast tillagt inom Dokumentärer 4 true true true false Alla 1.2063725,1.2544107,1.2301959,1.2496859,1.2668676,1.2437873,1.2496855,1.2588849,1.1973474,1.2615840,1.2530679,1.2486341,1.2588900,1.2527876,1.2457570,1.2681630,1.1854778,1.2624242,1.1848699 Ett kamerateam följer nyutexaminerade poliskadetter när de gör sin tolv veckor långa provtjänstgöring. SE;SE 115.111.227.14 115.111.227.6 25.19.39.117 210.94.41.89 217.67.201.237 217.67.201.162 Visas i tv4fakta true http://cdn01.tv4.se/polopoly_fs/1.1968480.1337607445!image/2386747863.jpg http://cdn01.tv4.se/polopoly_fs/1.1968480.1337607445!smallformatimage/3172728801.jpg http://cdn01.tv4.se/polopoly_fs/1.1968480.1337607445!categorylarge/617290259.jpg http://cdn01.tv4.se/polopoly_fs/1.1968480.1337607445!image-large/4047416794.jpg http://cdn01.tv4.se/polopoly_fs/1.1968480.1337607445!image-logo/4131385203.png Hela program 12 true false false true 1.1972200 Senast tillagt inom Dokumentärer 4 true true true false Alla 1.2063725,1.2544107,1.2301959,1.2496859,1.2668676,1.2437873,1.2496855,1.2588849,1.1973474,1.2615840,1.2530679,1.2486341,1.2588900,1.2527876,1.2457570,1.2681630,1.1854778,1.2624242,1.1848699 Rikshospitalet är det mest avancerade och framåtskridande sjukhuset i Danmark med de främsta specialistläkarna och de mest moderna metoderna. SE 115.111.227.14 115.111.227.6 25.19.39.117 210.94.41.89 217.67.201.237 217.67.201.162;SE Visas i tv4fakta true http://cdn01.tv4.se/polopoly_fs/1.1965484.1329828093!image/1198829623.jpg http://cdn01.tv4.se/polopoly_fs/1.1965484.1329828093!smallformatimage/1098434249.jpg http://cdn01.tv4.se/polopoly_fs/1.1965484.1329828093!image-logo/3535450273.png http://cdn01.tv4.se/polopoly_fs/1.1965484.1329828093!small-image-logo/1685042653.png Senaste programmen 12 true false false true 1.1971985 Senast tillagt inom Dokumentärer 4 true true true false Alla 1.2063725,1.2544107,1.2301959,1.2496859,1.2668676,1.2437873,1.2496855,1.2588849,1.1973474,1.2615840,1.2530679,1.2486341,1.2588900,1.2527876,1.2457570,1.2681630,1.1854778,1.2624242,1.1848699 Livräddarna som patrullerar Australiens många stränder kan utgöra skillnaden mellan liv och död för turister och lokalbefolkning. SE 115.111.227.14 115.111.227.6 25.19.39.117 210.94.41.89 217.67.201.237 217.67.201.162;SE Visas i tv4fakta true http://cdn01.tv4.se/polopoly_fs/1.1968516.1337607567!image/2362262155.jpg http://cdn01.tv4.se/polopoly_fs/1.1968516.1337607567!smallformatimage/286692409.jpg http://cdn01.tv4.se/polopoly_fs/1.1968516.1337607567!categorylarge/2112773730.jpg http://cdn01.tv4.se/polopoly_fs/1.1968516.1337607567!image-large/3541357652.jpg http://cdn01.tv4.se/polopoly_fs/1.1968516.1337607567!image-logo/3890748468.png http://cdn01.tv4.se/polopoly_fs/1.1968516.1337607567!small-image-logo/2472265572.png Senaste programmen 12 true true false false 1.1968517 Senast tillagt inom Dokumentärer 4 true true true false Alla 1.2063725,1.2544107,1.2301959,1.2496859,1.2668676,1.2437873,1.2496855,1.2588849,1.1973474,1.2615840,1.2530679,1.2486341,1.2588900,1.2527876,1.2457570,1.2681630,1.1854778,1.2624242,1.1848699 http://cdn01.tv4.se/polopoly_fs/1.1968511.1337607623!mobileimage/128705273.jpg http://cdn01.tv4.se/polopoly_fs/1.1968511.1337607623!mobileimage-highres/766765399.jpg Om livräddare och poliser som räddar liv och håller ordning på stränderna i Miami, Hawaii och San Diego. SE;SE 115.111.227.14 115.111.227.6 25.19.39.117 210.94.41.89 217.67.201.237 217.67.201.162 Visas i tv4fakta true http://cdn01.tv4.se/polopoly_fs/1.1968511.1337607623!image/3137120068.jpg http://cdn01.tv4.se/polopoly_fs/1.1968511.1337607623!smallformatimage/62882116.jpg http://cdn01.tv4.se/polopoly_fs/1.1968511.1337607623!categorylarge/557925005.jpg http://cdn01.tv4.se/polopoly_fs/1.1968511.1337607623!image-logo/169128979.png Hela program 12 true true false false 1.1968512 Senast tillagt inom Dokumentärer 4 true true true false Alla 1.2063725,1.2544107,1.2301959,1.2496859,1.2668676,1.2437873,1.2496855,1.2588849,1.1973474,1.2615840,1.2530679,1.2486341,1.2588900,1.2527876,1.2457570,1.2681630,1.1854778,1.2624242,1.1848699 http://cdn01.tv4.se/polopoly_fs/1.1959899.1337607681!originallogoimage/1190444202.png http://cdn01.tv4.se/polopoly_fs/1.1959899.1337607681!originalformatimage/2947899275.jpg http://cdn01.tv4.se/polopoly_fs/1.1959899.1337607681!originalcarouselimage/431106892.jpg Ambulansen är alltid först på olycksplatsen och personalens arbete och deras snabba insatser avgör de olycksdrabbades framtid. SE Visas i tv4fakta true Hela program 4 true false false true 1.1971782 Senast tillagt inom Dokumentärer 4 true true true false Alla 1.2063725,1.2544107,1.2301959,1.2496859,1.2668676,1.2437873,1.2496855,1.2588849,1.1973474,1.2615840,1.2530679,1.2486341,1.2588900,1.2527876,1.2457570,1.2681630,1.1854778,1.2624242,1.1848699 Här visas unika bilder från arbetet på en förlossningsavdelning. Frågor om liv och död, lycka och sorg ställs ständigt på sin spets. SE 115.111.227.14 115.111.227.6 25.19.39.117 210.94.41.89 217.67.201.237 217.67.201.162;SE Visas i tv4fakta true http://cdn01.tv4.se/polopoly_fs/1.1973493.1337607739!image/3036055883.jpg http://cdn01.tv4.se/polopoly_fs/1.1973493.1337607739!smallformatimage/3109642659.jpg http://cdn01.tv4.se/polopoly_fs/1.1973493.1337607739!image-logo/1700975212.png Hela program 12 true false false true 1.1973497 Senast tillagt inom Dokumentärer 4 true true true false Alla 1.2063725,1.2544107,1.2301959,1.2496859,1.2668676,1.2437873,1.2496855,1.2588849,1.1973474,1.2615840,1.2530679,1.2486341,1.2588900,1.2527876,1.2457570,1.2681630,1.1854778,1.2624242,1.1848699 http://cdn01.tv4.se/polopoly_fs/1.1955522.1329827943!mobileimage/2823540255.jpg http://cdn01.tv4.se/polopoly_fs/1.1955522.1329827943!mobileimage-logo/2111261462.png http://cdn01.tv4.se/polopoly_fs/1.1955522.1329827943!mobileimage-large/2844354240.jpg http://cdn01.tv4.se/polopoly_fs/1.1955522.1329827943!mobileimage-highres/253603048.jpg http://cdn01.tv4.se/polopoly_fs/1.1955522.1329827943!mobileimage-logo-highres/3227760912.png http://cdn01.tv4.se/polopoly_fs/1.1955522.1329827943!mobileimage-large-highres/1199763045.jpg Programmet visar och berättar vad som ligger till grund för en diagnos, hur utsikterna för det sjuka eller skadade djuret ser ut och vilka behandlingar som är aktuella. SE 129.35.209.170 58.247.178.245 115.111.227.14 115.111.227.6 25.19.39.117 210.94.41.89 217.67.201.237 217.67.201.162 Visas i tv4 true http://cdn01.tv4.se/polopoly_fs/1.1955522.1329827943!image/4288026274.jpg http://cdn01.tv4.se/polopoly_fs/1.1955522.1329827943!smallformatimage/765143580.jpg http://cdn01.tv4.se/polopoly_fs/1.1955522.1329827943!categorylarge/902756335.jpg http://cdn01.tv4.se/polopoly_fs/1.1955522.1329827943!image-large/3541125404.jpg http://cdn01.tv4.se/polopoly_fs/1.1955522.1329827943!image-logo/225118467.png http://cdn01.tv4.se/polopoly_fs/1.1955522.1329827943!small-image-logo/1718938412.png Hela program 4 true false false false 1.1971829 Senast tillagt inom Dokumentärer 4 true true true false Alla 1.2063725,1.2544107,1.2301959,1.2496859,1.2668676,1.2437873,1.2496855,1.2588849,1.1973474,1.2615840,1.2530679,1.2486341,1.2588900,1.2527876,1.2457570,1.2681630,1.1854778,1.2624242,1.1848699 Svensk dokumentärserie om ett antal läkarstuderande på Karolinska institutet. SE 115.111.227.14 115.111.227.6 25.19.39.117 210.94.41.89 217.67.201.237 217.67.201.162;SE Visas i tv4 true http://cdn01.tv4.se/polopoly_fs/1.1963229.1337607801!image/2408123638.jpg http://cdn01.tv4.se/polopoly_fs/1.1963229.1337607801!smallformatimage/2860189056.jpg http://cdn01.tv4.se/polopoly_fs/1.1963229.1337607801!image-logo/3651683646.png Hela program 12 true false false true 1.1971982 Senast tillagt inom Dokumentärer 4 true true true false Alla 1.2063725,1.2544107,1.2301959,1.2496859,1.2668676,1.2437873,1.2496855,1.2588849,1.1973474,1.2615840,1.2530679,1.2486341,1.2588900,1.2527876,1.2457570,1.2681630,1.1854778,1.2624242,1.1848699 Dokumentärserie om fem kvinnor i olika länder som arbetar inom olika grenar av rättsväsendet. SE 115.111.227.14 115.111.227.6 25.19.39.117 210.94.41.89 217.67.201.237 217.67.201.162;SE Visas i tv4fakta true http://cdn01.tv4.se/polopoly_fs/1.1973625.1337607969!image/2309439139.jpg http://cdn01.tv4.se/polopoly_fs/1.1973625.1337607969!smallformatimage/3846356858.jpg http://cdn01.tv4.se/polopoly_fs/1.1973625.1337607969!image-logo/764976628.png http://cdn01.tv4.se/polopoly_fs/1.1973625.1337607969!small-image-logo/877377881.png Hela program 4 true false false true 1.1973631 Senast tillagt inom Dokumentärer 4 true true true false Alla 1.2063725,1.2544107,1.2301959,1.2496859,1.2668676,1.2437873,1.2496855,1.2588849,1.1973474,1.2615840,1.2530679,1.2486341,1.2588900,1.2527876,1.2457570,1.2681630,1.1854778,1.2624242,1.1848699 Här följer man läkare och annan sjukhuspersonal i deras arbete på en stressig akutmottagning. De möter och vårdar patienter som råkat ut för olyckor och de som har allvarliga sjukdomar. SE 129.35.209.170 58.247.178.245 115.111.227.14 115.111.227.6 25.19.39.117 210.94.41.89 217.67.201.237 217.67.201.162 Visas i tv4fakta true http://cdn01.tv4.se/polopoly_fs/1.1973649.1329827857!image/3571799841.jpg http://cdn01.tv4.se/polopoly_fs/1.1973649.1329827857!smallformatimage/1866331449.jpg http://cdn01.tv4.se/polopoly_fs/1.1973649.1329827857!categorylarge/261906408.jpg http://cdn01.tv4.se/polopoly_fs/1.1973649.1329827857!image-logo/764976628.png Hela program 4 true false false true 1.1973654 Senast tillagt inom Dokumentärer 4 true true true false Alla 1.2063725,1.2544107,1.2301959,1.2496859,1.2668676,1.2437873,1.2496855,1.2588849,1.1973474,1.2615840,1.2530679,1.2486341,1.2588900,1.2527876,1.2457570,1.2681630,1.1854778,1.2624242,1.1848699 Från skadade pingviner till kattungar som fastnat i en vägg - utredarna på Aucklands djurräddningscenter, SPCA, på Nya Zeeland har alltid fullt upp. De gör sitt bästa både ute på fältet och på kliniken för att hjälpa och rädda djur som skadats eller behandlats illa av sina ägare. SE 115.111.227.14 115.111.227.6 25.19.39.117 210.94.41.89 217.67.201.237 217.67.201.162;SE Visas i tv4 true http://cdn01.tv4.se/polopoly_fs/1.1955544.1329827833!image/4187090093.jpg http://cdn01.tv4.se/polopoly_fs/1.1955544.1329827833!smallformatimage/4029739304.jpg http://cdn01.tv4.se/polopoly_fs/1.1955544.1329827833!image-logo/1917802865.png Hela program 12 true false false false 1.1971901 Senast tillagt inom Dokumentärer 4 true true true false Alla 1.2063725,1.2544107,1.2301959,1.2496859,1.2668676,1.2437873,1.2496855,1.2588849,1.1973474,1.2615840,1.2530679,1.2486341,1.2588900,1.2527876,1.2457570,1.2681630,1.1854778,1.2624242,1.1848699 http://cdn01.tv4.se/polopoly_fs/1.1984974.1337608135!mobileimage/3679858187.jpg http://cdn01.tv4.se/polopoly_fs/1.1984974.1337608135!mobileimage-logo/3526048035.png http://cdn01.tv4.se/polopoly_fs/1.1984974.1337608135!mobileimage-large/3667166932.jpg http://cdn01.tv4.se/polopoly_fs/1.1984974.1337608135!mobileimage-highres/2080394492.jpg http://cdn01.tv4.se/polopoly_fs/1.1984974.1337608135!mobileimage-logo-highres/1008775558.png http://cdn01.tv4.se/polopoly_fs/1.1984974.1337608135!mobileimage-large-highres/882839153.jpg Djurens beskyddare är en brittisk dokumentärserie om människor som arbetar för att hjälpa djur som misshandlas, glöms bort eller far illa. SE;SE 115.111.227.14 115.111.227.6 25.19.39.117 210.94.41.89 217.67.201.237 217.67.201.162 Visas i tv4fakta true http://cdn01.tv4.se/polopoly_fs/1.1984974.1337608135!image/2357982902.jpg http://cdn01.tv4.se/polopoly_fs/1.1984974.1337608135!smallformatimage/1585891848.jpg http://cdn01.tv4.se/polopoly_fs/1.1984974.1337608135!categorylarge/1188239355.jpg http://cdn01.tv4.se/polopoly_fs/1.1984974.1337608135!image-large/2685184264.jpg http://cdn01.tv4.se/polopoly_fs/1.1984974.1337608135!image-logo/3361639144.png Hela program 4 true false false false 1.1984994 Senast tillagt inom Dokumentärer 4 true true true false Alla 1.2063725,1.2544107,1.2301959,1.2496859,1.2668676,1.2437873,1.2496855,1.2588849,1.1973474,1.2615840,1.2530679,1.2486341,1.2588900,1.2527876,1.2457570,1.2681630,1.1854778,1.2624242,1.1848699 Sarah Beeny och hennes team av experter åker ut och hjälper människor som har köpt hus med stora problem. Det kan handla om allt från fuktskador till mögel som de varit ovetandes om vid köpet och som innebär stora merkostnader som de inte har råd med. SE 129.35.209.170 58.247.178.245 Visas i tv4plus true http://cdn01.tv4.se/polopoly_fs/1.1937295.1329827780!image/3406762797.jpg http://cdn01.tv4.se/polopoly_fs/1.1937295.1329827780!smallformatimage/2433531968.jpg http://cdn01.tv4.se/polopoly_fs/1.1937295.1329827780!categorylarge/1220053059.jpg http://cdn01.tv4.se/polopoly_fs/1.1937295.1329827780!image-large/3712918881.jpg http://cdn01.tv4.se/polopoly_fs/1.1937295.1329827780!image-logo/1041943460.png http://cdn01.tv4.se/polopoly_fs/1.1937295.1329827780!small-image-logo/1730094006.png Hela program 12 true false false false 1.1940251 Senast tillagt inom Dokumentärer 4 true true true false Alla 1.2063725,1.2544107,1.2301959,1.2496859,1.2668676,1.2437873,1.2496855,1.2588849,1.1973474,1.2615840,1.2530679,1.2486341,1.2588900,1.2527876,1.2457570,1.2681630,1.1854778,1.2624242,1.1848699 http://cdn01.tv4.se/polopoly_fs/1.1981519.1337608175!mobileimage/4086789550.jpg http://cdn01.tv4.se/polopoly_fs/1.1981519.1337608175!mobileimage-highres/2226605909.jpg Jurister, forskare och psykologer granskar fall där kvinnor begått sexuella brott och mord tillsammans med en manlig partner. SE;SE 115.111.227.14 115.111.227.6 25.19.39.117 210.94.41.89 217.67.201.237 217.67.201.162 Visas i tv4fakta true http://cdn01.tv4.se/polopoly_fs/1.1981519.1337608175!image/421581918.jpg http://cdn01.tv4.se/polopoly_fs/1.1981519.1337608175!smallformatimage/1020452136.jpg http://cdn01.tv4.se/polopoly_fs/1.1981519.1337608175!image-logo/2927198181.png Hela program 4 true false false false 1.1981521 Senast tillagt inom Dokumentärer 4 true true true false Alla 1.2063725,1.2544107,1.2301959,1.2496859,1.2668676,1.2437873,1.2496855,1.2588849,1.1973474,1.2615840,1.2530679,1.2486341,1.2588900,1.2527876,1.2457570,1.2681630,1.1854778,1.2624242,1.1848699 http://cdn01.tv4.se/polopoly_fs/1.1981524.1337608249!mobileimage/1026608083.jpg http://cdn01.tv4.se/polopoly_fs/1.1981524.1337608249!mobileimage-large/2948365806.jpg http://cdn01.tv4.se/polopoly_fs/1.1981524.1337608249!mobileimage-highres/2091292574.jpg http://cdn01.tv4.se/polopoly_fs/1.1981524.1337608249!mobileimage-large-highres/3966937857.jpg Om människor som har hittat alternativa behandlingsmetoder för sina ovanliga tillstånd. SE;SE 115.111.227.14 115.111.227.6 25.19.39.117 210.94.41.89 217.67.201.237 217.67.201.162 Visas i tv4fakta true http://cdn01.tv4.se/polopoly_fs/1.1981524.1337608249!image/2269863923.jpg http://cdn01.tv4.se/polopoly_fs/1.1981524.1337608249!smallformatimage/2417684991.jpg http://cdn01.tv4.se/polopoly_fs/1.1981524.1337608249!categorylarge/3684692573.jpg http://cdn01.tv4.se/polopoly_fs/1.1981524.1337608249!image-large/598892971.jpg http://cdn01.tv4.se/polopoly_fs/1.1981524.1337608249!image-logo/4164815669.png Hela program 4 true false false false 1.1981530 Senast tillagt inom Dokumentärer 4 true true true false Alla 1.2063725,1.2544107,1.2301959,1.2496859,1.2668676,1.2437873,1.2496855,1.2588849,1.1973474,1.2615840,1.2530679,1.2486341,1.2588900,1.2527876,1.2457570,1.2681630,1.1854778,1.2624242,1.1848699 http://cdn01.tv4.se/polopoly_fs/1.1981534.1329827673!mobileimage/1569869001.jpg http://cdn01.tv4.se/polopoly_fs/1.1981534.1329827673!mobileimage-large/1275019556.jpg http://cdn01.tv4.se/polopoly_fs/1.1981534.1329827673!mobileimage-highres/2129427732.jpg http://cdn01.tv4.se/polopoly_fs/1.1981534.1329827673!mobileimage-large-highres/3987545547.jpg Varje år behöver 4000 personer i Australien ett nytt organ, men antalet donatorer uppgår bara till 200. Här följs patienter i dödligt behov av en transplantation och vårdpersonalens, polisens och kirurgernas arbete med att få fram organen i tid. SE 115.111.227.14 115.111.227.6 25.19.39.117 210.94.41.89 217.67.201.237 217.67.201.162;SE Visas i tv4fakta true http://cdn01.tv4.se/polopoly_fs/1.1981534.1329827673!image/3893714464.jpg http://cdn01.tv4.se/polopoly_fs/1.1981534.1329827673!smallformatimage/3290353047.jpg http://cdn01.tv4.se/polopoly_fs/1.1981534.1329827673!categorylarge/3769777132.jpg http://cdn01.tv4.se/polopoly_fs/1.1981534.1329827673!image-large/3303032820.jpg http://cdn01.tv4.se/polopoly_fs/1.1981534.1329827673!image-logo/4139080730.png http://cdn01.tv4.se/polopoly_fs/1.1981534.1329827673!small-image-logo/3015201266.png Hela program 4 true false false false 1.1981538 Senast tillagt inom Dokumentärer 4 true true true false Alla 1.2063725,1.2544107,1.2301959,1.2496859,1.2668676,1.2437873,1.2496855,1.2588849,1.1973474,1.2615840,1.2530679,1.2486341,1.2588900,1.2527876,1.2457570,1.2681630,1.1854778,1.2624242,1.1848699 http://cdn01.tv4.se/polopoly_fs/1.1981543.1337608362!mobileimage/857334652.jpg http://cdn01.tv4.se/polopoly_fs/1.1981543.1337608362!mobileimage-large/420639999.jpg http://cdn01.tv4.se/polopoly_fs/1.1981543.1337608362!mobileimage-highres/2705313495.jpg http://cdn01.tv4.se/polopoly_fs/1.1981543.1337608362!mobileimage-large-highres/1524408848.jpg Följ med in i operationssalen och se hur läkarna arbetar med nydanande tekniker för bland annat hjärt- och hjärnkirurgi. SE 115.111.227.14 115.111.227.6 25.19.39.117 210.94.41.89 217.67.201.237 217.67.201.162;SE Visas i tv4fakta true http://cdn01.tv4.se/polopoly_fs/1.1981543.1337608362!image/2562442888.jpg http://cdn01.tv4.se/polopoly_fs/1.1981543.1337608362!smallformatimage/2125170966.jpg http://cdn01.tv4.se/polopoly_fs/1.1981543.1337608362!categorylarge/1831992140.jpg http://cdn01.tv4.se/polopoly_fs/1.1981543.1337608362!image-large/2501667002.jpg http://cdn01.tv4.se/polopoly_fs/1.1981543.1337608362!image-logo/1318060580.png Hela program 4 true false false false 1.1981547 Senast tillagt inom Dokumentärer 4 true true true false Alla 1.2063725,1.2544107,1.2301959,1.2496859,1.2668676,1.2437873,1.2496855,1.2588849,1.1973474,1.2615840,1.2530679,1.2486341,1.2588900,1.2527876,1.2457570,1.2681630,1.1854778,1.2624242,1.1848699 http://cdn01.tv4.se/polopoly_fs/1.1981550.1329827469!mobileimage/4116422508.jpg http://cdn01.tv4.se/polopoly_fs/1.1981550.1329827469!mobileimage-large/3536633633.jpg http://cdn01.tv4.se/polopoly_fs/1.1981550.1329827469!mobileimage-highres/32137893.jpg http://cdn01.tv4.se/polopoly_fs/1.1981550.1329827469!mobileimage-large-highres/3810069146.jpg Om militär vårdpersonal i den brittiska armén som räddar liv och sköter om sårade soldater i krig och kriszoner. Bland annat följs vårdpersonal som tjänstgör vid krigsfronten i Irak och Afghanistan. SE 115.111.227.14 115.111.227.6 25.19.39.117 210.94.41.89 217.67.201.237 217.67.201.162;SE Visas i tv4fakta true http://cdn01.tv4.se/polopoly_fs/1.1981550.1329827469!image/1480594086.jpg http://cdn01.tv4.se/polopoly_fs/1.1981550.1329827469!smallformatimage/1441790542.jpg http://cdn01.tv4.se/polopoly_fs/1.1981550.1329827469!categorylarge/2429408291.jpg http://cdn01.tv4.se/polopoly_fs/1.1981550.1329827469!image-large/2216108269.jpg http://cdn01.tv4.se/polopoly_fs/1.1981550.1329827469!image-logo/1318779323.png Hela program 4 true false false false 1.1981558 Senast tillagt inom Dokumentärer 4 true true true false Alla 1.2063725,1.2544107,1.2301959,1.2496859,1.2668676,1.2437873,1.2496855,1.2588849,1.1973474,1.2615840,1.2530679,1.2486341,1.2588900,1.2527876,1.2457570,1.2681630,1.1854778,1.2624242,1.1848699 http://cdn01.tv4.se/polopoly_fs/1.1981565.1337608446!mobileimage/2530785908.jpg http://cdn01.tv4.se/polopoly_fs/1.1981565.1337608446!mobileimage-large/3894238480.jpg http://cdn01.tv4.se/polopoly_fs/1.1981565.1337608446!mobileimage-highres/2666795269.jpg http://cdn01.tv4.se/polopoly_fs/1.1981565.1337608446!mobileimage-large-highres/1582007836.jpg Fredsstyrkan följer ett tiotal svenska soldater i Afghanistan och dokumenterar deras tillvaro, liv och gemenskap. Visas i tv4fakta true http://cdn01.tv4.se/polopoly_fs/1.1981565.1337608446!image/2903302440.jpg http://cdn01.tv4.se/polopoly_fs/1.1981565.1337608446!smallformatimage/2762865837.jpg http://cdn01.tv4.se/polopoly_fs/1.1981565.1337608446!categorylarge/1525828345.jpg http://cdn01.tv4.se/polopoly_fs/1.1981565.1337608446!image-large/1897018897.jpg http://cdn01.tv4.se/polopoly_fs/1.1981565.1337608446!image-logo/1825666233.png Hela program 4 true false false true 1.1981566 Senast tillagt inom Dokumentärer 4 true true true false Alla 1.2063725,1.2544107,1.2301959,1.2496859,1.2668676,1.2437873,1.2496855,1.2588849,1.1973474,1.2615840,1.2530679,1.2486341,1.2588900,1.2527876,1.2457570,1.2681630,1.1854778,1.2624242,1.1848699 http://cdn01.tv4.se/polopoly_fs/1.1981581.1337608479!mobileimage/693266956.jpg http://cdn01.tv4.se/polopoly_fs/1.1981581.1337608479!mobileimage-large/380489137.jpg http://cdn01.tv4.se/polopoly_fs/1.1981581.1337608479!mobileimage-highres/1584550135.jpg http://cdn01.tv4.se/polopoly_fs/1.1981581.1337608479!mobileimage-large-highres/2870558647.jpg Kriminalexperten Stéphane Bourgoin utforskar kända seriemördares bakgrunder, tänkesätt och brottsmönster. SE 115.111.227.14 115.111.227.6 25.19.39.117 210.94.41.89 217.67.201.237 217.67.201.162;SE Visas i tv4fakta true http://cdn01.tv4.se/polopoly_fs/1.1981581.1337608479!image/3286617084.jpg http://cdn01.tv4.se/polopoly_fs/1.1981581.1337608479!smallformatimage/3860316810.jpg http://cdn01.tv4.se/polopoly_fs/1.1981581.1337608479!categorylarge/448967228.jpg http://cdn01.tv4.se/polopoly_fs/1.1981581.1337608479!image-large/3587628335.jpg http://cdn01.tv4.se/polopoly_fs/1.1981581.1337608479!image-logo/4086050861.png Hela program 4 true false false false 1.1981592 Senast tillagt inom Dokumentärer 4 true true true false Alla 1.2063725,1.2544107,1.2301959,1.2496859,1.2668676,1.2437873,1.2496855,1.2588849,1.1973474,1.2615840,1.2530679,1.2486341,1.2588900,1.2527876,1.2457570,1.2681630,1.1854778,1.2624242,1.1848699 http://cdn01.tv4.se/polopoly_fs/1.1981625.1329827382!mobileimage/1740065640.jpg http://cdn01.tv4.se/polopoly_fs/1.1981625.1329827382!mobileimage-large/1075866405.jpg http://cdn01.tv4.se/polopoly_fs/1.1981625.1329827382!mobileimage-highres/2466690721.jpg http://cdn01.tv4.se/polopoly_fs/1.1981625.1329827382!mobileimage-large-highres/1911938718.jpg Serien presenterar verkliga historier där människor som vill förändra sina liv i fåfängans tecken satsar hälsa och pengar för att nå skönhet. De gör vad som helst för att förbättra sina utseenden genom att genomgå farliga ingrepp, som att förlänga sina tår för att lättare kunna gå i högklackat. SE;SE 115.111.227.14 115.111.227.6 25.19.39.117 210.94.41.89 217.67.201.237 217.67.201.162 Visas i tv4plus true http://cdn01.tv4.se/polopoly_fs/1.1981625.1329827382!image/3400320674.jpg http://cdn01.tv4.se/polopoly_fs/1.1981625.1329827382!smallformatimage/3338874442.jpg http://cdn01.tv4.se/polopoly_fs/1.1981625.1329827382!categorylarge/35717159.jpg http://cdn01.tv4.se/polopoly_fs/1.1981625.1329827382!image-large/385610985.jpg http://cdn01.tv4.se/polopoly_fs/1.1981625.1329827382!image-logo/3218962167.png Hela program 4 true false false false 1.1981629 Senast tillagt inom Dokumentärer 4 true true true false Alla 1.2063725,1.2544107,1.2301959,1.2496859,1.2668676,1.2437873,1.2496855,1.2588849,1.1973474,1.2615840,1.2530679,1.2486341,1.2588900,1.2527876,1.2457570,1.2681630,1.1854778,1.2624242,1.1848699 http://cdn01.tv4.se/polopoly_fs/1.1981835.1337608550!mobileimage/2974919278.jpg http://cdn01.tv4.se/polopoly_fs/1.1981835.1337608550!mobileimage-large/4226861768.jpg http://cdn01.tv4.se/polopoly_fs/1.1981835.1337608550!mobileimage-highres/2522597231.jpg http://cdn01.tv4.se/polopoly_fs/1.1981835.1337608550!mobileimage-large-highres/4075868216.jpg Trafikpoliserna i Victoria, Australien, har uppdraget att hantera allvarliga trafiksituationer och skydda medborgarna från faror. SE;SE 115.111.227.14 115.111.227.6 25.19.39.117 210.94.41.89 217.67.201.237 217.67.201.162 Visas i tv4fakta true http://cdn01.tv4.se/polopoly_fs/1.1981835.1337608550!image/3552011242.jpg http://cdn01.tv4.se/polopoly_fs/1.1981835.1337608550!smallformatimage/1315747160.jpg http://cdn01.tv4.se/polopoly_fs/1.1981835.1337608550!categorylarge/580157187.jpg http://cdn01.tv4.se/polopoly_fs/1.1981835.1337608550!image-large/2356081973.jpg http://cdn01.tv4.se/polopoly_fs/1.1981835.1337608550!image-logo/3096591701.png Hela program 4 true false false true 1.1981836 Senast tillagt inom Dokumentärer 4 true true true false Alla 1.2063725,1.2544107,1.2301959,1.2496859,1.2668676,1.2437873,1.2496855,1.2588849,1.1973474,1.2615840,1.2530679,1.2486341,1.2588900,1.2527876,1.2457570,1.2681630,1.1854778,1.2624242,1.1848699 http://cdn01.tv4.se/polopoly_fs/1.1981839.1337608624!mobileimage/1347737435.jpg http://cdn01.tv4.se/polopoly_fs/1.1981839.1337608624!mobileimage-large/2053062872.jpg http://cdn01.tv4.se/polopoly_fs/1.1981839.1337608624!mobileimage-highres/3262315248.jpg http://cdn01.tv4.se/polopoly_fs/1.1981839.1337608624!mobileimage-large-highres/965842487.jpg Psykologen och beteendevetaren Laura Richards undersöker vad som får någon att döda sin familj. SE 129.35.209.170 58.247.178.245 115.111.227.14 115.111.227.6 25.19.39.117 210.94.41.89 217.67.201.237 217.67.201.162 Visas i tv4fakta true http://cdn01.tv4.se/polopoly_fs/1.1981839.1337608624!image/4227265199.jpg http://cdn01.tv4.se/polopoly_fs/1.1981839.1337608624!smallformatimage/501660977.jpg http://cdn01.tv4.se/polopoly_fs/1.1981839.1337608624!categorylarge/243060587.jpg http://cdn01.tv4.se/polopoly_fs/1.1981839.1337608624!image-large/4132527261.jpg http://cdn01.tv4.se/polopoly_fs/1.1981839.1337608624!image-logo/769472003.png Hela program 4 true false false false 1.1981840 Senast tillagt inom Dokumentärer 4 true true true false Alla 1.2063725,1.2544107,1.2301959,1.2496859,1.2668676,1.2437873,1.2496855,1.2588849,1.1973474,1.2615840,1.2530679,1.2486341,1.2588900,1.2527876,1.2457570,1.2681630,1.1854778,1.2624242,1.1848699 http://cdn01.tv4.se/polopoly_fs/1.1945101.1329827277!mobileimage/719763259.jpg http://cdn01.tv4.se/polopoly_fs/1.1945101.1329827277!mobileimage-logo/2966852694.png http://cdn01.tv4.se/polopoly_fs/1.1945101.1329827277!mobileimage-large/3886237703.jpg http://cdn01.tv4.se/polopoly_fs/1.1945101.1329827277!mobileimage-highres/583670858.jpg http://cdn01.tv4.se/polopoly_fs/1.1945101.1329827277!mobileimage-logo-highres/109072218.png http://cdn01.tv4.se/polopoly_fs/1.1945101.1329827277!mobileimage-large-highres/4003681015.jpg Våra barns liv är en dokumentärserie i fyra delar om utsatta barn runt om i världen. Visas i tv4 false http://cdn01.tv4.se/polopoly_fs/1.1945101.1329827277!image/3487883557.jpg http://cdn01.tv4.se/polopoly_fs/1.1945101.1329827277!smallformatimage/1379874711.jpg http://cdn01.tv4.se/polopoly_fs/1.1945101.1329827277!categorylarge/1053294028.jpg http://cdn01.tv4.se/polopoly_fs/1.1945101.1329827277!image-large/2419947514.jpg http://cdn01.tv4.se/polopoly_fs/1.1945101.1329827277!image-logo/468537689.png Hela program 4 true false false false 1.1946253 Senast tillagt inom Dokumentärer 4 true true true false Alla 1.2063725,1.2544107,1.2301959,1.2496859,1.2668676,1.2437873,1.2496855,1.2588849,1.1973474,1.2615840,1.2530679,1.2486341,1.2588900,1.2527876,1.2457570,1.2681630,1.1854778,1.2624242,1.1848699 http://cdn01.tv4.se/polopoly_fs/1.2001393.1329827260!mobileimage/2397388048.jpg http://cdn01.tv4.se/polopoly_fs/1.2001393.1329827260!mobileimage-logo/388343586.png http://cdn01.tv4.se/polopoly_fs/1.2001393.1329827260!mobileimage-large/3292814774.jpg http://cdn01.tv4.se/polopoly_fs/1.2001393.1329827260!mobileimage-highres/2851033105.jpg http://cdn01.tv4.se/polopoly_fs/1.2001393.1329827260!mobileimage-logo-highres/505789906.png http://cdn01.tv4.se/polopoly_fs/1.2001393.1329827260!mobileimage-large-highres/3443803974.jpg En serie om barn och vuxna som övervunnit svåra motgångar i form av olyckor, ovanliga sjukdomar eller komplicerade handikapp. Med hjälp av mod, viljestyrka och sina närståendes stöd har de olycksdrabbade mot alla odds kunnat vända svårigheterna till personliga triumfer. Genom intervjuer berättar personerna om händelserna som förändrade deras liv för alltid. tv4fakta true http://cdn01.tv4.se/polopoly_fs/1.2001393.1329827260!image/3959682196.jpg http://cdn01.tv4.se/polopoly_fs/1.2001393.1329827260!smallformatimage/1909989926.jpg http://cdn01.tv4.se/polopoly_fs/1.2001393.1329827260!categorylarge/488695933.jpg http://cdn01.tv4.se/polopoly_fs/1.2001393.1329827260!image-large/3017433675.jpg http://cdn01.tv4.se/polopoly_fs/1.2001393.1329827260!image-logo/3247652135.png http://cdn01.tv4.se/polopoly_fs/1.2001393.1329827260!small-image-logo/3038832247.png Hela program 4 true false false false 1.2001440 Senast tillagt inom Dokumentärer 4 true true true false Alla 1.2063725,1.2544107,1.2301959,1.2496859,1.2668676,1.2437873,1.2496855,1.2588849,1.1973474,1.2615840,1.2530679,1.2486341,1.2588900,1.2527876,1.2457570,1.2681630,1.1854778,1.2624242,1.1848699 http://cdn01.tv4.se/polopoly_fs/1.2027277.1329827241!mobileimage/445054474.jpg http://cdn01.tv4.se/polopoly_fs/1.2027277.1329827241!mobileimage-logo/1604535595.png http://cdn01.tv4.se/polopoly_fs/1.2027277.1329827241!mobileimage-large/2825849323.jpg http://cdn01.tv4.se/polopoly_fs/1.2027277.1329827241!mobileimage-highres/2552987147.jpg http://cdn01.tv4.se/polopoly_fs/1.2027277.1329827241!mobileimage-logo-highres/2498146326.png http://cdn01.tv4.se/polopoly_fs/1.2027277.1329827241!mobileimage-large-highres/1663761622.jpg http://cdn01.tv4.se/polopoly_fs/1.2027277.1329827241!originallogoimage/1746776386.png http://cdn01.tv4.se/polopoly_fs/1.2027277.1329827241!originalformatimage/2372886160.jpg http://cdn01.tv4.se/polopoly_fs/1.2027277.1329827241!originalcarouselimage/2681339266.jpg I Inlåst får tittarna följa ett gäng killar som på ett eller annat sätt brutit mot lagen. Med deras föräldrars medgivande och stöd flyttar de in på anstalt i Västervik för att få ett smakprov på hur det är att sitta inlåst. tv4 true http://cdn01.tv4.se/polopoly_fs/1.2027277.1329827241!image/3227566579.jpg http://cdn01.tv4.se/polopoly_fs/1.2027277.1329827241!smallformatimage/4080656325.jpg http://cdn01.tv4.se/polopoly_fs/1.2027277.1329827241!categorylarge/1793669687.jpg http://cdn01.tv4.se/polopoly_fs/1.2027277.1329827241!image-large/3206319614.jpg http://cdn01.tv4.se/polopoly_fs/1.2027277.1329827241!image-logo/3088961367.png http://cdn01.tv4.se/polopoly_fs/1.2027277.1329827241!small-image-logo/1274919927.png Hela program 12 true false false false Alla 1.2027372,1.2027277 Senast tillagt inom Dokumentärer 4 true true true false Alla 1.2063725,1.2544107,1.2301959,1.2496859,1.2668676,1.2437873,1.2496855,1.2588849,1.1973474,1.2615840,1.2530679,1.2486341,1.2588900,1.2527876,1.2457570,1.2681630,1.1854778,1.2624242,1.1848699 Programmen kombinerar dramatiska scener från patrullerande poliskårer med bilkörning utöver det vanliga. tv4sport true http://cdn01.tv4.se/polopoly_fs/1.1968478.1329827202!image/1316508429.jpg http://cdn01.tv4.se/polopoly_fs/1.1968478.1329827202!smallformatimage/2180095882.jpg http://cdn01.tv4.se/polopoly_fs/1.1968478.1329827202!categorylarge/3537624159.jpg http://cdn01.tv4.se/polopoly_fs/1.1968478.1329827202!image-large/817255420.jpg http://cdn01.tv4.se/polopoly_fs/1.1968478.1329827202!image-logo/1935108362.png Hela program 12 true false false true 1.1972189 Senast tillagt inom Dokumentärer 4 true true true false Alla 1.2063725,1.2544107,1.2301959,1.2496859,1.2668676,1.2437873,1.2496855,1.2588849,1.1973474,1.2615840,1.2530679,1.2486341,1.2588900,1.2527876,1.2457570,1.2681630,1.1854778,1.2624242,1.1848699 http://cdn01.tv4.se/polopoly_fs/1.2159840.1329827180!mobileimage/3718830592.jpg http://cdn01.tv4.se/polopoly_fs/1.2159840.1329827180!mobileimage-logo/1414768704.png http://cdn01.tv4.se/polopoly_fs/1.2159840.1329827180!mobileimage-large/50670024.jpg http://cdn01.tv4.se/polopoly_fs/1.2159840.1329827180!mobileimage-highres/636029528.jpg http://cdn01.tv4.se/polopoly_fs/1.2159840.1329827180!mobileimage-logo-highres/1681917429.png http://cdn01.tv4.se/polopoly_fs/1.2159840.1329827180!mobileimage-large-highres/857113725.jpg Våra pinsamma husdjur är en brittisk dokumentärserie från 2010 i sex delar. Veterinär Marc Abraham och hans personal tar emot husdjur som lider av olika medicinska och beteenderelaterade problem. SE 115.111.227.14 115.111.227.6 25.19.39.117 210.94.41.89 217.67.201.237 217.67.201.162;SE tv4 false http://cdn01.tv4.se/polopoly_fs/1.2159840.1329827180!image/80414670.jpg http://cdn01.tv4.se/polopoly_fs/1.2159840.1329827180!smallformatimage/1373776498.jpg http://cdn01.tv4.se/polopoly_fs/1.2159840.1329827180!categorylarge/2517708336.jpg http://cdn01.tv4.se/polopoly_fs/1.2159840.1329827180!image-large/2237260826.jpg http://cdn01.tv4.se/polopoly_fs/1.2159840.1329827180!image-logo/775249542.png http://cdn01.tv4.se/polopoly_fs/1.2159840.1329827180!small-image-logo/2158049729.png Hela program 12 true false false false Alla 1.2159845 Senast tillagt inom Dokumentärer 4 true true true false Alla 1.2063725,1.2544107,1.2301959,1.2496859,1.2668676,1.2437873,1.2496855,1.2588849,1.1973474,1.2615840,1.2530679,1.2486341,1.2588900,1.2527876,1.2457570,1.2681630,1.1854778,1.2624242,1.1848699 sas i tv4 true http://cdn01.tv4.se/polopoly_fs/1.1974909.1329827126!image/1159730432.jpg http://cdn01.tv4.se/polopoly_fs/1.1974909.1329827126!smallformatimage/2326387079.jpg http://cdn01.tv4.se/polopoly_fs/1.1974909.1329827126!image-logo/2635799513.png http://cdn01.tv4.se/polopoly_fs/1.1974909.1329827126!small-image-logo/3290362827.png Hela program 12 true false false true 1.1974909 Senast tillagt inom Dokumentärer 4 true true true false Alla 1.2063725,1.2544107,1.2301959,1.2496859,1.2668676,1.2437873,1.2496855,1.2588849,1.1973474,1.2615840,1.2530679,1.2486341,1.2588900,1.2527876,1.2457570,1.2681630,1.1854778,1.2624242,1.1848699 Svensk dokumentärserie om personer som råkat ut för olyckor eller på andra sätt skadat hjärnan. Vi får följa med dem innan, under och efter operation. Visas i tv4fakta false http://cdn01.tv4.se/polopoly_fs/1.1915491.1329827105!image/1878032125.jpg http://cdn01.tv4.se/polopoly_fs/1.1915491.1329827105!smallformatimage/2692330106.jpg http://cdn01.tv4.se/polopoly_fs/1.1915491.1329827105!categorylarge/2433928157.jpg http://cdn01.tv4.se/polopoly_fs/1.1915491.1329827105!image-large/289308172.jpg http://cdn01.tv4.se/polopoly_fs/1.1915491.1329827105!image-logo/403190855.png Hela program 12 true false false true 1.1915507 Senast tillagt inom Dokumentärer 4 true true true false Alla 1.2063725,1.2544107,1.2301959,1.2496859,1.2668676,1.2437873,1.2496855,1.2588849,1.1973474,1.2615840,1.2530679,1.2486341,1.2588900,1.2527876,1.2457570,1.2681630,1.1854778,1.2624242,1.1848699 Här får rebelliska tonåringar lämna sina hem och under tio dagar bo hemma hos några riktigt stränga föräldrar. De blir inte lätt för de upproriska barnen att anpassa sig till de dagliga rutinerna och de tuffa vuxna som kräver disciplin och ordning. 16:20 tv4plus false Hela program 12 true false false true Alla 1.2047725 Senast tillagt inom Dokumentärer 4 true true true false Alla 1.2063725,1.2544107,1.2301959,1.2496859,1.2668676,1.2437873,1.2496855,1.2588849,1.1973474,1.2615840,1.2530679,1.2486341,1.2588900,1.2527876,1.2457570,1.2681630,1.1854778,1.2624242,1.1848699 http://cdn01.tv4.se/polopoly_fs/1.2161481.1329827066!mobileimage/1212411383.jpg http://cdn01.tv4.se/polopoly_fs/1.2161481.1329827066!mobileimage-logo/3084009785.png http://cdn01.tv4.se/polopoly_fs/1.2161481.1329827066!mobileimage-large/1074350074.jpg http://cdn01.tv4.se/polopoly_fs/1.2161481.1329827066!mobileimage-highres/2853119518.jpg http://cdn01.tv4.se/polopoly_fs/1.2161481.1329827066!mobileimage-logo-highres/3947953800.png http://cdn01.tv4.se/polopoly_fs/1.2161481.1329827066!mobileimage-large-highres/478935115.jpg Jag skäms över min kropp handlar om kroppsliga avvikelser av vitt skilda slag. Dessa kroppsliga defekter skapar obehag hos sina bärare och med läkarhjälp hoppas personerna i serien på att bli av med sina handikapp en gång för alla. SE 115.111.227.14 115.111.227.6 25.19.39.117 210.94.41.89 217.67.201.237 217.67.201.162;SE Söndagar 12:00 tv4plus false http://cdn01.tv4.se/polopoly_fs/1.2161481.1329827066!image/861920724.jpg http://cdn01.tv4.se/polopoly_fs/1.2161481.1329827066!smallformatimage/2642614390.jpg http://cdn01.tv4.se/polopoly_fs/1.2161481.1329827066!categorylarge/2923767741.jpg http://cdn01.tv4.se/polopoly_fs/1.2161481.1329827066!image-large/3532460798.jpg http://cdn01.tv4.se/polopoly_fs/1.2161481.1329827066!image-logo/3301386727.png http://cdn01.tv4.se/polopoly_fs/1.2161481.1329827066!small-image-logo/1825314865.png Hela program 12 true false false false Alla 1.2161481 Senast tillagt inom Dokumentärer 4 true true true false Alla 1.2063725,1.2544107,1.2301959,1.2496859,1.2668676,1.2437873,1.2496855,1.2588849,1.1973474,1.2615840,1.2530679,1.2486341,1.2588900,1.2527876,1.2457570,1.2681630,1.1854778,1.2624242,1.1848699 Att få barn kan vara en stor förändring i livet, men att få tvillingar eller fler är ännu mer utmanande. Här möter man familjer som fått flera barn och tittar närmare på vilka förändringar det inneburit för dem. SE 129.35.209.170 58.247.178.245 115.111.227.14 115.111.227.6 25.19.39.117 210.94.41.89 217.67.201.237 217.67.201.162 Visas i tv4plus false http://cdn01.tv4.se/polopoly_fs/1.1968373.1329827042!image/3683888807.jpg http://cdn01.tv4.se/polopoly_fs/1.1968373.1329827042!smallformatimage/337273376.jpg http://cdn01.tv4.se/polopoly_fs/1.1968373.1329827042!categorylarge/1194336757.jpg http://cdn01.tv4.se/polopoly_fs/1.1968373.1329827042!image-large/2774380118.jpg http://cdn01.tv4.se/polopoly_fs/1.1968373.1329827042!image-logo/3871118496.png Hela program 12 true false false true 1.1968378 Senast tillagt inom Dokumentärer 4 true true true false Alla 1.2063725,1.2544107,1.2301959,1.2496859,1.2668676,1.2437873,1.2496855,1.2588849,1.1973474,1.2615840,1.2530679,1.2486341,1.2588900,1.2527876,1.2457570,1.2681630,1.1854778,1.2624242,1.1848699 http://cdn01.tv4.se/polopoly_fs/1.2220002.1329827022!originallogoimage/3533638621.png http://cdn01.tv4.se/polopoly_fs/1.2220002.1329827022!originalformatimage/406908546.jpg http://cdn01.tv4.se/polopoly_fs/1.2220002.1329827022!originalcarouselimage/341332132.jpg Vid de tillfällen som polisen i USA misslyckas med att gripa gärningsmännen finns det andra som kan ta över jakten. Programserien följer ett gäng hårdföra prisjägare som inte skyr några medel för att fånga in skurkar. SE;SE 115.111.227.14 115.111.227.6 25.19.39.117 210.94.41.89 217.67.201.237 217.67.201.162 visas i tv4fakta true Hela program 12 true false false false Alla 1.2220002 Senast tillagt inom Dokumentärer 4 true true true false Alla 1.2063725,1.2544107,1.2301959,1.2496859,1.2668676,1.2437873,1.2496855,1.2588849,1.1973474,1.2615840,1.2530679,1.2486341,1.2588900,1.2527876,1.2457570,1.2681630,1.1854778,1.2624242,1.1848699 http://cdn01.tv4.se/polopoly_fs/1.2356480.1323784713!mobileimage/511208467.jpg http://cdn01.tv4.se/polopoly_fs/1.2356480.1323784713!mobileimage-large/3225398287.jpg http://cdn01.tv4.se/polopoly_fs/1.2356480.1323784713!mobileimage-highres/2014451239.jpg http://cdn01.tv4.se/polopoly_fs/1.2356480.1323784713!mobileimage-large-highres/1136384427.jpg Information om TV4 Play tv4 false SE 129.35.209.170 58.247.178.245;SE 115.111.227.14 115.111.227.6 25.19.39.117 210.94.41.89 217.67.201.237 217.67.201.162;SE 115.111.227.14 115.111.227.6 25.19.39.117 210.94.41.89 217.67.201.237 217.67.201.162;SE;SE;SE 115.111.227.14 115.111.227.6 25.19.39.117 210.94.41.89 217.67.201.237 217.67.201.162;SE;SE 115.111.227.14 115.111.227.6 25.19.39.117 210.94.41.89 217.67.201.237 217.67.201.162;SE 115.111.227.14 115.111.227.6 25.19.39.117 210.94.41.89 217.67.201.237 217.67.201.162 tv4 false 1.2002886 http://cdn01.tv4.se/polopoly_fs/1.2027370.1309788505!image/3695871530.jpg http://cdn01.tv4.se/polopoly_fs/1.2027370.1309788505!image-logo/765935821.png http://cdn01.tv4.se/polopoly_fs/1.2027370.1309788505!smallformatimage/3472842221.jpg http://www.tv4play.se/noje/big_brother Vill du se något avsnitt från Big Brother-säsongen? Nu kan du se alla program igen i TV4Play. Senaste avsnittet från TV11 false Senaste avsnittet i TV4Play Senaste klippen 4 false true false false Alla 1.2002886 TEKNISKT MEDDELANDE: Sajten förbereds för ny säsong. Problem kan uppstå med visning av klipp. tv4 false Senaste klippen 4 false true false false Alla 1.2002886 TEKNISKT MEDDELANDE: Sajten förbereds för ny säsong. Problem kan uppstå med visning av klipp. tv4 false Senaste klippen 4 false true false false Alla 1.2002886 nokogiri-1.8.2/test/files/2ch.html0000644000004100000410000001042713235345655017035 0ustar www-datawww-data Q˂f‚ւ悤
nokogiri-1.8.2/test/files/valid_bar.xml0000644000004100000410000000005713235345655020136 0ustar www-datawww-data nokogiri-1.8.2/test/files/po.xml0000644000004100000410000000164313235345655016633 0ustar www-datawww-data Alice Smith 123 Maple Street Mill Valley CA 90952 Robert Smith 8 Oak Avenue Old Town PA 95819 Hurry, my lawn is going wild! Lawnmower 1 148.95 Confirm this is electric Baby Monitor 1 39.98 1999-05-21 nokogiri-1.8.2/test/files/encoding.xhtml0000644000004100000410000001633213235345655020340 0ustar www-datawww-data Ă

\zB

\zB

\zB

\zB

\zB

\zB

\zB

\zB

\zB

\zB

\zB

\zB

\zB

\zB

\zB

\zB

\zB

\zB

\zB

\zB

\zB

\zB

\zB

\zB

\zB

\zB

\zB

\zB

\zB

\zB

\zB

\zB

\zB

\zB

\zB

\zB

\zB

\zB

\zB

\zB

\zB

\zB

\zB

\zB

\zB

\zB

\zB

\zB

\zB

\zB

\zB

\zB

\zB

\zB

\zB

\zB

\zB

\zB

\zB

\zB

\zB

\zB

\zB

\zB

\zB

\zB

\zB

\zB

\zB

\zB

\zB

\zB

\zB

nokogiri-1.8.2/test/files/shift_jis_no_charset.html0000644000004100000410000000022513235345655022543 0ustar www-datawww-data ɂ́I

This is a Shift_JIS File

ɂ́I

nokogiri-1.8.2/test/files/shift_jis.xml0000644000004100000410000000020013235345655020163 0ustar www-datawww-data This is a Shift_JIS File ɂ nokogiri-1.8.2/test/files/dont_hurt_em_why.xml0000644000004100000410000004451313235345655021576 0ustar www-datawww-data Sat Aug 09 05:38:12 +0000 2008 882281424 I so just thought the guy lighting the Olympic torch was falling when he began to run on the wall. Wow that would have been catastrophic. web false 4243 John Nunemaker jnunemaker Mishawaka, IN, US Loves his wife, ruby, notre dame football and iu basketball http://s3.amazonaws.com/twitter_production/profile_images/53781608/Photo_75_normal.jpg http://addictedtonew.com false 486 Sat Aug 09 02:04:56 +0000 2008 882145663 @ijonas - wow that stuff sounds sweet web false 882005142 1000471 4243 John Nunemaker jnunemaker Mishawaka, IN, US Loves his wife, ruby, notre dame football and iu basketball http://s3.amazonaws.com/twitter_production/profile_images/53781608/Photo_75_normal.jpg http://addictedtonew.com false 486 Sat Aug 09 01:36:41 +0000 2008 882126691 Steph is driving Sally for the first time. I'm proud of her. <a href="http://help.twitter.com/index.php?pg=kb.page&id=75">txt</a> false 4243 John Nunemaker jnunemaker Mishawaka, IN, US Loves his wife, ruby, notre dame football and iu basketball http://s3.amazonaws.com/twitter_production/profile_images/53781608/Photo_75_normal.jpg http://addictedtonew.com false 486 Fri Aug 08 22:21:21 +0000 2008 881987762 @ijonas - what are you making with couchdb, ruby and httparty? web false 881947237 1000471 4243 John Nunemaker jnunemaker Mishawaka, IN, US Loves his wife, ruby, notre dame football and iu basketball http://s3.amazonaws.com/twitter_production/profile_images/53781608/Photo_75_normal.jpg http://addictedtonew.com false 486 Fri Aug 08 14:20:14 +0000 2008 881535796 @oaknd1 - delete it off phone and iTunes. <a href="http://help.twitter.com/index.php?pg=kb.page&id=75">txt</a> false 881526234 3038211 4243 John Nunemaker jnunemaker Mishawaka, IN, US Loves his wife, ruby, notre dame football and iu basketball http://s3.amazonaws.com/twitter_production/profile_images/53781608/Photo_75_normal.jpg http://addictedtonew.com false 486 Fri Aug 08 14:07:29 +0000 2008 881522394 Listening to U2 "beautiful day" in honor of it being such a beautiful day. <a href="http://help.twitter.com/index.php?pg=kb.page&id=75">txt</a> false 4243 John Nunemaker jnunemaker Mishawaka, IN, US Loves his wife, ruby, notre dame football and iu basketball http://s3.amazonaws.com/twitter_production/profile_images/53781608/Photo_75_normal.jpg http://addictedtonew.com false 486 Fri Aug 08 14:06:44 +0000 2008 881521592 @lizsmc1 - hi! (just passed her on the road) <a href="http://help.twitter.com/index.php?pg=kb.page&id=75">txt</a> false 881519558 11485452 4243 John Nunemaker jnunemaker Mishawaka, IN, US Loves his wife, ruby, notre dame football and iu basketball http://s3.amazonaws.com/twitter_production/profile_images/53781608/Photo_75_normal.jpg http://addictedtonew.com false 486 Fri Aug 08 13:59:35 +0000 2008 881514030 Beautiful day for a motorcycle ride. <a href="http://help.twitter.com/index.php?pg=kb.page&id=75">txt</a> false 4243 John Nunemaker jnunemaker Mishawaka, IN, US Loves his wife, ruby, notre dame football and iu basketball http://s3.amazonaws.com/twitter_production/profile_images/53781608/Photo_75_normal.jpg http://addictedtonew.com false 486 Fri Aug 08 13:45:21 +0000 2008 881499439 @lizamc1 - no way! Politos will be missed. I remember eating a whole garlic pizza there with Joe. <a href="http://help.twitter.com/index.php?pg=kb.page&id=75">txt</a> false 4243 John Nunemaker jnunemaker Mishawaka, IN, US Loves his wife, ruby, notre dame football and iu basketball http://s3.amazonaws.com/twitter_production/profile_images/53781608/Photo_75_normal.jpg http://addictedtonew.com false 486 Fri Aug 08 13:41:50 +0000 2008 881496024 Riding my motorcyle to campus. Using the library basement for a meeting. <a href="http://help.twitter.com/index.php?pg=kb.page&id=75">txt</a> false 4243 John Nunemaker jnunemaker Mishawaka, IN, US Loves his wife, ruby, notre dame football and iu basketball http://s3.amazonaws.com/twitter_production/profile_images/53781608/Photo_75_normal.jpg http://addictedtonew.com false 486 Thu Aug 07 22:52:20 +0000 2008 880896190 Scraping super glue off my finger with a knife. web false 4243 John Nunemaker jnunemaker Mishawaka, IN, US Loves his wife, ruby, notre dame football and iu basketball http://s3.amazonaws.com/twitter_production/profile_images/53781608/Photo_75_normal.jpg http://addictedtonew.com false 486 Thu Aug 07 22:14:35 +0000 2008 880866160 So cold...Starbucks north side, you win the day, but I shall bring a sweatshirt to our next battle! <a href="http://help.twitter.com/index.php?pg=kb.page&id=75">txt</a> false 4243 John Nunemaker jnunemaker Mishawaka, IN, US Loves his wife, ruby, notre dame football and iu basketball http://s3.amazonaws.com/twitter_production/profile_images/53781608/Photo_75_normal.jpg http://addictedtonew.com false 486 Thu Aug 07 17:25:40 +0000 2008 880610064 Headed home for a bit to get my headphones and then to the north side to meet @orderedlist. <a href="http://help.twitter.com/index.php?pg=kb.page&id=75">txt</a> false 4243 John Nunemaker jnunemaker Mishawaka, IN, US Loves his wife, ruby, notre dame football and iu basketball http://s3.amazonaws.com/twitter_production/profile_images/53781608/Photo_75_normal.jpg http://addictedtonew.com false 485 Thu Aug 07 17:15:59 +0000 2008 880600278 Panera wifi, why do you hate me? <a href="http://help.twitter.com/index.php?pg=kb.page&id=75">txt</a> false 4243 John Nunemaker jnunemaker Mishawaka, IN, US Loves his wife, ruby, notre dame football and iu basketball http://s3.amazonaws.com/twitter_production/profile_images/53781608/Photo_75_normal.jpg http://addictedtonew.com false 485 Thu Aug 07 15:46:25 +0000 2008 880509577 At panera. Turned my alarm off this morning and woke up late. Oh well. <a href="http://help.twitter.com/index.php?pg=kb.page&id=75">txt</a> false 4243 John Nunemaker jnunemaker Mishawaka, IN, US Loves his wife, ruby, notre dame football and iu basketball http://s3.amazonaws.com/twitter_production/profile_images/53781608/Photo_75_normal.jpg http://addictedtonew.com false 485 Thu Aug 07 15:01:35 +0000 2008 880463746 @kloh I remember days like that. Exhausting. Also, NullRiver said to sync again, uninstall app from phone and then resync app. Evidently ... web true 880432701 10193732 4243 John Nunemaker jnunemaker Mishawaka, IN, US Loves his wife, ruby, notre dame football and iu basketball http://s3.amazonaws.com/twitter_production/profile_images/53781608/Photo_75_normal.jpg http://addictedtonew.com false 485 Thu Aug 07 02:52:38 +0000 2008 879986739 @kloh - I haven't updated my OS so I'm wondering how apple could have made the app stop working. I did contact NullRiver support just no ... web true 879980813 10193732 4243 John Nunemaker jnunemaker Mishawaka, IN, US Loves his wife, ruby, notre dame football and iu basketball http://s3.amazonaws.com/twitter_production/profile_images/53781608/Photo_75_normal.jpg http://addictedtonew.com false 486 Thu Aug 07 02:38:58 +0000 2008 879976045 @jerry - i went with the pdf download. web false 879878196 613 4243 John Nunemaker jnunemaker Mishawaka, IN, US Loves his wife, ruby, notre dame football and iu basketball http://s3.amazonaws.com/twitter_production/profile_images/53781608/Photo_75_normal.jpg http://addictedtonew.com false 486 Thu Aug 07 02:31:26 +0000 2008 879969851 @kloh - it worked at home for multiple tests and just stopped when I acyltually needed it. <a href="http://help.twitter.com/index.php?pg=kb.page&id=75">txt</a> false 879968483 10193732 4243 John Nunemaker jnunemaker Mishawaka, IN, US Loves his wife, ruby, notre dame football and iu basketball http://s3.amazonaws.com/twitter_production/profile_images/53781608/Photo_75_normal.jpg http://addictedtonew.com false 486 Thu Aug 07 01:18:28 +0000 2008 879913748 Netshare will no longer start up for me. Of course it borks the first time I actually want to use it. <a href="http://help.twitter.com/index.php?pg=kb.page&id=75">txt</a> false 4243 John Nunemaker jnunemaker Mishawaka, IN, US Loves his wife, ruby, notre dame football and iu basketball http://s3.amazonaws.com/twitter_production/profile_images/53781608/Photo_75_normal.jpg http://addictedtonew.com false 486 nokogiri-1.8.2/test/files/address_book.xml0000644000004100000410000000030013235345655020641 0ustar www-datawww-data John Smith js@example.com Fred Bloggs fb@example.net nokogiri-1.8.2/test/files/staff.xml0000644000004100000410000000375513235345655017326 0ustar www-datawww-data Element data"> ]> EMP0001 Margaret Martin Accountant 56,000 Female
1230 North Ave. Dallas, Texas 98551
EMP0002 Martha Raynolds Secretary 35,000 Female
&ent2; Dallas, &ent3; 98554
EMP0003 Roger Jones Department Manager 100,000 &ent4;
PO Box 27 Irving, texas 98553
EMP0004 Jeny Oconnor Personnel Director 95,000 Female
27 South Road. Dallas, Texas 98556
EMP0005 Robert Myers Computer Specialist 90,000 male
1821 Nordic. Road, Irving Texas 98558
nokogiri-1.8.2/test/files/staff.dtd0000644000004100000410000000064213235345655017271 0ustar www-datawww-data Element data"> nokogiri-1.8.2/test/files/staff.xslt0000644000004100000410000000142413235345655017507 0ustar www-datawww-data

Employee ID Name Position Salary
nokogiri-1.8.2/test/files/tlm.html0000644000004100000410000021071713235345655017161 0ustar www-datawww-data Tender Lovemaking

Back Home!

I'm finally back home. I went to Japan a few weeks ago for vacation, and I also spoke at Ruby Kaigi 2008. Ruby Kaigi was so much fun! I've been studying Japanese for a little over a year, but I've never been to Japan. It was exciting and fun to talk to people, and I made a bunch of new Japanese friends. I'd really like to thank Leonard Chin for helping out at the Kaigi. My language skills aren't good enough, and he was kind enough to fill in the gaps. Thank you!

While I was in Japan, I noticed QR Codes everywhere. QR Codes are basically really awesome bar codes. They can hold much more information in a smaller amount of space. They can be easily decoded from images taken with digital cameras. They have these codes everywhere in Japan, and the idea is that people can take a photo with the camera on their cell phone, then the phone decodes the QR Code. I believe most of the QR codes contain information about the company, or possibly a URL to the company's website.

The company that created the format says that the format is open, but unfortunately I have to pay for the spec. I can download the spec in Japanese for free, but my Japanese isn't that good! So unfortunately I'm stuck with either the ISO spec (which is over $200) or the AIM spec ($85). I don't understand why they are so expensive..... I think I'll buy the AIM one, and hope that it is the same as the ISO one.

Written by Aaron PattersonPermalinkComments (1)Leave your Comment »

Meow meow meow meow meow

The other day I wrote an app called dejour to give me growl notifications from all the *jour gems out there. I used Eric Hodel's awesome ruby-growl library. Unfortunately it does all communications over the interweb, so you have to tweak some knobs in Growl to get it to work. I stumbled across a ruby/cocoa example using Growl, fixed it up, and released a gem called "Meow".

Meow lets you post notifications to your local machine without adjusting Growl. If you're on OS X 10.5, just do:

$ gem install meow

Then you can do this:

$ ruby -r rubygems -e'require "meow"; Meow.notify("meow", "meow", "meow")'

No growl tweaks required! Here is a code sample that is a little more explanatory:

require 'rubygems'
require 'meow'

meep = Meow.new('My Application Name')
meep.notify('Message Title', 'Message Description')

Be sure to check out the documentation.

Written by Aaron PattersonPermalinkComments (4)Leave your Comment »

Write your Rails view in……. JavaScript?

In my last post about Johnson, I said that next time I would talk about the JavaScript parse tree that Johnson provides. Well, I changed my mind. Sorry.

I want to write about a rails plugin that I added to Johnson. Brohuda Katz wrote an ERb type parser in JavaScript, and added it to the (yet to be released) Johnson distribution. With that in mind, and looking at the new template handlers in edge rails, I was able to throw together a rails plugin that allows me to use JavaScript in my rails view code.

Lets get to the code. Here is my controller:

class JohnsonController < ApplicationController
  def index
    @users = User.find(:all)
  end
end

And my EJS view (the file is named index.html.ejs):

<% for(var user in at.users) { %>
  <%= user.first_name() %><br />
<% } %>

The johnson rails plugin puts controller instance variables in to a special javascript variable called "at". The "at" variable is actually a proxy to the controller, lazily fetching instance variables from the controller and importing those objects in to javascript land.

Lets take a look at the plugin, its only a few lines:

class EJSHandler < ActionView::TemplateHandler
  class EJSProxy # :nodoc:
    def initialize(controller)
      @controller = controller
    end

    def key?(pooperty)
      @controller.instance_variables.include?("@#{pooperty}")
    end

    def [](pooperty)
      @controller.instance_variable_get("@#{pooperty}")
    end

    def []=(pooperty, value)
      @controller.instance_variable_set("@#{pooperty}", value)
    end
  end

  def initialize(view)
    @view = view
  end

  def render(template)
    ctx = Johnson::Context.new
    ctx.evaluate('Johnson.require("johnson/template");')
    ctx['template'] = template.source
    ctx['controller'] = @view.controller
    ctx['at'] = EJSProxy.new(@view.controller)

    ctx.evaluate('Johnson.templatize(template).call(at)')
  end
end

ActionView::Template.register_template_handler("ejs", EJSHandler)

When the template gets rendered (the render method), I wrap the controller with an EJS proxy, then compile the template into a javascript function, and call that function. The "at" variable is set to the EJSProxy before executing the template, and all property accessing on the "at" variable is passed along to fetching instance variables from the controller.

Server side javascript coding in rails. Weird, eh?

Written by Aaron PattersonPermalinkComments (7)Leave your Comment »

Take it to the limit one more time

Sup bros. I need to post in this thing more often. Yesterday, someone tipped over my scooter again. I'm getting kind of tired of that.

Anyway, its time for me to write about this. RKelly is pretty much dead. For the past few months, John and I have been working on RKelly's replacement called Johnson. Basically we're now putting a ruby wrapper around Mozilla's Spidermonkey. The project is coming along quite nicely. Ruby objects can be passed in to javascript land, and javascript objects can be passed back in to ruby land.

For example, we can define an alert function in our javascript context:

require 'johnson'

ctx = Johnson::Context.new
ctx['alert'] = lambda { |x| puts x }
ctx.evaluate('alert("Hello world!");')

Johnson::Context#evaluate will also return the last statement evaluated. We can evaluate an expression, and manipulate that expression in ruby land. For example, I'll create an object in javascript, return it to ruby land, then access a property of the javascript object:

require 'johnson'

ctx = Johnson::Context.new
obj = ctx.evaluate('var foo = { x: "hello world" }; foo')
puts obj.x  # => 'hello world'

We can even do the reverse by stuffing ruby objects in to the context:

A = Struct.new(:foo)

ctx = Johnson::Context.new
ctx['alert'] = lambda { |x| puts x }
ctx['a'] = A.new("bar")
ctx.evaluate('alert(a.foo);') # => 'bar'

But it gets better. We added a top level variable called "Ruby" that lets you access constants and globals from Ruby land. We can rewrite the previous example completely in javascript:

ctx = Johnson::Context.new
ctx.evaluate("var x = new (new Ruby.Struct(Johnson.symbolize('foo')));")
ctx.evaluate("x.foo = 'bar'")
puts ctx.evaluate('x').foo # => 'bar'
puts ctx.evaluate('x').class # => #<Class:0x49714>

Since the 'Ruby' constant delegates to Object, you can access any constant. Including ones you've defined yourself. We could, for example, look up a bunch of User records through rails:

ctx = Johnson::Context.new
ctx['alert'] = lambda { |x| puts x }
ctx.evaluate(<<-END
             for(var user in Ruby.User.find(Johnson.symbolize('all'))) {
               alert(user.first_name());
             }
             END
            )

You might be wondering what this Johnson.symbolize business is about. Since Javascript doesn't have a concept of a symbol, we've created a helper to "mark" a string as a symbol and pass it back in to ruby land.

To conclude this update about my Johnson, I'd like to show off an interactive shell for Johnson (thanks to Brohuda Katz). Johnson has an interactive shell that lets you try things out in javascript land or ruby land, and let you quickly switch between the two. Typing 'js' will put in you the javascript shell, 'rb' will switch you to the ruby shell. In the ruby shell, you can use the 'cx' variable to get ahold of you javascript context:

$ ruby -I lib bin/johnson
js> var x = { foo: 'bar', hello: function() { return 'world' } };
=> nil
js> rb
rb> cx['x'].foo
=> "bar"
rb> cx['x'].hello()
=> "world"
rb>

We aren't quite ready for a release yet, but if you'd like to play around with Johnson, you can pull it down from github here. Just run 'rake', and you should have it compiled and running!

My next Johnson related post will be about Javascript parse trees and Javascript code generation.

Written by Aaron PattersonPermalinkComments (11)Leave your Comment »

New Ruby Implementation - Brobinius

Brobinius version 1.0.0 has been released!

I am happy to annouce the first release of my new fork of Ruby called
Brobinius. The goal of Brobinius is to implement new language features
that I have noticed to be completely missing.

For example, Object#tase! The tase method is featured in many other languages
but is sadly missing from Ruby. Brobinius has a fully implemented tase! method.

>> x = Class.new
=> #<Class:0x3632ec>
>> x.tase!
RuntimeError: Don't tase me bro
from (irb):2:in `tase!'
from (irb):6
>>

Brobinius also has fully serializable kittenuations. You can create and
serialize your kittenuations, then pick up your snuggling where you left off.
For example:

>> lol = Kittenuation.new {
?> look_cute
>> throw :yarn
>> look_cute
>> }
=> #<Kittenuation:0x366244>
>> lol.snuggle
>> Marshal.load(Marshal.dump(lol)).snuggle

Since Brobinius's kittenuations are serializable, you can share them over the
network with friends!

Brobinius also features screencasts with automatic YouTube uploads. All you
have to do write your program, then pass the --screencast option to Brobinius.
Brobinius will automatically create a screencast of your program and upload it
to YouTube:

$ brobinius --screencast my_code.rb

You can even add the --geoff flag to create screencasts with Geoffrey
Grosenbach doing the voice over.

Written by Aaron PattersonPermalinkComments (2)Leave your Comment »

Laser Etch My Macbook Air

Dear Lazyweb,

I would really like to Laser Etch my Macbook Air with Martha Stewart's face. Where can I get that done? How much would it cost?

Written by Aaron PattersonPermalinkComments (6)Leave your Comment »

mechanize version 0.7.5 has been released!

The Mechanize library is used for automating interaction with websites.
Mechanize automatically stores and sends cookies, follows redirects,
can follow links, and submit forms. Form fields can be populated and
submitted. Mechanize also keeps track of the sites that you have visited as
a history.

Changes:

# Mechanize CHANGELOG

## 0.7.5

Written by Aaron PattersonPermalinkComments (0)Leave your Comment »

Profiling Database Queries in Rails

Despite the recent Ruby webserver speed contests, most of the slowness at my job results from slow (or too many) database queries.

To help keep database queries down, I added a stats to every page that shows the number of queries vs. cache hits, the number of rows returned, and the amount of data transferred from the database. In this screenshot I'm using the "live" environment, 3 cache hits, 169 misses, 577 rows returned, and 458.9k data transferred. Clicking the box hides it, and clicking "Super Hide!" hides the box and sets a cookie so that the box doesn't show up again for a while.

Debug Window

To get this working, first I monkey patch the MysqlAdapter to collect database stats:

ActiveRecord::ConnectionAdapters::MysqlAdapter.module_eval do
    @@stats_queries = @@stats_bytes = @@stats_rows = 0

    def self.get_stats
      { :queries => @@stats_queries,
        :rows => @@stats_rows,
        :bytes => @@stats_bytes }
    end
    def self.reset_stats
      @@stats_queries = @@stats_bytes = @@stats_rows = 0
    end

    def select_with_stats(sql, name)
      bytes = 0
      rows = select_without_stats(sql, name)
      rows.each do |row|
        row.each do |key, value|
          bytes += key.length
          bytes += value.length if value
        end
      end
      @@stats_queries += 1
      @@stats_rows += rows.length
      @@stats_bytes += bytes
      rows
    end
    alias_method_chain :select, :stats
  end

Next I patched the QueryCache to keep track of hits and misses:

ActiveRecord::ConnectionAdapters::QueryCache.module_eval do
    @@hits = @@misses = 0

    def self.get_stats
      { :hits => @@hits,
        :misses => @@misses }
    end
    def self.reset_stats
      @@hits = @@misses = 0
    end

    def cache_sql_with_stats(sql, &block)
      if @query_cache.has_key?(sql)
        @@hits += 1
      else
        @@misses += 1
      end
      cache_sql_without_stats(sql, &block)
    end
    alias_method_chain :cache_sql, :stats
  end

Then modify ActionController to reset stats for each request:

ActionController::Base.module_eval do
    def perform_action_with_reset
      ActiveRecord::ConnectionAdapters::MysqlAdapter::reset_stats
      ActiveRecord::ConnectionAdapters::QueryCache::reset_stats
      perform_action_without_reset
    end

    alias_method_chain :perform_action, :reset

    def active_record_runtime(runtime)
      stats = ActiveRecord::ConnectionAdapters::MysqlAdapter::get_stats
      "#{super} #{sprintf("%.1fk", stats[:bytes].to_f / 1024)} queries: #{stats[:queries]}"
    end
  end

Just drop all that inside the after_initialize in your development.rb and you'll get the nice stats. After that, just create a partial that displays the stats and include the partial at the bottom of your layout. Our partial looks like this:

<% unless %w(production test).include?(RAILS_ENV) -%>
  <h4 id="debug" onclick="$(this).remove()" style="background:pink;text-align:center;position:absolute;top:16px;left:35%;padding:0.5em;border: 2px solid red;">
  <%= RAILS_ENV %>
  <br />
  <% if ActiveRecord::ConnectionAdapters::QueryCache.respond_to?(:get_stats) %>
    <% stats = ActiveRecord::ConnectionAdapters::QueryCache.get_stats %>
    Queries: <%= stats[:hits] %> / <%= stats[:misses] %> /
    <%= number_to_percentage((stats[:hits].to_f / (stats[:hits] + stats[:misses])) * 100, :precision => 0) %>
    |
  <% end %>
  <% if ActiveRecord::ConnectionAdapters::MysqlAdapter.respond_to?(:get_stats) %>
    <% stats = ActiveRecord::ConnectionAdapters::MysqlAdapter.get_stats %>
    Rows: <%= stats[:rows] %> |
    Transfer: <%= sprintf("%.1fk", stats[:bytes].to_f / 1024) %>
  <% end %>
  <p style="margin:0">
    <a style="color:magenta" href="#" onclick="superHide()">super hide!</a>
  </p>
  </h4>
  <script type="text/javascript">
    function superHide() {
      document.cookie = 'debug=hidden; path=/; domain=<%= request.host %>; max-age=14400';
    }
    if(document.cookie.indexOf('debug=hidden') != -1) {
      $('debug').hide();
    }
  </script>
<% end -%>

It's a little work, but it helps keep my mind on reducing the queries. With enough work, one of these days the speed of the webserver will matter to me. Thanks to Adam Doppelt for the basis of this monkey patch. Any bugs are mine, not his!

Written by Aaron PattersonPermalinkComments (2)Leave your Comment »

mechanize version 0.7.1 has been released!

The Mechanize library is used for automating interaction with websites.
Mechanize automatically stores and sends cookies, follows redirects,
can follow links, and submit forms. Form fields can be populated and
submitted. Mechanize also keeps track of the sites that you have visited as
a history.

Changes:

# Mechanize CHANGELOG

## 0.7.1

  • Added iPhone to the user agent aliases. [#17572]
  • Fixed a bug with EOF errors in net/http. [#17570]
  • Handling 0 length gzipped responses. [#17471]

  • http://mechanize.rubyforge.org/

Written by Aaron PattersonPermalinkComments (1)Leave your Comment »

Automated Youtube Uploads

I thought I would share the part of my twitterbrite scripts that uploads videos to Youtube. Its about 30 lines long, and took me an hour or so to write. Most of my time was spent figuring out form fields to fill out rather than writing code though....

I've broken the script down to three parts: logging in, setting the video attributes, and uploading the video file.

Step 1: Logging In

The first step is pretty simple. Just instantiate a new mechanize object, fetch youtube.com, set your login credentials, and submit!

agent = WWW::Mechanize.new { |a|
  a.user_agent_alias = 'Mac Safari'
}
page = agent.get('http://youtube.com/')

# Login
page.form('loginForm') { |f|
  f.username = 'username'
  f.password = 'password'
}.submit

Step 2: Setting video attributes

This is probably the most difficult step. Now that the agent is logged in, we have to fetch the upload page and fill out the video attributes form. You have to set the title, description, category, and keywords for your video. The you have to tell the agent to click a special button.

# Set the video attributes
page = agent.get('http://youtube.com/my_videos_upload')
form = page.form('theForm')
form.field_myvideo_title = 'My video title'
form.field_myvideo_descr = "My video description"
form.field_myvideo_categories = 28
form.field_myvideo_keywords = 'my tag'
page = form.submit(form.buttons.name('action_upload').first)

The number "28" is just the value from the category drop down list. You can iterate over the select options using mechanize, but I leave that as an exercise to the reader.

Step 3: Upload the video file

My script expects that the video file name will be supplied on the command line, so ARGV[0] should point to the file you want to upload. In this step, you simply set the video file name, then submit the form.

# Upload the video
page = page.form('theForm') { |f|
  f.file_uploads.name('field_uploadfile').first.file_name = ARGV[0]
}.submit
page.body =~ /<textarea[^>]*>(.*)<\/textarea>/m
puts $1

The last two lines grab the html needed to display the video and prints it.

There you go. Upload lots of videos now! Yay!

Written by Aaron PattersonPermalinkComments (0)Leave your Comment »

Next Page »
Special character div
nokogiri-1.8.2/test/files/foo/0000755000004100000410000000000013235345655016252 5ustar www-datawww-datanokogiri-1.8.2/test/files/foo/foo.xsd0000644000004100000410000000024213235345655017553 0ustar www-datawww-data nokogiri-1.8.2/test/files/saml/0000755000004100000410000000000013235345655016423 5ustar www-datawww-datanokogiri-1.8.2/test/files/saml/xenc_schema.xsd0000644000004100000410000001207113235345655021421 0ustar www-datawww-data ]> nokogiri-1.8.2/test/files/saml/saml20protocol_schema.xsd0000644000004100000410000003270013235345655023345 0ustar www-datawww-data Document identifier: saml-schema-protocol-2.0 Location: http://docs.oasis-open.org/security/saml/v2.0/ Revision history: V1.0 (November, 2002): Initial Standard Schema. V1.1 (September, 2003): Updates within the same V1.0 namespace. V2.0 (March, 2005): New protocol schema based in a SAML V2.0 namespace. nokogiri-1.8.2/test/files/saml/saml20assertion_schema.xsd0000644000004100000410000003137413235345655023521 0ustar www-datawww-data Document identifier: saml-schema-assertion-2.0 Location: http://docs.oasis-open.org/security/saml/v2.0/ Revision history: V1.0 (November, 2002): Initial Standard Schema. V1.1 (September, 2003): Updates within the same V1.0 namespace. V2.0 (March, 2005): New assertion schema for SAML V2.0 namespace. nokogiri-1.8.2/test/files/saml/xmldsig_schema.xsd0000644000004100000410000002406513235345655022141 0ustar www-datawww-data ]> nokogiri-1.8.2/test/files/encoding.html0000644000004100000410000001600313235345655020143 0ustar www-datawww-data Ă

\zB

\zB

\zB

\zB

\zB

\zB

\zB

\zB

\zB

\zB

\zB

\zB

\zB

\zB

\zB

\zB

\zB

\zB

\zB

\zB

\zB

\zB

\zB

\zB

\zB

\zB

\zB

\zB

\zB

\zB

\zB

\zB

\zB

\zB

\zB

\zB

\zB

\zB

\zB

\zB

\zB

\zB

\zB

\zB

\zB

\zB

\zB

\zB

\zB

\zB

\zB

\zB

\zB

\zB

\zB

\zB

\zB

\zB

\zB

\zB

\zB

\zB

\zB

\zB

\zB

\zB

\zB

\zB

\zB

\zB

\zB

\zB

\zB

nokogiri-1.8.2/test/files/bogus.xml0000644000004100000410000000000013235345655017316 0ustar www-datawww-datanokogiri-1.8.2/test/files/snuggles.xml0000644000004100000410000000016513235345655020042 0ustar www-datawww-data snuggles! nokogiri-1.8.2/test/test_encoding_handler.rb0000644000004100000410000000242213235345655021234 0ustar www-datawww-data# -*- coding: utf-8 -*- require "helper" class TestEncodingHandler < Nokogiri::TestCase def teardown Nokogiri::EncodingHandler.clear_aliases! #Replace default aliases removed by clear_aliases! Nokogiri.install_default_aliases end def test_get assert_not_nil Nokogiri::EncodingHandler['UTF-8'] assert_nil Nokogiri::EncodingHandler['alsdkjfhaldskjfh'] end def test_name eh = Nokogiri::EncodingHandler['UTF-8'] assert_equal "UTF-8", eh.name end def test_alias Nokogiri::EncodingHandler.alias('UTF-8', 'UTF-18') assert_equal 'UTF-8', Nokogiri::EncodingHandler['UTF-18'].name end def test_cleanup_aliases assert_nil Nokogiri::EncodingHandler['UTF-9'] Nokogiri::EncodingHandler.alias('UTF-8', 'UTF-9') assert_not_nil Nokogiri::EncodingHandler['UTF-9'] Nokogiri::EncodingHandler.clear_aliases! assert_nil Nokogiri::EncodingHandler['UTF-9'] end def test_delete assert_nil Nokogiri::EncodingHandler['UTF-9'] Nokogiri::EncodingHandler.alias('UTF-8', 'UTF-9') assert_not_nil Nokogiri::EncodingHandler['UTF-9'] Nokogiri::EncodingHandler.delete 'UTF-9' assert_nil Nokogiri::EncodingHandler['UTF-9'] end def test_delete_non_existent assert_nil Nokogiri::EncodingHandler.delete('UTF-9') end end nokogiri-1.8.2/test/test_xslt_transforms.rb0000644000004100000410000002141213235345655021221 0ustar www-datawww-datarequire "helper" class TestXsltTransforms < Nokogiri::TestCase def setup @doc = Nokogiri::XML(File.open(XML_FILE)) end def test_class_methods style = Nokogiri::XSLT(File.read(XSLT_FILE)) assert result = style.apply_to(@doc, ['title', '"Grandma"']) assert_match %r{

Grandma

}, result end def test_transform assert style = Nokogiri::XSLT.parse(File.read(XSLT_FILE)) assert result = style.apply_to(@doc, ['title', '"Booyah"']) assert_match %r{

Booyah

}, result assert_match %r{}, result assert_match %r{}, result assert_match %r{}, result assert_match %r{}, result assert_match %r{EMP0003}, result assert_match %r{Margaret Martin}, result assert_match %r{Computer Specialist}, result assert_match %r{100,000}, result assert_no_match %r{Dallas|Texas}, result assert_no_match %r{Female}, result assert result = style.apply_to(@doc, ['title', '"Grandma"']) assert_match %r{

Grandma

}, result assert result = style.apply_to(@doc) assert_match %r{

|

}, result end def test_xml_declaration input_xml = <<-EOS My Report EOS input_xsl = <<-EOS <xsl:value-of select="report/title"/>

EOS require 'nokogiri' xml = ::Nokogiri::XML(input_xml) xsl = ::Nokogiri::XSLT(input_xsl) assert_includes xsl.apply_to(xml), '' end def test_transform_with_output_style xslt = "" if Nokogiri.jruby? xslt = Nokogiri::XSLT(<<-eoxslt) eoxslt else xslt = Nokogiri::XSLT(<<-eoxslt) eoxslt end result = xslt.apply_to(@doc, ['title', 'foo']) assert_no_match(//, result) assert_match(/This is an adjacent/, result) end def test_transform_arg_error assert style = Nokogiri::XSLT(File.read(XSLT_FILE)) assert_raises(TypeError) do style.transform(@doc, :foo) end end def test_transform_with_hash assert style = Nokogiri::XSLT(File.read(XSLT_FILE)) result = style.transform(@doc, {'title' => '"Booyah"'}) assert result.html? assert_equal "Booyah", result.at_css("h1").content end def test_transform2 assert style = Nokogiri::XSLT(File.open(XSLT_FILE)) assert result_doc = style.transform(@doc) assert result_doc.html? assert_equal "", result_doc.at_css("h1").content assert style = Nokogiri::XSLT(File.read(XSLT_FILE)) assert result_doc = style.transform(@doc, ['title', '"Booyah"']) assert result_doc.html? assert_equal "Booyah", result_doc.at_css("h1").content assert result_string = style.apply_to(@doc, ['title', '"Booyah"']) assert_equal result_string, style.serialize(result_doc) end def test_transform_with_quote_params assert style = Nokogiri::XSLT(File.open(XSLT_FILE)) assert result_doc = style.transform(@doc, Nokogiri::XSLT.quote_params(['title', 'Booyah'])) assert result_doc.html? assert_equal "Booyah", result_doc.at_css("h1").content assert style = Nokogiri::XSLT.parse(File.read(XSLT_FILE)) assert result_doc = style.transform(@doc, Nokogiri::XSLT.quote_params({'title' => 'Booyah'})) assert result_doc.html? assert_equal "Booyah", result_doc.at_css("h1").content end def test_quote_params h = { :sym => %{xxx}, 'str' => %{"xxx"}, :sym2 => %{'xxx'}, 'str2' => %{x'x'x}, :sym3 => %{x"x"x}, } hh=h.dup result_hash = Nokogiri::XSLT.quote_params(h) assert_equal hh, h # non-destructive a=h.to_a.flatten result_array = Nokogiri::XSLT.quote_params(a) assert_equal h.to_a.flatten, a #non-destructive assert_equal result_array, result_hash end if Nokogiri.uses_libxml? # By now, cannot get it working on JRuby, see: # http://yokolet.blogspot.com/2010/10/pure-java-nokogiri-xslt-extension.html def test_exslt assert doc = Nokogiri::XML.parse(File.read(EXML_FILE)) assert doc.xml? assert style = Nokogiri::XSLT.parse(File.read(EXSLT_FILE)) params = { :p1 => 'xxx', :p2 => "x'x'x", :p3 => 'x"x"x', :p4 => '"xxx"' } result_doc = Nokogiri::XML.parse(style.apply_to(doc, Nokogiri::XSLT.quote_params(params))) assert_equal 'func-result', result_doc.at('/root/function').content assert_equal 3, result_doc.at('/root/max').content.to_i assert_match( /\d{4}-\d\d-\d\d([-|+]\d\d:\d\d)?/, result_doc.at('/root/date').content ) result_doc.xpath('/root/params/*').each do |p| assert_equal p.content, params[p.name.intern] end check_params result_doc, params result_doc = Nokogiri::XML.parse(style.apply_to(doc, Nokogiri::XSLT.quote_params(params.to_a.flatten))) check_params result_doc, params end def test_xslt_paramaters xslt_str = <<-EOX EOX xslt = Nokogiri::XSLT(xslt_str) doc = Nokogiri::XML("") assert_match %r{bar}, xslt.transform(doc, Nokogiri::XSLT.quote_params('foo' => 'bar')).to_s end def test_xslt_transform_error xslt_str = <<-EOX EOX xslt = Nokogiri::XSLT(xslt_str) doc = Nokogiri::XML("") assert_raises(RuntimeError) { xslt.transform(doc) } end end def test_xslt_parse_error xslt_str = <<-EOX } EOX assert_raises(RuntimeError) { Nokogiri::XSLT.parse(xslt_str) } end def test_passing_a_non_document_to_transform xsl = Nokogiri::XSLT('') assert_raises(ArgumentError) { xsl.transform("
") } assert_raises(ArgumentError) { xsl.transform(Nokogiri::HTML("").css("body")) } end def check_params result_doc, params result_doc.xpath('/root/params/*').each do |p| assert_equal p.content, params[p.name.intern] end end def test_non_html_xslt_transform xml = Nokogiri.XML(<<-EOXML) 123 EOXML xsl = Nokogiri.XSLT(<<-EOXSL) EOXSL result = xsl.transform xml assert !result.html? end end nokogiri-1.8.2/test/test_convert_xpath.rb0000644000004100000410000001171013235345655020635 0ustar www-datawww-datarequire "helper" class TestConvertXPath < Nokogiri::TestCase def setup super @N = Nokogiri(File.read(HTML_FILE)) end def assert_syntactical_equivalence(hpath, xpath, match, &blk) blk ||= lambda {|j| j.first} assert_equal match, blk.call(@N.search(xpath)), "xpath result did not match" end def test_child_tag assert_syntactical_equivalence("h1[a]", ".//h1[child::a]", "Tender Lovemaking") do |j| j.inner_text end end def test_child_tag_equals assert_syntactical_equivalence("h1[a='Tender Lovemaking']", ".//h1[child::a = 'Tender Lovemaking']", "Tender Lovemaking") do |j| j.inner_text end end def test_filter_contains assert_syntactical_equivalence("title:contains('Tender')", ".//title[contains(., 'Tender')]", "Tender Lovemaking ") do |j| j.inner_text end end def test_filter_comment assert_syntactical_equivalence("div comment()[2]", ".//div//comment()[position() = 2]", "") do |j| j.first.to_s end end def test_filter_text assert_syntactical_equivalence("a[text()]", ".//a[normalize-space(child::text())]", "Tender Lovemaking") do |j| j.first.to_s end assert_syntactical_equivalence("a[text()='Tender Lovemaking']", ".//a[normalize-space(child::text()) = 'Tender Lovemaking']", "Tender Lovemaking") do |j| j.first.to_s end assert_syntactical_equivalence("a/text()", ".//a/child::text()", "Tender Lovemaking") do |j| j.first.to_s end assert_syntactical_equivalence("h2//a[text()!='Back Home!']", ".//h2//a[normalize-space(child::text()) != 'Back Home!']", "Meow meow meow meow meow") do |j| j.first.inner_text end end def test_filter_by_attr assert_syntactical_equivalence("a[@href='http://blog.geminigeek.com/wordpress-theme']", ".//a[@href = 'http://blog.geminigeek.com/wordpress-theme']", "http://blog.geminigeek.com/wordpress-theme") do |j| j.first["href"] end end def test_css_id assert_syntactical_equivalence("#linkcat-7", ".//*[@id = 'linkcat-7']", "linkcat-7") do |j| j.first["id"] end assert_syntactical_equivalence("li#linkcat-7", ".//li[@id = 'linkcat-7']", "linkcat-7") do |j| j.first["id"] end end def test_css_class assert_syntactical_equivalence(".cat-item-15", ".//*[contains(concat(' ', @class, ' '), ' cat-item-15 ')]", "cat-item cat-item-15") do |j| j.first["class"] end assert_syntactical_equivalence("li.cat-item-15", ".//li[contains(concat(' ', @class, ' '), ' cat-item-15 ')]", "cat-item cat-item-15") do |j| j.first["class"] end end def test_css_tags assert_syntactical_equivalence("div li a", ".//div//li//a", "http://brobinius.org/") do |j| j.first.inner_text end assert_syntactical_equivalence("div li > a", ".//div//li/a", "http://brobinius.org/") do |j| j.first.inner_text end assert_syntactical_equivalence("h1 ~ small", ".//small[preceding-sibling::h1]", "The act of making love, tenderly.") do |j| j.first.inner_text end assert_syntactical_equivalence("h1 ~ small", ".//small[preceding-sibling::h1]", "The act of making love, tenderly.") do |j| j.first.inner_text end end def test_positional assert_syntactical_equivalence("div/div:first()", ".//div/div[position() = 1]", "\r\nTender Lovemaking\r\nThe act of making love, tenderly.\r\n".gsub(/[\r\n]/, '')) do |j| j.first.inner_text.gsub(/[\r\n]/, '') end assert_syntactical_equivalence("div/div:first", ".//div/div[position() = 1]", "\r\nTender Lovemaking\r\nThe act of making love, tenderly.\r\n".gsub(/[\r\n]/, '')) do |j| j.first.inner_text.gsub(/[\r\n]/, '') end assert_syntactical_equivalence("div//a:last()", ".//div//a[position() = last()]", "Wordpress") do |j| j.last.inner_text end assert_syntactical_equivalence("div//a:last", ".//div//a[position() = last()]", "Wordpress") do |j| j.last.inner_text end end def test_multiple_filters assert_syntactical_equivalence("a[@rel='bookmark'][1]", ".//a[@rel = 'bookmark' and position() = 1]", "Back Home!") do |j| j.first.inner_text end end # TODO: # doc/'title ~ link' -> links that are siblings of title # doc/'p[@class~="final"]' -> class includes string (whitespacy) # doc/'p[text()*="final"]' -> class includes string (index) (broken: always returns true?) # doc/'p[text()$="final"]' -> /final$/ # doc/'p[text()|="final"]' -> /^final$/ # doc/'p[text()^="final"]' -> string starts with 'final # nth_first # nth_last # even # odd # first-child, nth-child, last-child, nth-last-child, nth-last-of-type # only-of-type, only-child # parent # empty # root end nokogiri-1.8.2/test/xslt/0000755000004100000410000000000013235345655015357 5ustar www-datawww-datanokogiri-1.8.2/test/xslt/test_custom_functions.rb0000644000004100000410000000660313235345655022352 0ustar www-datawww-data# -*- encoding: utf-8 -*- require "helper" module Nokogiri module XSLT class TestCustomFunctions < Nokogiri::TestCase def setup super @xml = Nokogiri.XML(<<-EOXML) Foo

Foo

Lorem ipsum.

EOXML end def test_function skip("Pure Java version doesn't support this feature.") if !Nokogiri.uses_libxml? foo = Class.new do def capitalize nodes nodes.first.content.upcase end end XSLT.register "http://e.org/functions", foo xsl = Nokogiri.XSLT(<<-EOXSL) EOXSL result = xsl.transform @xml assert_match(/FOO/, result.css('title').first.text) end def test_function_arguments skip("Pure Java version doesn't support this feature.") if !Nokogiri.uses_libxml? foo = Class.new do include MiniTest::Assertions # Minitest 5 uses `self.assertions` in `assert()` which is not # defined in the Minitest::Assertions module :-( attr_writer :assertions def assertions; @assertions ||= 0; end def multiarg *args assert_equal ["abc", "xyz"], args args.first end def numericarg arg assert_equal 42, arg arg end end xsl = Nokogiri.XSLT(<<-EOXSL, "http://e.org/functions" => foo) EOXSL xsl.transform @xml end def test_function_XSLT skip("Pure Java version doesn't support this feature.") if !Nokogiri.uses_libxml? foo = Class.new do def america nodes nodes.first.content.upcase end end xsl = Nokogiri.XSLT(<<-EOXSL, "http://e.org/functions" => foo) EOXSL result = xsl.transform @xml assert_match(/FOO/, result.css('title').first.text) end end end end nokogiri-1.8.2/test/xslt/test_exception_handling.rb0000644000004100000410000000143213235345655022605 0ustar www-datawww-datarequire "helper" module Nokogiri module XSLT class TestExceptionHandling < Nokogiri::TestCase def test_java_exception_handling skip('This test is for Java only') if Nokogiri.uses_libxml? xml = Nokogiri.XML(<<-EOXML) EOXML xsl = Nokogiri.XSLT(<<-EOXSL) EOXSL begin xsl.transform xml fail('It should not get here') rescue RuntimeError => e assert_match(/Can't have more than one root/, e.to_s, 'The exception message does not contain the expected information') end end end end end nokogiri-1.8.2/test/xml/0000755000004100000410000000000013235345655015165 5ustar www-datawww-datanokogiri-1.8.2/test/xml/test_node_attributes.rb0000644000004100000410000000643513235345655021754 0ustar www-datawww-datarequire "helper" module Nokogiri module XML class TestNodeAttributes < Nokogiri::TestCase def test_attribute_with_ns doc = Nokogiri::XML <<-eoxml eoxml node = doc.at('node') assert_equal 'bar', node.attribute_with_ns('foo', 'http://tenderlovemaking.com/').value end def test_prefixed_attributes doc = Nokogiri::XML "" node = doc.root assert_equal 'en-GB', node['xml:lang'] assert_equal 'en-GB', node.attributes['lang'].value assert_equal nil, node['lang'] end def test_unknown_namespace_prefix_should_not_be_removed doc = Nokogiri::XML '' elem = doc.create_element 'foo', 'bar:attr' => 'something' assert_equal elem.attribute_nodes.first.name, 'bar:attr' end def test_set_prefixed_attributes doc = Nokogiri::XML %Q{} node = doc.root node['xml:lang'] = 'en-GB' node['foo:bar'] = 'bazz' assert_equal 'en-GB', node['xml:lang'] assert_equal 'en-GB', node.attributes['lang'].value assert_equal nil, node['lang'] assert_equal 'http://www.w3.org/XML/1998/namespace', node.attributes['lang'].namespace.href assert_equal 'bazz', node['foo:bar'] assert_equal 'bazz', node.attributes['bar'].value assert_equal nil, node['bar'] assert_equal 'x', node.attributes['bar'].namespace.href end def test_append_child_namespace_definitions_prefixed_attributes doc = Nokogiri::XML "" node = doc.root node['xml:lang'] = 'en-GB' assert_equal [], node.namespace_definitions.map(&:prefix) child_node = Nokogiri::XML::Node.new 'foo', doc node << child_node assert_equal [], node.namespace_definitions.map(&:prefix) end def test_append_child_element_with_prefixed_attributes doc = Nokogiri::XML "" node = doc.root assert_equal [], node.namespace_definitions.map(&:prefix) # assert_nothing_raised do child_node = Nokogiri::XML::Node.new 'foo', doc child_node['xml:lang'] = 'en-GB' node << child_node # end assert_equal [], child_node.namespace_definitions.map(&:prefix) end def test_namespace_key? doc = Nokogiri::XML <<-eoxml eoxml node = doc.at('node') assert node.namespaced_key?('foo', 'http://tenderlovemaking.com/') assert node.namespaced_key?('foo', nil) assert !node.namespaced_key?('foo', 'foo') end def test_set_attribute_frees_nodes # testing a segv skip("JRuby doesn't do GC.") if Nokogiri.jruby? document = Nokogiri::XML.parse("") node = document.root node['visible'] = 'foo' attribute = node.attribute('visible') text = Nokogiri::XML::Text.new 'bar', document attribute.add_child(text) stress_memory_while do node['visible'] = 'attr' end end end end end nokogiri-1.8.2/test/xml/test_reader_encoding.rb0000644000004100000410000000717413235345655021672 0ustar www-datawww-data# -*- coding: utf-8 -*- require "helper" module Nokogiri module XML class TestReaderEncoding < Nokogiri::TestCase def setup super @reader = Nokogiri::XML::Reader( File.read(XML_FILE), XML_FILE, 'UTF-8' ) end def test_attribute_at @reader.each do |node| next unless attribute = node.attribute_at(0) assert_equal @reader.encoding, attribute.encoding.name end end def test_attributes @reader.each do |node| node.attributes.each do |k,v| assert_equal @reader.encoding, k.encoding.name assert_equal @reader.encoding, v.encoding.name end end end def test_attribute xml = <<-eoxml snuggles! eoxml reader = Nokogiri::XML::Reader(xml, nil, 'UTF-8') reader.each do |node| next unless attribute = node.attribute('awesome') assert_equal reader.encoding, attribute.encoding.name end end def test_xml_version @reader.each do |node| next unless version = node.xml_version assert_equal @reader.encoding, version.encoding.name end end def test_lang xml = <<-eoxml

The quick brown fox jumps over the lazy dog.

日本語が上手です

eoxml reader = Nokogiri::XML::Reader(xml, nil, 'UTF-8') reader.each do |node| next unless lang = node.lang assert_equal reader.encoding, lang.encoding.name end end def test_value called = false @reader.each do |node| next unless value = node.value assert_equal @reader.encoding, value.encoding.name called = true end assert called end def test_prefix xml = <<-eoxml hello eoxml reader = Nokogiri::XML::Reader(xml, nil, 'UTF-8') reader.each do |node| next unless prefix = node.prefix assert_equal reader.encoding, prefix.encoding.name end end def test_ns_uri xml = <<-eoxml hello eoxml reader = Nokogiri::XML::Reader(xml, nil, 'UTF-8') reader.each do |node| next unless uri = node.namespace_uri assert_equal reader.encoding, uri.encoding.name end end def test_local_name xml = <<-eoxml hello eoxml reader = Nokogiri::XML::Reader(xml, nil, 'UTF-8') reader.each do |node| next unless lname = node.local_name assert_equal reader.encoding, lname.encoding.name end end def test_name @reader.each do |node| next unless name = node.name assert_equal @reader.encoding, name.encoding.name end end def test_value_lookup_segfault skip("JRuby doesn't do GC.") if Nokogiri.jruby? stress_memory_while do while node = @reader.read nodes = node.send(:attr_nodes) nodes.first.name if nodes.first end end end end end end nokogiri-1.8.2/test/xml/test_unparented_node.rb0000644000004100000410000003452313235345655021732 0ustar www-datawww-datarequire "helper" require 'stringio' module Nokogiri module XML class TestUnparentedNode < Nokogiri::TestCase def setup begin xml = Nokogiri::XML.parse(File.read(XML_FILE), XML_FILE) @node = xml.at('staff') @node.unlink end GC.start # try to GC the document end def test_node_still_has_document assert @node.document end def test_add_namespace node = @node.at('address') node.unlink node.add_namespace('foo', 'http://tenderlovemaking.com') assert_equal 'http://tenderlovemaking.com', node.namespaces['xmlns:foo'] end def test_write_to io = StringIO.new @node.write_to io io.rewind assert_equal @node.to_xml, io.read end def test_attribute_with_symbol assert_equal 'Yes', @node.css('address').first[:domestic] end def test_write_to_with_block called = false io = StringIO.new conf = nil @node.write_to io do |config| called = true conf = config config.format.as_html.no_empty_tags end io.rewind assert called assert_equal @node.serialize(:save_with => conf.options), io.read end %w{ xml html xhtml }.each do |type| define_method(:"test_write_#{type}_to") do io = StringIO.new assert @node.send(:"write_#{type}_to", io) io.rewind assert_match @node.send(:"to_#{type}"), io.read end end def test_serialize_with_block called = false conf = nil string = @node.serialize do |config| called = true conf = config config.format.as_html.no_empty_tags end assert called assert_equal @node.serialize(nil, conf.options), string end def test_values assert_equal %w{ Yes Yes }, @node.xpath('.//address')[1].values end def test_keys assert_equal %w{ domestic street }, @node.xpath('.//address')[1].keys end def test_each attributes = [] @node.xpath('.//address')[1].each do |key, value| attributes << [key, value] end assert_equal [['domestic', 'Yes'], ['street', 'Yes']], attributes end def test_new assert node = Nokogiri::XML::Node.new('input', @node) assert_equal 1, node.node_type end def test_to_str assert name = @node.xpath('.//name').first assert_match(/Margaret/, '' + name) assert_equal('Margaret Martin', '' + name.children.first) end def test_ancestors assert(address = @node.xpath('.//address').first) assert_equal 2, address.ancestors.length assert_equal ['employee', 'staff'], address.ancestors.map { |x| x ? x.name : x } end def test_read_only? assert entity_decl = @node.internal_subset.children.find { |x| x.type == Node::ENTITY_DECL } assert entity_decl.read_only? end def test_remove_attribute address = @node.xpath('./employee/address').first assert_equal 'Yes', address['domestic'] address.remove_attribute 'domestic' assert_nil address['domestic'] end def test_delete address = @node.xpath('./employee/address').first assert_equal 'Yes', address['domestic'] address.delete 'domestic' assert_nil address['domestic'] end def test_add_child_in_same_document child = @node.css('employee').first assert child.children.last assert new_child = child.children.first last = child.children.last child.add_child(new_child) assert_equal new_child, child.children.last assert_equal last, child.children.last end def test_add_child_from_other_document d1 = Nokogiri::XML("12") d2 = Nokogiri::XML("34") d2.at('root').search('item').each do |i| d1.at('root').add_child i end assert_equal 0, d2.search('item').size assert_equal 4, d1.search('item').size end def test_add_child xml = Nokogiri::XML(<<-eoxml)
Hello world
eoxml text_node = Nokogiri::XML::Text.new('hello', xml) assert_equal Nokogiri::XML::Node::TEXT_NODE, text_node.type xml.root.add_child text_node assert_match 'hello', xml.to_s end def test_chevron_works_as_add_child xml = Nokogiri::XML(<<-eoxml) Hello world eoxml text_node = Nokogiri::XML::Text.new('hello', xml) xml.root << text_node assert_match 'hello', xml.to_s end def test_add_previous_sibling xml = Nokogiri::XML(<<-eoxml) Hello world eoxml b_node = Nokogiri::XML::Node.new('a', xml) assert_equal Nokogiri::XML::Node::ELEMENT_NODE, b_node.type b_node.content = 'first' a_node = xml.xpath('.//a').first a_node.add_previous_sibling(b_node) assert_equal('first', xml.xpath('.//a').first.text) end def test_add_previous_sibling_merge xml = Nokogiri::XML(<<-eoxml) Hello world eoxml assert a_tag = xml.css('a').first left_space = a_tag.previous right_space = a_tag.next assert left_space.text? assert right_space.text? left_space.add_previous_sibling(right_space) assert_equal left_space, right_space end def test_add_next_sibling_merge xml = Nokogiri::XML(<<-eoxml) Hello world eoxml assert a_tag = xml.css('a').first left_space = a_tag.previous right_space = a_tag.next assert left_space.text? assert right_space.text? right_space.add_next_sibling(left_space) assert_equal left_space, right_space end def test_add_next_sibling_to_root_raises_exception xml = Nokogiri::XML(<<-eoxml) eoxml node = Nokogiri::XML::Node.new 'child', xml assert_raise(ArgumentError) do xml.root.add_next_sibling(node) end end def test_add_previous_sibling_to_root_raises_exception xml = Nokogiri::XML(<<-eoxml) eoxml node = Nokogiri::XML::Node.new 'child', xml assert_raise(ArgumentError) do xml.root.add_previous_sibling(node) end end def test_document_root_can_have_a_comment_sibling_via_add_child doc = Nokogiri::XML "foo" comment = Nokogiri::XML::Comment.new(doc, "this is a comment") doc.add_child comment assert_equal [doc.root, comment], doc.children.to_a end def test_document_root_can_have_a_comment_sibling_via_prepend_child doc = Nokogiri::XML "foo" comment = Nokogiri::XML::Comment.new(doc, "this is a comment") doc.prepend_child comment assert_equal [comment, doc.root], doc.children.to_a end def test_document_root_can_have_a_comment_sibling_via_add_next_sibling doc = Nokogiri::XML "foo" comment = Nokogiri::XML::Comment.new(doc, "this is a comment") doc.root.add_next_sibling comment assert_equal [doc.root, comment], doc.children.to_a end def test_document_root_can_have_a_comment_sibling_via_add_previous_sibling doc = Nokogiri::XML "foo" comment = Nokogiri::XML::Comment.new(doc, "this is a comment") doc.root.add_previous_sibling comment assert_equal [comment, doc.root], doc.children.to_a end def test_document_root_can_have_a_processing_instruction_sibling_via_add_child doc = Nokogiri::XML "foo" pi = Nokogiri::XML::ProcessingInstruction.new(doc, "xml-stylesheet", %q{type="text/xsl" href="foo.xsl"}) doc.add_child pi assert_equal [doc.root, pi], doc.children.to_a end def test_document_root_can_have_a_processing_instruction_sibling_via_prepend_child doc = Nokogiri::XML "foo" pi = Nokogiri::XML::ProcessingInstruction.new(doc, "xml-stylesheet", %q{type="text/xsl" href="foo.xsl"}) doc.prepend_child pi assert_equal [pi, doc.root], doc.children.to_a end def test_document_root_can_have_a_processing_instruction_sibling_via_add_next_sibling doc = Nokogiri::XML "foo" pi = Nokogiri::XML::ProcessingInstruction.new(doc, "xml-stylesheet", %q{type="text/xsl" href="foo.xsl"}) doc.root.add_next_sibling pi assert_equal [doc.root, pi], doc.children.to_a end def test_document_root_can_have_a_processing_instruction_sibling_via_add_previous_sibling doc = Nokogiri::XML "foo" pi = Nokogiri::XML::ProcessingInstruction.new(doc, "xml-stylesheet", %q{type="text/xsl" href="foo.xsl"}) doc.root.add_previous_sibling pi assert_equal [pi, doc.root], doc.children.to_a end def test_find_by_css_with_tilde_eql xml = Nokogiri::XML.parse(<<-eoxml) Hello world Bar Bar Bar Bar Awesome Awesome eoxml set = xml.css('a[@class~="bar"]') assert_equal 4, set.length assert_equal ['Bar'], set.map { |node| node.content }.uniq end def test_unlink xml = Nokogiri::XML.parse(<<-eoxml) Bar Bar Bar Hello world Bar Awesome Awesome eoxml node = xml.xpath('.//a')[3] assert_equal('Hello world', node.text) assert_match(/Hello world/, xml.to_s) assert node.parent assert node.document assert node.previous_sibling assert node.next_sibling node.unlink assert !node.parent # assert !node.document assert !node.previous_sibling assert !node.next_sibling assert_no_match(/Hello world/, xml.to_s) end def test_next_sibling assert sibling = @node.child.next_sibling assert_equal('employee', sibling.name) end def test_previous_sibling assert sibling = @node.child.next_sibling assert_equal('employee', sibling.name) assert_equal(sibling.previous_sibling, @node.child) end def test_name= @node.name = 'awesome' assert_equal('awesome', @node.name) end def test_child assert child = @node.child assert_equal('text', child.name) end def test_key? assert node = @node.search('.//address').first assert(!node.key?('asdfasdf')) end def test_set_property assert node = @node.search('.//address').first node['foo'] = 'bar' assert_equal('bar', node['foo']) end def test_attributes assert node = @node.search('.//address').first assert_nil(node['asdfasdfasdf']) assert_equal('Yes', node['domestic']) assert node = @node.search('.//address')[2] attr = node.attributes assert_equal 2, attr.size assert_equal 'Yes', attr['domestic'].value assert_equal 'Yes', attr['domestic'].to_s assert_equal 'No', attr['street'].value end def test_path assert set = @node.search('.//employee') assert node = set.first assert_equal('/staff/employee[1]', node.path) end def test_search_by_symbol assert set = @node.search(:employee) assert 5, set.length assert node = @node.at(:employee) assert node.text =~ /EMP0001/ end def test_new_node node = Nokogiri::XML::Node.new('form', @node.document) assert_equal('form', node.name) assert(node.document) end def test_encode_special_chars foo = @node.css('employee').first.encode_special_chars('&') assert_equal '&', foo end def test_content node = Nokogiri::XML::Node.new('form', @node) assert_equal('', node.content) node.content = 'hello world!' assert_equal('hello world!', node.content) end def test_whitespace_nodes doc = Nokogiri::XML.parse("Foo\nBar

Bazz

") children = doc.at('.//root').children.collect(&:to_s) assert_equal "\n", children[1] assert_equal " ", children[3] end def test_replace set = @node.search('.//employee') assert 5, set.length assert 0, @node.search('.//form').length first = set[0] second = set[1] node = Nokogiri::XML::Node.new('form', @node) first.replace(node) assert set = @node.search('.//employee') assert_equal 4, set.length assert 1, @node.search('.//form').length assert_equal set[0].to_xml, second.to_xml end def test_replace_on_unparented_node foo = Node.new('foo', @node.document) if Nokogiri.jruby? # JRuby Nokogiri doesn't raise an exception @node.replace(foo) else assert_raises(RuntimeError){ @node.replace(foo) } end end def test_illegal_replace_of_node_with_doc new_node = Nokogiri::XML.parse('bar') old_node = @node.at('.//employee') assert_raises(ArgumentError){ old_node.replace new_node } end def test_unlink_on_unlinked_node_1 node = Nokogiri::XML::Node.new 'div', Nokogiri::XML::Document.new node.unlink # must_not_raise assert_nil node.parent end def test_unlink_on_unlinked_node_2 node = Nokogiri::XML('
foo
').at_css("div") node.unlink node.unlink # must_not_raise assert_nil node.parent end end end end nokogiri-1.8.2/test/xml/test_document_encoding.rb0000644000004100000410000000130513235345655022234 0ustar www-datawww-datarequire "helper" module Nokogiri module XML class TestDocumentEncoding < Nokogiri::TestCase def setup super @xml = Nokogiri::XML(File.read(SHIFT_JIS_XML), SHIFT_JIS_XML) end def test_url assert_equal 'UTF-8', @xml.url.encoding.name end def test_encoding assert_equal 'UTF-8', @xml.encoding.encoding.name end def test_dotted_version if Nokogiri.uses_libxml? assert_equal 'UTF-8', Nokogiri::LIBXML_VERSION.encoding.name end end def test_empty_doc_encoding encoding = 'US-ASCII' assert_equal encoding, Nokogiri::XML(nil, nil, encoding).encoding end end end end nokogiri-1.8.2/test/xml/test_text.rb0000644000004100000410000000322713235345655017541 0ustar www-datawww-datarequire "helper" module Nokogiri module XML class TestText < Nokogiri::TestCase def test_css_path doc = Nokogiri.XML " foo something bar bazz " node = doc.root.children[2] assert_instance_of Nokogiri::XML::Text, node assert_equal node, doc.at_css(node.css_path) end def test_inspect node = Text.new('hello world', Document.new) assert_equal "#<#{node.class.name}:#{sprintf("0x%x",node.object_id)} #{node.text.inspect}>", node.inspect end def test_new node = Text.new('hello world', Document.new) assert node assert_equal('hello world', node.content) assert_instance_of Nokogiri::XML::Text, node end def test_lots_of_text 100.times { Text.new('hello world', Document.new) } end def test_new_without_document doc = Document.new node = Nokogiri::XML::Element.new('foo', doc) assert Text.new('hello world', node) end def test_content= node = Text.new('foo', Document.new) assert_equal('foo', node.content) node.content = '& &' assert_equal('& &', node.content) assert_equal('& <foo> &amp;', node.to_xml) end def test_add_child node = Text.new('foo', Document.new) if Nokogiri.jruby? exc = RuntimeError else exc = ArgumentError end assert_raises(exc) { node.add_child Text.new('bar', Document.new) } assert_raises(exc) { node << Text.new('bar', Document.new) } end end end end nokogiri-1.8.2/test/xml/test_node_reparenting.rb0000644000004100000410000005571013235345655022104 0ustar www-datawww-datarequire "helper" module Nokogiri module XML class TestNodeReparenting < Nokogiri::TestCase describe "standard node reparenting behavior" do # describe "namespace handling during reparenting" do # describe "given a Node" do # describe "with a Namespace" do # it "keeps the Namespace" # end # describe "given a parent Node with a default and a non-default Namespace" do # describe "passed an Node without a namespace" do # it "inserts an Node that inherits the default Namespace" # end # describe "passed a Node with a Namespace that matches the parent's non-default Namespace" do # it "inserts a Node that inherits the matching parent Namespace" # end # end # end # describe "given a markup string" do # describe "parsed relative to the document" do # describe "with a Namespace" do # it "keeps the Namespace" # end # describe "given a parent Node with a default and a non-default Namespace" do # describe "passed an Node without a namespace" do # it "inserts an Node that inherits the default Namespace" # end # describe "passed a Node with a Namespace that matches the parent's non-default Namespace" do # it "inserts a Node that inherits the matching parent Namespace" # end # end # end # describe "parsed relative to a specific node" do # describe "with a Namespace" do # it "keeps the Namespace" # end # describe "given a parent Node with a default and a non-default Namespace" do # describe "passed an Node without a namespace" do # it "inserts an Node that inherits the default Namespace" # end # describe "passed a Node with a Namespace that matches the parent's non-default Namespace" do # it "inserts a Node that inherits the matching parent Namespace" # end # end # end # end # end before do @doc = Nokogiri::XML "First nodeSecond nodeThird node" @doc2 = @doc.dup @fragment_string = "foobar" @fragment = Nokogiri::XML::DocumentFragment.parse @fragment_string @node_set = Nokogiri::XML("foobar").xpath("/root/node()") end { :add_child => {:target => "/root/a1", :returns_self => false, :children_tags => %w[text b1 b2]}, :<< => {:target => "/root/a1", :returns_self => true, :children_tags => %w[text b1 b2]}, :replace => {:target => "/root/a1/node()", :returns_self => false, :children_tags => %w[b1 b2]}, :swap => {:target => "/root/a1/node()", :returns_self => true, :children_tags => %w[b1 b2]}, :children= => {:target => "/root/a1", :returns_self => false, :children_tags => %w[b1 b2]}, :inner_html= => {:target => "/root/a1", :returns_self => true, :children_tags => %w[b1 b2]}, :add_previous_sibling => {:target => "/root/a1/text()", :returns_self => false, :children_tags => %w[b1 b2 text]}, :previous= => {:target => "/root/a1/text()", :returns_self => false, :children_tags => %w[b1 b2 text]}, :before => {:target => "/root/a1/text()", :returns_self => true, :children_tags => %w[b1 b2 text]}, :add_next_sibling => {:target => "/root/a1/text()", :returns_self => false, :children_tags => %w[text b1 b2]}, :next= => {:target => "/root/a1/text()", :returns_self => false, :children_tags => %w[text b1 b2]}, :after => {:target => "/root/a1/text()", :returns_self => true, :children_tags => %w[text b1 b2]} }.each do |method, params| describe "##{method}" do describe "passed a Node" do [:current, :another].each do |which| describe "passed a Node in the #{which} document" do before do @other_doc = which == :current ? @doc : @doc2 @other_node = @other_doc.at_xpath("/root/a2") end it "unlinks the Node from its previous position" do @doc.at_xpath(params[:target]).send(method, @other_node) @other_doc.at_xpath("/root/a2").must_be_nil end it "inserts the Node in the proper position" do @doc.at_xpath(params[:target]).send(method, @other_node) @doc.at_xpath("/root/a1/a2").wont_be_nil end it "returns the expected value" do sendee = @doc.at_xpath(params[:target]) result = sendee.send(method, @other_node) if params[:returns_self] result.must_equal sendee else result.must_equal @other_node end end end end end describe "passed a markup string" do it "inserts the fragment roots in the proper position" do @doc.at_xpath(params[:target]).send(method, @fragment_string) @doc.xpath("/root/a1/node()").collect {|n| n.name}.must_equal params[:children_tags] end it "returns the expected value" do sendee = @doc.at_xpath(params[:target]) result = sendee.send(method, @fragment_string) if params[:returns_self] result.must_equal sendee else result.must_be_kind_of Nokogiri::XML::NodeSet result.to_html.must_equal @fragment_string end end end describe "passed a fragment" do it "inserts the fragment roots in the proper position" do @doc.at_xpath(params[:target]).send(method, @fragment) @doc.xpath("/root/a1/node()").collect {|n| n.name}.must_equal params[:children_tags] end end describe "passed a document" do it "raises an exception" do proc { @doc.at_xpath("/root/a1").send(method, @doc2) }.must_raise(ArgumentError) end end describe "passed a non-Node" do it "raises an exception" do proc { @doc.at_xpath("/root/a1").send(method, 42) }.must_raise(ArgumentError) end end describe "passed a NodeSet" do it "inserts each member of the NodeSet in the proper order" do @doc.at_xpath(params[:target]).send(method, @node_set) @doc.xpath("/root/a1/node()").collect {|n| n.name}.must_equal params[:children_tags] end end end end describe "text node merging" do describe "#add_child" do it "merges the Text node with adjacent Text nodes" do @doc.at_xpath("/root/a1").add_child Nokogiri::XML::Text.new('hello', @doc) @doc.at_xpath("/root/a1/text()").content.must_equal "First nodehello" end end describe "#replace" do it "merges the Text node with adjacent Text nodes" do @doc.at_xpath("/root/a3/bx").replace Nokogiri::XML::Text.new('hello', @doc) @doc.at_xpath("/root/a3/text()").content.must_equal "Third hellonode" end end end end describe "ad hoc node reparenting behavior" do describe "#<<" do it "allows chaining" do doc = Nokogiri::XML::Document.new root = Nokogiri::XML::Element.new('root', doc) doc.root = root child1 = Nokogiri::XML::Element.new('child1', doc) child2 = Nokogiri::XML::Element.new('child2', doc) doc.root << child1 << child2 assert_equal [child1, child2], doc.root.children.to_a end end describe "#add_child" do describe "given a new node with a namespace" do it "keeps the namespace" do doc = Nokogiri::XML::Document.new item = Nokogiri::XML::Element.new('item', doc) doc.root = item entry = Nokogiri::XML::Element.new('entry', doc) entry.add_namespace('tlm', 'http://tenderlovemaking.com') assert_equal 'http://tenderlovemaking.com', entry.namespaces['xmlns:tlm'] item.add_child(entry) assert_equal 'http://tenderlovemaking.com', entry.namespaces['xmlns:tlm'] end end describe "given a parent node with a default namespace" do before do @doc = Nokogiri::XML(<<-eoxml) eoxml end it "inserts a node that inherits the default namespace" do assert node = @doc.at('//xmlns:first') child = Nokogiri::XML::Node.new('second', @doc) node.add_child(child) assert @doc.at('//xmlns:second') end end describe "given a parent node with a default and non-default namespace" do before do @doc = Nokogiri::XML(<<-eoxml) eoxml assert @node = @doc.at('//xmlns:first') @child = Nokogiri::XML::Node.new('second', @doc) end describe "and a child with a namespace matching the parent's default namespace" do describe "and as the default prefix" do before do @ns = @child.add_namespace(nil, 'http://tenderlovemaking.com/') @child.namespace = @ns end it "inserts a node that inherits the parent's default namespace" do @node.add_child(@child) assert reparented = @doc.at('//bar:second', "bar" => "http://tenderlovemaking.com/") assert reparented.namespace_definitions.empty? assert_equal @ns, reparented.namespace assert_equal( { "xmlns" => "http://tenderlovemaking.com/", "xmlns:foo" => "http://flavorjon.es/", }, reparented.namespaces) end end describe "but with a different prefix" do before do @ns = @child.add_namespace("baz", 'http://tenderlovemaking.com/') @child.namespace = @ns end it "inserts a node that uses its own namespace" do @node.add_child(@child) assert reparented = @doc.at('//bar:second', "bar" => "http://tenderlovemaking.com/") assert reparented.namespace_definitions.include?(@ns) assert_equal @ns, reparented.namespace assert_equal( { "xmlns" => "http://tenderlovemaking.com/", "xmlns:foo" => "http://flavorjon.es/", "xmlns:baz" => "http://tenderlovemaking.com/", }, reparented.namespaces) end end end describe "and a child with a namespace matching the parent's non-default namespace" do describe "set by #namespace=" do before do @ns = @doc.root.namespace_definitions.detect { |x| x.prefix == "foo" } @child.namespace = @ns end it "inserts a node that inherits the matching parent namespace" do @node.add_child(@child) assert reparented = @doc.at('//bar:second', "bar" => "http://flavorjon.es/") assert reparented.namespace_definitions.empty? assert_equal @ns, reparented.namespace assert_equal( { "xmlns" => "http://tenderlovemaking.com/", "xmlns:foo" => "http://flavorjon.es/", }, reparented.namespaces) end end describe "with the same prefix" do before do @ns = @child.add_namespace("foo", 'http://flavorjon.es/') @child.namespace = @ns end it "inserts a node that uses the parent's namespace" do @node.add_child(@child) assert reparented = @doc.at('//bar:second', "bar" => "http://flavorjon.es/") assert reparented.namespace_definitions.empty? assert_equal @ns, reparented.namespace assert_equal( { "xmlns" => "http://tenderlovemaking.com/", "xmlns:foo" => "http://flavorjon.es/", }, reparented.namespaces) end end describe "as the default prefix" do before do @ns = @child.add_namespace(nil, 'http://flavorjon.es/') @child.namespace = @ns end it "inserts a node that keeps its namespace" do @node.add_child(@child) assert reparented = @doc.at('//bar:second', "bar" => "http://flavorjon.es/") assert reparented.namespace_definitions.include?(@ns) assert_equal @ns, reparented.namespace assert_equal( { "xmlns" => "http://flavorjon.es/", "xmlns:foo" => "http://flavorjon.es/", }, reparented.namespaces) end end describe "but with a different prefix" do before do @ns = @child.add_namespace('baz', 'http://flavorjon.es/') @child.namespace = @ns end it "inserts a node that keeps its namespace" do @node.add_child(@child) assert reparented = @doc.at('//bar:second', "bar" => "http://flavorjon.es/") assert reparented.namespace_definitions.include?(@ns) assert_equal @ns, reparented.namespace assert_equal( { "xmlns" =>"http://tenderlovemaking.com/", "xmlns:foo" =>"http://flavorjon.es/", "xmlns:baz" =>"http://flavorjon.es/", }, reparented.namespaces) end end end describe "and a child node with a default namespace not matching the parent's default namespace and a namespace matching a parent namespace but with a different prefix" do before do @ns = @child.add_namespace(nil, 'http://example.org/') @child.namespace = @ns @ns2 = @child.add_namespace('baz', 'http://tenderlovemaking.com/') end it "inserts a node that keeps its namespace" do @node.add_child(@child) assert reparented = @doc.at('//bar:second', "bar" => "http://example.org/") assert reparented.namespace_definitions.include?(@ns) assert reparented.namespace_definitions.include?(@ns2) assert_equal @ns, reparented.namespace assert_equal( { "xmlns" => "http://example.org/", "xmlns:foo" => "http://flavorjon.es/", "xmlns:baz" => "http://tenderlovemaking.com/", }, reparented.namespaces) end end end end describe "#add_previous_sibling" do it "should not merge text nodes during the operation" do xml = Nokogiri::XML %Q(text node) replacee = xml.root.children.first replacee.add_previous_sibling "foo

bar" assert_equal "foo

bartext node", xml.root.children.to_html end it 'should remove the child node after the operation' do fragment = Nokogiri::HTML::DocumentFragment.parse("ab") node = fragment.children.last node.add_previous_sibling node.children assert_empty node.children, "should have no childrens" end describe "with a text node before" do it "should not defensively dup the 'before' text node" do xml = Nokogiri::XML %Q(before

after
) pivot = xml.at_css("p") before = xml.root.children.first after = xml.root.children.last pivot.add_previous_sibling("x") assert_equal "after", after.content assert !after.parent.nil?, "unrelated node should not be affected" assert_equal "before", before.content assert !before.parent.nil?, "no need to reparent" end end end describe "#add_next_sibling" do it "should not merge text nodes during the operation" do xml = Nokogiri::XML %Q(text node) replacee = xml.root.children.first replacee.add_next_sibling "foo

bar" assert_equal "text nodefoo

bar", xml.root.children.to_html end it 'should append a text node before an existing non text node' do xml = Nokogiri::XML %Q(

foo

bar

) p = xml.at_css 'p' p.add_next_sibling 'a' assert_equal '

foo

a

bar

', xml.root.to_s end it 'should append a text node before an existing text node' do xml = Nokogiri::XML %Q(

foo

after
) p = xml.at_css 'p' p.add_next_sibling 'x' assert_equal '

foo

xafter
', xml.root.to_s end describe "with a text node after" do it "should not defensively dup the 'after' text node" do xml = Nokogiri::XML %Q(before

after
) pivot = xml.at_css("p") before = xml.root.children.first after = xml.root.children.last pivot.add_next_sibling("x") assert_equal "before", before.content assert !before.parent.nil?, "unrelated node should not be affected" assert_equal "after", after.content assert !after.parent.nil? end end end describe "#replace" do describe "a text node with a text node" do it "should not merge text nodes during the operation" do xml = Nokogiri::XML %Q(text node) replacee = xml.root.children.first replacee.replace "new text node" assert_equal "new text node", xml.root.children.first.content end end describe "when a document has a default namespace" do before do @fruits = Nokogiri::XML(<<-eoxml) eoxml end it "inserts a node with default namespaces" do apple = @fruits.css('apple').first orange = Nokogiri::XML::Node.new('orange', @fruits) apple.replace(orange) assert_equal orange, @fruits.css('orange').first end end end describe "unlinking a node and then reparenting it" do it "not blow up" do # see http://github.com/sparklemotion/nokogiri/issues#issue/22 10.times do begin doc = Nokogiri::XML <<-EOHTML EOHTML assert root = doc.at("root") assert a = root.at("a") assert b = a.at("b") assert c = a.at("c") a.add_next_sibling(b.unlink) c.unlink end GC.start end end end describe "replace-merging text nodes" do [ ['a
', 'afoo'], ['a
b
', 'afoob'], ['
b
', 'foob'] ].each do |xml, result| it "doesn't blow up on #{xml}" do doc = Nokogiri::XML.parse(xml) saved_nodes = doc.root.children doc.at_xpath("/root/br").replace(Nokogiri::XML::Text.new('foo', doc)) saved_nodes.each { |child| child.inspect } # try to cause a crash assert_equal result, doc.at_xpath("/root/text()").inner_text end end end describe "reparenting into another document" do it "correctly sets default namespace of a reparented node" do # issue described in #391 # thanks to Nick Canzoneri @nickcanz for this test case! source_doc = Nokogiri::XML <<-EOX EOX dest_doc = Nokogiri::XML <<-EOX EOX stuff = source_doc.at_css("Directory[Id='TARGETDIR']") insert_point = dest_doc.at_css("DirectoryRef[Id='InstallDir']") insert_point.children = stuff.children() assert_no_match(/default:/, insert_point.children.to_xml) assert_match(//, insert_point.children.to_xml) end end end end end end nokogiri-1.8.2/test/xml/test_dtd_encoding.rb0000644000004100000410000000135213235345655021173 0ustar www-datawww-data# -*- coding: utf-8 -*- require "helper" module Nokogiri module XML class TestDTDEncoding < Nokogiri::TestCase def setup super @xml = Nokogiri::XML(File.read(XML_FILE), XML_FILE, 'UTF-8') assert @dtd = @xml.internal_subset end def test_entities @dtd.entities.each do |k,v| assert_equal @xml.encoding, k.encoding.name end end def test_notations @dtd.notations.each do |k,notation| assert_equal 'UTF-8', k.encoding.name %w{ name public_id system_id }.each do |attribute| v = notation.send(:"#{attribute}") || next assert_equal 'UTF-8', v.encoding.name end end end end end end nokogiri-1.8.2/test/xml/test_processing_instruction.rb0000644000004100000410000000133413235345655023367 0ustar www-datawww-datarequire "helper" module Nokogiri module XML class TestProcessingInstruction < Nokogiri::TestCase def setup super @xml = Nokogiri::XML.parse(File.read(XML_FILE), XML_FILE) end def test_type assert_equal(Node::PI_NODE, @xml.children[0].type) end def test_name assert_equal 'TEST-STYLE', @xml.children[0].name end def test_new assert ref = ProcessingInstruction.new(@xml, 'name', 'content') assert_instance_of ProcessingInstruction, ref end def test_many_new 100.times { ProcessingInstruction.new(@xml, 'foo', 'bar') } @xml.root << ProcessingInstruction.new(@xml, 'foo', 'bar') end end end end nokogiri-1.8.2/test/xml/sax/0000755000004100000410000000000013235345655015760 5ustar www-datawww-datanokogiri-1.8.2/test/xml/sax/test_push_parser.rb0000644000004100000410000001426213235345655021704 0ustar www-datawww-data# -*- coding: utf-8 -*- require "helper" module Nokogiri module XML module SAX class TestPushParser < Nokogiri::SAX::TestCase def setup super @parser = XML::SAX::PushParser.new(Doc.new) end def test_exception assert_raises(SyntaxError) do @parser << "" end assert_raises(SyntaxError) do @parser << nil end end def test_end_document_called @parser.<<(<<-eoxml)

Paragraph 1

eoxml assert ! @parser.document.end_document_called @parser.finish assert @parser.document.end_document_called end def test_start_element @parser.<<(<<-eoxml)

eoxml assert_equal [["p", [["id", "asdfasdf"]]]], @parser.document.start_elements @parser.<<(<<-eoxml) Paragraph 1

eoxml assert_equal [' This is a comment '], @parser.document.comments @parser.finish end def test_start_element_with_namespaces @parser.<<(<<-eoxml)

eoxml assert_equal [["p", [["xmlns:foo", "http://foo.example.com/"]]]], @parser.document.start_elements @parser.<<(<<-eoxml) Paragraph 1

eoxml assert_equal [' This is a comment '], @parser.document.comments @parser.finish end def test_start_element_ns @parser.<<(<<-eoxml) eoxml assert_equal 1, @parser.document.start_elements_namespace.length el = @parser.document.start_elements_namespace.first assert_equal 'stream', el.first assert_equal 2, el[1].length assert_equal [['version', '1.0'], ['size', 'large']], el[1].map { |x| [x.localname, x.value] } assert_equal 'stream', el[2] assert_equal 'http://etherx.jabber.org/streams', el[3] @parser.finish end def test_end_element_ns @parser.<<(<<-eoxml) eoxml assert_equal [['stream', 'stream', 'http://etherx.jabber.org/streams']], @parser.document.end_elements_namespace @parser.finish end def test_chevron_partial_xml @parser.<<(<<-eoxml)

eoxml @parser.<<(<<-eoxml) Paragraph 1

eoxml assert_equal [' This is a comment '], @parser.document.comments @parser.finish end def test_chevron @parser.<<(<<-eoxml)

Paragraph 1

eoxml @parser.finish assert_equal [' This is a comment '], @parser.document.comments end def test_default_options assert_equal 0, @parser.options end def test_recover @parser.options |= XML::ParseOptions::RECOVER @parser.<<(<<-eoxml)

Foo Bar

eoxml @parser.finish assert(@parser.document.errors.size >= 1) assert_equal [["p", []], ["bar", []]], @parser.document.start_elements assert_equal "FooBar", @parser.document.data.map { |x| x.gsub(/\s/, '') }.join end def test_broken_encoding skip("ultra hard to fix for pure Java version") if Nokogiri.jruby? @parser.options |= XML::ParseOptions::RECOVER # This is ISO_8859-1: @parser.<< "Gau\337" @parser.finish assert(@parser.document.errors.size >= 1) assert_equal "Gau\337", @parser.document.data.join assert_equal [["r"]], @parser.document.end_elements end def test_replace_entities_attribute_behavior if Nokogiri.uses_libxml? # initially false assert_equal false, @parser.replace_entities # can be set to true @parser.replace_entities = true assert_equal true, @parser.replace_entities # can be set to false @parser.replace_entities = false assert_equal false, @parser.replace_entities else # initially true assert_equal true, @parser.replace_entities # ignore attempts to set to false @parser.replace_entities = false # TODO: should we raise an exception here? assert_equal true, @parser.replace_entities end end def test_untouched_entities skip("entities are always replaced in pure Java version") if Nokogiri.jruby? @parser.<<(<<-eoxml)

Paragraph 1 & 2

eoxml @parser.finish assert_equal [["p", [["id", "asdf&asdf"]]]], @parser.document.start_elements assert_equal "Paragraph 1 & 2", @parser.document.data.join.strip end def test_replaced_entities @parser.replace_entities = true @parser.<<(<<-eoxml)

Paragraph 1 & 2

eoxml @parser.finish assert_equal [["p", [["id", "asdf&asdf"]]]], @parser.document.start_elements assert_equal "Paragraph 1 & 2", @parser.document.data.join.strip end end end end end nokogiri-1.8.2/test/xml/sax/test_parser_context.rb0000644000004100000410000000537113235345655022412 0ustar www-datawww-data# -*- coding: utf-8 -*- require "helper" module Nokogiri module XML module SAX class TestParserContext < Nokogiri::SAX::TestCase def setup @xml = ' world ' end class Counter < Nokogiri::XML::SAX::Document attr_accessor :context, :lines, :columns def initialize @context = nil @lines = [] @columns = [] end def start_element name, attrs = [] @lines << [name, context.line] @columns << [name, context.column] end end def test_line_numbers sax_handler = Counter.new parser = Nokogiri::XML::SAX::Parser.new(sax_handler) parser.parse(@xml) do |ctx| sax_handler.context = ctx end assert_equal [["hello", 1], ["inter", 4], ["net", 5]], sax_handler.lines end def test_column_numbers sax_handler = Counter.new parser = Nokogiri::XML::SAX::Parser.new(sax_handler) parser.parse(@xml) do |ctx| sax_handler.context = ctx end assert_equal [["hello", 7], ["inter", 7], ["net", 9]], sax_handler.columns end def test_replace_entities pc = ParserContext.new StringIO.new(''), 'UTF-8' pc.replace_entities = false assert_equal false, pc.replace_entities pc.replace_entities = true assert_equal true, pc.replace_entities end def test_recovery pc = ParserContext.new StringIO.new(''), 'UTF-8' pc.recovery = false assert_equal false, pc.recovery pc.recovery = true assert_equal true, pc.recovery end def test_from_io ctx = ParserContext.new StringIO.new('fo'), 'UTF-8' assert ctx end def test_from_string assert ParserContext.new 'blah blah' end def test_parse_with ctx = ParserContext.new 'blah' assert_raises ArgumentError do ctx.parse_with nil end end def test_parse_with_sax_parser xml = "" ctx = ParserContext.new xml parser = Parser.new Doc.new assert_nil ctx.parse_with parser end def test_from_file ctx = ParserContext.file XML_FILE parser = Parser.new Doc.new assert_nil ctx.parse_with parser end def test_parse_with_returns_nil xml = "" ctx = ParserContext.new xml parser = Parser.new Doc.new assert_nil ctx.parse_with(parser) end end end end end nokogiri-1.8.2/test/xml/sax/test_parser_text.rb0000644000004100000410000001040213235345655021701 0ustar www-datawww-data# -*- coding: utf-8 -*- require "helper" module Nokogiri module XML module SAX class TestParserText < Nokogiri::SAX::TestCase def setup super @doc = DocWithOrderedItems.new @parser = XML::SAX::Parser.new @doc end def test_texts_order xml = <<-eoxml text 0

text 1 text 2 text 3

text 4

eoxml @parser.parse xml items = @doc.items.get_root_content "root" items = items.select_methods [ :start_element, :end_element, :characters, :comment, :cdata_block ] items.strip_text! [:characters, :comment, :cdata_block] assert_equal [ [:characters, 'text 0'], [:start_element, 'p', []], [:characters, 'text 1'], [:start_element, 'span', []], [:characters, 'text 2'], [:end_element, 'span'], [:characters, 'text 3'], [:end_element, 'p'], [:characters, 'text 4'], [:comment, 'text 5'], [:characters, ''], [:start_element, 'p', []], [:characters, ''], [:comment, 'text 6'], [:characters, ''], [:start_element, 'span', []], [:comment, 'text 7'], [:end_element, 'span'], [:characters, ''], [:comment, 'text 8'], [:characters, ''], [:end_element, 'p'], [:characters, ''], [:comment, 'text 9'], [:characters, ''], [:cdata_block, 'text 10'], [:characters, ''], [:start_element, 'p', []], [:characters, ''], [:cdata_block, 'text 11'], [:characters, ''], [:start_element, 'span', []], [:cdata_block, 'text 12'], [:end_element, 'span'], [:characters, ''], [:cdata_block, 'text 13'], [:characters, ''], [:end_element, 'p'], [:characters, ''] ], items nil end def text_whitespace xml = <<-eoxml

eoxml @parser.parse xml items = @doc.items.get_root_content "root" items = items.select_methods [ :start_element, :end_element, :characters, :comment, :cdata_block ] items.strip_text! [:characters, :comment, :cdata_block] assert_equal [ [:characters, ''], [:start_element, 'p', []], [:characters, ''], [:start_element, 'span', []], [:end_element, 'span'], [:characters, ''], [:start_element, 'span', []], [:characters, ''], [:end_element, 'span'], [:characters, ''], [:start_element, 'span', []], [:characters, ''], [:end_element, 'span'], [:characters, ''], [:end_element, 'p'], [:characters, ''], [:start_element, 'p', []], [:characters, ''], [:comment, ''], [:characters, ''], [:comment, ''], [:characters, ''], [:comment, ''], [:characters, ''], [:end_element, 'p'], [:characters, ''], [:start_element, 'p', []], [:characters, ''], [:cdata_block, ''], [:characters, ''], [:cdata_block, ''], [:characters, ''], [:cdata_block, ''], [:characters, ''], [:end_element, 'p'], [:characters, ''] ], items nil end end end end end nokogiri-1.8.2/test/xml/sax/test_parser.rb0000644000004100000410000003010213235345655020634 0ustar www-datawww-data# -*- coding: utf-8 -*- require "helper" module Nokogiri module XML module SAX class TestParser < Nokogiri::SAX::TestCase def setup super @parser = XML::SAX::Parser.new(Doc.new) end def test_parser_context_yielded_io doc = Doc.new parser = XML::SAX::Parser.new doc xml = "" block_called = false parser.parse(StringIO.new(xml)) { |ctx| block_called = true ctx.replace_entities = true } assert block_called assert_equal [['foo', [['a', '&b']]]], doc.start_elements end def test_parser_context_yielded_in_memory doc = Doc.new parser = XML::SAX::Parser.new doc xml = "" block_called = false parser.parse(xml) { |ctx| block_called = true ctx.replace_entities = true } assert block_called assert_equal [['foo', [['a', '&b']]]], doc.start_elements end def test_xml_decl [ ['', nil], ['', ['1.0']], ['', ['1.0', 'UTF-8']], ['', ['1.0', 'yes']], ['', ['1.0', 'no']], ['', ['1.0', "UTF-8", 'no']], ['', ['1.0', "ISO-8859-1", 'yes']] ].each do |decl, value| parser = XML::SAX::Parser.new(Doc.new) xml = "#{decl}\n" parser.parse xml assert parser.document.start_document_called, xml assert_equal value, parser.document.xmldecls, xml end end def test_parse_empty assert_raises RuntimeError do @parser.parse('') end end def test_namespace_declaration_order_is_saved @parser.parse <<-eoxml eoxml assert_equal 2, @parser.document.start_elements_namespace.length el = @parser.document.start_elements_namespace.first namespaces = el.last assert_equal ['foo', 'http://foo.example.com/'], namespaces.first assert_equal [nil, 'http://example.com/'], namespaces.last end def test_bad_document_calls_error_handler @parser.parse('') assert @parser.document.errors assert @parser.document.errors.length > 0 end def test_namespace_are_super_fun_to_parse @parser.parse <<-eoxml hello world eoxml assert @parser.document.start_elements_namespace.length > 0 el = @parser.document.start_elements_namespace[1] assert_equal 'a', el.first assert_equal 1, el[1].length attribute = el[1].first assert_equal 'bar', attribute.localname assert_equal 'foo', attribute.prefix assert_equal 'hello', attribute.value assert_equal 'http://foo.example.com/', attribute.uri end def test_sax_v1_namespace_attribute_declarations @parser.parse <<-eoxml hello world
eoxml assert @parser.document.start_elements.length > 0 elm = @parser.document.start_elements.first assert_equal 'root', elm.first assert elm[1].include?(['xmlns:foo', 'http://foo.example.com/']) assert elm[1].include?(['xmlns', 'http://example.com/']) end def test_sax_v1_namespace_nodes @parser.parse <<-eoxml hello world
eoxml assert_equal 5, @parser.document.start_elements.length assert @parser.document.start_elements.map(&:first).include?('foo:bar') assert @parser.document.end_elements.map(&:first).include?('foo:bar') end def test_start_is_called_without_namespace @parser.parse(<<-eoxml) eoxml assert_equal ['root', 'foo:f', 'bar'], @parser.document.start_elements.map(&:first) end def test_parser_sets_encoding parser = XML::SAX::Parser.new(Doc.new, 'UTF-8') assert_equal 'UTF-8', parser.encoding end def test_errors_set_after_parsing_bad_dom doc = Nokogiri::XML('') assert doc.errors @parser.parse('') assert @parser.document.errors assert @parser.document.errors.length > 0 doc.errors.each do |error| assert_equal 'UTF-8', error.message.encoding.name end # when using JRuby Nokogiri, more errors will be generated as the DOM # parser continue to parse an ill formed document, while the sax parser # will stop at the first error unless Nokogiri.jruby? assert_equal doc.errors.length, @parser.document.errors.length end end def test_parse_with_memory_argument @parser.parse(File.read(XML_FILE)) assert(@parser.document.cdata_blocks.length > 0) end def test_parse_with_io_argument File.open(XML_FILE, 'rb') { |f| @parser.parse(f) } assert(@parser.document.cdata_blocks.length > 0) end def test_parse_io call_parse_io_with_encoding 'UTF-8' end # issue #828 def test_parse_io_lower_case_encoding call_parse_io_with_encoding 'utf-8' end def call_parse_io_with_encoding encoding File.open(XML_FILE, 'rb') { |f| @parser.parse_io(f, encoding) } assert(@parser.document.cdata_blocks.length > 0) called = false @parser.document.start_elements.flatten.each do |thing| assert_equal 'UTF-8', thing.encoding.name called = true end assert called called = false @parser.document.end_elements.flatten.each do |thing| assert_equal 'UTF-8', thing.encoding.name called = true end assert called called = false @parser.document.data.each do |thing| assert_equal 'UTF-8', thing.encoding.name called = true end assert called called = false @parser.document.comments.flatten.each do |thing| assert_equal 'UTF-8', thing.encoding.name called = true end assert called called = false @parser.document.cdata_blocks.flatten.each do |thing| assert_equal 'UTF-8', thing.encoding.name called = true end assert called end def test_parse_file @parser.parse_file(XML_FILE) assert_raises(ArgumentError) { @parser.parse_file(nil) } assert_raises(Errno::ENOENT) { @parser.parse_file('') } assert_raises(Errno::EISDIR) { @parser.parse_file(File.expand_path(File.dirname(__FILE__))) } end def test_render_parse_nil_param assert_raises(ArgumentError) { @parser.parse_memory(nil) } end def test_bad_encoding_args assert_raises(ArgumentError) { XML::SAX::Parser.new(Doc.new, 'not an encoding') } assert_raises(ArgumentError) { @parser.parse_io(StringIO.new(''), 'not an encoding')} end def test_ctag @parser.parse_memory(<<-eoxml)

Paragraph 1

eoxml assert_equal [' This is a comment '], @parser.document.cdata_blocks end def test_comment @parser.parse_memory(<<-eoxml)

Paragraph 1

eoxml assert_equal [' This is a comment '], @parser.document.comments end def test_characters @parser.parse_memory(<<-eoxml)

Paragraph 1

eoxml assert_equal ['Paragraph 1'], @parser.document.data end def test_end_document @parser.parse_memory(<<-eoxml)

Paragraph 1

eoxml assert @parser.document.end_document_called end def test_end_element @parser.parse_memory(<<-eoxml)

Paragraph 1

eoxml assert_equal [["p"]], @parser.document.end_elements end def test_start_element_attrs @parser.parse_memory(<<-eoxml)

Paragraph 1

eoxml assert_equal [["p", [["id", "asdfasdf"]]]], @parser.document.start_elements end def test_start_element_attrs_include_namespaces @parser.parse_memory(<<-eoxml)

Paragraph 1

eoxml assert_equal [["p", [['xmlns:foo', 'http://foo.example.com/']]]], @parser.document.start_elements end def test_processing_instruction @parser.parse_memory(<<-eoxml) eoxml assert_equal [['xml-stylesheet', 'href="a.xsl" type="text/xsl"']], @parser.document.processing_instructions end if Nokogiri.uses_libxml? # JRuby SAXParser only parses well-formed XML documents def test_parse_document @parser.parse_memory(<<-eoxml)

Paragraph 1

Paragraph 2

eoxml end end def test_parser_attributes xml = <<-eoxml eoxml block_called = false @parser.parse(xml) { |ctx| block_called = true ctx.replace_entities = true } assert block_called assert_equal [['root', []], ['foo', [['a', '&b'], ['c', '>d']]]], @parser.document.start_elements end def test_recovery_from_incorrect_xml xml = <<-eoxml heyhey yourself eoxml block_called = false @parser.parse(xml) { |ctx| block_called = true ctx.recovery = true } assert block_called assert_equal [['Root', []], ['Data', []], ['Item', []], ['Data', []], ['Item', []]], @parser.document.start_elements end def test_square_bracket_in_text # issue 1261 xml = <<-eoxml en:#:home_page:#:stories:#:[6]:#:name Sandy S. eoxml @parser.parse(xml) assert @parser.document.data.must_include "en:#:home_page:#:stories:#:[6]:#:name" end end end end end nokogiri-1.8.2/test/xml/test_builder.rb0000644000004100000410000002370013235345655020201 0ustar www-datawww-data# -*- coding: utf-8 -*- require "helper" module Nokogiri module XML class TestBuilder < Nokogiri::TestCase def test_attribute_sensitivity xml = Nokogiri::XML::Builder.new { |x| x.tag "hello", "abcDef" => "world" }.to_xml doc = Nokogiri.XML xml assert_equal 'world', doc.root['abcDef'] end def test_builder_multiple_nodes Nokogiri::XML::Builder.new do |xml| 0.upto(10) do xml.text "test" end end end def test_builder_with_utf8_text text = "test ﺵ " doc = Nokogiri::XML::Builder.new(:encoding => "UTF-8") { |xml| xml.test text }.doc assert_equal text, doc.content end def test_builder_escape xml = Nokogiri::XML::Builder.new { |x| x.condition "value < 1", :attr => "value < 1" }.to_xml doc = Nokogiri.XML xml assert_equal 'value < 1', doc.root['attr'] assert_equal 'value < 1', doc.root.content end def test_builder_namespace doc = Nokogiri::XML::Builder.new { |xml| xml.a("xmlns:a" => "x") do xml.b("xmlns:a" => "x", "xmlns:b" => "y") end }.doc b = doc.at('b') assert b assert_equal({"xmlns:a"=>"x", "xmlns:b"=>"y"}, b.namespaces) assert_equal({"xmlns:b"=>"y"}, namespaces_defined_on(b)) end def test_builder_namespace_part_deux doc = Nokogiri::XML::Builder.new { |xml| xml.a("xmlns:b" => "y") do xml.b("xmlns:a" => "x", "xmlns:b" => "y", "xmlns:c" => "z") end }.doc b = doc.at('b') assert b assert_equal({"xmlns:a"=>"x", "xmlns:b"=>"y", "xmlns:c"=>"z"}, b.namespaces) assert_equal({"xmlns:a"=>"x", "xmlns:c"=>"z"}, namespaces_defined_on(b)) end def test_builder_with_unlink b = Nokogiri::XML::Builder.new do |xml| xml.foo do xml.bar { xml.parent.unlink } xml.bar2 end end assert b end def test_with_root doc = Nokogiri::XML(File.read(XML_FILE)) Nokogiri::XML::Builder.with(doc.at('employee')) do |xml| xml.foo end assert_equal 1, doc.xpath('//employee/foo').length end def test_root_namespace_default_decl b = Nokogiri::XML::Builder.new { |xml| xml.root(:xmlns => 'one:two') } doc = b.doc assert_equal 'one:two', doc.root.namespace.href assert_equal({ 'xmlns' => 'one:two' }, doc.root.namespaces) end def test_root_namespace_multi_decl b = Nokogiri::XML::Builder.new { |xml| xml.root(:xmlns => 'one:two', 'xmlns:foo' => 'bar') do xml.hello end } doc = b.doc assert_equal 'one:two', doc.root.namespace.href assert_equal({ 'xmlns' => 'one:two', 'xmlns:foo' => 'bar' }, doc.root.namespaces) assert_equal 'one:two', doc.at('hello').namespace.href end def test_non_root_namespace b = Nokogiri::XML::Builder.new { |xml| xml.root { xml.hello(:xmlns => 'one') } } assert_equal 'one', b.doc.at('hello', 'xmlns' => 'one').namespace.href end def test_specify_namespace b = Nokogiri::XML::Builder.new { |xml| xml.root('xmlns:foo' => 'bar') do xml[:foo].bar xml['foo'].baz end } doc = b.doc assert_equal 'bar', doc.at('foo|bar', 'foo' => 'bar').namespace.href assert_equal 'bar', doc.at('foo|baz', 'foo' => 'bar').namespace.href end def test_dtd_in_builder_output builder = Nokogiri::XML::Builder.new do |xml| xml.doc.create_internal_subset( 'html', "-//W3C//DTD HTML 4.01 Transitional//EN", "http://www.w3.org/TR/html4/loose.dtd" ) xml.root do xml.foo end end assert_match(//, builder.to_xml) end def test_specify_namespace_nested b = Nokogiri::XML::Builder.new { |xml| xml.root('xmlns:foo' => 'bar') do xml.yay do xml[:foo].bar xml.yikes do xml['foo'].baz end end end } doc = b.doc assert_equal 'bar', doc.at('foo|bar', 'foo' => 'bar').namespace.href assert_equal 'bar', doc.at('foo|baz', 'foo' => 'bar').namespace.href end def test_specified_namespace_postdeclared doc = Nokogiri::XML::Builder.new { |xml| xml.a do xml[:foo].b("xmlns:foo" => "bar") end }.doc a = doc.at('a') assert_equal({}, a.namespaces) b = doc.at_xpath('//foo:b', {:foo=>'bar'}) assert b assert_equal({"xmlns:foo"=>"bar"}, b.namespaces) assert_equal("b", b.name) assert_equal("bar", b.namespace.href) end def test_specified_namespace_undeclared Nokogiri::XML::Builder.new { |xml| xml.root do assert_raises(ArgumentError) do xml[:foo].bar end end } end def test_set_encoding builder = Nokogiri::XML::Builder.new(:encoding => 'UTF-8') do |xml| xml.root do xml.bar 'blah' end end assert_match 'UTF-8', builder.to_xml end def test_bang_and_underscore_is_escaped builder = Nokogiri::XML::Builder.new do |xml| xml.root do xml.p_('adsfadsf') xml.p!('adsfadsf') end end assert_equal 2, builder.doc.xpath('//p').length end def test_square_brackets_set_attributes builder = Nokogiri::XML::Builder.new do |xml| xml.root do foo = xml.foo foo['id'] = 'hello' assert_equal 'hello', foo['id'] end end assert_equal 1, builder.doc.xpath('//foo[@id = "hello"]').length end def test_nested_local_variable @ivar = 'hello' local_var = 'hello world' builder = Nokogiri::XML::Builder.new do |xml| xml.root do xml.foo local_var xml.bar @ivar xml.baz { xml.text @ivar } end end assert_equal 'hello world', builder.doc.at('//root/foo').content assert_equal 'hello', builder.doc.at('//root/bar').content assert_equal 'hello', builder.doc.at('baz').content end def test_raw_append builder = Nokogiri::XML::Builder.new do |xml| xml.root do xml << 'hello' end end assert_equal 'hello', builder.doc.at('/root').content end def test_raw_append_with_instance_eval builder = Nokogiri::XML::Builder.new do root do self << 'hello' end end assert_equal 'hello', builder.doc.at('/root').content end def test_raw_xml_append builder = Nokogiri::XML::Builder.new do |xml| xml.root do xml << '' end end assert_equal ["aaa"], builder.doc.at_css("root").children.collect(&:name) assert_equal ["bbb","ccc"], builder.doc.at_css("aaa").children.collect(&:name) end def test_raw_xml_append_with_namespaces doc = Nokogiri::XML::Builder.new do |xml| xml.root("xmlns:foo" => "x", "xmlns" => "y") do xml << '' end end.doc el = doc.at 'Element' assert_not_nil el assert_equal 'y', el.namespace.href assert_nil el.namespace.prefix attr = el.attributes["bar"] assert_not_nil attr assert_not_nil attr.namespace assert_equal "foo", attr.namespace.prefix end def test_cdata builder = Nokogiri::XML::Builder.new do root { cdata "hello world" } end assert_equal("", builder.to_xml.gsub(/\n/, "")) end def test_comment builder = Nokogiri::XML::Builder.new do root { comment "this is a comment" } end assert builder.doc.root.children.first.comment? end def test_builder_no_block string = "hello world" builder = Nokogiri::XML::Builder.new builder.root { cdata string } assert_equal("", builder.to_xml.gsub(/\n/, '')) end def test_builder_can_inherit_parent_namespace builder = Nokogiri::XML::Builder.new builder.products { builder.parent.default_namespace = "foo" builder.product { builder.parent.default_namespace = nil } } doc = builder.doc ['product', 'products'].each do |n| assert_equal doc.at_xpath("//*[local-name() = '#{n}']").namespace.href, 'foo' end end def test_builder_can_handle_namespace_override builder = Nokogiri::XML::Builder.new builder.products('xmlns:foo' => 'bar') { builder.product('xmlns:foo' => 'baz') } doc = builder.doc assert_equal doc.at_xpath("//*[local-name() = 'product']").namespaces['xmlns:foo'], 'baz' assert_equal doc.at_xpath("//*[local-name() = 'products']").namespaces['xmlns:foo'], 'bar' assert_nil doc.at_xpath("//*[local-name() = 'products']").namespace end private def namespaces_defined_on(node) Hash[*node.namespace_definitions.collect{|n| ["xmlns:" + n.prefix, n.href]}.flatten] end end end end nokogiri-1.8.2/test/xml/test_cdata.rb0000644000004100000410000000244313235345655017630 0ustar www-datawww-datarequire "helper" module Nokogiri module XML class TestCDATA < Nokogiri::TestCase def setup super @xml = Nokogiri::XML.parse(File.read(XML_FILE), XML_FILE) end def test_cdata_node name = @xml.xpath('//employee[2]/name').first assert cdata = name.children[1] assert cdata.cdata? assert_equal '#cdata-section', cdata.name end def test_new node = CDATA.new(@xml, "foo") assert_equal "foo", node.content node = CDATA.new(@xml.root, "foo") assert_equal "foo", node.content end def test_new_with_nil node = CDATA.new(@xml, nil) assert_equal nil, node.content end def test_new_with_non_string assert_raises(TypeError) do CDATA.new(@xml, 1.234) end end def test_lots_of_new_cdata assert 100.times { CDATA.new(@xml, "asdfasdf") } end def test_content= node = CDATA.new(@xml, 'foo') assert_equal('foo', node.content) node.content = '& &' assert_equal('& &', node.content) assert_equal(' &]]>', node.to_xml) node.content = 'foo ]]> bar' assert_equal('foo ]]> bar', node.content) end end end end nokogiri-1.8.2/test/xml/test_entity_decl.rb0000644000004100000410000000612213235345655021055 0ustar www-datawww-datarequire "helper" module Nokogiri module XML class TestEntityDecl < Nokogiri::TestCase def setup super @xml = Nokogiri::XML(<<-eoxml) ]> eoxml @entities = @xml.internal_subset.children @entity_decl = @entities.first end def test_constants assert_equal 1, EntityDecl::INTERNAL_GENERAL assert_equal 2, EntityDecl::EXTERNAL_GENERAL_PARSED assert_equal 3, EntityDecl::EXTERNAL_GENERAL_UNPARSED assert_equal 4, EntityDecl::INTERNAL_PARAMETER assert_equal 5, EntityDecl::EXTERNAL_PARAMETER assert_equal 6, EntityDecl::INTERNAL_PREDEFINED end def test_create_typed_entity entity = @xml.create_entity( 'foo', EntityDecl::INTERNAL_GENERAL, nil, nil, nil ) assert_equal EntityDecl::INTERNAL_GENERAL, entity.entity_type assert_equal 'foo', entity.name end def test_new entity = Nokogiri::XML::EntityDecl.new( 'foo', @xml, EntityDecl::INTERNAL_GENERAL, nil, nil, nil ) assert_equal EntityDecl::INTERNAL_GENERAL, entity.entity_type assert_equal 'foo', entity.name end def test_create_default_args entity = @xml.create_entity('foo') assert_equal EntityDecl::INTERNAL_GENERAL, entity.entity_type assert_equal 'foo', entity.name end def test_external_id assert_nil @entity_decl.external_id end def test_system_id assert_nil @entity_decl.system_id end def test_entity_type assert_equal 1, @entity_decl.entity_type end def test_original_content assert_equal "es", @entity_decl.original_content if Nokogiri.jruby? assert_nil @entities[1].original_content else assert_equal "", @entities[1].original_content end end def test_content assert_equal "es", @entity_decl.content if Nokogiri.jruby? assert_nil @entities[1].content else assert_equal "", @entities[1].content end end def test_type assert_equal 17, @entities.first.type end def test_class assert_instance_of Nokogiri::XML::EntityDecl, @entities.first end def test_attributes assert_raise NoMethodError do @entity_decl.attributes end end def test_namespace assert_raise NoMethodError do @entity_decl.namespace end end def test_namespace_definitions assert_raise NoMethodError do @entity_decl.namespace_definitions end end def test_line assert_raise NoMethodError do @entity_decl.line end end def test_inspect assert_equal( "#<#{@entity_decl.class.name}:#{sprintf("0x%x", @entity_decl.object_id)} #{@entity_decl.to_s.inspect}>", @entity_decl.inspect ) end end end end nokogiri-1.8.2/test/xml/test_node_encoding.rb0000644000004100000410000000505613235345655021352 0ustar www-datawww-data# encoding: UTF-8 require "helper" module Nokogiri module XML class TestNodeEncoding < Nokogiri::TestCase def test_serialize_encoding_xml @xml = Nokogiri::XML(File.open(SHIFT_JIS_XML)) assert_equal @xml.encoding.downcase, @xml.serialize.encoding.name.downcase @doc = Nokogiri::XML(@xml.serialize) assert_equal @xml.serialize, @doc.serialize end def test_default_encoding doc = Nokogiri::XML(VEHICLE_XML) assert_nil doc.encoding assert_equal 'UTF-8', doc.serialize.encoding.name end def test_encoding_GH_1113 utf8 = 'shahid ὡ 𐄣 𢂁' hex = 'shahid ὡ 𐄣 𢂁' decimal = 'shahid ὡ 𐄣 𢂁' expected = Nokogiri.jruby? ? hex : decimal frag = Nokogiri::XML(utf8, nil, 'UTF-8', Nokogiri::XML::ParseOptions::STRICT) assert_equal utf8, frag.to_xml.sub(/^<.xml[^>]*>\n/m, '').strip frag = Nokogiri::XML(expected, nil, 'UTF-8', Nokogiri::XML::ParseOptions::STRICT) assert_equal utf8, frag.to_xml.sub(/^<.xml[^>]*>\n/m, '').strip frag = Nokogiri::XML(expected, nil, 'US-ASCII', Nokogiri::XML::ParseOptions::STRICT) assert_equal expected, frag.to_xml.sub(/^<.xml[^>]*>\n/m, '').strip end VEHICLE_XML = <<-eoxml Michelin Model XGV I'm a bicycle tire! eoxml def test_namespace doc = Nokogiri::XML(VEHICLE_XML.encode('Shift_JIS'), nil, 'Shift_JIS') assert_equal 'Shift_JIS', doc.encoding n = doc.xpath('//part:tire', { 'part' => 'http://schwinn.com/' }).first assert n assert_equal 'UTF-8', n.namespace.href.encoding.name assert_equal 'UTF-8', n.namespace.prefix.encoding.name end def test_namespace_as_hash doc = Nokogiri::XML(VEHICLE_XML.encode('Shift_JIS'), nil, 'Shift_JIS') assert_equal 'Shift_JIS', doc.encoding assert n = doc.xpath('//car').first n.namespace_definitions.each do |nd| assert_equal 'UTF-8', nd.href.encoding.name assert_equal 'UTF-8', nd.prefix.encoding.name end n.namespaces.each do |k,v| assert_equal 'UTF-8', k.encoding.name assert_equal 'UTF-8', v.encoding.name end end end end end nokogiri-1.8.2/test/xml/test_xpath.rb0000644000004100000410000003723013235345655017702 0ustar www-datawww-datarequire "helper" module Nokogiri module XML class TestXPath < Nokogiri::TestCase # ** WHY ALL THOSE _if Nokogiri.uses_libxml?_ ** # Hi, my dear readers, # # After reading these tests you may be wondering why all those ugly # if Nokogiri.uses_libxml? sparsed over the whole document. Well, let # me explain it. While using XPath in Java, you need the extension # functions to be in a namespace. This is not required by XPath, afaik, # but it is an usual convention though. # # Yours truly, # # The guy whose headaches belong to Nokogiri JRuby impl. def setup super @xml = Nokogiri::XML.parse(File.read(XML_FILE), XML_FILE) @ns = @xml.root.namespaces # TODO: Maybe I should move this to the original code. @ns["nokogiri"] = "http://www.nokogiri.org/default_ns/ruby/extensions_functions" @handler = Class.new { attr_reader :things def initialize @things = [] end def thing thing @things << thing thing end def returns_array node_set @things << node_set.to_a node_set.to_a end def my_filter set, attribute, value set.find_all { |x| x[attribute] == value } end def saves_node_set node_set @things = node_set end def value 123.456 end def anint 1230456 end }.new end def test_variable_binding assert_equal 4, @xml.xpath('//address[@domestic=$value]', nil, :value => 'Yes').length end def test_variable_binding_with_search assert_equal 4, @xml.search('//address[@domestic=$value]', nil, :value => 'Yes').length end def test_unknown_attribute assert_equal 0, @xml.xpath('//employee[@id="asdfasdf"]/@fooo').length assert_nil @xml.xpath('//employee[@id="asdfasdf"]/@fooo')[0] end def test_boolean assert_equal false, @xml.xpath('1 = 2') end def test_number assert_equal 2, @xml.xpath('1 + 1') end def test_string assert_equal 'foo', @xml.xpath('concat("fo", "o")') end def test_node_search_with_multiple_queries xml = '
important thing
stuff

more stuff

' node = Nokogiri::XML(xml).root assert_kind_of Nokogiri::XML::Node, node assert_equal 3, node.xpath('.//div', './/p').length assert_equal 3, node.css('.title', '.content', 'p').length assert_equal 3, node.search('.//div', 'p.blah').length end def test_css_search_uses_custom_selectors_with_arguments set = @xml.css('employee > address:my_filter("domestic", "Yes")', @handler) assert set.length > 0 set.each do |node| assert_equal 'Yes', node['domestic'] end end def test_css_search_uses_custom_selectors set = @xml.xpath('//employee') @xml.css('employee:thing()', @handler) assert_equal(set.length, @handler.things.length) assert_equal(set.to_a, @handler.things.flatten) end def test_search_with_css_query_uses_custom_selectors_with_arguments set = @xml.search('employee > address:my_filter("domestic", "Yes")', @handler) assert set.length > 0 set.each do |node| assert_equal 'Yes', node['domestic'] end end def test_search_with_xpath_query_uses_custom_selectors_with_arguments set = if Nokogiri.uses_libxml? @xml.search('//employee/address[my_filter(., "domestic", "Yes")]', @handler) else @xml.search('//employee/address[nokogiri:my_filter(., "domestic", "Yes")]', @ns, @handler) end assert set.length > 0 set.each do |node| assert_equal 'Yes', node['domestic'] end end def test_pass_self_to_function set = if Nokogiri.uses_libxml? @xml.xpath('//employee/address[my_filter(., "domestic", "Yes")]', @handler) else @xml.xpath('//employee/address[nokogiri:my_filter(., "domestic", "Yes")]', @ns, @handler) end assert set.length > 0 set.each do |node| assert_equal 'Yes', node['domestic'] end end def test_custom_xpath_function_gets_strings set = @xml.xpath('//employee') if Nokogiri.uses_libxml? @xml.xpath('//employee[thing("asdf")]', @handler) else @xml.xpath('//employee[nokogiri:thing("asdf")]', @ns, @handler) end assert_equal(set.length, @handler.things.length) assert_equal(['asdf'] * set.length, @handler.things) end def parse_params node params={} node.xpath('./param').each do |p| subparams = parse_params p if(subparams.length > 0) if(not params.has_key? p.attributes['name'].value) params[p.attributes['name'].value] = subparams else if(params[p.attributes['name'].value].is_a? Array) params[p.attributes['name'].value] << subparams else value = params[p.attributes['name'].value] params[p.attributes['name'].value] = [value,subparams] end end else params[p.attributes['name'].value]=p.text end end params end # issue #741 (xpath() around 10x slower in JRuby) def test_slow_jruby_xpath skip("testing against an absolute time is brittle. help make this better! see https://github.com/sparklemotion/nokogiri/issues/741") doc = Nokogiri::XML(File.open(XPATH_FILE)) start = Time.now doc.xpath('.//category').each do |c| c.xpath('programformats/programformat').each do |p| p.xpath('./modules/module').each do |m| parse_params m end end end stop = Time.now elapsed_time = stop - start time_limit = 20 assert_send [elapsed_time, :<, time_limit], "XPath is taking too long" end # issue #1109 (jruby impl's xpath() cache not being cleared on attr removal) def test_xpath_results_cache_should_get_cleared_on_attr_removal doc = Nokogiri::HTML('
') element = doc.at_xpath('//div[@name="foo"]') element.remove_attribute('name') assert_nil doc.at_xpath('//div[@name="foo"]') end # issue #1109 (jruby impl's xpath() cache not being cleared on attr update ) def test_xpath_results_cache_should_get_cleared_on_attr_update doc = Nokogiri::HTML('
') element = doc.at_xpath('//div[@name="foo"]') element['name'] = 'bar' assert_nil doc.at_xpath('//div[@name="foo"]') end def test_custom_xpath_function_returns_string if Nokogiri.uses_libxml? result = @xml.xpath('thing("asdf")', @handler) else result = @xml.xpath('nokogiri:thing("asdf")', @ns, @handler) end assert_equal 'asdf', result end def test_custom_xpath_gets_true_booleans set = @xml.xpath('//employee') if Nokogiri.uses_libxml? @xml.xpath('//employee[thing(true())]', @handler) else @xml.xpath("//employee[nokogiri:thing(true())]", @ns, @handler) end assert_equal(set.length, @handler.things.length) assert_equal([true] * set.length, @handler.things) end def test_custom_xpath_gets_false_booleans set = @xml.xpath('//employee') if Nokogiri.uses_libxml? @xml.xpath('//employee[thing(false())]', @handler) else @xml.xpath("//employee[nokogiri:thing(false())]", @ns, @handler) end assert_equal(set.length, @handler.things.length) assert_equal([false] * set.length, @handler.things) end def test_custom_xpath_gets_numbers set = @xml.xpath('//employee') if Nokogiri.uses_libxml? @xml.xpath('//employee[thing(10)]', @handler) else @xml.xpath('//employee[nokogiri:thing(10)]', @ns, @handler) end assert_equal(set.length, @handler.things.length) assert_equal([10] * set.length, @handler.things) end def test_custom_xpath_gets_node_sets set = @xml.xpath('//employee/name') if Nokogiri.uses_libxml? @xml.xpath('//employee[thing(name)]', @handler) else @xml.xpath('//employee[nokogiri:thing(name)]', @ns, @handler) end assert_equal(set.length, @handler.things.length) assert_equal(set.to_a, @handler.things.flatten) end def test_custom_xpath_gets_node_sets_and_returns_array set = @xml.xpath('//employee/name') if Nokogiri.uses_libxml? @xml.xpath('//employee[returns_array(name)]', @handler) else @xml.xpath('//employee[nokogiri:returns_array(name)]', @ns, @handler) end assert_equal(set.length, @handler.things.length) assert_equal(set.to_a, @handler.things.flatten) end def test_custom_xpath_handler_is_passed_a_decorated_node_set x = Module.new do def awesome! ; end end util_decorate(@xml, x) assert @xml.xpath('//employee/name') @xml.xpath('//employee[saves_node_set(name)]', @handler) assert_equal @xml, @handler.things.document assert @handler.things.respond_to?(:awesome!) end def test_code_that_invokes_OP_RESET_inside_libxml2 doc = "hi" xpath = 'id("foo")//foo' nokogiri = Nokogiri::HTML.parse(doc) assert nokogiri.xpath(xpath) end def test_custom_xpath_handler_with_args_under_gc_pressure # see http://github.com/sparklemotion/nokogiri/issues/#issue/345 tool_inspector = Class.new do def name_equals(nodeset, name, *args) nodeset.all? do |node| args.each { |thing| thing.inspect } node["name"] == name end end end.new xml = <<-EOXML #{"" * 10} EOXML doc = Nokogiri::XML xml # long list of long arguments, to apply GC pressure during # ruby_funcall argument marshalling xpath = ["//tool[name_equals(.,'hammer'"] 1000.times { xpath << "'unused argument #{'x' * 1000}'" } xpath << "'unused argument')]" xpath = xpath.join(',') assert_equal doc.xpath("//tool[@name='hammer']"), doc.xpath(xpath, tool_inspector) end def test_custom_xpath_without_arguments if Nokogiri.uses_libxml? value = @xml.xpath('value()', @handler) else value = @xml.xpath('nokogiri:value()', @ns, @handler) end assert_equal 123.456, value end def test_custom_xpath_without_arguments_returning_int if Nokogiri.uses_libxml? value = @xml.xpath('anint()', @handler) else value = @xml.xpath('nokogiri:anint()', @ns, @handler) end assert_equal 1230456, value end def test_custom_xpath_with_bullshit_arguments xml = %q{ } doc = Nokogiri::XML.parse(xml) foo = doc.xpath('//foo[bool_function(bar/baz)]', Class.new { def bool_function(value) true end }.new) assert_equal foo, doc.xpath("//foo") end def test_node_set_should_be_decorated # "called decorate on nill" exception in JRuby issue#514 process_output= < LZ77 END doc = Nokogiri::XML.parse(process_output) node = doc.xpath(%{//track[@type='Video']}) assert_equal "[]", node.xpath("Format").inspect end def test_very_specific_xml_xpath_making_problems_in_jruby # manually merges pull request #681 xml_string = %q{ a } xml_doc = Nokogiri::XML(xml_string) onix = xml_doc.children.first assert_equal 'a', onix.at_xpath('xmlns:Product').at_xpath('xmlns:RecordReference').text end def test_xpath_after_attribute_change xml_string = %q{ THE ARTICLE TITLE HYDRANGEA ARTICLE 1 SUBTITLE Artikkelin otsikko Hydrangea artiklan 1 } xml_doc = Nokogiri::XML(xml_string) ns_hash = {'mods'=>'http://www.loc.gov/mods/v3'} node = xml_doc.at_xpath('//mods:titleInfo[1]',ns_hash) node['lang'] = 'english' assert_equal 1, xml_doc.xpath('//mods:titleInfo[1]/@lang',ns_hash).length assert_equal 'english', xml_doc.xpath('//mods:titleInfo[1]/@lang',ns_hash).first.value end def test_xpath_after_element_removal xml_string = %q{ THE ARTICLE TITLE HYDRANGEA ARTICLE 1 SUBTITLE Artikkelin otsikko Hydrangea artiklan 1 } xml_doc = Nokogiri::XML(xml_string) ns_hash = {'mods'=>'http://www.loc.gov/mods/v3'} node = xml_doc.at_xpath('//mods:titleInfo[1]',ns_hash) node.remove assert_equal 1, xml_doc.xpath('//mods:titleInfo',ns_hash).length assert_equal 'finnish', xml_doc.xpath('//mods:titleInfo[1]/@lang',ns_hash).first.value end def test_xpath_after_reset_doc_via_innerhtml xml = < [TEXT_INSIDE_SECTION] XML doc = Nokogiri::XML(xml) doc.inner_html = doc.inner_html sections = doc.xpath(".//text:section[@name='Section1']") assert_equal 1, sections.size assert_equal "[TEXT_INSIDE_SECTION]", sections.first.text end def test_xpath_syntax_error doc = Nokogiri::XML('') begin doc.xpath('//ns1:Root') rescue => e assert_equal false, e.message.include?('0:0') end end end end end nokogiri-1.8.2/test/xml/test_document.rb0000644000004100000410000007220713235345655020377 0ustar www-datawww-datarequire "helper" require 'uri' module Nokogiri module XML class TestDocument < Nokogiri::TestCase URI = if URI.const_defined?(:DEFAULT_PARSER) ::URI::DEFAULT_PARSER else ::URI end def setup super @xml = Nokogiri::XML.parse(File.read(XML_FILE), XML_FILE) end def test_dtd_with_empty_internal_subset doc = Nokogiri::XML <<-eoxml eoxml assert doc.root end # issue #1005 def test_strict_parsing_empty_doc_should_raise_exception ["", " "].each do |empty_string| assert_raises(SyntaxError, "empty string '#{empty_string}' should raise a SyntaxError") do Nokogiri::XML(empty_string) { |c| c.strict } end assert_raises(SyntaxError, "StringIO of '#{empty_string}' should raise a SyntaxError") do Nokogiri::XML(StringIO.new(empty_string)) { |c| c.strict } end end end # issue #838 def test_document_with_invalid_prolog doc = Nokogiri::XML '' assert_empty doc.content end # issue #837 def test_document_with_refentity doc = Nokogiri::XML '&' assert_equal '', doc.content end # issue #835 def test_manually_adding_reference_entities d = Nokogiri::XML::Document.new root = Nokogiri::XML::Element.new('bar', d) txt = Nokogiri::XML::Text.new('foo', d) ent = Nokogiri::XML::EntityReference.new(d, '#8217') root << txt root << ent d << root assert_match(/’/, d.to_html) end def test_document_with_initial_space doc = Nokogiri::XML(" ") assert_equal 2, doc.children.size end def test_root_set_to_nil @xml.root = nil assert_equal nil, @xml.root end def test_million_laugh_attach doc = Nokogiri::XML ' ]> &lol9;' assert_not_nil doc end def test_million_laugh_attach_2 doc = Nokogiri::XML ' ]> &a; ' assert_not_nil doc end def test_ignore_unknown_namespace doc = Nokogiri::XML(<<-eoxml) eoxml if Nokogiri.jruby? refute doc.xpath('//foo').first.namespace # assert that the namespace is nil end refute_empty doc.xpath('//bar'), "bar wasn't found in the document" # bar should be part of the doc end def test_collect_namespaces doc = Nokogiri::XML(<<-eoxml) eoxml assert_equal({"xmlns"=>"hello", "xmlns:foo"=>"world"}, doc.collect_namespaces) end def test_subclass_initialize_modify # testing a segv Class.new(Nokogiri::XML::Document) { def initialize super body_node = Nokogiri::XML::Node.new "body", self body_node.content = "stuff" self.root = body_node end }.new end def test_create_text_node txt = @xml.create_text_node 'foo' assert_instance_of Nokogiri::XML::Text, txt assert_equal 'foo', txt.text assert_equal @xml, txt.document end def test_create_text_node_with_block @xml.create_text_node 'foo' do |txt| assert_instance_of Nokogiri::XML::Text, txt assert_equal 'foo', txt.text assert_equal @xml, txt.document end end def test_create_element elm = @xml.create_element('foo') assert_instance_of Nokogiri::XML::Element, elm assert_equal 'foo', elm.name assert_equal @xml, elm.document end def test_create_element_with_block @xml.create_element('foo') do |elm| assert_instance_of Nokogiri::XML::Element, elm assert_equal 'foo', elm.name assert_equal @xml, elm.document end end def test_create_element_with_attributes elm = @xml.create_element('foo',:a => "1") assert_instance_of Nokogiri::XML::Element, elm assert_instance_of Nokogiri::XML::Attr, elm.attributes["a"] assert_equal "1", elm["a"] end def test_create_element_with_namespace elm = @xml.create_element('foo',:'xmlns:foo' => 'http://tenderlovemaking.com') assert_equal 'http://tenderlovemaking.com', elm.namespaces['xmlns:foo'] end def test_create_element_with_hyphenated_namespace elm = @xml.create_element('foo',:'xmlns:SOAP-ENC' => 'http://tenderlovemaking.com') assert_equal 'http://tenderlovemaking.com', elm.namespaces['xmlns:SOAP-ENC'] end def test_create_element_with_content elm = @xml.create_element('foo',"needs more xml/violence") assert_equal "needs more xml/violence", elm.content end def test_create_cdata cdata = @xml.create_cdata("abc") assert_instance_of Nokogiri::XML::CDATA, cdata assert_equal "abc", cdata.content end def test_create_cdata_with_block @xml.create_cdata("abc") do |cdata| assert_instance_of Nokogiri::XML::CDATA, cdata assert_equal "abc", cdata.content end end def test_create_comment comment = @xml.create_comment("abc") assert_instance_of Nokogiri::XML::Comment, comment assert_equal "abc", comment.content end def test_create_comment_with_block @xml.create_comment("abc") do |comment| assert_instance_of Nokogiri::XML::Comment, comment assert_equal "abc", comment.content end end def test_pp out = StringIO.new(String.new) ::PP.pp @xml, out assert_operator out.string.length, :>, 0 end def test_create_internal_subset_on_existing_subset assert_not_nil @xml.internal_subset assert_raises(RuntimeError) do @xml.create_internal_subset('staff', nil, 'staff.dtd') end end def test_create_internal_subset xml = Nokogiri::XML('') assert_nil xml.internal_subset xml.create_internal_subset('name', nil, 'staff.dtd') ss = xml.internal_subset assert_equal 'name', ss.name assert_nil ss.external_id assert_equal 'staff.dtd', ss.system_id end def test_external_subset assert_nil @xml.external_subset Dir.chdir(ASSETS_DIR) do @xml = Nokogiri::XML.parse(File.read(XML_FILE), XML_FILE) { |cfg| cfg.dtdload } end assert @xml.external_subset end def test_create_external_subset_fails_with_existing_subset assert_nil @xml.external_subset Dir.chdir(ASSETS_DIR) do @xml = Nokogiri::XML.parse(File.read(XML_FILE), XML_FILE) { |cfg| cfg.dtdload } end assert @xml.external_subset assert_raises(RuntimeError) do @xml.create_external_subset('staff', nil, 'staff.dtd') end end def test_create_external_subset dtd = @xml.create_external_subset('staff', nil, 'staff.dtd') assert_nil dtd.external_id assert_equal 'staff.dtd', dtd.system_id assert_equal 'staff', dtd.name assert_equal dtd, @xml.external_subset end def test_version assert_equal '1.0', @xml.version end def test_add_namespace assert_raise NoMethodError do @xml.add_namespace('foo', 'bar') end end def test_attributes assert_raise NoMethodError do @xml.attributes end end def test_namespace assert_raise NoMethodError do @xml.namespace end end def test_namespace_definitions assert_raise NoMethodError do @xml.namespace_definitions end end def test_line assert_raise NoMethodError do @xml.line end end def test_empty_node_converted_to_html_is_not_self_closing doc = Nokogiri::XML('
') assert_equal "", doc.inner_html end def test_fragment fragment = @xml.fragment assert_equal 0, fragment.children.length end def test_add_child_fragment_with_single_node doc = Nokogiri::XML::Document.new fragment = doc.fragment('') doc.add_child fragment assert_equal '/hello', doc.at('//hello').path assert_equal 'hello', doc.root.name end def test_add_child_fragment_with_multiple_nodes doc = Nokogiri::XML::Document.new fragment = doc.fragment('') assert_raises(RuntimeError) do doc.add_child fragment end end def test_add_child_with_multiple_roots assert_raises(RuntimeError) do @xml << Node.new('foo', @xml) end end def test_add_child_with_string doc = Nokogiri::XML::Document.new doc.add_child "
quack!
" assert_equal 1, doc.root.children.length assert_equal "quack!", doc.root.children.first.content end def test_prepend doc = Nokogiri::XML('') node_set = doc.root.prepend_child '' assert_equal %w[branch], node_set.map(&:name) branch = doc.at('//branch') leaves = %w[leaf1 leaf2 leaf3] leaves.each { |name| branch.prepend_child('<%s/>' % name) } assert_equal leaves.length, branch.children.length assert_equal leaves.reverse, branch.children.map(&:name) end def test_prepend_child_fragment_with_single_node doc = Nokogiri::XML::Document.new fragment = doc.fragment('') doc.prepend_child fragment assert_equal '/hello', doc.at('//hello').path assert_equal 'hello', doc.root.name end def test_prepend_child_fragment_with_multiple_nodes doc = Nokogiri::XML::Document.new fragment = doc.fragment('') assert_raises(RuntimeError) do doc.prepend_child fragment end end def test_prepend_child_with_multiple_roots assert_raises(RuntimeError) do @xml.prepend_child Node.new('foo', @xml) end end def test_prepend_child_with_string doc = Nokogiri::XML::Document.new doc.prepend_child "
quack!
" assert_equal 1, doc.root.children.length assert_equal "quack!", doc.root.children.first.content end def test_move_root_to_document_with_no_root sender = Nokogiri::XML('foo') newdoc = Nokogiri::XML::Document.new newdoc.root = sender.root end def test_move_root_with_existing_root_gets_gcd doc = Nokogiri::XML('test') doc2 = Nokogiri::XML("#{'x' * 5000000}") doc2.root = doc.root end def test_validate if Nokogiri.uses_libxml? assert_equal 44, @xml.validate.length else xml = Nokogiri::XML.parse(File.read(XML_FILE), XML_FILE) {|cfg| cfg.dtdvalid} assert_equal 40, xml.validate.length end end def test_validate_no_internal_subset doc = Nokogiri::XML('') assert_nil doc.validate end def test_clone assert @xml.clone end def test_document_should_not_have_default_ns doc = Nokogiri::XML::Document.new assert_raises NoMethodError do doc.default_namespace = 'http://innernet.com/' end assert_raises NoMethodError do doc.add_namespace_definition('foo', 'bar') end end def test_parse_handles_nil_gracefully @doc = Nokogiri::XML::Document.parse(nil) assert_instance_of Nokogiri::XML::Document, @doc end def test_parse_takes_block options = nil Nokogiri::XML.parse(File.read(XML_FILE), XML_FILE) do |cfg| options = cfg end assert options end def test_parse_yields_parse_options options = nil Nokogiri::XML.parse(File.read(XML_FILE), XML_FILE) do |cfg| options = cfg options.nonet.nowarning.dtdattr end assert options.nonet? assert options.nowarning? assert options.dtdattr? end def test_XML_takes_block options = nil Nokogiri::XML(File.read(XML_FILE), XML_FILE) do |cfg| options = cfg options.nonet.nowarning.dtdattr end assert options.nonet? assert options.nowarning? assert options.dtdattr? end def test_subclass klass = Class.new(Nokogiri::XML::Document) doc = klass.new assert_instance_of klass, doc end def test_subclass_initialize klass = Class.new(Nokogiri::XML::Document) do attr_accessor :initialized_with def initialize(*args) @initialized_with = args end end doc = klass.new("1.0", 1) assert_equal ["1.0", 1], doc.initialized_with end def test_subclass_dup klass = Class.new(Nokogiri::XML::Document) doc = klass.new.dup assert_instance_of klass, doc end def test_subclass_parse klass = Class.new(Nokogiri::XML::Document) doc = klass.parse(File.read(XML_FILE)) # lame hack uses root to avoid comparing DOCTYPE tags which can appear out of order. # I should really finish lorax and use that here. assert_equal @xml.root.to_s, doc.root.to_s assert_instance_of klass, doc end def test_document_parse_method xml = Nokogiri::XML::Document.parse(File.read(XML_FILE)) # lame hack uses root to avoid comparing DOCTYPE tags which can appear out of order. # I should really finish lorax and use that here. assert_equal @xml.root.to_s, xml.root.to_s end def test_encoding= @xml.encoding = 'UTF-8' assert_match 'UTF-8', @xml.to_xml @xml.encoding = 'EUC-JP' assert_match 'EUC-JP', @xml.to_xml end def test_namespace_should_not_exist assert_raises(NoMethodError) { @xml.namespace } end def test_non_existant_function # WTF. I don't know why this is different between MRI and Jruby # They should be the same... Either way, raising an exception # is the correct thing to do. exception = RuntimeError if !Nokogiri.uses_libxml? || (Nokogiri.uses_libxml? && Nokogiri::VERSION_INFO['libxml']['platform'] == 'jruby') exception = Nokogiri::XML::XPath::SyntaxError end assert_raises(exception) { @xml.xpath('//name[foo()]') } end def test_xpath_syntax_error assert_raises(Nokogiri::XML::XPath::SyntaxError) do @xml.xpath('\\') end end def test_ancestors assert_equal 0, @xml.ancestors.length end def test_root_node_parent_is_document parent = @xml.root.parent assert_equal @xml, parent assert_instance_of Nokogiri::XML::Document, parent end def test_xmlns_is_automatically_registered doc = Nokogiri::XML(<<-eoxml) bar eoxml assert_equal 1, doc.css('xmlns|foo').length assert_equal 1, doc.css('foo').length assert_equal 0, doc.css('|foo').length assert_equal 1, doc.xpath('//xmlns:foo').length assert_equal 1, doc.search('xmlns|foo').length assert_equal 1, doc.search('//xmlns:foo').length assert doc.at('xmlns|foo') assert doc.at('//xmlns:foo') assert doc.at('foo') end def test_xmlns_is_registered_for_nodesets doc = Nokogiri::XML(<<-eoxml) baz eoxml assert_equal 1, doc.css('xmlns|foo').css('xmlns|bar').length assert_equal 1, doc.css('foo').css('bar').length assert_equal 1, doc.xpath('//xmlns:foo').xpath('./xmlns:bar').length assert_equal 1, doc.search('xmlns|foo').search('xmlns|bar').length assert_equal 1, doc.search('//xmlns:foo').search('./xmlns:bar').length end def test_to_xml_with_indent doc = Nokogiri::XML('') doc = Nokogiri::XML(doc.to_xml(:indent => 5)) assert_indent 5, doc end def test_write_xml_to_with_indent io = StringIO.new doc = Nokogiri::XML('') doc.write_xml_to io, :indent => 5 io.rewind doc = Nokogiri::XML(io.read) assert_indent 5, doc end # wtf... osx's libxml sucks. unless !Nokogiri.uses_libxml? || Nokogiri::LIBXML_VERSION =~ /^2\.6\./ def test_encoding xml = Nokogiri::XML(File.read(XML_FILE), XML_FILE, 'UTF-8') assert_equal 'UTF-8', xml.encoding end end def test_memory_explosion_on_invalid_xml doc = Nokogiri::XML("<<<") refute_nil doc refute_empty doc.errors end def test_memory_explosion_on_wrong_formatted_element_following_the_root_element doc = Nokogiri::XML("<\n") refute_nil doc refute_empty doc.errors end def test_document_has_errors doc = Nokogiri::XML(<<-eoxml) eoxml assert doc.errors.length > 0 doc.errors.each do |error| assert_match error.message, error.inspect assert_match error.message, error.to_s end end def test_strict_document_throws_syntax_error assert_raises(Nokogiri::XML::SyntaxError) { Nokogiri::XML('', nil, nil, 0) } assert_raises(Nokogiri::XML::SyntaxError) { Nokogiri::XML('') { |cfg| cfg.strict } } assert_raises(Nokogiri::XML::SyntaxError) { Nokogiri::XML(StringIO.new('')) { |cfg| cfg.strict } } end def test_XML_function xml = Nokogiri::XML(File.read(XML_FILE), XML_FILE) assert xml.xml? end def test_url assert @xml.url assert_equal XML_FILE, URI.unescape(@xml.url).sub('file:///', '') end def test_document_parent xml = Nokogiri::XML(File.read(XML_FILE), XML_FILE) assert_raises(NoMethodError) { xml.parent } end def test_document_name xml = Nokogiri::XML(File.read(XML_FILE), XML_FILE) assert_equal 'document', xml.name end def test_parse_can_take_io xml = nil File.open(XML_FILE, 'rb') { |f| xml = Nokogiri::XML(f) } assert xml.xml? set = xml.search('//employee') assert set.length > 0 end def test_parsing_empty_io doc = Nokogiri::XML.parse(StringIO.new('')) refute_nil doc end def test_parse_works_with_an_object_that_responds_to_read klass = Class.new do def read *args "
foo
" end end doc = Nokogiri::XML.parse klass.new doc.at_css("div").content.must_equal("foo") end def test_search_on_empty_documents doc = Nokogiri::XML::Document.new ns = doc.search('//foo') assert_equal 0, ns.length ns = doc.css('foo') assert_equal 0, ns.length ns = doc.xpath('//foo') assert_equal 0, ns.length end def test_document_search_with_multiple_queries xml = '
important thing
stuff

more stuff

' document = Nokogiri::XML(xml) assert_kind_of Nokogiri::XML::Document, document assert_equal 3, document.xpath('.//div', './/p').length assert_equal 3, document.css('.title', '.content', 'p').length assert_equal 3, document.search('.//div', 'p.blah').length end def test_bad_xpath_raises_syntax_error assert_raises(XML::XPath::SyntaxError) { @xml.xpath('\\') } end def test_find_with_namespace doc = Nokogiri::XML.parse(<<-eoxml) snuggles! eoxml ctx = Nokogiri::XML::XPathContext.new(doc) ctx.register_ns 'tenderlove', 'http://tenderlovemaking.com/' set = ctx.evaluate('//tenderlove:foo') assert_equal 1, set.length assert_equal 'foo', set.first.name # It looks like only the URI is important: ctx = Nokogiri::XML::XPathContext.new(doc) ctx.register_ns 'america', 'http://tenderlovemaking.com/' set = ctx.evaluate('//america:foo') assert_equal 1, set.length assert_equal 'foo', set.first.name # Its so important that a missing slash will cause it to return nothing ctx = Nokogiri::XML::XPathContext.new(doc) ctx.register_ns 'america', 'http://tenderlovemaking.com' set = ctx.evaluate('//america:foo') assert_equal 0, set.length end def test_xml? assert @xml.xml? end def test_document assert @xml.document end def test_singleton_methods assert node_set = @xml.search('//name') assert node_set.length > 0 node = node_set.first def node.test 'test' end assert node_set = @xml.search('//name') assert_equal 'test', node_set.first.test end def test_multiple_search assert node_set = @xml.search('//employee', '//name') employees = @xml.search('//employee') names = @xml.search('//name') assert_equal(employees.length + names.length, node_set.length) end def test_node_set_index assert node_set = @xml.search('//employee') assert_equal(5, node_set.length) assert node_set[4] assert_nil node_set[5] end def test_search assert node_set = @xml.search('//employee') assert_equal(5, node_set.length) node_set.each do |node| assert_equal('employee', node.name) end end def test_dump assert @xml.serialize assert @xml.to_xml end def test_dup dup = @xml.dup assert_instance_of Nokogiri::XML::Document, dup assert dup.xml?, 'duplicate should be xml' end def test_new doc = nil doc = Nokogiri::XML::Document.new assert doc assert doc.xml? assert_nil doc.root end def test_set_root doc = nil doc = Nokogiri::XML::Document.new assert doc assert doc.xml? assert_nil doc.root node = Nokogiri::XML::Node.new("b", doc) { |n| n.content = 'hello world' } assert_equal('hello world', node.content) doc.root = node assert_equal(node, doc.root) end def test_remove_namespaces doc = Nokogiri::XML <<-EOX hello from a hello from b hello from c EOX namespaces = doc.root.namespaces # assert on setup assert_equal 2, doc.root.namespaces.length assert_equal 3, doc.at_xpath("//container").namespaces.length assert_equal 0, doc.xpath("//foo").length assert_equal 1, doc.xpath("//a:foo").length assert_equal 1, doc.xpath("//a:foo").length assert_equal 1, doc.xpath("//x:foo", "x" => "http://c.flavorjon.es/").length assert_match %r{foo c:attr}, doc.to_xml doc.at_xpath("//x:foo", "x" => "http://c.flavorjon.es/").tap do |node| assert_equal nil, node["attr"] assert_equal "attr-value", node["c:attr"] assert_equal nil, node.attribute_with_ns("attr", nil) assert_equal "attr-value", node.attribute_with_ns("attr", "http://c.flavorjon.es/").value assert_equal "attr-value", node.attributes["attr"].value end doc.remove_namespaces! assert_equal 0, doc.root.namespaces.length assert_equal 0, doc.at_xpath("//container").namespaces.length assert_equal 3, doc.xpath("//foo").length assert_equal 0, doc.xpath("//a:foo", namespaces).length assert_equal 0, doc.xpath("//a:foo", namespaces).length assert_equal 0, doc.xpath("//x:foo", "x" => "http://c.flavorjon.es/").length assert_match %r{foo attr}, doc.to_xml doc.at_xpath("//container/foo").tap do |node| assert_equal "attr-value", node["attr"] assert_equal nil, node["c:attr"] assert_equal "attr-value", node.attribute_with_ns("attr", nil).value assert_equal nil, node.attribute_with_ns("attr", "http://c.flavorjon.es/") assert_equal "attr-value", node.attributes["attr"].value # doesn't change! end end # issue #785 def test_attribute_decoration decorator = Module.new do def test_method end end util_decorate(@xml, decorator) assert @xml.search('//@street').first.respond_to?(:test_method) end def test_subset_is_decorated x = Module.new do def awesome! end end util_decorate(@xml, x) assert @xml.respond_to?(:awesome!) assert node_set = @xml.search('//staff') assert node_set.respond_to?(:awesome!) assert subset = node_set.search('.//employee') assert subset.respond_to?(:awesome!) assert sub_subset = node_set.search('.//name') assert sub_subset.respond_to?(:awesome!) end def test_decorator_is_applied x = Module.new do def awesome! end end util_decorate(@xml, x) assert @xml.respond_to?(:awesome!) assert node_set = @xml.search('//employee') assert node_set.respond_to?(:awesome!) node_set.each do |node| assert node.respond_to?(:awesome!), node.class end assert @xml.root.respond_to?(:awesome!) assert @xml.children.respond_to?(:awesome!) end if Nokogiri.jruby? def wrap_java_document require 'java' factory = javax.xml.parsers.DocumentBuilderFactory.newInstance builder = factory.newDocumentBuilder document = builder.newDocument root = document.createElement("foo") document.appendChild(root) Nokogiri::XML::Document.wrap(document) end end def test_java_integration skip("Ruby doesn't have the wrap method") unless Nokogiri.jruby? noko_doc = wrap_java_document assert_equal 'foo', noko_doc.root.name noko_doc = Nokogiri::XML(< eoxml dom = noko_doc.to_java assert dom.kind_of? org.w3c.dom.Document assert_equal 'foo', dom.getDocumentElement().getTagName() end def test_add_child skip("Ruby doesn't have the wrap method") unless Nokogiri.jruby? doc = wrap_java_document doc.root.add_child "" end def test_can_be_closed f = File.open XML_FILE Nokogiri::XML f f.close end end end end nokogiri-1.8.2/test/xml/test_schema.rb0000644000004100000410000000752413235345655020021 0ustar www-datawww-datarequire "helper" module Nokogiri module XML class TestSchema < Nokogiri::TestCase def setup assert @xsd = Nokogiri::XML::Schema(File.read(PO_SCHEMA_FILE)) end def test_schema_from_document doc = Nokogiri::XML(File.open(PO_SCHEMA_FILE)) assert doc xsd = Nokogiri::XML::Schema.from_document doc assert_instance_of Nokogiri::XML::Schema, xsd end def test_invalid_schema_do_not_raise_exceptions xsd = Nokogiri::XML::Schema.new < EOF assert_instance_of Nokogiri::XML::Schema, xsd end def test_schema_from_document_node doc = Nokogiri::XML(File.open(PO_SCHEMA_FILE)) assert doc xsd = Nokogiri::XML::Schema.from_document doc.root assert_instance_of Nokogiri::XML::Schema, xsd end def test_schema_validates_with_relative_paths xsd = File.join(ASSETS_DIR, 'foo', 'foo.xsd') xml = File.join(ASSETS_DIR, 'valid_bar.xml') doc = Nokogiri::XML(File.open(xsd)) xsd = Nokogiri::XML::Schema.from_document doc doc = Nokogiri::XML(File.open(xml)) assert xsd.valid?(doc) end def test_parse_with_memory assert_instance_of Nokogiri::XML::Schema, @xsd assert_equal 0, @xsd.errors.length end def test_new assert xsd = Nokogiri::XML::Schema.new(File.read(PO_SCHEMA_FILE)) assert_instance_of Nokogiri::XML::Schema, xsd end def test_parse_with_io xsd = nil File.open(PO_SCHEMA_FILE, 'rb') { |f| assert xsd = Nokogiri::XML::Schema(f) } assert_equal 0, xsd.errors.length end def test_parse_with_errors xml = File.read(PO_SCHEMA_FILE).sub(/name="/, 'name=') assert_raises(Nokogiri::XML::SyntaxError) { Nokogiri::XML::Schema(xml) } end def test_validate_document doc = Nokogiri::XML(File.read(PO_XML_FILE)) assert errors = @xsd.validate(doc) assert_equal 0, errors.length end def test_validate_file assert errors = @xsd.validate(PO_XML_FILE) assert_equal 0, errors.length end def test_validate_invalid_document doc = Nokogiri::XML File.read(PO_XML_FILE) doc.css("city").unlink assert errors = @xsd.validate(doc) assert_equal 2, errors.length end def test_validate_invalid_file tempfile = Tempfile.new("xml") doc = Nokogiri::XML File.read(PO_XML_FILE) doc.css("city").unlink tempfile.write doc.to_xml tempfile.close assert errors = @xsd.validate(tempfile.path) assert_equal 2, errors.length end def test_validate_non_document string = File.read(PO_XML_FILE) assert_raise(ArgumentError) {@xsd.validate(string)} end def test_valid? valid_doc = Nokogiri::XML(File.read(PO_XML_FILE)) invalid_doc = Nokogiri::XML( File.read(PO_XML_FILE).gsub(/[^<]*<\/city>/, '') ) assert(@xsd.valid?(valid_doc)) assert(!@xsd.valid?(invalid_doc)) end def test_xsd_with_dtd Dir.chdir(File.join(ASSETS_DIR, 'saml')) do # works Nokogiri::XML::Schema(IO.read('xmldsig_schema.xsd')) # was not working Nokogiri::XML::Schema(IO.read('saml20protocol_schema.xsd')) end end end end end nokogiri-1.8.2/test/xml/test_attribute_decl.rb0000644000004100000410000000363213235345655021547 0ustar www-datawww-datarequire "helper" module Nokogiri module XML class TestAttributeDecl < Nokogiri::TestCase def setup super @xml = Nokogiri::XML(<<-eoxml) ]> eoxml @attrs = @xml.internal_subset.children @attr_decl = @attrs.first end def test_inspect assert_equal( "#<#{@attr_decl.class.name}:#{sprintf("0x%x", @attr_decl.object_id)} #{@attr_decl.to_s.inspect}>", @attr_decl.inspect ) end def test_type assert_equal 16, @attr_decl.type end def test_class assert_instance_of Nokogiri::XML::AttributeDecl, @attr_decl end def test_content assert_raise NoMethodError do @attr_decl.content end end def test_attributes assert_raise NoMethodError do @attr_decl.attributes end end def test_namespace assert_raise NoMethodError do @attr_decl.namespace end end def test_namespace_definitions assert_raise NoMethodError do @attr_decl.namespace_definitions end end def test_line assert_raise NoMethodError do @attr_decl.line end end def test_attribute_type if Nokogiri.uses_libxml? assert_equal 1, @attr_decl.attribute_type else assert_equal 'CDATA', @attr_decl.attribute_type end end def test_default assert_equal '0', @attr_decl.default assert_equal '0', @attrs[1].default end def test_enumeration assert_equal [], @attr_decl.enumeration assert_equal ['check', 'cash'], @attrs[2].enumeration end end end end nokogiri-1.8.2/test/xml/test_element_decl.rb0000644000004100000410000000325013235345655021171 0ustar www-datawww-datarequire "helper" module Nokogiri module XML class TestElementDecl < Nokogiri::TestCase def setup super @xml = Nokogiri::XML(<<-eoxml) ]> eoxml @elements = @xml.internal_subset.children.find_all { |x| x.type == 15 } end def test_inspect e = @elements.first assert_equal( "#<#{e.class.name}:#{sprintf("0x%x", e.object_id)} #{e.to_s.inspect}>", e.inspect ) end def test_prefix assert_nil @elements[1].prefix assert_equal 'my', @elements[2].prefix end def test_line assert_raise NoMethodError do @elements.first.line end end def test_namespace assert_raise NoMethodError do @elements.first.namespace end end def test_namespace_definitions assert_raise NoMethodError do @elements.first.namespace_definitions end end def test_element_type assert_equal 1, @elements.first.element_type end def test_type assert_equal 15, @elements.first.type end def test_class assert_instance_of Nokogiri::XML::ElementDecl, @elements.first end def test_attributes assert_equal 2, @elements.first.attribute_nodes.length assert_equal 'width', @elements.first.attribute_nodes.first.name end end end end nokogiri-1.8.2/test/xml/test_dtd.rb0000644000004100000410000001303613235345655017327 0ustar www-datawww-datarequire "helper" module Nokogiri module XML class TestDTD < Nokogiri::TestCase def setup super @xml = Nokogiri::XML(File.open(XML_FILE)) assert @dtd = @xml.internal_subset end def test_system_id assert_equal 'staff.dtd', @dtd.system_id end def test_external_id xml = Nokogiri::XML('') assert dtd = xml.internal_subset, 'no internal subset' assert_equal 'bar', dtd.external_id end def test_html_dtd { 'MathML 2.0' => [ '', false, false, ], 'HTML 2.0' => [ '', true, false, ], 'HTML 3.2' => [ '', true, false, ], 'XHTML Basic 1.0' => [ '', true, false, ], 'XHTML 1.0 Strict' => [ '', true, false, ], 'XHTML + MathML + SVG Profile (XHTML as the host language)' => [ '', true, false, ], 'XHTML + MathML + SVG Profile (Using SVG as the host)' => [ '', false, false, ], 'CHTML 1.0' => [ '', true, false, ], 'HTML 4.01 Strict' => [ '', true, false, ], 'HTML 4.01 Transitional' => [ '', true, false, ], 'HTML 4.01 Frameset' => [ '', true, false, ], 'HTML 5' => [ '', true, true, ], 'HTML 5 legacy compatible' => [ '', true, true, ], }.each { |name, (dtd_str, html_p, html5_p)| doc = Nokogiri(dtd_str) dtd = doc.internal_subset assert_instance_of Nokogiri::XML::DTD, dtd, name if html_p assert_send [dtd, :html_dtd?], name else assert_not_send [dtd, :html_dtd?], name end if html5_p assert_send [dtd, :html5_dtd?], name else assert_not_send [dtd, :html5_dtd?], name end } end def test_content assert_raise NoMethodError do @dtd.content end end def test_empty_attributes dtd = Nokogiri::HTML("").internal_subset assert_equal Hash.new, dtd.attributes end def test_attributes assert_equal ['width'], @dtd.attributes.keys assert_equal '0', @dtd.attributes['width'].default end def test_keys assert_equal ['width'], @dtd.keys end def test_each hash = {} @dtd.each { |key, value| hash[key] = value } assert_equal @dtd.attributes, hash end def test_namespace assert_raise NoMethodError do @dtd.namespace end end def test_namespace_definitions assert_raise NoMethodError do @dtd.namespace_definitions end end def test_line assert_raise NoMethodError do @dtd.line end end def test_validate if Nokogiri.uses_libxml? list = @xml.internal_subset.validate @xml assert_equal 44, list.length else xml = Nokogiri::XML(File.open(XML_FILE)) {|cfg| cfg.dtdvalid} list = xml.internal_subset.validate xml assert_equal 40, list.length end end def test_external_subsets assert subset = @xml.internal_subset assert_equal 'staff', subset.name end def test_entities assert entities = @dtd.entities assert_equal %w[ ent1 ent2 ent3 ent4 ent5 ].sort, entities.keys.sort end def test_elements assert elements = @dtd.elements assert_equal %w[ br ], elements.keys assert_equal 'br', elements['br'].name end def test_notations assert notations = @dtd.notations assert_equal %w[ notation1 notation2 ].sort, notations.keys.sort assert notation1 = notations['notation1'] assert_equal 'notation1', notation1.name assert_equal 'notation1File', notation1.public_id assert_nil notation1.system_id end end end end nokogiri-1.8.2/test/xml/test_reader.rb0000644000004100000410000004620313235345655020020 0ustar www-datawww-data# -*- coding: utf-8 -*- require "helper" module Nokogiri module XML class TestReader < Nokogiri::TestCase def test_from_io_sets_io_as_source io = File.open SNUGGLES_FILE reader = Nokogiri::XML::Reader.from_io(io) assert_equal io, reader.source end def test_empty_element? reader = Nokogiri::XML::Reader.from_memory(<<-eoxml) Paris eoxml results = reader.map do |node| if node.node_type == Nokogiri::XML::Node::ELEMENT_NODE node.empty_element? end end assert_equal [false, false, nil, nil, true, nil], results end def test_self_closing? reader = Nokogiri::XML::Reader.from_memory(<<-eoxml) Paris eoxml results = reader.map do |node| if node.node_type == Nokogiri::XML::Node::ELEMENT_NODE node.self_closing? end end assert_equal [false, false, nil, nil, true, nil], results end # Issue #831 # Make sure that the reader doesn't block reading the entire input def test_reader_blocking rd, wr = IO.pipe() node_out = nil t = Thread.start do reader = Nokogiri::XML::Reader(rd, 'UTF-8') reader.each do |node| node_out = node break end rd.close end sleep(1) # sleep for one second to make sure the reader will actually block for input begin wr.puts "" wr.puts "" * 10000 wr.flush rescue Errno::EPIPE end res = t.join(5) # wait 5 seconds for the thread to finish wr.close refute_nil node_out, "Didn't read any nodes, exclude the trivial case" refute_nil res, "Reader blocks trying to read the entire stream" end def test_reader_takes_block options = nil Nokogiri::XML::Reader(File.read(XML_FILE), XML_FILE) do |cfg| options = cfg options.nonet.nowarning.dtdattr end assert options.nonet? assert options.nowarning? assert options.dtdattr? end def test_nil_raises assert_raises(ArgumentError) { Nokogiri::XML::Reader.from_memory(nil) } assert_raises(ArgumentError) { Nokogiri::XML::Reader.from_io(nil) } end def test_from_io io = File.open SNUGGLES_FILE reader = Nokogiri::XML::Reader.from_io(io) assert_equal false, reader.default? assert_equal [false, false, false, false, false, false, false], reader.map(&:default?) end def test_io io = File.open SNUGGLES_FILE reader = Nokogiri::XML::Reader(io) assert_equal false, reader.default? assert_equal [false, false, false, false, false, false, false], reader.map(&:default?) end def test_string_io io = StringIO.new(<<-eoxml) snuggles! eoxml reader = Nokogiri::XML::Reader(io) assert_equal false, reader.default? assert_equal [false, false, false, false, false, false, false], reader.map(&:default?) end class ReallyBadIO def read(size) 'a' * size ** 10 end end class ReallyBadIO4Java def read(size=1) 'a' * size ** 10 end end def test_io_that_reads_too_much if Nokogiri.jruby? io = ReallyBadIO4Java.new Nokogiri::XML::Reader(io) else io = ReallyBadIO.new Nokogiri::XML::Reader(io) end end def test_in_memory assert Nokogiri::XML::Reader(<<-eoxml) snuggles! eoxml end def test_reader_holds_on_to_string xml = <<-eoxml snuggles! eoxml reader = Nokogiri::XML::Reader(xml) assert_equal xml, reader.source end def test_default? reader = Nokogiri::XML::Reader.from_memory(<<-eoxml) snuggles! eoxml assert_equal false, reader.default? assert_equal [false, false, false, false, false, false, false], reader.map(&:default?) end def test_value? reader = Nokogiri::XML::Reader.from_memory(<<-eoxml) snuggles! eoxml assert_equal false, reader.value? assert_equal [false, true, false, true, false, true, false], reader.map(&:value?) end def test_read_error_document reader = Nokogiri::XML::Reader.from_memory(<<-eoxml) snuggles! eoxml assert_raises(Nokogiri::XML::SyntaxError) do reader.each { |node| } end assert 1, reader.errors.length end def test_errors_is_an_array reader = Nokogiri::XML::Reader(StringIO.new('&bogus;')) assert_raises(SyntaxError) { reader.read } assert_equal [SyntaxError], reader.errors.map(&:class) end def test_pushing_to_non_array_raises_TypeError skip "TODO: JRuby ext does not internally call `errors`" if Nokogiri.jruby? reader = Nokogiri::XML::Reader(StringIO.new('&bogus;')) def reader.errors 1 end assert_raises(TypeError) { reader.read } end def test_attributes? reader = Nokogiri::XML::Reader.from_memory(<<-eoxml) snuggles! eoxml assert_equal false, reader.attributes? assert_equal [true, false, true, false, true, false, true], reader.map(&:attributes?) end def test_attributes reader = Nokogiri::XML::Reader.from_memory(<<-eoxml) snuggles! eoxml assert_equal({}, reader.attributes) assert_equal [{'xmlns:tenderlove'=>'http://tenderlovemaking.com/', 'xmlns'=>'http://mothership.connection.com/'}, {}, {"awesome"=>"true"}, {}, {"awesome"=>"true"}, {}, {'xmlns:tenderlove'=>'http://tenderlovemaking.com/', 'xmlns'=>'http://mothership.connection.com/'}], reader.map(&:attributes) end def test_attribute_roundtrip reader = Nokogiri::XML::Reader.from_memory(<<-eoxml) snuggles! eoxml reader.each do |node| node.attributes.each do |key, value| assert_equal value, node.attribute(key) end end end def test_attribute_at reader = Nokogiri::XML::Reader.from_memory(<<-eoxml) snuggles! eoxml assert_nil reader.attribute_at(nil) assert_nil reader.attribute_at(0) assert_equal ['http://tenderlovemaking.com/', nil, 'true', nil, 'true', nil, 'http://tenderlovemaking.com/'], reader.map { |x| x.attribute_at(0) } end def test_attribute reader = Nokogiri::XML::Reader.from_memory(<<-eoxml) snuggles! eoxml assert_nil reader.attribute(nil) assert_nil reader.attribute('awesome') assert_equal [nil, nil, 'true', nil, 'true', nil, nil], reader.map { |x| x.attribute('awesome') } end def test_attribute_length reader = Nokogiri::XML::Reader.from_memory(<<-eoxml) snuggles! eoxml assert_equal 0, reader.attribute_count assert_equal [1, 0, 1, 0, 0, 0, 0], reader.map(&:attribute_count) end def test_depth reader = Nokogiri::XML::Reader.from_memory(<<-eoxml) snuggles! eoxml assert_equal 0, reader.depth assert_equal [0, 1, 1, 2, 1, 1, 0], reader.map(&:depth) end def test_encoding string = <<-eoxml

The quick brown fox jumps over the lazy dog.

日本語が上手です

eoxml reader = Nokogiri::XML::Reader.from_memory(string, nil, 'UTF-8') assert_equal ['UTF-8'], reader.map(&:encoding).uniq end def test_xml_version reader = Nokogiri::XML::Reader.from_memory(<<-eoxml) snuggles! eoxml assert_nil reader.xml_version assert_equal ['1.0'], reader.map(&:xml_version).uniq end def test_lang reader = Nokogiri::XML::Reader.from_memory(<<-eoxml)

The quick brown fox jumps over the lazy dog.

日本語が上手です

eoxml assert_nil reader.lang assert_equal [nil, nil, "en", "en", "en", nil, "ja", "ja", "ja", nil, nil], reader.map(&:lang) end def test_value reader = Nokogiri::XML::Reader.from_memory(<<-eoxml) snuggles! eoxml assert_nil reader.value assert_equal [nil, "\n ", nil, "snuggles!", nil, "\n ", nil], reader.map(&:value) end def test_prefix reader = Nokogiri::XML::Reader.from_memory(<<-eoxml) hello eoxml assert_nil reader.prefix assert_equal [nil, nil, "edi", nil, "edi", nil, nil], reader.map(&:prefix) end def test_node_type reader = Nokogiri::XML::Reader.from_memory(<<-eoxml) hello eoxml assert_equal 0, reader.node_type assert_equal [1, 14, 1, 3, 15, 14, 15], reader.map(&:node_type) end def test_inner_xml str = "hello" reader = Nokogiri::XML::Reader.from_memory(str) reader.read assert_equal "hello", reader.inner_xml end def test_outer_xml str = ["hello", "hello", "hello", "", ""] reader = Nokogiri::XML::Reader.from_memory(str.first) xml = [] reader.map { |node| xml << node.outer_xml } assert_equal str, xml end def test_outer_xml_with_empty_nodes str = ["", "", ""] reader = Nokogiri::XML::Reader.from_memory(str.first) xml = [] reader.map { |node| xml << node.outer_xml } assert_equal str, xml end def test_state reader = Nokogiri::XML::Reader.from_memory('bar
') assert reader.state end def test_ns_uri reader = Nokogiri::XML::Reader.from_memory(<<-eoxml) hello eoxml assert_nil reader.namespace_uri assert_equal([nil, nil, "http://ecommerce.example.org/schema", nil, "http://ecommerce.example.org/schema", nil, nil], reader.map(&:namespace_uri)) end def test_namespaced_attributes reader = Nokogiri::XML::Reader.from_memory(<<-eoxml) hello eoxml attr_ns = [] while reader.read if reader.node_type == Nokogiri::XML::Node::ELEMENT_NODE reader.attribute_nodes.each {|attr| attr_ns << (attr.namespace.nil? ? nil : attr.namespace.prefix) } end end assert_equal(['commons', 'edi', nil], attr_ns) end def test_local_name reader = Nokogiri::XML::Reader.from_memory(<<-eoxml) hello eoxml assert_nil reader.local_name assert_equal(["x", "#text", "foo", "#text", "foo", "#text", "x"], reader.map(&:local_name)) end def test_name reader = Nokogiri::XML::Reader.from_memory(<<-eoxml) hello eoxml assert_nil reader.name assert_equal(["x", "#text", "edi:foo", "#text", "edi:foo", "#text", "x"], reader.map(&:name)) end def test_base_uri reader = Nokogiri::XML::Reader.from_memory(<<-eoxml) eoxml assert_nil reader.base_uri assert_equal(["http://base.example.org/base/", "http://base.example.org/base/", "http://base.example.org/base/", "http://base.example.org/base/", "http://other.example.org/", "http://base.example.org/base/", "http://base.example.org/base/relative", "http://base.example.org/base/relative", "http://base.example.org/base/relative", "http://base.example.org/base/relative", "http://base.example.org/base/relative", "http://base.example.org/base/", "http://base.example.org/base/"], reader.map(&:base_uri)) end def test_xlink_href_without_base_uri reader = Nokogiri::XML::Reader(<<-eoxml) Link Linked Element eoxml reader.each do |node| if node.node_type == Nokogiri::XML::Reader::TYPE_ELEMENT if node.name == 'link' assert_nil node.base_uri end end end end def test_xlink_href_with_base_uri reader = Nokogiri::XML::Reader(<<-eoxml) Link Linked Element eoxml reader.each do |node| if node.node_type == Nokogiri::XML::Reader::TYPE_ELEMENT assert_equal node.base_uri, "http://base.example.org/base/" end end end def test_read_from_memory called = false reader = Nokogiri::XML::Reader.from_memory('bar') reader.each do |node| called = true assert node end assert called end def test_large_document_smoke_test # simply run on a large document to verify that there no GC issues xml = [] xml << "" 10000.times { |j| xml << "" } xml << "" xml = xml.join("\n") Nokogiri::XML::Reader.from_memory(xml).each do |e| e.attributes end end def test_correct_outer_xml_inclusion xml = Nokogiri::XML::Reader.from_io(StringIO.new(<<-eoxml)) child-1 child-2 child-3 eoxml nodelengths = [] has_child2 = [] xml.each do |node| if node.node_type == Nokogiri::XML::Reader::TYPE_ELEMENT and node.name == "child" nodelengths << node.outer_xml.length has_child2 << !!(node.outer_xml =~ /child-2/) end end assert_equal(nodelengths[0], nodelengths[1]) assert(has_child2[1]) assert(!has_child2[0]) end def test_correct_inner_xml_inclusion xml = Nokogiri::XML::Reader.from_io(StringIO.new(<<-eoxml)) child-1 child-2 child-3 eoxml nodelengths = [] has_child2 = [] xml.each do |node| if node.node_type == Nokogiri::XML::Reader::TYPE_ELEMENT and node.name == "child" nodelengths << node.inner_xml.length has_child2 << !!(node.inner_xml =~ /child-2/) end end assert_equal(nodelengths[0], nodelengths[1]) assert(has_child2[1]) assert(!has_child2[0]) end def test_nonexistent_attribute require 'nokogiri' reader = Nokogiri::XML::Reader("") reader.read # root reader.read # el assert_equal nil, reader.attribute('other') end end end end nokogiri-1.8.2/test/xml/test_entity_reference.rb0000644000004100000410000002156413235345655022113 0ustar www-datawww-datarequire "helper" module Nokogiri module XML class TestEntityReference < Nokogiri::TestCase def setup super @xml = Nokogiri::XML(File.open(XML_FILE), XML_FILE) end def test_new assert ref = EntityReference.new(@xml, 'ent4') assert_instance_of EntityReference, ref end def test_many_references 100.times { EntityReference.new(@xml, 'foo') } end def test_newline_node # issue 719 xml = < EOF doc = Nokogiri::XML xml lf_node = Nokogiri::XML::EntityReference.new(doc, "#xa") doc.xpath('/item').first.add_child(lf_node) assert_match(/ /, doc.to_xml) end def test_children_should_always_be_empty # https://github.com/sparklemotion/nokogiri/issues/1238 # # libxml2 will create a malformed child node for predefined # entities. because any use of that child is likely to cause a # segfault, we shall pretend that it doesn't exist. entity = Nokogiri::XML::EntityReference.new(@xml, "amp") assert_equal 0, entity.children.length entity.inspect # should not segfault end end module Common PATH = 'test/files/test_document_url/' attr_accessor :path, :parser def xml_document File.join path, 'document.xml' end def self.included base def base.test_relative_and_absolute_path method_name, &block test_relative_path method_name, &block test_absolute_path method_name, &block end def base.test_absolute_path method_name, &block define_method "#{method_name}_with_absolute_path" do self.path = "#{File.expand_path PATH}/" instance_eval(&block) end end def base.test_relative_path method_name, &block define_method method_name do self.path = PATH instance_eval(&block) end end end end class TestDOMEntityReference < Nokogiri::TestCase include Common def setup super @parser = Nokogiri::XML::Document end test_relative_and_absolute_path :test_dom_entity_reference_with_dtdloda do # Make sure that we can parse entity references and include them in the document html = File.read xml_document doc = @parser.parse html, path do |cfg| cfg.default_xml cfg.dtdload cfg.noent end assert_equal [], doc.errors assert_equal "foobar", doc.xpath('//blah').text end test_relative_and_absolute_path :test_dom_entity_reference_with_dtdvalid do # Make sure that we can parse entity references and include them in the document html = File.read xml_document doc = @parser.parse html, path do |cfg| cfg.default_xml cfg.dtdvalid cfg.noent end assert_equal [], doc.errors assert_equal "foobar", doc.xpath('//blah').text end test_absolute_path :test_dom_dtd_loading_with_absolute_path do # Make sure that we can parse entity references and include them in the document html = %Q[ &bar; ] doc = @parser.parse html, xml_document do |cfg| cfg.default_xml cfg.dtdvalid cfg.noent end assert_equal [], doc.errors assert_equal "foobar", doc.xpath('//blah').text end test_relative_and_absolute_path :test_dom_entity_reference_with_io do # Make sure that we can parse entity references and include them in the document html = File.open xml_document doc = @parser.parse html, nil do |cfg| cfg.default_xml cfg.dtdload cfg.noent end assert_equal [], doc.errors assert_equal "foobar", doc.xpath('//blah').text end test_relative_and_absolute_path :test_dom_entity_reference_without_noent do # Make sure that we don't include entity references unless NOENT is set to true html = File.read xml_document doc = @parser.parse html, path do |cfg| cfg.default_xml cfg.dtdload end assert_equal [], doc.errors assert_kind_of Nokogiri::XML::EntityReference, doc.xpath('//body').first.children.first end test_relative_and_absolute_path :test_dom_entity_reference_without_dtdload do # Make sure that we don't include entity references unless NOENT is set to true html = File.read xml_document doc = @parser.parse html, path do |cfg| cfg.default_xml end assert_kind_of Nokogiri::XML::EntityReference, doc.xpath('//body').first.children.first if Nokogiri.uses_libxml? assert_equal ["5:14: ERROR: Entity 'bar' not defined"], doc.errors.map(&:to_s) end end test_relative_and_absolute_path :test_document_dtd_loading_with_nonet do # Make sure that we don't include remote entities unless NOENT is set to true html = %Q[ &bar; ] doc = @parser.parse html, path do |cfg| cfg.default_xml cfg.dtdload end assert_kind_of Nokogiri::XML::EntityReference, doc.xpath('//body').first.children.first if Nokogiri.uses_libxml? assert_equal ["ERROR: Attempt to load network entity http://foo.bar.com/", "4:34: ERROR: Entity 'bar' not defined"], doc.errors.map(&:to_s) else assert_equal ["Attempt to load network entity http://foo.bar.com/"], doc.errors.map(&:to_s) end end # TODO: can we retreive a resource pointing to localhost when NONET is set to true ? end class TestSaxEntityReference < Nokogiri::SAX::TestCase include Common def setup super @parser = XML::SAX::Parser.new(Doc.new) do |ctx| ctx.replace_entities = true end end test_relative_and_absolute_path :test_sax_entity_reference do # Make sure that we can parse entity references and include them in the document html = File.read xml_document @parser.parse html refute_nil @parser.document.errors assert_equal ["Entity 'bar' not defined"], @parser.document.errors.map(&:to_s).map(&:strip) end test_relative_and_absolute_path :test_more_sax_entity_reference do # Make sure that we don't include entity references unless NOENT is set to true html = %Q[ &bar; ] @parser.parse html refute_nil @parser.document.errors assert_equal ["Entity 'bar' not defined"], @parser.document.errors.map(&:to_s).map(&:strip) end end class TestReaderEntityReference < Nokogiri::TestCase include Common def setup super end test_relative_and_absolute_path :test_reader_entity_reference do # Make sure that we can parse entity references and include them in the document html = File.read xml_document reader = Nokogiri::XML::Reader html, path do |cfg| cfg.default_xml cfg.dtdload cfg.noent end nodes = [] reader.each { |n| nodes << n.value } assert_equal ['foobar'], nodes.compact.map(&:strip).reject(&:empty?) end test_relative_and_absolute_path :test_reader_entity_reference_without_noent do # Make sure that we can parse entity references and include them in the document html = File.read xml_document reader = Nokogiri::XML::Reader html, path do |cfg| cfg.default_xml cfg.dtdload end nodes = [] reader.each { |n| nodes << n.value } assert_equal [], nodes.compact.map(&:strip).reject(&:empty?) end test_relative_and_absolute_path :test_reader_entity_reference_without_dtdload do html = File.read xml_document reader = Nokogiri::XML::Reader html, path do |cfg| cfg.default_xml end if Nokogiri.uses_libxml? && Nokogiri::LIBXML_PARSER_VERSION.to_i >= 20900 # Unknown entity is not fatal in libxml2 >= 2.9 assert_equal 8, reader.count else assert_raises(Nokogiri::XML::SyntaxError) { assert_equal 5, reader.count } end assert_operator reader.errors.size, :>, 0 end end end end nokogiri-1.8.2/test/xml/test_syntax_error.rb0000644000004100000410000000176713235345655021323 0ustar www-datawww-datarequire "helper" module Nokogiri module XML class TestSyntaxError < Nokogiri::TestCase def test_new error = Nokogiri::XML::SyntaxError.new 'hello' assert_equal 'hello', error.message end def test_line_column_level_libxml skip unless Nokogiri.uses_libxml? bad_doc = Nokogiri::XML('test') error = bad_doc.errors.first assert_equal "1:1: FATAL: Start tag expected, '<' not found", error.message assert_equal 1, error.line assert_equal 1, error.column assert_equal 3, error.level end def test_line_column_level_jruby skip unless Nokogiri.jruby? bad_doc = Nokogiri::XML('test
') error = bad_doc.errors.first assert_equal "The element type \"root\" must be terminated by the matching end-tag \"\".", error.message assert_equal nil, error.line assert_equal nil, error.column assert_equal nil, error.level end end end end nokogiri-1.8.2/test/xml/test_element_content.rb0000644000004100000410000000243513235345655021740 0ustar www-datawww-datarequire "helper" module Nokogiri module XML class TestElementContent < Nokogiri::TestCase def setup super @xml = Nokogiri::XML(<<-eoxml) ]> eoxml @elements = @xml.internal_subset.children.find_all { |x| x.type == 15 } @tree = @elements[1].content end def test_allowed_content_not_defined assert_nil @elements.first.content end def test_document assert @tree assert_equal @xml, @tree.document end def test_type assert_equal ElementContent::SEQ, @tree.type end def test_children assert_equal 2, @tree.children.length end def test_name assert_nil @tree.name assert_equal 'head', @tree.children.first.name assert_equal 'p', @tree.children[1].children.first.children.first.name end def test_occur assert_equal ElementContent::ONCE, @tree.occur end def test_prefix assert_nil @tree.prefix assert_equal 'tender', @elements[2].content.prefix end end end end nokogiri-1.8.2/test/xml/test_node.rb0000644000004100000410000011632713235345655017510 0ustar www-datawww-datarequire "helper" require 'stringio' module Nokogiri module XML class TestNode < Nokogiri::TestCase def setup super @xml = Nokogiri::XML(File.read(XML_FILE), XML_FILE) end def test_first_element_child node = @xml.root.first_element_child assert_equal 'employee', node.name assert node.element?, 'node is an element' end def test_element_children nodes = @xml.root.element_children assert_equal @xml.root.first_element_child, nodes.first assert nodes.all?(&:element?), 'all nodes are elements' end def test_last_element_child nodes = @xml.root.element_children assert_equal nodes.last, @xml.root.element_children.last end def test_bad_xpath bad_xpath = '//foo[' begin @xml.xpath(bad_xpath) rescue Nokogiri::XML::XPath::SyntaxError => e assert_match(bad_xpath, e.to_s) end end def test_namespace_type_error assert_raises(TypeError) do @xml.root.namespace = Object.new end end def test_remove_namespace @xml = Nokogiri::XML('') tag = @xml.at('s') assert tag.namespace tag.namespace = nil assert_nil tag.namespace end def test_parse_needs_doc list = @xml.root.parse('fooooooo ') assert_equal 1, list.css('hello').length end def test_parse list = @xml.root.parse('fooooooo ') assert_equal 2, list.length end def test_parse_with_block called = false list = @xml.root.parse('') { |cfg| called = true assert_instance_of Nokogiri::XML::ParseOptions, cfg } assert called, 'config block called' assert_equal 1, list.length end def test_parse_with_io list = @xml.root.parse(StringIO.new('')) assert_equal 1, list.length assert_equal 'hello', list.first.name end def test_parse_with_empty_string list = @xml.root.parse('') assert_equal 0, list.length end def test_parse_config_option node = @xml.root options = nil node.parse("") do |config| options = config end assert_equal Nokogiri::XML::ParseOptions::DEFAULT_XML, options.to_i end def test_node_context_parsing_of_malformed_html_fragment doc = HTML.parse "
" context_node = doc.at_css "div" nodeset = context_node.parse("
") assert_equal 1, doc.errors.length assert_equal 1, nodeset.length assert_equal "
", nodeset.to_s end def test_node_context_parsing_of_malformed_html_fragment_with_recover_is_corrected doc = HTML.parse "
" context_node = doc.at_css "div" nodeset = context_node.parse("
") do |options| options.recover end assert_equal 1, doc.errors.length assert_equal 1, nodeset.length assert_equal "
", nodeset.to_s end def test_node_context_parsing_of_malformed_html_fragment_without_recover_is_not_corrected doc = HTML.parse "
" context_node = doc.at_css "div" nodeset = context_node.parse("
") do |options| options.strict end assert_equal 1, doc.errors.length assert_equal 0, nodeset.length end def test_parse_error_list error_count = @xml.errors.length @xml.root.parse('') assert(error_count < @xml.errors.length, "errors should have increased") end def test_parse_error_on_fragment_with_empty_document doc = Document.new fragment = DocumentFragment.new(doc, '') node = fragment%'bar' node.parse('<') end def test_parse_with_unparented_text_context_node doc = XML::Document.new elem = XML::Text.new("foo", doc) x = elem.parse("") # should not raise an exception assert_equal x.first.name, "bar" end def test_parse_with_unparented_html_text_context_node doc = HTML::Document.new elem = XML::Text.new("div", doc) x = elem.parse("
") # should not raise an exception assert_equal x.first.name, "div" end def test_parse_with_unparented_fragment_text_context_node doc = XML::DocumentFragment.parse "
foo
" elem = doc.at_css "span" x = elem.parse("") # should not raise an exception assert_equal x.first.name, "span" end def test_parse_with_unparented_html_fragment_text_context_node doc = HTML::DocumentFragment.parse "
foo
" elem = doc.at_css "span" x = elem.parse("") # should not raise an exception assert_equal x.first.name, "span" end def test_subclass_dup subclass = Class.new(Nokogiri::XML::Node) node = subclass.new('foo', @xml).dup assert_instance_of subclass, node end def test_gt_string_arg node = @xml.at('employee') nodes = (node > 'name') assert_equal 1, nodes.length assert_equal node, nodes.first.parent end def test_next_element_when_next_sibling_is_element_should_return_next_sibling doc = Nokogiri::XML "" node = doc.at_css("foo") next_element = node.next_element assert next_element.element? assert_equal doc.at_css("quux"), next_element end def test_next_element_when_there_is_no_next_sibling_should_return_nil doc = Nokogiri::XML "" assert_nil doc.at_css("quux").next_element end def test_next_element_when_next_sibling_is_not_an_element_should_return_closest_next_element_sibling doc = Nokogiri::XML "bar" node = doc.at_css("foo") next_element = node.next_element assert next_element.element? assert_equal doc.at_css("quux"), next_element end def test_next_element_when_next_sibling_is_not_an_element_and_no_following_element_should_return_nil doc = Nokogiri::XML "bar" node = doc.at_css("foo") next_element = node.next_element assert_nil next_element end def test_previous_element_when_previous_sibling_is_element_should_return_previous_sibling doc = Nokogiri::XML "" node = doc.at_css("quux") previous_element = node.previous_element assert previous_element.element? assert_equal doc.at_css("foo"), previous_element end def test_previous_element_when_there_is_no_previous_sibling_should_return_nil doc = Nokogiri::XML "" assert_nil doc.at_css("foo").previous_element end def test_previous_element_when_previous_sibling_is_not_an_element_should_return_closest_previous_element_sibling doc = Nokogiri::XML "bar" node = doc.at_css("quux") previous_element = node.previous_element assert previous_element.element? assert_equal doc.at_css("foo"), previous_element end def test_previous_element_when_previous_sibling_is_not_an_element_and_no_following_element_should_return_nil doc = Nokogiri::XML "foo" node = doc.at_css("bar") previous_element = node.previous_element assert_nil previous_element end def test_element? assert @xml.root.element?, 'is an element' end def test_slash_search assert_equal 'EMP0001', (@xml/:staff/:employee/:employeeId).first.text end def test_append_with_document assert_raises(ArgumentError) do @xml.root << Nokogiri::XML::Document.new end end def test_append_with_attr r = Nokogiri.XML('').root assert_raises(ArgumentError) do r << r.at_xpath('@a') end end def test_inspect_ns xml = Nokogiri::XML(<<-eoxml) { |c| c.noblanks } eoxml ins = xml.inspect xml.traverse do |node| assert_match node.class.name, ins if node.respond_to? :attributes node.attributes.each do |k,v| assert_match k, ins assert_match v, ins end end if node.respond_to?(:namespace) && node.namespace assert_match node.namespace.class.name, ins assert_match node.namespace.href, ins end end end def test_namespace_definitions_when_some_exist xml = Nokogiri::XML <<-eoxml eoxml namespace_definitions = xml.root.namespace_definitions assert_equal 2, namespace_definitions.length end def test_namespace_definitions_when_no_exist xml = Nokogiri::XML <<-eoxml eoxml namespace_definitions = xml.at_xpath('//xmlns:awesome').namespace_definitions assert_equal 0, namespace_definitions.length end def test_namespace_goes_to_children fruits = Nokogiri::XML(<<-eoxml) eoxml apple = Nokogiri::XML::Node.new('Apple', fruits) orange = Nokogiri::XML::Node.new('Orange', fruits) apple << orange fruits.root << apple assert fruits.at('//fruit:Orange',{'fruit'=>'www.fruits.org'}) assert fruits.at('//fruit:Apple',{'fruit'=>'www.fruits.org'}) end def test_description assert_nil @xml.at('employee').description end def test_spaceship nodes = @xml.xpath('//employee') assert_equal(-1, (nodes.first <=> nodes.last)) list = [nodes.first, nodes.last].sort assert_equal nodes.first, list.first assert_equal nodes.last, list.last end def test_incorrect_spaceship nodes = @xml.xpath('//employee') assert_nil(nodes.first <=> 'asdf') end def test_document_compare skip "underlying libxml2 behavior changed in libxml2@a005199" nodes = @xml.xpath('//employee') assert_equal(-1, (nodes.first <=> @xml)) # post-libxml2@a005199, returns 1 end def test_different_document_compare nodes = @xml.xpath('//employee') doc = Nokogiri::XML('
') b = doc.at('b') assert_nil(nodes.first <=> b) end def test_duplicate_node_removes_namespace fruits = Nokogiri::XML(<<-eoxml) eoxml apple = fruits.root.xpath('fruit:Apple', {'fruit'=>'www.fruits.org'})[0] new_apple = apple.dup fruits.root << new_apple assert_equal 2, fruits.xpath('//xmlns:Apple').length assert_equal 1, fruits.to_xml.scan('www.fruits.org').length end [:clone, :dup].each do |symbol| define_method "test_#{symbol}" do node = @xml.at('//employee') other = node.send(symbol) assert_equal "employee", other.name assert_nil other.parent end end def test_fragment_creates_elements apple = @xml.fragment('') apple.children.each do |child| assert_equal Nokogiri::XML::Node::ELEMENT_NODE, child.type assert_instance_of Nokogiri::XML::Element, child end end def test_node_added_to_root_should_get_namespace fruits = Nokogiri::XML(<<-eoxml) eoxml apple = fruits.fragment('') fruits.root << apple assert_equal 1, fruits.xpath('//xmlns:Apple').length end def test_new_node_can_have_ancestors xml = Nokogiri::XML('text') item = Nokogiri::XML::Element.new('item', xml) assert_equal 0, item.ancestors.length end def test_children doc = Nokogiri::XML(<<-eoxml) #{'' * 9 } eoxml assert_equal 9, doc.root.children.length assert_equal 9, doc.root.children.to_a.length doc = Nokogiri::XML(<<-eoxml) #{'' * 15 } eoxml assert_equal 15, doc.root.children.length assert_equal 15, doc.root.children.to_a.length end def test_add_namespace node = @xml.at('address') node.add_namespace('foo', 'http://tenderlovemaking.com') assert_equal 'http://tenderlovemaking.com', node.namespaces['xmlns:foo'] end def test_add_namespace_twice node = @xml.at('address') ns = node.add_namespace('foo', 'http://tenderlovemaking.com') ns2 = node.add_namespace('foo', 'http://tenderlovemaking.com') assert_equal ns, ns2 end def test_add_default_ns node = @xml.at('address') node.add_namespace(nil, 'http://tenderlovemaking.com') assert_equal 'http://tenderlovemaking.com', node.namespaces['xmlns'] end def test_add_multiple_namespaces node = @xml.at('address') node.add_namespace(nil, 'http://tenderlovemaking.com') assert_equal 'http://tenderlovemaking.com', node.namespaces['xmlns'] node.add_namespace('foo', 'http://tenderlovemaking.com') assert_equal 'http://tenderlovemaking.com', node.namespaces['xmlns:foo'] end def test_default_namespace= node = @xml.at('address') node.default_namespace = 'http://tenderlovemaking.com' assert_equal 'http://tenderlovemaking.com', node.namespaces['xmlns'] end def test_namespace= node = @xml.at('address') assert_nil node.namespace definition = node.add_namespace_definition 'bar', 'http://tlm.com/' node.namespace = definition assert_equal definition, node.namespace assert_equal node, @xml.at('//foo:address', { 'foo' => 'http://tlm.com/' }) end def test_add_namespace_with_nil_associates_node node = @xml.at('address') assert_nil node.namespace definition = node.add_namespace_definition nil, 'http://tlm.com/' assert_equal definition, node.namespace end def test_add_namespace_does_not_associate_node node = @xml.at('address') assert_nil node.namespace assert node.add_namespace_definition 'foo', 'http://tlm.com/' assert_nil node.namespace end def test_set_namespace_from_different_doc node = @xml.at('address') doc = Nokogiri::XML(File.read(XML_FILE), XML_FILE) decl = doc.root.add_namespace_definition 'foo', 'bar' assert_raises(ArgumentError) do node.namespace = decl end end def test_set_namespace_must_only_take_a_namespace node = @xml.at('address') assert_raises(TypeError) do node.namespace = node end end def test_at node = @xml.at('address') assert_equal node, @xml.xpath('//address').first end def test_at_self node = @xml.at('address') assert_equal node, node.at('.') end def test_at_xpath node = @xml.at_xpath('//address') nodes = @xml.xpath('//address') assert_equal 5, nodes.size assert_equal node, nodes.first end def test_at_css node = @xml.at_css('address') nodes = @xml.css('address') assert_equal 5, nodes.size assert_equal node, nodes.first end def test_percent node = @xml % ('address') assert_equal node, @xml.xpath('//address').first end def test_accept visitor = Class.new { attr_accessor :visited def accept target target.accept(self) end def visit node node.children.each { |c| c.accept(self) } @visited = true end }.new visitor.accept(@xml.root) assert visitor.visited end def test_write_to io = StringIO.new @xml.write_to io io.rewind assert_equal @xml.to_xml, io.read end def test_attribute_with_symbol assert_equal 'Yes', @xml.css('address').first[:domestic] end def test_non_existent_attribute_should_return_nil node = @xml.root.first_element_child assert_nil node.attribute('type') end def test_write_to_with_block called = false io = StringIO.new conf = nil @xml.write_to io do |config| called = true conf = config config.format.as_html.no_empty_tags end io.rewind assert called string = io.read assert_equal @xml.serialize(nil, conf.options), string assert_equal @xml.serialize(nil, conf), string end %w{ xml html xhtml }.each do |type| define_method(:"test_write_#{type}_to") do io = StringIO.new assert @xml.send(:"write_#{type}_to", io) io.rewind assert_match @xml.send(:"to_#{type}"), io.read end end def test_serialize_with_block called = false conf = nil string = @xml.serialize do |config| called = true conf = config config.format.as_html.no_empty_tags end assert called assert_equal @xml.serialize(nil, conf.options), string assert_equal @xml.serialize(nil, conf), string end def test_hold_refence_to_subnode doc = Nokogiri::XML(<<-eoxml) eoxml assert node_a = doc.css('a').first assert node_b = node_a.css('b').first node_a.unlink assert_equal 'b', node_b.name end def test_values assert_equal %w{ Yes Yes }, @xml.xpath('//address')[1].values end def test_keys assert_equal %w{ domestic street }, @xml.xpath('//address')[1].keys end def test_each attributes = [] @xml.xpath('//address')[1].each do |key, value| attributes << [key, value] end assert_equal [['domestic', 'Yes'], ['street', 'Yes']], attributes end def test_new assert node = Nokogiri::XML::Node.new('input', @xml) assert_equal 1, node.node_type assert_instance_of Nokogiri::XML::Element, node end def test_to_str name = @xml.xpath('//name').first assert_match(/Margaret/, '' + name) assert_equal('Margaret Martin', '' + name.children.first) end def test_ancestors address = @xml.xpath('//address').first assert_equal 3, address.ancestors.length assert_equal ['employee', 'staff', 'document'], address.ancestors.map(&:name) end def test_read_only? assert entity_decl = @xml.internal_subset.children.find { |x| x.type == Node::ENTITY_DECL } assert entity_decl.read_only? end def test_remove_attribute address = @xml.xpath('/staff/employee/address').first assert_equal 'Yes', address['domestic'] attr = address.attributes['domestic'] returned_attr = address.remove_attribute 'domestic' assert_nil address['domestic'] assert_equal attr, returned_attr end def test_remove_attribute_when_not_found address = @xml.xpath('/staff/employee/address').first attr = address.remove_attribute 'not-an-attribute' assert_nil attr end def test_attribute_setter_accepts_non_string address = @xml.xpath("/staff/employee/address").first assert_equal "Yes", address[:domestic] address[:domestic] = "Altered Yes" assert_equal "Altered Yes", address[:domestic] end def test_attribute_accessor_accepts_non_string address = @xml.xpath("/staff/employee/address").first assert_equal "Yes", address["domestic"] assert_equal "Yes", address[:domestic] end def test_empty_attribute_reading node = Nokogiri::XML '' assert_equal '', node.root['empty'] assert_equal ' ', node.root['whitespace'] end def test_delete address = @xml.xpath('/staff/employee/address').first assert_equal 'Yes', address['domestic'] address.delete 'domestic' assert_nil address['domestic'] end def test_set_content_with_symbol node = @xml.at('//name') node.content = :foo assert_equal 'foo', node.content end def test_set_native_content_is_unescaped comment = Nokogiri.XML('').at('//comment()') comment.native_content = " < " # content= will escape this string assert_equal "", comment.to_xml end def test_find_by_css_class_with_nonstandard_whitespace doc = Nokogiri::HTML "
" assert_not_nil doc.at_css(".b") end def test_find_by_css_with_tilde_eql xml = Nokogiri::XML.parse(<<-eoxml) Hello world Bar Bar Bar Bar Awesome Awesome eoxml set = xml.css('a[@class~="bar"]') assert_equal 4, set.length assert_equal ['Bar'], set.map(&:content).uniq end def test_unlink xml = Nokogiri::XML.parse(<<-eoxml) Bar Bar Bar Hello world Bar Awesome Awesome eoxml node = xml.xpath('//a')[3] assert_equal('Hello world', node.text) assert_match(/Hello world/, xml.to_s) assert node.parent assert node.document assert node.previous_sibling assert node.next_sibling node.unlink assert !node.parent #assert !node.document assert !node.previous_sibling assert !node.next_sibling assert_no_match(/Hello world/, xml.to_s) end def test_next_sibling assert node = @xml.root assert sibling = node.child.next_sibling assert_equal('employee', sibling.name) end def test_previous_sibling assert node = @xml.root assert sibling = node.child.next_sibling assert_equal('employee', sibling.name) assert_equal(sibling.previous_sibling, node.child) end def test_name= assert node = @xml.root node.name = 'awesome' assert_equal('awesome', node.name) end def test_child assert node = @xml.root assert child = node.child assert_equal('text', child.name) end def test_key? assert node = @xml.search('//address').first assert(!node.key?('asdfasdf')) end def test_set_property assert node = @xml.search('//address').first node['foo'] = 'bar' assert_equal('bar', node['foo']) end def test_set_property_non_string assert node = @xml.search('//address').first node['foo'] = 1 assert_equal('1', node['foo']) node['foo'] = false assert_equal('false', node['foo']) end def test_attributes assert node = @xml.search('//address').first assert_nil(node['asdfasdfasdf']) assert_equal('Yes', node['domestic']) assert node = @xml.search('//address')[2] attr = node.attributes assert_equal 2, attr.size assert_equal 'Yes', attr['domestic'].value assert_equal 'Yes', attr['domestic'].to_s assert_equal 'No', attr['street'].value end def test_path assert set = @xml.search('//employee') assert node = set.first assert_equal('/staff/employee[1]', node.path) end def test_parent_xpath assert set = @xml.search('//employee') assert node = set.first assert parent_set = node.search('..') assert parent_node = parent_set.first assert_equal '/staff', parent_node.path assert_equal node.parent, parent_node end def test_search_self node = @xml.at('//employee') assert_equal node.search('.').to_a, [node] end def test_search_by_symbol assert set = @xml.search(:employee) assert 5, set.length assert node = @xml.at(:employee) assert node.text =~ /EMP0001/ end def test_new_node node = Nokogiri::XML::Node.new('form', @xml) assert_equal('form', node.name) assert(node.document) end def test_encode_special_chars foo = @xml.css('employee').first.encode_special_chars('&') assert_equal '&', foo end def test_content_equals node = Nokogiri::XML::Node.new('form', @xml) assert_equal('', node.content) node.content = 'hello world!' assert_equal('hello world!', node.content) node.content = '& &' assert_equal('& &', node.content) assert_equal('
& <foo> &amp;
', node.to_xml) node.content = "1234 <-> 1234" assert_equal "1234 <-> 1234", node.content assert_equal "
1234 <-> 1234
", node.to_xml node.content = '1234' node.add_child '5678' assert_equal '12345678', node.content end # issue #839 def test_encoding_of_copied_nodes d1 = Nokogiri::XML('&') d2 = Nokogiri::XML('') ne = d1.root.xpath('//a').first.dup(1) ne.content += "& < & > \" &" d2.root << ne assert_match(/&& < & > \" &<\/a>/, d2.to_s) end def test_content_after_appending_text doc = Nokogiri::XML '' node = doc.children.first node.content = 'bar' node << 'baz' assert_equal 'barbaz', node.content end def test_content_depth_first node = Nokogiri::XML 'firstsecondthird' assert_equal 'firstsecondthird', node.content end def test_set_content_should_unlink_existing_content node = @xml.at_css("employee") children = node.children node.content = "hello" children.each { |child| assert_nil child.parent } end def test_whitespace_nodes doc = Nokogiri::XML.parse("Foo\nBar

Bazz

") children = doc.at('//root').children.collect(&:to_s) assert_equal "\n", children[1] assert_equal " ", children[3] end def test_node_equality doc1 = Nokogiri::XML.parse(File.read(XML_FILE), XML_FILE) doc2 = Nokogiri::XML.parse(File.read(XML_FILE), XML_FILE) address1_1 = doc1.xpath('//address').first address1_2 = doc1.xpath('//address').first address2 = doc2.xpath('//address').first assert_not_equal address1_1, address2 # two references to very, very similar nodes assert_equal address1_1, address1_2 # two references to the exact same node end def test_namespace_search_with_xpath_and_hash xml = Nokogiri::XML.parse(<<-eoxml) Michelin Model XGV I'm a bicycle tire! eoxml tires = xml.xpath('//bike:tire', {'bike' => 'http://schwinn.com/'}) assert_equal 1, tires.length end def test_namespace_search_with_xpath_and_hash_with_symbol_keys xml = Nokogiri::XML.parse(<<-eoxml) Michelin Model XGV I'm a bicycle tire! eoxml tires = xml.xpath('//bike:tire', :bike => 'http://schwinn.com/') assert_equal 1, tires.length end def test_namespace_search_with_css xml = Nokogiri::XML.parse(<<-eoxml) Michelin Model XGV I'm a bicycle tire! eoxml tires = xml.css('bike|tire', 'bike' => 'http://schwinn.com/' ) assert_equal 1, tires.length end def test_namespaced_attribute_search_with_xpath # from #593 xmlContent = <<-EOXML with namespace no namespace EOXML xml_doc = Nokogiri::XML(xmlContent) no_ns = xml_doc.xpath("//*[@att]") assert_equal no_ns.length, 1 assert_equal no_ns.first.content, "no namespace" with_ns = xml_doc.xpath("//*[@ns1:att]") assert_equal with_ns.length, 1 assert_equal with_ns.first.content, "with namespace" end def test_namespaced_attribute_search_with_css # from #593 xmlContent = <<-EOXML with namespace no namespace EOXML xml_doc = Nokogiri::XML(xmlContent) no_ns = xml_doc.css('*[att]') assert_equal no_ns.length, 1 assert_equal no_ns.first.content, "no namespace" with_ns = xml_doc.css('*[ns1|att]') assert_equal with_ns.length, 1 assert_equal with_ns.first.content, "with namespace" end def test_namespaces_should_include_all_namespace_definitions xml = Nokogiri::XML.parse(<<-EOF) hello
EOF namespaces = xml.namespaces # Document#namespace assert_equal({"xmlns" => "http://quux.com/", "xmlns:a" => "http://foo.com/", "xmlns:b" => "http://bar.com/"}, namespaces) namespaces = xml.root.namespaces assert_equal({"xmlns" => "http://quux.com/", "xmlns:a" => "http://foo.com/", "xmlns:b" => "http://bar.com/"}, namespaces) namespaces = xml.at_xpath("//xmlns:y").namespaces assert_equal({"xmlns" => "http://quux.com/", "xmlns:a" => "http://foo.com/", "xmlns:b" => "http://bar.com/", "xmlns:c" => "http://bazz.com/"}, namespaces) namespaces = xml.at_xpath("//xmlns:z").namespaces assert_equal({"xmlns" => "http://quux.com/", "xmlns:a" => "http://foo.com/", "xmlns:b" => "http://bar.com/", "xmlns:c" => "http://bazz.com/"}, namespaces) namespaces = xml.at_xpath("//xmlns:a").namespaces assert_equal({"xmlns" => "http://quux.com/", "xmlns:a" => "http://foo.com/", "xmlns:b" => "http://bar.com/", "xmlns:c" => "http://newc.com/"}, namespaces) end def test_namespace xml = Nokogiri::XML.parse(<<-EOF) hello a hello b hello c
hello moon
EOF set = xml.search("//y/*") assert_equal "a", set[0].namespace.prefix assert_equal 'http://foo.com/', set[0].namespace.href assert_equal "b", set[1].namespace.prefix assert_equal 'http://bar.com/', set[1].namespace.href assert_equal "c", set[2].namespace.prefix assert_equal 'http://bazz.com/', set[2].namespace.href assert_equal nil, set[3].namespace.prefix # default namespace assert_equal 'http://ns.example.com/d', set[3].namespace.href assert_equal nil, set[4].namespace # no namespace assert_equal 'b', set[2].attributes['y'].namespace.prefix assert_equal 'http://bar.com/', set[2].attributes['y'].namespace.href assert_equal nil, set[2].attributes['x'].namespace assert_equal nil, set[3].attributes['x'].namespace assert_equal nil, set[4].attributes['x'].namespace end if Nokogiri.uses_libxml? def test_namespace_without_an_href_on_html_node # because microsoft word's HTML formatting does this. ick. xml = Nokogiri::HTML.parse <<-EOF
foo
EOF assert_not_nil(node = xml.at('p')) assert_equal 1, node.namespaces.keys.size assert node.namespaces.has_key?('xmlns:o') assert_equal nil, node.namespaces['xmlns:o'] end end def test_line xml = Nokogiri::XML(<<-eoxml)
Hello world eoxml set = xml.search("//a") node = set.first assert_equal 2, node.line end def test_xpath_results_have_document_and_are_decorated x = Module.new do def awesome! ; end end util_decorate(@xml, x) node_set = @xml.xpath("//employee") assert_equal @xml, node_set.document assert node_set.respond_to?(:awesome!) end def test_css_results_have_document_and_are_decorated x = Module.new do def awesome! ; end end util_decorate(@xml, x) node_set = @xml.css("employee") assert_equal @xml, node_set.document assert node_set.respond_to?(:awesome!) end def test_blank doc = Nokogiri::XML('') assert_equal false, doc.blank? end def test_to_xml_allows_to_serialize_with_as_xml_save_option xml = Nokogiri::XML("
  • Hello world
") set = xml.search("//ul") node = set.first assert_no_match("
    \n
  • ", xml.to_xml(:save_with => XML::Node::SaveOptions::AS_XML)) assert_no_match("
      \n
    • ", node.to_xml(:save_with => XML::Node::SaveOptions::AS_XML)) end # issue 647 def test_default_namespace_should_be_created subject = Nokogiri::XML.parse('').root ns = subject.attributes['bar'].namespace assert_not_nil ns assert_equal ns.class, Nokogiri::XML::Namespace assert_equal 'xml', ns.prefix assert_equal "http://www.w3.org/XML/1998/namespace", ns.href end # issue 648 def test_namespace_without_prefix_should_be_set node = Nokogiri::XML.parse('').root subject = Nokogiri::XML::Node.new 'foo', node.document subject.namespace = node.namespace ns = subject.namespace assert_equal ns.class, Nokogiri::XML::Namespace assert_nil ns.prefix assert_equal ns.href, "http://bar.com" end # issue 695 def test_namespace_in_rendered_xml document = Nokogiri::XML::Document.new subject = Nokogiri::XML::Node.new 'foo', document ns = subject.add_namespace nil, 'bar' subject.namespace = ns assert_match(/xmlns="bar"/, subject.to_xml) end # issue 771 def test_format_noblank content = < hello eoxml subject = Nokogiri::XML(content) do |conf| conf.default_xml.noblanks end assert_match %r{hello}, subject.to_xml(:indent => 2) end def test_text_node_colon document = Nokogiri::XML::Document.new root = Nokogiri::XML::Node.new 'foo', document document.root = root root << "hello:with_colon" assert_match(/hello:with_colon/, document.to_xml) end def test_document_eh html_doc = Nokogiri::HTML "
      foo
      " xml_doc = Nokogiri::XML "
      foo
      " html_node = html_doc.at_css "div" xml_node = xml_doc.at_css "div" assert html_doc.document? assert xml_doc.document? assert ! html_node.document? assert ! xml_node.document? end def test_processing_instruction_eh xml_doc = Nokogiri::XML %Q{\n\n\n
      foo
      } pi_node = xml_doc.children.first div_node = xml_doc.at_css "div" assert pi_node.processing_instruction? assert ! div_node.processing_instruction? end def test_node_lang document = Nokogiri::XML <<-EOXML
      foo
      bar
      bar
      EOXML assert_equal "en", document.at_css(".english").lang assert_equal "en", document.at_css(".english_child").lang assert_equal "jp", document.at_css(".japanese").lang assert_nil document.at_css(".unspecified").lang end def test_set_node_lang document = Nokogiri::XML "
      foo
      " subject = document.at_css(".subject") subject.lang = "de" assert_equal "de", subject.lang subject.lang = "fr" assert_equal "fr", subject.lang end def test_text_node_robustness_gh1426 # notably, the original bug report was about libxml-ruby interactions # this test should blow up under valgrind if we regress on libxml-ruby workarounds message = "

      BOOM!

      " 10_000.times do node = Nokogiri::HTML::DocumentFragment.parse(message) node.add_previous_sibling(Nokogiri::XML::Text.new('before', node.document)) node.add_next_sibling(Nokogiri::XML::Text.new('after', node.document)) end end end end end nokogiri-1.8.2/test/xml/test_node_set.rb0000644000004100000410000006045613235345655020364 0ustar www-datawww-datarequire "helper" module Nokogiri module XML class TestNodeSet < Nokogiri::TestCase class TestNodeSetNamespaces < Nokogiri::TestCase def setup super @xml = Nokogiri.XML('') @list = @xml.xpath('//namespace::*') end def test_include? assert @list.include?(@list.first), 'list should have item' end def test_push @list.push @list.first end def test_delete @list.push @list.first @list.delete @list.first end def test_reference_after_delete first = @list.first @list.delete(first) assert_equal 'http://www.w3.org/XML/1998/namespace', first.href end end def setup super @xml = Nokogiri::XML(File.read(XML_FILE), XML_FILE) @list = @xml.css('employee') end def test_break_works assert_equal 7, @xml.root.elements.each { |x| break 7 } end def test_filter list = @xml.css('address').filter('*[domestic="Yes"]') assert_equal(%w{ Yes } * 4, list.map { |n| n['domestic'] }) end def test_remove_attr @list.each { |x| x['class'] = 'blah' } assert_equal @list, @list.remove_attr('class') @list.each { |x| assert_nil x['class'] } end def test_add_class assert_equal @list, @list.add_class('bar') @list.each { |x| assert_equal 'bar', x['class'] } @list.add_class('bar') @list.each { |x| assert_equal 'bar', x['class'] } @list.add_class('baz') @list.each { |x| assert_equal 'bar baz', x['class'] } end def test_remove_class_with_no_class assert_equal @list, @list.remove_class('bar') @list.each { |e| assert_nil e['class'] } @list.each { |e| e['class'] = '' } assert_equal @list, @list.remove_class('bar') @list.each { |e| assert_nil e['class'] } end def test_remove_class_single @list.each { |e| e['class'] = 'foo bar' } assert_equal @list, @list.remove_class('bar') @list.each { |e| assert_equal 'foo', e['class'] } end def test_remove_class_completely @list.each { |e| e['class'] = 'foo' } assert_equal @list, @list.remove_class @list.each { |e| assert_nil e['class'] } end def test_attribute_set @list.each { |e| assert_nil e['foo'] } [ ['attribute', 'bar'], ['attr', 'biz'], ['set', 'baz'] ].each do |t| @list.send(t.first.to_sym, 'foo', t.last) @list.each { |e| assert_equal t.last, e['foo'] } end end def test_attribute_set_with_block @list.each { |e| assert_nil e['foo'] } [ ['attribute', 'bar'], ['attr', 'biz'], ['set', 'baz'] ].each do |t| @list.send(t.first.to_sym, 'foo') { |x| t.last } @list.each { |e| assert_equal t.last, e['foo'] } end end def test_attribute_set_with_hash @list.each { |e| assert_nil e['foo'] } [ ['attribute', 'bar'], ['attr', 'biz'], ['set', 'baz'] ].each do |t| @list.send(t.first.to_sym, 'foo' => t.last) @list.each { |e| assert_equal t.last, e['foo'] } end end def test_attribute_no_args @list.first['foo'] = 'bar' assert_equal @list.first.attribute('foo'), @list.attribute('foo') end def test_search_empty_node_set set = Nokogiri::XML::NodeSet.new(Nokogiri::XML::Document.new) assert_equal 0, set.css('foo').length assert_equal 0, set.xpath('.//foo').length assert_equal 0, set.search('foo').length end def test_node_set_search_with_multiple_queries xml = '
      important thing
      stuff

      more stuff

' set = Nokogiri::XML(xml).xpath(".//thing") assert_kind_of Nokogiri::XML::NodeSet, set assert_equal 3, set.xpath('./div', './p').length assert_equal 3, set.css('.title', '.content', 'p').length assert_equal 3, set.search('./div', 'p.blah').length end def test_search_with_custom_selector set = @xml.xpath('//staff') [ [:xpath, '//*[awesome(.)]'], [:search, '//*[awesome(.)]'], [:css, '*:awesome'], [:search, '*:awesome'] ].each do |method, query| custom_employees = set.send(method, query, Class.new { def awesome ns ns.select { |n| n.name == 'employee' } end }.new) assert_equal(@xml.xpath('//employee'), custom_employees, "using #{method} with custom selector '#{query}'") end end def test_search_with_variable_bindings set = @xml.xpath('//staff') assert_equal(4, set.xpath('//address[@domestic=$value]', nil, :value => 'Yes').length, "using #xpath with variable binding") assert_equal(4, set.search('//address[@domestic=$value]', nil, :value => 'Yes').length, "using #search with variable binding") end def test_search_self set = @xml.xpath('//staff') assert_equal set.to_a, set.search('.').to_a end def test_css_searches_match_self html = Nokogiri::HTML("
") set = html.xpath("/html/body/div") assert_equal set.first, set.css(".a").first assert_equal set.first, set.search(".a").first end def test_css_search_with_namespace fragment = Nokogiri::XML.fragment(<<-eoxml) eoxml assert fragment.children.search( 'body', { 'xmlns' => 'http://www.w3.org/1999/xhtml' }) end def test_double_equal assert node_set_one = @xml.xpath('//employee') assert node_set_two = @xml.xpath('//employee') assert_not_equal node_set_one.object_id, node_set_two.object_id assert_equal node_set_one, node_set_two end def test_node_set_not_equal_to_string node_set_one = @xml.xpath('//employee') assert_not_equal node_set_one, "asdfadsf" end def test_out_of_order_not_equal one = @xml.xpath('//employee') two = @xml.xpath('//employee') two.push two.shift assert_not_equal one, two end def test_shorter_is_not_equal node_set_one = @xml.xpath('//employee') node_set_two = @xml.xpath('//employee') node_set_two.delete(node_set_two.first) assert_not_equal node_set_one, node_set_two end def test_pop set = @xml.xpath('//employee') last = set.last assert_equal last, set.pop end def test_shift set = @xml.xpath('//employee') first = set.first assert_equal first, set.shift end def test_shift_empty set = Nokogiri::XML::NodeSet.new(@xml) assert_nil set.shift end def test_pop_empty set = Nokogiri::XML::NodeSet.new(@xml) assert_nil set.pop end def test_first_takes_arguments assert node_set = @xml.xpath('//employee') assert_equal 2, node_set.first(2).length end def test_first_clamps_arguments assert node_set = @xml.xpath('//employee[position() < 3]') assert_equal 2, node_set.first(5).length end [:dup, :clone].each do |method_name| define_method "test_#{method_name}" do assert node_set = @xml.xpath('//employee') duplicate = node_set.send(method_name) assert_equal node_set.length, duplicate.length node_set.zip(duplicate).each do |a,b| assert_equal a, b end end end def test_dup_on_empty_set empty_set = Nokogiri::XML::NodeSet.new @xml, [] assert_equal 0, empty_set.dup.length # this shouldn't raise null pointer exception end def test_xmlns_is_automatically_registered doc = Nokogiri::XML(<<-eoxml) eoxml set = doc.css('foo') assert_equal 1, set.css('xmlns|bar').length assert_equal 0, set.css('|bar').length assert_equal 1, set.xpath('//xmlns:bar').length assert_equal 1, set.search('xmlns|bar').length assert_equal 1, set.search('//xmlns:bar').length assert set.at('//xmlns:bar') assert set.at('xmlns|bar') assert set.at('bar') end def test_children_has_document set = @xml.root.children assert_instance_of(NodeSet, set) assert_equal @xml, set.document end def test_length_size assert node_set = @xml.search('//employee') assert_equal node_set.length, node_set.size end def test_to_xml assert node_set = @xml.search('//employee') assert node_set.to_xml end def test_inner_html doc = Nokogiri::HTML(<<-eohtml)
one
two
eohtml assert html = doc.css('div').inner_html assert_match '', html end def test_gt_string_arg assert node_set = @xml.search('//employee') assert_equal node_set.xpath('./employeeId'), (node_set > 'employeeId') end def test_at_performs_a_search_with_css assert node_set = @xml.search('//employee') assert_equal node_set.first.first_element_child, node_set.at('employeeId') assert_equal node_set.first.first_element_child, node_set.%('employeeId') end def test_at_performs_a_search_with_xpath assert node_set = @xml.search('//employee') assert_equal node_set.first.first_element_child, node_set.at('./employeeId') assert_equal node_set.first.first_element_child, node_set.%('./employeeId') end def test_at_with_integer_index assert node_set = @xml.search('//employee') assert_equal node_set.first, node_set.at(0) assert_equal node_set.first, node_set % 0 end def test_at_xpath assert node_set = @xml.search('//employee') assert_equal node_set.first.first_element_child, node_set.at_xpath('./employeeId') end def test_at_css assert node_set = @xml.search('//employee') assert_equal node_set.first.first_element_child, node_set.at_css('employeeId') end def test_to_ary assert node_set = @xml.search('//employee') foo = [] foo += node_set assert_equal node_set.length, foo.length end def test_push node = Nokogiri::XML::Node.new('foo', @xml) node.content = 'bar' assert node_set = @xml.search('//employee') node_set.push(node) assert node_set.include?(node) end def test_delete_with_invalid_argument employees = @xml.search("//employee") positions = @xml.search("//position") assert_raises(ArgumentError) { employees.delete(positions) } end def test_delete_when_present employees = @xml.search("//employee") wally = employees.first assert employees.include?(wally) # testing setup length = employees.length result = employees.delete(wally) assert_equal result, wally assert ! employees.include?(wally) assert length-1, employees.length end def test_delete_when_not_present employees = @xml.search("//employee") phb = @xml.search("//position").first assert ! employees.include?(phb) # testing setup length = employees.length result = employees.delete(phb) assert_nil result assert length, employees.length end def test_delete_on_empty_set empty_set = Nokogiri::XML::NodeSet.new @xml, [] employee = @xml.at_xpath("//employee") assert_equal nil, empty_set.delete(employee) end def test_unlink xml = Nokogiri::XML.parse(<<-eoxml) Bar Bar Bar Hello world Bar Awesome Awesome eoxml set = xml.xpath('//a') set.unlink set.each do |node| assert !node.parent #assert !node.document assert !node.previous_sibling assert !node.next_sibling end assert_no_match(/Hello world/, xml.to_s) end def test_nodeset_search_takes_namespace @xml = Nokogiri::XML.parse(<<-eoxml) Michelin Model XGV I'm a bicycle tire! eoxml set = @xml/'root' assert_equal 1, set.length bike_tire = set.search('//bike:tire', 'bike' => "http://schwinn.com/") assert_equal 1, bike_tire.length end def test_new_nodeset node_set = Nokogiri::XML::NodeSet.new(@xml) assert_equal(0, node_set.length) node = Nokogiri::XML::Node.new('form', @xml) node_set << node assert_equal(1, node_set.length) assert_equal(node, node_set.last) end def test_search_on_nodeset assert node_set = @xml.search('//employee') assert sub_set = node_set.search('.//name') assert_equal(node_set.length, sub_set.length) end def test_negative_index_works assert node_set = @xml.search('//employee') assert_equal node_set.last, node_set[-1] end def test_large_negative_index_returns_nil assert node_set = @xml.search('//employee') assert_nil(node_set[-1 * (node_set.length + 1)]) end def test_node_set_fetches_private_data assert node_set = @xml.search('//employee') set = node_set assert_equal(set[0], set[0]) end def test_node_set_returns_0 assert node_set = @xml.search('//asdkfjhasdlkfjhaldskfh') assert_equal(0, node_set.length) end def test_wrap employees = (@xml/"//employee").wrap("") assert_equal 'wrapper', employees[0].parent.name assert_equal 'employee', @xml.search("//wrapper").first.children[0].name end def test_wrap_a_fragment frag = Nokogiri::XML::DocumentFragment.parse <<-EOXML hello goodbye EOXML employees = frag.xpath ".//employee" employees.wrap("") assert_equal 'wrapper', employees[0].parent.name assert_equal 'employee', frag.at(".//wrapper").children.first.name end def test_wrap_preserves_document_structure assert_equal "employeeId", @xml.at_xpath("//employee").children.detect{|j| ! j.text? }.name @xml.xpath("//employeeId[text()='EMP0001']").wrap("") assert_equal "wrapper", @xml.at_xpath("//employee").children.detect{|j| ! j.text? }.name end def test_plus_operator names = @xml.search("name") positions = @xml.search("position") names_len = names.length positions_len = positions.length assert_raises(ArgumentError) { names + positions.first } result = names + positions assert_equal names_len, names.length assert_equal positions_len, positions.length assert_equal names.length + positions.length, result.length names += positions assert_equal result.length, names.length end def test_union names = @xml.search("name") assert_equal(names.length, (names | @xml.search("name")).length) end def test_minus_operator employees = @xml.search("//employee") females = @xml.search("//employee[gender[text()='Female']]") employees_len = employees.length females_len = females.length assert_raises(ArgumentError) { employees - females.first } result = employees - females assert_equal employees_len, employees.length assert_equal females_len, females.length assert_equal employees.length - females.length, result.length employees -= females assert_equal result.length, employees.length end def test_array_index employees = @xml.search("//employee") other = @xml.search("//position").first assert_equal 3, employees.index(employees[3]) assert_nil employees.index(other) end def test_slice_too_far employees = @xml.search("//employee") assert_equal employees.length, employees[0, employees.length + 1].length assert_equal employees.length, employees[0, employees.length].length end def test_slice_on_empty_node_set empty_set = Nokogiri::XML::NodeSet.new @xml, [] assert_equal nil, empty_set[99] assert_equal nil, empty_set[99..101] assert_equal nil, empty_set[99,2] end def test_slice_waaaaaay_off_the_end xml = Nokogiri::XML::Builder.new { root { 100.times { div } } }.doc nodes = xml.css "div" assert_equal 1, nodes.slice(99, 100_000).length assert_equal 0, nodes.slice(100, 100_000).length end def test_array_slice_with_start_and_end employees = @xml.search("//employee") assert_equal [employees[1], employees[2], employees[3]], employees[1,3].to_a end def test_array_index_bracket_equivalence employees = @xml.search("//employee") assert_equal [employees[1], employees[2], employees[3]], employees[1,3].to_a assert_equal [employees[1], employees[2], employees[3]], employees.slice(1,3).to_a end def test_array_slice_with_negative_start employees = @xml.search("//employee") assert_equal [employees[2]], employees[-3,1].to_a assert_equal [employees[2], employees[3]], employees[-3,2].to_a end def test_array_slice_with_invalid_args employees = @xml.search("//employee") assert_nil employees[99, 1] # large start assert_nil employees[1, -1] # negative len assert_equal [], employees[1, 0].to_a # zero len end def test_array_slice_with_range employees = @xml.search("//employee") assert_equal [employees[1], employees[2], employees[3]], employees[1..3].to_a assert_equal [employees[0], employees[1], employees[2], employees[3]], employees[0..3].to_a end def test_intersection_with_no_overlap employees = @xml.search("//employee") positions = @xml.search("//position") assert_equal [], (employees & positions).to_a end def test_intersection employees = @xml.search("//employee") first_set = employees[0..2] second_set = employees[2..4] assert_equal [employees[2]], (first_set & second_set).to_a end def test_intersection_on_empty_set empty_set = Nokogiri::XML::NodeSet.new @xml employees = @xml.search("//employee") assert_equal 0, (empty_set & employees).length end def test_include? employees = @xml.search("//employee") yes = employees.first no = @xml.search("//position").first assert employees.include?(yes) assert ! employees.include?(no) end def test_include_on_empty_node_set empty_set = Nokogiri::XML::NodeSet.new @xml, [] employee = @xml.at_xpath("//employee") assert ! empty_set.include?(employee) end def test_children employees = @xml.search("//employee") count = 0 employees.each do |employee| count += employee.children.length end set = employees.children assert_equal count, set.length end def test_inspect employees = @xml.search("//employee") inspected = employees.inspect assert_equal "[#{employees.map(&:inspect).join(', ')}]", inspected end def test_should_not_splode_when_accessing_namespace_declarations_in_a_node_set 2.times do xml = Nokogiri::XML "" node_set = xml.xpath("//namespace::*") assert_equal 1, node_set.size node = node_set.first node.to_s # segfaults in 1.4.0 and earlier # if we haven't segfaulted, let's make sure we handled it correctly assert_instance_of Nokogiri::XML::Namespace, node end end def test_should_not_splode_when_arrayifying_node_set_containing_namespace_declarations xml = Nokogiri::XML "" node_set = xml.xpath("//namespace::*") assert_equal 1, node_set.size node_array = node_set.to_a node = node_array.first node.to_s # segfaults in 1.4.0 and earlier # if we haven't segfaulted, let's make sure we handled it correctly assert_instance_of Nokogiri::XML::Namespace, node end def test_should_not_splode_when_unlinking_node_set_containing_namespace_declarations xml = Nokogiri::XML "" node_set = xml.xpath("//namespace::*") assert_equal 1, node_set.size node_set.unlink end def test_reverse xml = Nokogiri::XML "bd" children = xml.root.children assert_instance_of Nokogiri::XML::NodeSet, children reversed = children.reverse assert_equal reversed[0], children[4] assert_equal reversed[1], children[3] assert_equal reversed[2], children[2] assert_equal reversed[3], children[1] assert_equal reversed[4], children[0] assert_equal children, children.reverse.reverse end def test_node_set_dup_result_has_document_and_is_decorated x = Module.new do def awesome! ; end end util_decorate(@xml, x) node_set = @xml.css("address") new_set = node_set.dup assert_equal node_set.document, new_set.document assert new_set.respond_to?(:awesome!) end def test_node_set_union_result_has_document_and_is_decorated x = Module.new do def awesome! ; end end util_decorate(@xml, x) node_set1 = @xml.css("address") node_set2 = @xml.css("address") new_set = node_set1 | node_set2 assert_equal node_set1.document, new_set.document assert new_set.respond_to?(:awesome!) end def test_node_set_intersection_result_has_document_and_is_decorated x = Module.new do def awesome! ; end end util_decorate(@xml, x) node_set1 = @xml.css("address") node_set2 = @xml.css("address") new_set = node_set1 & node_set2 assert_equal node_set1.document, new_set.document assert new_set.respond_to?(:awesome!) end def test_node_set_difference_result_has_document_and_is_decorated x = Module.new do def awesome! ; end end util_decorate(@xml, x) node_set1 = @xml.css("address") node_set2 = @xml.css("address") new_set = node_set1 - node_set2 assert_equal node_set1.document, new_set.document assert new_set.respond_to?(:awesome!) end def test_node_set_slice_result_has_document_and_is_decorated x = Module.new do def awesome! ; end end util_decorate(@xml, x) node_set = @xml.css("address") new_set = node_set[0..-1] assert_equal node_set.document, new_set.document assert new_set.respond_to?(:awesome!) end end end end nokogiri-1.8.2/test/xml/test_relax_ng.rb0000644000004100000410000000316613235345655020356 0ustar www-datawww-datarequire "helper" module Nokogiri module XML class TestRelaxNG < Nokogiri::TestCase def setup assert @schema = Nokogiri::XML::RelaxNG(File.read(ADDRESS_SCHEMA_FILE)) end def test_parse_with_memory assert_instance_of Nokogiri::XML::RelaxNG, @schema assert_equal 0, @schema.errors.length end def test_new assert schema = Nokogiri::XML::RelaxNG.new( File.read(ADDRESS_SCHEMA_FILE)) assert_instance_of Nokogiri::XML::RelaxNG, schema end def test_parse_with_io xsd = nil File.open(ADDRESS_SCHEMA_FILE, 'rb') { |f| assert xsd = Nokogiri::XML::RelaxNG(f) } assert_equal 0, xsd.errors.length end def test_parse_with_errors xml = File.read(ADDRESS_SCHEMA_FILE).sub(/name="/, 'name=') assert_raises(Nokogiri::XML::SyntaxError) { Nokogiri::XML::RelaxNG(xml) } end def test_validate_document doc = Nokogiri::XML(File.read(ADDRESS_XML_FILE)) assert errors = @schema.validate(doc) assert_equal 0, errors.length end def test_validate_invalid_document # Empty address book is not allowed read_doc = '' assert errors = @schema.validate(Nokogiri::XML(read_doc)) assert_equal 1, errors.length end def test_valid? valid_doc = Nokogiri::XML(File.read(ADDRESS_XML_FILE)) invalid_doc = Nokogiri::XML('') assert(@schema.valid?(valid_doc)) assert(!@schema.valid?(invalid_doc)) end end end end nokogiri-1.8.2/test/xml/test_parse_options.rb0000644000004100000410000000332213235345655021436 0ustar www-datawww-datarequire "helper" module Nokogiri module XML class TestParseOptions < Nokogiri::TestCase def test_new options = Nokogiri::XML::ParseOptions.new assert_equal 0, options.options end def test_to_i options = Nokogiri::XML::ParseOptions.new assert_equal 0, options.to_i end ParseOptions.constants.each do |constant| next if constant == 'STRICT' class_eval %{ def test_predicate_#{constant.downcase} options = ParseOptions.new(ParseOptions::#{constant}) assert options.#{constant.downcase}? assert ParseOptions.new.#{constant.downcase}.#{constant.downcase}? end } end def test_strict_noent options = ParseOptions.new.recover.noent assert !options.strict? end def test_new_with_argument options = Nokogiri::XML::ParseOptions.new 1 << 1 assert_equal 1 << 1, options.options end def test_unsetting options = Nokogiri::XML::ParseOptions.new Nokogiri::XML::ParseOptions::DEFAULT_HTML assert options.nonet? assert options.recover? options.nononet.norecover assert ! options.nonet? assert ! options.recover? options.nonet.recover assert options.nonet? assert options.recover? end def test_chaining options = Nokogiri::XML::ParseOptions.new.recover.noent assert options.recover? assert options.noent? end def test_inspect options = Nokogiri::XML::ParseOptions.new.recover.noent ins = options.inspect assert_match(/recover/, ins) assert_match(/noent/, ins) end end end end nokogiri-1.8.2/test/xml/test_document_fragment.rb0000644000004100000410000002373313235345655022262 0ustar www-datawww-datarequire "helper" module Nokogiri module XML class TestDocumentFragment < Nokogiri::TestCase def setup super @xml = Nokogiri::XML.parse(File.read(XML_FILE), XML_FILE) end def test_replace_text_node html = "foo" doc = Nokogiri::XML::DocumentFragment.parse(html) doc.children[0].replace "bar" assert_equal 'bar', doc.children[0].content end def test_fragment_is_relative doc = Nokogiri::XML('') ctx = doc.root.child fragment = Nokogiri::XML::DocumentFragment.new(doc, '', ctx) hello = fragment.child assert_equal 'hello', hello.name assert_equal doc.root.child.namespace, hello.namespace end def test_node_fragment_is_relative doc = Nokogiri::XML('') assert doc.root.child fragment = doc.root.child.fragment('') hello = fragment.child assert_equal 'hello', hello.name assert_equal doc.root.child.namespace, hello.namespace end def test_new assert Nokogiri::XML::DocumentFragment.new(@xml) end def test_fragment_should_have_document fragment = Nokogiri::XML::DocumentFragment.new(@xml) assert_equal @xml, fragment.document end def test_name fragment = Nokogiri::XML::DocumentFragment.new(@xml) assert_equal '#document-fragment', fragment.name end def test_static_method fragment = Nokogiri::XML::DocumentFragment.parse("
a
") assert_instance_of Nokogiri::XML::DocumentFragment, fragment end def test_static_method_with_namespaces # follows different path in FragmentHandler#start_element which blew up after 597195ff fragment = Nokogiri::XML::DocumentFragment.parse("a") assert_instance_of Nokogiri::XML::DocumentFragment, fragment end def test_many_fragments 100.times { Nokogiri::XML::DocumentFragment.new(@xml) } end def test_subclass klass = Class.new(Nokogiri::XML::DocumentFragment) fragment = klass.new(@xml, "
a
") assert_instance_of klass, fragment end def test_subclass_parse klass = Class.new(Nokogiri::XML::DocumentFragment) doc = klass.parse("
a
") assert_instance_of klass, doc end def test_unparented_text_node_parse fragment = Nokogiri::XML::DocumentFragment.parse("foo") fragment.children.after("") end def test_xml_fragment fragment = Nokogiri::XML.fragment("
a
") assert_equal "
a
", fragment.to_s end def test_xml_fragment_has_multiple_toplevel_children doc = "
b
e
" fragment = Nokogiri::XML::Document.new.fragment(doc) assert_equal "
b
e
", fragment.to_s end def test_xml_fragment_has_outer_text # this test is descriptive, not prescriptive. doc = "a
b
" fragment = Nokogiri::XML::Document.new.fragment(doc) assert_equal "a
b
", fragment.to_s doc = "
b
c" fragment = Nokogiri::XML::Document.new.fragment(doc) assert_equal "
b
c", fragment.to_s end def test_xml_fragment_case_sensitivity doc = "b" fragment = Nokogiri::XML::Document.new.fragment(doc) assert_equal "b", fragment.to_s end def test_xml_fragment_with_leading_whitespace doc = "
b
" fragment = Nokogiri::XML::Document.new.fragment(doc) assert_equal "
b
", fragment.to_s end def test_xml_fragment_with_leading_whitespace_and_newline doc = " \n
b
" fragment = Nokogiri::XML::Document.new.fragment(doc) assert_equal " \n
b
", fragment.to_s end def test_fragment_children_search fragment = Nokogiri::XML::Document.new.fragment( '

hi

' ) expected = fragment.children.xpath('.//p') assert_equal 1, expected.length css = fragment.children.css('p') search_css = fragment.children.search('p') search_xpath = fragment.children.search('.//p') assert_equal expected, css assert_equal expected, search_css assert_equal expected, search_xpath end def test_fragment_css_search_with_whitespace_and_node_removal # The same xml without leading whitespace in front of the first line # does not expose the error. Putting both nodes on the same line # instead also fixes the crash. fragment = Nokogiri::XML::DocumentFragment.parse <<-EOXML

hi

x

another paragraph

EOXML children = fragment.css('p') assert_equal 2, children.length # removing the last node instead does not yield the error. Probably the # node removal leaves around two consecutive text nodes which make the # css search crash? children.first.remove assert_equal 1, fragment.xpath('.//p | self::p').length assert_equal 1, fragment.css('p').length end def test_fragment_search_three_ways frag = Nokogiri::XML::Document.new.fragment '

foo

bar

' expected = frag.xpath('./*[@id = "content"]') assert_equal 2, expected.length [ [:css, '#content'], [:search, '#content'], [:search, './*[@id = \'content\']'], ].each do |method, query| result = frag.send(method, query) assert_equal(expected, result, "fragment search with :#{method} using '#{query}' expected '#{expected}' got '#{result}'") end end def test_fragment_search_with_multiple_queries xml = '
important thing
stuff

more stuff

' fragment = Nokogiri::XML.fragment(xml) assert_kind_of Nokogiri::XML::DocumentFragment, fragment assert_equal 3, fragment.xpath('.//div', './/p').length assert_equal 3, fragment.css('.title', '.content', 'p').length assert_equal 3, fragment.search('.//div', 'p.blah').length end def test_fragment_without_a_namespace_does_not_get_a_namespace doc = Nokogiri::XML <<-EOX EOX frag = doc.fragment "" assert_nil frag.namespace end def test_fragment_namespace_resolves_against_document_root doc = Nokogiri::XML <<-EOX EOX ns = doc.root.namespace_definitions.detect { |x| x.prefix == "bar" } frag = doc.fragment "" assert frag.children.first.namespace assert_equal ns, frag.children.first.namespace end def test_fragment_invalid_namespace_is_silently_ignored doc = Nokogiri::XML <<-EOX EOX frag = doc.fragment "" assert_nil frag.children.first.namespace end def test_decorator_is_applied x = Module.new do def awesome! end end util_decorate(@xml, x) fragment = Nokogiri::XML::DocumentFragment.new(@xml, "
a
b
") assert node_set = fragment.css('div') assert node_set.respond_to?(:awesome!) node_set.each do |node| assert node.respond_to?(:awesome!), node.class end assert fragment.children.respond_to?(:awesome!), fragment.children.class end def test_decorator_is_applied_to_empty_set x = Module.new do def awesome! end end util_decorate(@xml, x) fragment = Nokogiri::XML::DocumentFragment.new(@xml, "") assert fragment.children.respond_to?(:awesome!), fragment.children.class end def test_add_node_to_doc_fragment_segfault frag = Nokogiri::XML::DocumentFragment.new(@xml, '

hello world

') Nokogiri::XML::Comment.new(frag,'moo') end def test_issue_1077_parsing_of_frozen_strings input = <<-EOS EOS input.freeze Nokogiri::XML::DocumentFragment.parse(input) # assert_nothing_raised end if Nokogiri.uses_libxml? def test_for_libxml_in_context_fragment_parsing_bug_workaround 10.times do begin fragment = Nokogiri::XML.fragment("
") parent = fragment.children.first child = parent.parse("

").first parent.add_child child end GC.start end end def test_for_libxml_in_context_memory_badness_when_encountering_encoding_errors # see issue #643 for background # this test exists solely to raise an error during valgrind test runs. html = <<-EOHTML
Foo
EOHTML doc = Nokogiri::HTML html doc.at_css("div").replace("Bar") end end end end end nokogiri-1.8.2/test/xml/test_namespace.rb0000644000004100000410000000563613235345655020517 0ustar www-datawww-datarequire "helper" module Nokogiri module XML class TestNamespace < Nokogiri::TestCase def setup super @xml = Nokogiri::XML <<-eoxml eoxml end if Nokogiri.uses_libxml? def test_namespace_is_in_node_cache node = @xml.root.namespace assert @xml.instance_variable_get(:@node_cache).include?(node) end end def test_built_nodes_keep_namespace_decls doc = Document.new e = Node.new 'element', doc c = Node.new 'child', doc c.default_namespace = 'woop:de:doo' assert c.namespace, 'has a namespace' e.add_child c assert c.namespace, 'has a namespace' doc.add_child e assert c.namespace, 'has a namespace' end def test_inspect ns = @xml.root.namespace assert_equal "#<#{ns.class.name}:#{sprintf("0x%x", ns.object_id)} href=#{ns.href.inspect}>", ns.inspect end def test_namespace_node_prefix namespaces = @xml.root.namespace_definitions assert_equal [nil, 'foo'], namespaces.map(&:prefix) end def test_namespace_node_href namespaces = @xml.root.namespace_definitions assert_equal [ 'http://tenderlovemaking.com/', 'bar' ], namespaces.map(&:href) end def test_equality namespaces = @xml.root.namespace_definitions assert_equal namespaces, @xml.root.namespace_definitions end def test_add_definition @xml.root.add_namespace_definition('baz', 'bar') assert_equal 3, @xml.root.namespace_definitions.length end def test_add_definition_return ns = @xml.root.add_namespace_definition('baz', 'bar') assert_equal 'baz', ns.prefix end def test_remove_entity_namespace s = %q{]>} Nokogiri::XML(s).remove_namespaces! # TODO: we should probably assert something here. See commit 14d2f59. end def test_maintain_element_namespaces doc = Document.new subject = Nokogiri::XML::Node.new 'foo', doc subject << '' child = subject.children.first assert_equal 'foobar', child.name assert_equal 'barfoo', child.namespace.href assert_empty child.attributes end def test_maintain_element_namespaces_in_urn doc = Document.new subject = Nokogiri::XML::Node.new 'foo', doc subject << '' child = subject.children.first assert_equal 'foobar', child.name assert_equal 'urn:xmpp:foospec:barfoo', child.namespace.href assert_empty child.attributes end end end end nokogiri-1.8.2/test/xml/test_comment.rb0000644000004100000410000000201113235345655020205 0ustar www-datawww-datarequire "helper" module Nokogiri module XML class TestComment < Nokogiri::TestCase def setup super @xml = Nokogiri::XML.parse(File.read(XML_FILE), XML_FILE) end def test_new comment = Nokogiri::XML::Comment.new(@xml, 'hello world') assert_equal('', comment.to_s) end def test_comment? comment = Nokogiri::XML::Comment.new(@xml, 'hello world') assert(comment.comment?) assert(!@xml.root.comment?) end def test_passing_a_node_uses_the_node_document comment = Nokogiri::XML::Comment.new(@xml.at_css("employee"), 'hello world') assert_equal @xml, comment.document end def test_passing_anything_else assert_raises ArgumentError do Nokogiri::XML::Comment.new("NOT A NOKOGIRI CLASS", 'hello world') end end def test_many_comments 100.times { Nokogiri::XML::Comment.new(@xml, 'hello world') } end end end end nokogiri-1.8.2/test/xml/test_node_inheritance.rb0000644000004100000410000000130613235345655022047 0ustar www-datawww-data# issue#560 require 'helper' module Nokogiri module XML class TestNodeInheritance < Nokogiri::TestCase MyNode = Class.new Nokogiri::XML::Node def setup super @node = MyNode.new 'foo', Nokogiri::XML::Document.new @node['foo'] = 'bar' end def test_node_name assert @node.name == 'foo' end def test_node_writing_an_attribute_accessing_via_attributes assert @node.attributes['foo'] end def test_node_writing_an_attribute_accessing_via_key assert @node.key? 'foo' end def test_node_writing_an_attribute_accessing_via_brackets assert @node['foo'] == 'bar' end end end end nokogiri-1.8.2/test/xml/test_attr.rb0000644000004100000410000000420613235345655017525 0ustar www-datawww-datarequire "helper" module Nokogiri module XML class TestAttr < Nokogiri::TestCase def test_new 100.times { doc = Nokogiri::XML::Document.new assert doc assert Nokogiri::XML::Attr.new(doc, 'foo') } end def test_new_raises_argerror_on_nondocument document = Nokogiri::XML "" assert_raises ArgumentError do Nokogiri::XML::Attr.new document.at_css("foo"), "bar" end end def test_content= xml = Nokogiri::XML.parse(File.read(XML_FILE), XML_FILE) address = xml.xpath('//address')[3] street = address.attributes['street'] street.content = "Y&ent1;" assert_equal "Y&ent1;", street.value end def test_value= xml = Nokogiri::XML.parse(File.read(XML_FILE), XML_FILE) address = xml.xpath('//address')[3] street = address.attributes['street'] street.value = "Y&ent1;" assert_equal "Y&ent1;", street.value end def test_unlink # aliased as :remove xml = Nokogiri::XML.parse(File.read(XML_FILE), XML_FILE) address = xml.xpath('/staff/employee/address').first assert_equal 'Yes', address['domestic'] attr = address.attribute_nodes.first return_val = attr.unlink assert_nil address['domestic'] assert_equal attr, return_val end def test_parsing_attribute_namespace doc = Nokogiri::XML <<-EOXML
EOXML node = doc.at_css "div" attr = node.attributes["myattr"] assert_equal "http://flavorjon.es/", attr.namespace.href end def test_setting_attribute_namespace doc = Nokogiri::XML <<-EOXML
EOXML node = doc.at_css "div" attr = node.attributes["myattr"] attr.add_namespace("fizzle", "http://fizzle.com/") assert_equal "http://fizzle.com/", attr.namespace.href end end end end nokogiri-1.8.2/test/xml/node/0000755000004100000410000000000013235345655016112 5ustar www-datawww-datanokogiri-1.8.2/test/xml/node/test_save_options.rb0000644000004100000410000000143713235345655022214 0ustar www-datawww-datarequire "helper" module Nokogiri module XML class Node class TestSaveOptions < Nokogiri::TestCase SaveOptions.constants.each do |constant| class_eval <<-EOEVAL def test_predicate_#{constant.downcase} options = SaveOptions.new(SaveOptions::#{constant}) assert options.#{constant.downcase}? assert SaveOptions.new.#{constant.downcase}.#{constant.downcase}? end EOEVAL end def test_default_xml_save_options if Nokogiri.jruby? assert_equal 0, (SaveOptions::DEFAULT_XML & SaveOptions::FORMAT) else assert_equal SaveOptions::FORMAT, (SaveOptions::DEFAULT_XML & SaveOptions::FORMAT) end end end end end end nokogiri-1.8.2/test/xml/node/test_subclass.rb0000644000004100000410000000303113235345655021312 0ustar www-datawww-datarequire "helper" module Nokogiri module XML class Node class TestSubclass < Nokogiri::TestCase { Nokogiri::XML::CDATA => 'doc, "foo"', Nokogiri::XML::Attr => 'doc, "foo"', Nokogiri::XML::Comment => 'doc, "foo"', Nokogiri::XML::EntityReference => 'doc, "foo"', Nokogiri::XML::ProcessingInstruction => 'doc, "foo", "bar"', Nokogiri::XML::DocumentFragment => 'doc', Nokogiri::XML::Node => '"foo", doc', Nokogiri::XML::Text => '"foo", doc', }.each do |klass, constructor| class_eval %{ def test_subclass_#{klass.name.gsub('::', '_')} doc = Nokogiri::XML::Document.new klass = Class.new(#{klass.name}) node = klass.new(#{constructor}) assert_instance_of klass, node end } class_eval <<-eocode, __FILE__, __LINE__ + 1 def test_subclass_initialize_#{klass.name.gsub('::', '_')} doc = Nokogiri::XML::Document.new klass = Class.new(#{klass.name}) do attr_accessor :initialized_with def initialize *args @initialized_with = args end end node = klass.new(#{constructor}, 1) assert_equal [#{constructor}, 1], node.initialized_with end eocode end end end end end nokogiri-1.8.2/test/xml/test_xinclude.rb0000644000004100000410000000516313235345655020371 0ustar www-datawww-datarequire "helper" module Nokogiri module XML class TestXInclude < Nokogiri::TestCase def setup super @xml = Nokogiri::XML.parse(File.read(XML_XINCLUDE_FILE), XML_XINCLUDE_FILE) @included = "this snippet is to be included from xinclude.xml" end def test_xinclude_on_document_parse skip("Pure Java version XInlcude has a conflict with NekoDTD setting. This will be fixed later.") if Nokogiri.jruby? # first test that xinclude works when requested xml_doc = nil File.open(XML_XINCLUDE_FILE) do |fp| xml_doc = Nokogiri::XML(fp) do |conf| conf.strict.dtdload.noent.nocdata.xinclude end end assert_not_nil xml_doc assert_not_nil included = xml_doc.at_xpath('//included') assert_equal @included, included.content # no xinclude should happen when not requested xml_doc = nil File.open(XML_XINCLUDE_FILE) do |fp| xml_doc = Nokogiri::XML(fp) do |conf| conf.strict.dtdload.noent.nocdata end end assert_not_nil xml_doc assert_nil xml_doc.at_xpath('//included') end def test_xinclude_on_document_node skip("Pure Java version turns XInlcude on against a parser.") if Nokogiri.jruby? assert_nil @xml.at_xpath('//included') @xml.do_xinclude assert_not_nil included = @xml.at_xpath('//included') assert_equal @included, included.content end def test_xinclude_on_element_subtree skip("Pure Java version turns XInlcude on against a parser.") if Nokogiri.jruby? assert_nil @xml.at_xpath('//included') @xml.root.do_xinclude assert_not_nil included = @xml.at_xpath('//included') assert_equal @included, included.content end def test_do_xinclude_accepts_block non_default_options = Nokogiri::XML::ParseOptions::NOBLANKS | \ Nokogiri::XML::ParseOptions::XINCLUDE @xml.do_xinclude(non_default_options) do |options| assert_equal non_default_options, options.to_i end end def test_include_nonexistent_throws_exception skip("Pure Java version behaves differently") if Nokogiri.jruby? # break inclusion deliberately @xml.at_xpath('//xi:include')['href'] = "nonexistent.xml" exception_raised = false begin @xml.do_xinclude { |opts| opts.nowarning } rescue Exception => e assert_equal Nokogiri::XML::SyntaxError, e.class exception_raised = true end assert exception_raised end end end end nokogiri-1.8.2/test/xml/test_c14n.rb0000644000004100000410000001271013235345655017317 0ustar www-datawww-datarequire "helper" module Nokogiri module XML class TestC14N < Nokogiri::TestCase # http://www.w3.org/TR/xml-c14n#Example-OutsideDoc def test_3_1 doc = Nokogiri.XML <<-eoxml Hello, world! eoxml c14n = doc.canonicalize assert_no_match(/version=/, c14n) assert_match(/Hello, world/, c14n) assert_no_match(/Comment/, c14n) c14n = doc.canonicalize(nil, nil, true) assert_match(/Comment/, c14n) c14n = doc.canonicalize(nil, nil, false) assert_no_match(/Comment/, c14n) end def test_exclude_block_params xml = '
' doc = Nokogiri.XML xml list = [] doc.canonicalize do |node, parent| list << [node, parent] true end if Nokogiri.jruby? assert_equal( ['a', 'document', 'document', nil, 'b', 'a'], list.flatten.map { |x| x ? x.name : x } ) else assert_equal( ['a', 'document', 'document', nil, 'b', 'a', 'a', 'document'], list.flatten.map { |x| x ? x.name : x } ) end end def test_exclude_block_true xml = '' doc = Nokogiri.XML xml c14n = doc.canonicalize do |node, parent| true end assert_equal xml, c14n end def test_exclude_block_false xml = '' doc = Nokogiri.XML xml c14n = doc.canonicalize do |node, parent| false end assert_equal '', c14n end def test_exclude_block_nil xml = '' doc = Nokogiri.XML xml c14n = doc.canonicalize do |node, parent| nil end assert_equal '', c14n end def test_exclude_block_object xml = '' doc = Nokogiri.XML xml c14n = doc.canonicalize do |node, parent| Object.new end assert_equal xml, c14n end def test_c14n_node xml = '' doc = Nokogiri.XML xml c14n = doc.at_xpath('//b').canonicalize assert_equal '', c14n end def test_c14n_modes # http://www.w3.org/TR/xml-exc-c14n/#sec-Enveloping doc1 = Nokogiri.XML <<-EOXML EOXML doc2 = Nokogiri.XML <<-EOXML EOXML c14n = doc1.at_xpath('//n1:elem2', {'n1' => 'http://example.net'}).canonicalize assert_equal ' ', c14n expected = ' ' c14n = doc2.at_xpath('//n1:elem2', {'n1' => 'http://example.net'}).canonicalize assert_equal expected, c14n expected = ' ' c14n = doc1.at_xpath('//n1:elem2', {'n1' => 'http://example.net'}).canonicalize(XML::XML_C14N_EXCLUSIVE_1_0) assert_equal expected, c14n expected = ' ' c14n = doc2.at_xpath('//n1:elem2', {'n1' => 'http://example.net'}).canonicalize(XML::XML_C14N_EXCLUSIVE_1_0) assert_equal expected, c14n expected = ' ' c14n = doc2.at_xpath('//n1:elem2', {'n1' => 'http://example.net'}).canonicalize(XML::XML_C14N_EXCLUSIVE_1_0, ['n2']) assert_equal expected, c14n expected = ' ' c14n = doc2.at_xpath('//n1:elem2', {'n1' => 'http://example.net'}).canonicalize(XML::XML_C14N_EXCLUSIVE_1_0, ['n2', 'n4']) assert_equal expected, c14n end def test_wrong_params xml = '' doc = Nokogiri.XML xml assert_raise(TypeError){ doc.canonicalize :wrong_type } assert_raise(TypeError){ doc.canonicalize nil, :wrong_type } doc.canonicalize nil, nil, :wrong_type end end end end nokogiri-1.8.2/test/namespaces/0000755000004100000410000000000013235345655016504 5ustar www-datawww-datanokogiri-1.8.2/test/namespaces/test_namespaces_in_parsed_doc.rb0000644000004100000410000000542613235345655025067 0ustar www-datawww-datarequire "helper" module Nokogiri module XML class TestNamespacesInParsedDoc < Nokogiri::TestCase def setup super @doc = Nokogiri::XML <<-eoxml eoxml end def check_namespace e e.namespace.nil? ? nil : e.namespace.href end def test_parsed_default_ns assert_equal 'ns:fruit', check_namespace(@doc.root) end def test_parsed_parent_default_ns assert_equal 'ns:fruit', check_namespace(@doc.root.elements[0]) assert_equal 'ns:fruit', check_namespace(@doc.root.elements[1]) end def test_parsed_grandparent_default_ns assert_equal 'ns:fruit', check_namespace(@doc.root.elements[0].elements[0]) end def test_parsed_parent_nondefault_ns assert_equal 'ns:veg', check_namespace(@doc.root.elements[2]) end def test_parsed_single_decl_ns_1 assert_equal 'ns:dairy', check_namespace(@doc.root.elements[2].elements[0]) end def test_parsed_nondefault_attr_ns assert_equal 'http://www.w3.org/1999/xlink', check_namespace(@doc.root.elements[2].elements[0].attribute_nodes.find { |a| a.name =~ /href/ }) end def test_parsed_single_decl_ns_2 assert_equal 'ns:meat', check_namespace(@doc.root.elements[3]) end def test_parsed_buried_default_ns assert_equal 'ns:fruit', check_namespace(@doc.root.elements[3].elements[0]) end def test_parsed_buried_decl_ns assert_equal 'ns:veg', check_namespace(@doc.root.elements[3].elements[1]) end def test_parsed_namespace_count n = @doc.root.clone n.children.each(&:remove) ns_attrs = n.to_xml.scan(/\bxmlns(?::.+?)?=/) assert_equal 3, ns_attrs.length end def test_namespaces_under_memory_pressure_issue1155 skip("JRuby doesn't do GC.") if Nokogiri.jruby? # this test is here to emit warnings when run under valgrind # see https://github.com/sparklemotion/nokogiri/issues/1155 for background filename = File.join ASSETS_DIR, 'namespace_pressure_test.xml' doc = Nokogiri::XML File.open(filename) # bizarrely, can't repro without the call to #to_a doc.xpath('//namespace::*').to_a.each do |ns| ns.inspect end end end end end nokogiri-1.8.2/test/namespaces/test_namespaces_preservation.rb0000755000004100000410000000246513235345655025022 0ustar www-datawww-datarequire "helper" module Nokogiri module XML class TestNamespacePreservation < Nokogiri::TestCase def setup @xml = Nokogiri.XML <<-eoxml eoxml end def test_xpath first = @xml.at_xpath('//xs:element', 'xs' => 'http://www.w3.org/2001/XMLSchema') last = @xml.at_xpath('//xs:element[last()]', 'xs' => 'http://www.w3.org/2001/XMLSchema') assert_equal 'http://api.geotrust.com/webtrust/query' , first.namespaces['xmlns:quer'], "Should contain quer namespace" assert_equal 'http://api.geotrust.com/webtrust/query' , last.namespaces['xmlns:quer'], "Should contain quer namespace" end def test_traversing first = @xml.root.element_children.first last = @xml.root.element_children.last assert_equal 'http://api.geotrust.com/webtrust/query' , first.namespaces['xmlns:quer'], "Should contain quer namespace" assert_equal 'http://api.geotrust.com/webtrust/query' , last.namespaces['xmlns:quer'], "Should contain quer namespace" end end end end nokogiri-1.8.2/test/namespaces/test_namespaces_in_created_doc.rb0000644000004100000410000000551213235345655025214 0ustar www-datawww-datarequire "helper" module Nokogiri module XML class TestNamespacesInCreatedDoc < Nokogiri::TestCase def setup super @doc = Nokogiri::XML('') pear = @doc.create_element('pear') bosc = @doc.create_element('bosc') pear.add_child(bosc) @doc.root << pear @doc.root.add_child('') carrot = @doc.create_element('veg:carrot') @doc.root << carrot cheese = @doc.create_element('cheese', :xmlns => 'ns:dairy', :'xlink:href' => 'http://example.com/cheese/') carrot << cheese bacon = @doc.create_element('meat:bacon', :'xmlns:meat' => 'ns:meat') apple = @doc.create_element('apple') apple['count'] = 2 bacon << apple tomato = @doc.create_element('veg:tomato') bacon << tomato @doc.root << bacon end def check_namespace e e.namespace.nil? ? nil : e.namespace.href end def test_created_default_ns assert_equal 'ns:fruit', check_namespace(@doc.root) end def test_created_parent_default_ns assert_equal 'ns:fruit', check_namespace(@doc.root.elements[0]) assert_equal 'ns:fruit', check_namespace(@doc.root.elements[1]) end def test_created_grandparent_default_ns assert_equal 'ns:fruit', check_namespace(@doc.root.elements[0].elements[0]) end def test_created_parent_nondefault_ns assert_equal 'ns:veg', check_namespace(@doc.root.elements[2]) end def test_created_single_decl_ns_1 assert_equal 'ns:dairy', check_namespace(@doc.root.elements[2].elements[0]) end def test_created_nondefault_attr_ns assert_equal 'http://www.w3.org/1999/xlink', check_namespace(@doc.root.elements[2].elements[0].attribute_nodes.find { |a| a.name =~ /href/ }) end def test_created_single_decl_ns_2 assert_equal 'ns:meat', check_namespace(@doc.root.elements[3]) end def test_created_buried_default_ns assert_equal 'ns:fruit', check_namespace(@doc.root.elements[3].elements[0]) end def test_created_buried_decl_ns assert_equal 'ns:veg', check_namespace(@doc.root.elements[3].elements[1]) end def test_created_namespace_count n = @doc.root.clone n.children.each(&:remove) ns_attrs = n.to_xml.scan(/\bxmlns(?::.+?)?=/) assert_equal 3, ns_attrs.length end def test_created_namespaced_attribute_on_unparented_node doc = Nokogiri::XML('') node = @doc.create_element('obj', 'foo:attr' => 'baz') doc.root.add_child(node) assert_equal 'http://foo.io', doc.root.children.first.attribute_nodes.first.namespace.href end end end end nokogiri-1.8.2/test/namespaces/test_namespaces_in_builder_doc.rb0000644000004100000410000000511513235345655025232 0ustar www-datawww-datarequire "helper" module Nokogiri module XML class TestNamespacesInBuilderDoc < Nokogiri::TestCase def setup super b = Nokogiri::XML::Builder.new do |x| x.fruit(:xmlns => 'ns:fruit', :'xmlns:veg' => 'ns:veg', :'xmlns:xlink' => 'http://www.w3.org/1999/xlink') do x.pear { x.bosc } x.orange x[:veg].carrot do x.cheese(:xmlns => 'ns:dairy', :'xlink:href' => 'http://example.com/cheese/') end x[:meat].bacon(:'xmlns:meat' => 'ns:meat') do x.apple :count => 2 x[:veg].tomato end end end @doc = b.doc end def check_namespace e e.namespace.nil? ? nil : e.namespace.href end def test_builder_default_ns assert_equal 'ns:fruit', check_namespace(@doc.root) end def test_builder_parent_default_ns assert_equal 'ns:fruit', check_namespace(@doc.root.elements[0]) assert_equal 'ns:fruit', check_namespace(@doc.root.elements[1]) end def test_builder_grandparent_default_ns assert_equal 'ns:fruit', check_namespace(@doc.root.elements[0].elements[0]) end def test_builder_parent_nondefault_ns assert_equal 'ns:veg', check_namespace(@doc.root.elements[2]) end def test_builder_single_decl_ns_1 assert_equal 'ns:dairy', check_namespace(@doc.root.elements[2].elements[0]) end def test_builder_nondefault_attr_ns assert_equal 'http://www.w3.org/1999/xlink', check_namespace(@doc.root.elements[2].elements[0].attribute_nodes.find { |a| a.name =~ /href/ }) end def test_builder_single_decl_ns_2 assert_equal 'ns:meat', check_namespace(@doc.root.elements[3]) end def test_builder_buried_default_ns assert_equal 'ns:fruit', check_namespace(@doc.root.elements[3].elements[0]) end def test_builder_buried_decl_ns assert_equal 'ns:veg', check_namespace(@doc.root.elements[3].elements[1]) end def test_builder_namespace_count n = @doc.root.clone n.children.each(&:remove) ns_attrs = n.to_xml.scan(/\bxmlns(?::.+?)?=/) assert_equal 3, ns_attrs.length end def test_builder_namespaced_attribute_on_unparented_node doc = Nokogiri::XML::Builder.new do |x| x.root('xmlns:foo' => 'http://foo.io') { x.obj('foo:attr' => 'baz') } end.doc assert_equal 'http://foo.io', doc.root.children.first.attribute_nodes.first.namespace.href end end end end nokogiri-1.8.2/test/namespaces/test_additional_namespaces_in_builder_doc.rb0000644000004100000410000000055713235345655027427 0ustar www-datawww-datarequire "helper" module Nokogiri module XML class TestAdditionalNamespacesInBuilderDoc < Nokogiri::TestCase def test_builder_namespaced_root_node_ns b = Nokogiri::XML::Builder.new do |x| x[:foo].RDF(:'xmlns:foo' => 'http://foo.io') end assert_equal 'http://foo.io', b.doc.root.namespace.href end end end end nokogiri-1.8.2/test/namespaces/test_namespaces_in_cloned_doc.rb0000644000004100000410000000141213235345655025044 0ustar www-datawww-datarequire "helper" module Nokogiri module XML class TestNamespacesInClonedDoc < Nokogiri::TestCase def setup super b = Nokogiri::XML::Builder.new do |xml| xml.mods("xmlns"=>"http://www.loc.gov/mods/v3") { xml.name(:type=>"personal") { xml.namePart() } } end @doc = b.doc @clone = Nokogiri::XML(@doc.to_s) end def check_namespace e e.namespace.nil? ? nil : e.namespace.href end def test_namespace_ns xpath = '//oxns:name[@type="personal"]' namespaces = {'oxns' => "http://www.loc.gov/mods/v3"} assert_equal @doc.xpath(xpath, namespaces).length, @clone.xpath(xpath, namespaces).length end end end endnokogiri-1.8.2/test/namespaces/test_namespaces_aliased_default.rb0000644000004100000410000000135313235345655025377 0ustar www-datawww-datarequire "helper" module Nokogiri module XML class TestAliasedDefaultNamespaces < Nokogiri::TestCase def setup super end def test_alised_default_namespace_on_parse doc = Nokogiri::XML('') ns = doc.root.namespaces assert_equal "ns:fruit", ns["xmlns:fruit"], "Should have parsed aliased default namespace" end def test_add_aliased_default_namespace doc = Nokogiri::XML('') doc.root.add_namespace_definition("fruit", "ns:fruit") ns = doc.root.namespaces assert_equal "ns:fruit", ns["xmlns:fruit"],"Should have added aliased default namespace" end end end end nokogiri-1.8.2/test/decorators/0000755000004100000410000000000013235345655016532 5ustar www-datawww-datanokogiri-1.8.2/test/decorators/test_slop.rb0000644000004100000410000000115013235345655021070 0ustar www-datawww-datarequire "helper" module Nokogiri class TestSlop < Nokogiri::TestCase def test_description_tag doc = Nokogiri.Slop(<<-eoxml) foo this is the foo thing eoxml assert doc.item.respond_to?(:title) assert_equal 'foo', doc.item.title.text assert doc.item.respond_to?(:_description), 'should have description' assert_equal 'this is the foo thing', doc.item._description.text assert !doc.item.respond_to?(:foo) assert_raise(NoMethodError) { doc.item.foo } end end end nokogiri-1.8.2/test/test_soap4r_sax.rb0000644000004100000410000000176113235345655020041 0ustar www-datawww-datarequire "helper" module XSD module XMLParser class Parser @factory_added = nil class << self; attr_reader :factory_added; end def self.add_factory o @factory_added = o end def initialize *args @charset = nil end def characters foo end def start_element *args end def end_element *args end end end end require 'xsd/xmlparser/nokogiri' class TestSoap4rSax < Nokogiri::TestCase def test_factory_added assert_equal XSD::XMLParser::Nokogiri, XSD::XMLParser::Nokogiri.factory_added end def test_parse o = Class.new(::XSD::XMLParser::Nokogiri) do attr_accessor :element_started def initialize *args super @element_started = false end def start_element *args @element_started = true end end.new 'foo' o.do_parse '' assert o.element_started, 'element started' end end nokogiri-1.8.2/test/test_nokogiri.rb0000644000004100000410000000730013235345655017572 0ustar www-datawww-datarequire "helper" class TestNokogiri < Nokogiri::TestCase def test_versions version_match = /\d+\.\d+\.\d+/ assert_match version_match, Nokogiri::VERSION assert_equal Nokogiri::VERSION_INFO['ruby']['version'], ::RUBY_VERSION assert_equal Nokogiri::VERSION_INFO['ruby']['platform'], ::RUBY_PLATFORM if Nokogiri.uses_libxml? assert_match version_match, Nokogiri::LIBXML_VERSION assert_equal 'extension', Nokogiri::VERSION_INFO['libxml']['binding'] assert_match version_match, Nokogiri::VERSION_INFO['libxml']['compiled'] assert_equal Nokogiri::LIBXML_VERSION, Nokogiri::VERSION_INFO['libxml']['compiled'] assert_match version_match, Nokogiri::VERSION_INFO['libxml']['loaded'] Nokogiri::LIBXML_PARSER_VERSION =~ /(\d)(\d{2})(\d{2})/ major = $1.to_i minor = $2.to_i bug = $3.to_i assert_equal "#{major}.#{minor}.#{bug}", Nokogiri::VERSION_INFO['libxml']['loaded'] end end def test_libxml_iconv assert Nokogiri.const_defined?(:LIBXML_ICONV_ENABLED) if Nokogiri.uses_libxml? end def test_parse_with_io doc = Nokogiri.parse( StringIO.new("") ) assert_instance_of Nokogiri::HTML::Document, doc end def test_xml? doc = Nokogiri.parse(File.read(XML_FILE)) assert doc.xml? assert !doc.html? end def test_atom_is_xml? doc = Nokogiri.parse(File.read(XML_ATOM_FILE)) assert doc.xml? assert !doc.html? end def test_html? doc = Nokogiri.parse(File.read(HTML_FILE)) assert !doc.xml? assert doc.html? end def test_nokogiri_method_with_html doc1 = Nokogiri(File.read(HTML_FILE)) doc2 = Nokogiri.parse(File.read(HTML_FILE)) assert_equal doc1.serialize, doc2.serialize end def test_nokogiri_method_with_block doc = Nokogiri { b "bold tag" } assert_equal('bold tag', doc.to_html.chomp) end def test_make_with_html doc = Nokogiri.make("bold tag") assert_equal('bold tag', doc.to_html.chomp) end def test_make_with_block doc = Nokogiri.make { b "bold tag" } assert_equal('bold tag', doc.to_html.chomp) end SLOP_HTML = <<-END
  • one
  • two
one
div two
END def test_slop_css doc = Nokogiri::Slop(<<-eohtml)
one
div two
div three
eohtml assert_equal "div", doc.html.body.div.div('.foo').name end def test_slop doc = Nokogiri::Slop(SLOP_HTML) assert_equal "one", doc.html.body.ul.li.first.text assert_equal "two", doc.html.body.ul.li(".blue").text assert_equal "div two", doc.html.body.div.div.text assert_equal "two", doc.html.body.ul.li(:css => ".blue").text assert_equal "two", doc.html.body.ul.li(:xpath => "position()=2").text assert_equal "one", doc.html.body.ul.li(:xpath => ["contains(text(),'o')"]).first.text assert_equal "two", doc.html.body.ul.li(:xpath => ["contains(text(),'o')","contains(text(),'t')"]).text assert_raise(NoMethodError) { doc.nonexistent } end def test_slop_decorator doc = Nokogiri(SLOP_HTML) assert !doc.decorators(Nokogiri::XML::Node).include?(Nokogiri::Decorators::Slop) doc.slop! assert doc.decorators(Nokogiri::XML::Node).include?(Nokogiri::Decorators::Slop) doc.slop! assert_equal 1, doc.decorators(Nokogiri::XML::Node).select { |d| d == Nokogiri::Decorators::Slop }.size end end nokogiri-1.8.2/C_CODING_STYLE.rdoc0000644000004100000410000000115213235345655016443 0ustar www-datawww-data= C/C++ mode style for Nokogiri Please don't propose commits that only change whitespace. However, if your commit touches a function or section that is not using MRI Ruby conventions, feel free to update whitespace in the surrounding code. = WHITESPACE: * indent level: 2 * indent type: Always spaces * line Breaks: LF This style can be automatically applied by running: astyle --indent=spaces=2 --style=1tbs --keep-one-line-blocks $(ack -f --type=cpp --type=cc ext/nokogiri) = FUNCTION DECLARATION: ANSI C style: type name(args) { declarations code } = SOURCES: * <3<3<3 nokogiri-1.8.2/ROADMAP.md0000644000004100000410000000706413235345655015022 0ustar www-datawww-data# Roadmap for API Changes ## overhaul serialize/pretty printing API * https://github.com/sparklemotion/nokogiri/issues/530 XHTML formatting can't be turned off * https://github.com/sparklemotion/nokogiri/issues/415 XML formatting should be no formatting ## overhaul and optimize the SAX parsing * see fairy wing throwdown - SAX parsing is wicked slow. ## Node should not be Enumerable; and should have a better attributes API * https://github.com/sparklemotion/nokogiri/issues/679 Mixing in Enumerable has some unintended consequences; plus we want to improve the attributes API * Some ideas for a better attributes API? * (closed) https://github.com/sparklemotion/nokogiri/issues/666 * https://github.com/sparklemotion/nokogiri/issues/765 ## improve CSS query parsing * https://github.com/sparklemotion/nokogiri/issues/528 support `:not()` with a nontrivial argument, like `:not(div p.c)` * https://github.com/sparklemotion/nokogiri/issues/451 chained :not pseudoselectors * better jQuery selector and CSS pseudo-selector support: * https://github.com/sparklemotion/nokogiri/issues/621 * https://github.com/sparklemotion/nokogiri/issues/342 * https://github.com/sparklemotion/nokogiri/issues/628 * https://github.com/sparklemotion/nokogiri/issues/652 * https://github.com/sparklemotion/nokogiri/issues/688 * https://github.com/sparklemotion/nokogiri/issues/394 nth-of-type is wrong, and possibly other selectors as well * https://github.com/sparklemotion/nokogiri/issues/309 incorrect query being executed * https://github.com/sparklemotion/nokogiri/issues/350 :has is wrong? ## DocumentFragment * there are a few tickets about searches not working properly if you use or do not use the context node as part of the search. - https://github.com/sparklemotion/nokogiri/issues/213 - https://github.com/sparklemotion/nokogiri/issues/370 - https://github.com/sparklemotion/nokogiri/issues/454 - https://github.com/sparklemotion/nokogiri/issues/572 could we fix this by making DocumentFragment be a subclass of NodeSet? ## Better Syntax for custom XPath function handler * https://github.com/sparklemotion/nokogiri/pull/464 ## Better Syntax around Node#xpath and NodeSet#xpath * look at those methods, and use of Node#extract_params in Node#{css,search} * we should standardize on a hash of options for these and other calls * what should NodeSet#xpath return? * https://github.com/sparklemotion/nokogiri/issues/656 ## Encoding We have a lot of issues open around encoding. How bad are things? Somebody who knows encoding well should head this up. * Extract EncodingReader as a real object that can be injected https://groups.google.com/forum/#!msg/nokogiri-talk/arJeAtMqvkg/tGihB-iBRSAJ ## Reader It's fundamentally broken, in that we can't stop people from crashing their application if they want to use object reference unsafely. ## Class methods that require Document There are a few methods, like `Nokogiri::XML::Comment.new` that require a Document object. We should probably make Document instance methods to wrap this, since it's a non-obvious expectation and thus fails as a convention. So, instead, let's make alternative methods like `Nokogiri::XML::Document#new_comment`, and recommend those as the proper convention. ## `collect_namespaces` is just broken `collect_namespaces` is returning a hash, which means it can't return namespaces with the same prefix. See this issue for background: > https://github.com/sparklemotion/nokogiri/issues/885 Do we care? This seems like a useless method, but then again I hate XML, so what do I know? nokogiri-1.8.2/tasks/0000755000004100000410000000000013235345655014533 5ustar www-datawww-datanokogiri-1.8.2/tasks/test.rb0000644000004100000410000000625313235345655016045 0ustar www-datawww-datanamespace :test do desc "run test suite with aggressive GC" task :gc => :build do ENV['NOKOGIRI_GC'] = "true" Rake::Task["test"].invoke end task :installed do ENV['RUBY_FLAGS'] = "-w -Itest:." sh 'rake test' end desc "find call-seq in the rdoc" task :rdoc_call_seq => 'docs' do Dir['doc/**/*.html'].each { |docfile| next if docfile =~ /\.src/ puts "FAIL: #{docfile}" if File.read(docfile) =~ /call-seq/ } end desc "find all undocumented things" task :rdoc => 'docs' do base = File.expand_path(File.join(File.dirname(__FILE__), '..', 'doc')) require 'test/unit' test = Class.new(Test::Unit::TestCase) Dir["#{base}/**/*.html"].each { |docfile| test.class_eval(<<-eotest) def test_#{docfile.sub("#{base}/", '').gsub(/[\/\.-]/, '_')} assert_no_match( /Not documented/, File.read('#{docfile}'), '#{docfile} has undocumented things' ) end eotest } end desc "Test against multiple versions of libxml2 (MULTIXML2_DIR=directory)" task :multixml2 do MULTI_XML = File.join(ENV['HOME'], '.multixml2') unless File.exists?(MULTI_XML) %w{ versions install build }.each { |x| FileUtils.mkdir_p(File.join(MULTI_XML, x)) } Dir.chdir File.join(MULTI_XML, 'versions') do require 'net/ftp' puts "Contacting xmlsoft.org ..." ftp = Net::FTP.new('xmlsoft.org') ftp.login('anonymous', 'anonymous') ftp.chdir('libxml2') ftp.list('libxml2-2.*.tar.gz').each do |x| file = x[/[^\s]*$/] puts "Downloading #{file}" ftp.getbinaryfile(file) end end end # Build any libxml2 versions in $HOME/.multixml2/versions that # haven't been built yet Dir[File.join(MULTI_XML, 'versions','*.tar.gz')].each do |f| filename = File.basename(f, '.tar.gz') install_dir = File.join(MULTI_XML, 'install', filename) next if File.exists?(install_dir) Dir.chdir File.join(MULTI_XML, 'versions') do system "tar zxvf #{f} -C #{File.join(MULTI_XML, 'build')}" end Dir.chdir File.join(MULTI_XML, 'build', filename) do system "./configure --without-http --prefix=#{install_dir}" system "make && make install" end end test_results = {} libxslt = Dir[File.join(MULTI_XML, 'install', 'libxslt*')].first directories = ENV['MULTIXML2_DIR'] ? [ENV['MULTIXML2_DIR']] : Dir[File.join(MULTI_XML, 'install', '*')] directories.sort.reverse_each do |xml2_version| next unless xml2_version =~ /libxml2/ extopts = "--with-xml2-include=#{xml2_version}/include/libxml2 --with-xml2-lib=#{xml2_version}/lib --with-xslt-dir=#{libxslt} --with-iconv-dir=/usr" cmd = "#{$0} clean test EXTOPTS='#{extopts}' LD_LIBRARY_PATH='#{xml2_version}/lib'" version = File.basename(xml2_version) result = system(cmd) test_results[version] = { :result => result, :cmd => cmd } end test_results.sort_by { |k,v| k }.each do |k,v| passed = v[:result] puts "#{k}: #{passed ? 'PASS' : 'FAIL'}" puts "repro: #{v[:cmd]}" unless passed end end end nokogiri-1.8.2/CONTRIBUTING.md0000644000004100000410000000233413235345655015641 0ustar www-datawww-data# Issue and Pull Request Guidelines Thank you for getting involved in making Nokogiri better! ## Code of Conduct For best results, be nice. Remember that Nokogiri maintainers are volunteers, and treat them with respect. Do not act entitled to service. Do not be rude. Do not use judgmental or foul language. The maintainers reserve the right to delete comments that are rude, or that contain foul language. The maintainers reserve the right to delete comments that they deem harassing or offensive. ## Issues Please read the ["Getting Help" tutorial](http://www.nokogiri.org/tutorials/getting_help.html) at the [nokogiri.org](http://nokogiri.org) site. If you're reporting an issue, it must contain: * Example code that reproduces the **observed** behavior. * An explanation of what the **expected** behavior is. That's it. If you don't provide that information, we'll ask you for it, tag the story "needs more information", and then after a time will close it if the information isn't provided. ## Pull Requests Pull requests must always contain a test to prevent regressions. Preferably, the test should demonstrate the __intent__ of the code. We may ask you for clarification if we don't understand the intent of the change. nokogiri-1.8.2/build_all0000755000004100000410000000165013235345655015265 0ustar www-datawww-data#! /usr/bin/env bash # # script to build gems for all relevant platforms: # - MRI et al (standard gem) # - windows (x86-mingw32 and x64-mingw32) # - jruby # # Load RVM into a shell session *as a function* if [[ -s "$HOME/.rvm/scripts/rvm" ]] ; then source "$HOME/.rvm/scripts/rvm" elif [[ -s "/usr/local/rvm/scripts/rvm" ]] ; then source "/usr/local/rvm/scripts/rvm" else echo "ERROR: An RVM installation was not found.\n" fi set -o errexit rm -rf tmp pkg bundle exec rake clean clobber # holding pen rm -rf gems mkdir -p gems # windows bundle exec rake gem:windows cp -v pkg/nokogiri*{x86,x64}-mingw32*.gem gems # MRI bundle exec rake clean bundle exec rake gem cp -v pkg/nokogiri*.gem gems # jruby bundle exec rake clean clobber bundle exec rake generate rvm jruby-1.7.19 gem install bundler --conservative bundle install --quiet --local || bundle install bundle exec rake gem cp -v pkg/nokogiri*java.gem gems nokogiri-1.8.2/CHANGELOG.md0000644000004100000410000014346013235345655015227 0ustar www-datawww-data# 1.8.2 / 2018-01-29 ## Security Notes [MRI] The update of vendored libxml2 from 2.9.5 to 2.9.7 addresses at least one published vulnerability, CVE-2017-15412. [#1714 has complete details] ## Dependencies * [MRI] libxml2 is updated from 2.9.5 to 2.9.7 * [MRI] libxml2 is updated from 1.1.30 to 1.1.32 ## Features * [MRI] OpenBSD installation should be a bit easier now. [#1685] (Thanks, @jeremyevans!) * [MRI] Cross-built Windows gems now support Ruby 2.5 ## Bug fixes * Node#serialize once again returns UTF-8-encoded strings. [#1659] * [JRuby] made SAX parsing of characters consistent with C implementation [#1676] (Thanks, @andrew-aladev!) * [MRI] Predefined entities, when inspected, no longer cause a segfault. [#1238] # 1.8.1 / 2017-09-19 ## Dependencies * [MRI] libxml2 is updated from 2.9.4 to 2.9.5. * [MRI] libxslt is updated from 1.1.29 to 1.1.30. * [MRI] optional dependency on the pkg-config gem has had its constraint loosened to `~> 1.1` (from `~> 1.1.7`). [#1660] * [MRI] Upgrade mini_portile2 dependency from `~> 2.2.0` to `~> 2.3.0`, which will validate checksums on the vendored libxml2 and libxslt tarballs before using them. ## Bugs * NodeSet#first with an integer argument longer than the length of the NodeSet now correctly clamps the length of the returned NodeSet to the original length. [#1650] (Thanks, @Derenge!) * [MRI] Ensure CData.new raises TypeError if the `content` argument is not implicitly convertible into a string. [#1669] # 1.8.0 / 2017-06-04 ## Backwards incompatibilities This release ends support for Ruby 2.1 on Windows in the `x86-mingw32` and `x64-mingw32` platform gems (containing pre-compiled DLLs). Official support ended for Ruby 2.1 on 2017-04-01. Please note that this deprecation note only applies to the precompiled Windows gems. Ruby 2.1 continues to be supported (for now) in the default gem when compiled on installation. ## Dependencies * [Windows] Upgrade iconv from 1.14 to 1.15 (unless --use-system-libraries) * [Windows] Upgrade zlib from 1.2.8 to 1.2.11 (unless --use-system-libraries) * [MRI] Upgrade rake-compiler dependency from 0.9.2 to 1.0.3 * [MRI] Upgrade mini-portile2 dependency from `~> 2.1.0` to `~> 2.2.0` ## Compatibility notes * [JRuby] Removed support for `jruby --1.8` code paths. [#1607] (Thanks, @kares!) * [MRI Windows] Retrieve zlib source from http://zlib.net/fossils to avoid deprecation issues going forward. See #1632 for details around this problem. ## Features * NodeSet#clone is not an alias for NodeSet#dup [#1503] (Thanks, @stephankaag!) * Allow Processing Instructions and Comments as children of a document root. [#1033] (Thanks, @windwiny!) * [MRI] PushParser#replace_entities and #replace_entities= will control whether entities are replaced or not. [#1017] (Thanks, @spraints!) * [MRI] SyntaxError#to_s now includes line number, column number, and log level if made available by the parser. [#1304, #1637] (Thanks, @spk and @ccarruitero!) * [MRI] Cross-built Windows gems now support Ruby 2.4 * [MRI] Support for frozen string literals. [#1413] * [MRI] Support for installing Nokogiri on a machine in FIPS-enabled mode [#1544] * [MRI] Vendored libraries are verified with SHA-256 hashes (formerly some MD5 hashes were used) [#1544] * [JRuby] (performance) remove unnecessary synchronization of class-cache [#1563] (Thanks, @kares!) * [JRuby] (performance) remove unnecessary cloning of objects in XPath searches [#1563] (Thanks, @kares!) * [JRuby] (performance) more performance improvements, particularly in XPath, Reader, XmlNode, and XmlNodeSet [#1597] (Thanks, @kares!) ## Bugs * HTML::SAX::Parser#parse_io now correctly parses HTML and not XML [#1577] (Thanks for the test case, @gregors!) * Support installation on systems with a `lib64` site config. [#1562] * [MRI] on OpenBSD, do not require gcc if using system libraries [#1515] (Thanks, @jeremyevans!) * [MRI] XML::Attr.new checks type of Document arg to prevent segfaults. [#1477] * [MRI] Prefer xmlCharStrdup (and friends) to strdup (and friends), which can cause problems on some platforms. [#1517] (Thanks, @jeremy!) * [JRuby] correctly append a text node before another text node [#1318] (Thanks, @jkraemer!) * [JRuby] custom xpath functions returning an integer now work correctly [#1595] (Thanks, @kares!) * [JRuby] serializing (`#to_html`, `#to_s`, et al) a document with explicit encoding now works correctly. [#1281, #1440] (Thanks, @kares!) * [JRuby] XML::Reader now returns parse errors [#1586] (Thanks, @kares!) * [JRuby] Empty NodeSets are now decorated properly. [#1319] (Thanks, @kares!) * [JRuby] Merged nodes no longer results in Java exceptions during XPath queries. [#1320] (Thanks, @kares!) # 1.7.2 / 2017-05-09 ## Security Notes [MRI] Upstream libxslt patches are applied to the vendored libxslt 1.1.29 which address CVE-2017-5029 and CVE-2016-4738. For more information: * https://github.com/sparklemotion/nokogiri/issues/1634 * http://people.canonical.com/~ubuntu-security/cve/2017/CVE-2017-5029.html * http://people.canonical.com/~ubuntu-security/cve/2016/CVE-2016-4738.html # 1.7.1 / 2017-03-19 ## Security Notes [MRI] Upstream libxml2 patches are applied to the vendored libxml 2.9.4 which address CVE-2016-4658 and CVE-2016-5131. For more information: * https://github.com/sparklemotion/nokogiri/issues/1615 * http://people.canonical.com/~ubuntu-security/cve/2016/CVE-2016-4658.html * http://people.canonical.com/~ubuntu-security/cve/2016/CVE-2016-5131.html # 1.7.0.1 / 2017-01-04 ## Bugs * Fix OpenBSD support. (#1569) (related to #1543) # 1.7.0 / 2016-12-26 ## Features * Remove deprecation warnings in Ruby 2.4.0 (#1545) (Thanks, @matthewd!) * Support egcc compiler on OpenBSD (#1543) (Thanks, @frenkel and @knu!) ## Backwards incompatibilities. This release ends support for: * Ruby 1.9.2, for which official support ended on 2014-07-31 * Ruby 1.9.3, for which official support ended on 2015-02-23 * Ruby 2.0.0, for which official support ended on 2016-02-24 * MacRuby, which hasn't been actively supported since 2015-01-13 (see https://github.com/MacRuby/MacRuby/commit/f76b9d6e99c18236db617e8aceb12c27d593a483) # 1.6.8.1 / 2016-10-03 ## Dependency License Notes Removes required dependency on the `pkg-config` gem. This dependency was introduced in v1.6.8 and, because it's distributed under LGPL, was objectionable to many Nokogiri users (#1488, #1496). This version makes `pkg-config` an optional dependency. If it's installed, it's used; but otherwise Nokogiri will attempt to work around its absence. # 1.6.8 / 2016-06-06 ## Security Notes [MRI] Bundled libxml2 is upgraded to 2.9.4, which fixes many security issues. Many of these had previously been patched in the vendored libxml 2.9.2 in the 1.6.7.x branch, but some are newer. See these libxml2 email posts for more: * https://mail.gnome.org/archives/xml/2015-November/msg00012.html * https://mail.gnome.org/archives/xml/2016-May/msg00023.html For a more detailed analysis, you may care to read Canonical's take on these security issues: * http://www.ubuntu.com/usn/usn-2994-1 [MRI] Bundled libxslt is upgraded to 1.1.29, which fixes a security issue as well as many long-known outstanding bugs, some features, some portability improvements, and general cleanup. See this libxslt email post for more: * https://mail.gnome.org/archives/xslt/2016-May/msg00004.html ## Features Several changes were made to improve performance: * [MRI] Simplify NodeSet#to_a with a minor speed-up. (#1397) * XML::Node#ancestors optimization. (#1297) (Thanks, Bruno Sutic!) * Use Symbol#to_proc where we weren't previously. (#1296) (Thanks, Bruno Sutic!) * XML::DTD#each uses implicit block calls. (Thanks, @glaucocustodio!) * Fall back to the `pkg-config` gem if we're having trouble finding the system libxml2. This should help many FreeBSD users. (#1417) * Set document encoding appropriately even on blank document. (#1043) (Thanks, @batter!) ## Bug Fixes * [JRuby] fix slow add_child (#692) * [JRuby] fix load errors when deploying to JRuby/Torquebox (#1114) (Thanks, @atambo and @jvshahid!) * [JRuby] fix NPE when inspecting nodes returned by NodeSet#drop (#1042) (Thanks, @mkristian!) * [JRuby] fix nil attriubte node's namespace in reader (#1327) (Thanks, @codekitchen!) * [JRuby] fix Nokogiri munging unicode characters that require more than 2 bytes (#1113) (Thanks, @mkristian!) * [JRuby] allow unlinking an unparented node (#1112, #1152) (Thanks, @esse!) * [JRuby] allow Fragment parsing on a frozen string (#444, #1077) * [JRuby] HTML `style` tags are no longer encoded (#1316) (Thanks, @tbeauvais!) * [MRI] fix assertion failure while accessing attribute node's namespace in reader (#843) (Thanks, @2potatocakes!) * [MRI] fix issue with GCing namespace nodes returned in an xpath query. (#1155) * [MRI] Ensure C strings are null-terminated. (#1381) * [MRI] Ensure Rubygems is loaded before using mini_portile2 at installation. (#1393, #1411) (Thanks, @JonRowe!) * [MRI] Handling another edge case where the `libxml-ruby` gem's global callbacks were smashing the heap. (#1426). (Thanks to @bbergstrom for providing an isolated test case!) * [MRI] Ensure encodings are passed to Sax::Parser xmldecl callback. (#844) * [MRI] Ensure default ns prefix is applied correctly when reparenting nodes to another document. (#391) (Thanks, @ylecuyer!) * [MRI] Ensure Reader handles non-existent attributes as expected. (#1254) (Thanks, @ccutrer!) * [MRI] Cleanup around namespace handling when reparenting nodes. (#1332, #1333, #1444) (Thanks, @cuttrer and @bradleybeddoes!) * unescape special characters in CSS queries (#1303) (Thanks, @twalpole!) * consistently handle empty documents (#1349) * Update to mini_portile2 2.1.0 to address whitespace-handling during patching. (#1402) * Fix encoding of xml node namespaces. * Work around issue installing Nokogiri on overlayfs (commonly used in Docker containers). (#1370, #1405) ## Other Notes * Removed legacy code remaining from Ruby 1.8.x support. * Removed legacy code remaining from REE support. * Removing hacky workarounds for bugs in some older versions of libxml2. * Handling C strings in a forward-compatible manner, see https://github.com/ruby/ruby/blob/v2_2_0/NEWS#L319 # 1.6.7.2 / 2016-01-20 This version pulls in several upstream patches to the vendored libxml2 and libxslt to address: CVE-2015-7499 Ubuntu classifies this as "Priority: Low", RedHat classifies this as "Impact: Moderate", and NIST classifies this as "Severity: 5.0 (MEDIUM)". MITRE record is https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2015-7499 # 1.6.7.1 / 2015-12-16 This version pulls in several upstream patches to the vendored libxml2 and libxslt to address: CVE-2015-5312 CVE-2015-7497 CVE-2015-7498 CVE-2015-7499 CVE-2015-7500 CVE-2015-8241 CVE-2015-8242 CVE-2015-8317 See also http://www.ubuntu.com/usn/usn-2834-1/ # 1.6.7 / 2015-11-29 ## Notes This version supports native builds on Windows using the RubyInstaller DevKit. It also supports Ruby 2.2.x on Windows, as well as making several other improvements to the installation process on various platforms. This version also includes the security patches already applied in v1.6.6.3 and v1.6.6.4 to the vendored libxml2 and libxslt source. See #1374 and #1376 for details. ## Features * Cross-built gems now have a proper ruby version requirement. (#1266) * Ruby 2.2.x is supported on Windows. * Native build is supported on Windows. * [MRI] libxml2 and libxslt `config.guess` files brought up to date. (#1326) (Thanks, @hernan-erasmo!) * [JRuby] fix error in validating files with jruby (#1355, #1361) (Thanks, @twalpole!) * [MRI, OSX] Patch to handle nonstandard location of `iconv.h`. (#1206, #1210, #1218, #1345) (Thanks, @neonichu!) ## Bug Fixes * [JRuby] reset the namespace cache when replacing the document's innerHtml (#1265) (Thanks, @mkristian!) * [JRuby] Document#parse should support IO objects that respond to #read. (#1124) (Thanks, Jake Byman!) * [MRI] Duplicate-id errors when setting the `id` attribute on HTML documents are now silenced. (#1262) * [JRuby] SAX parser cuts texts in pieces when square brackets exist. (#1261) * [JRuby] Namespaced attributes aren't removed by remove_attribute. (#1299) # 1.6.6.4 / 2015-11-19 This version pulls in an upstream patch to the vendored libxml2 to address: * unclosed comment uninitialized access issue (#1376) This issue was assigned CVE-2015-8710 after the fact. See http://seclists.org/oss-sec/2015/q4/616 for details. # 1.6.6.3 / 2015-11-16 This version pulls in several upstream patches to the vendored libxml2 and libxslt to address: * CVE-2015-1819 * CVE-2015-7941_1 * CVE-2015-7941_2 * CVE-2015-7942 * CVE-2015-7942-2 * CVE-2015-8035 * CVE-2015-7995 See #1374 for details. # 1.6.6.2 / 2015-01-23 ## Bug fixes * Fixed installation issue affecting compiler arguments. (#1230) # 1.6.6.1 / 2015-01-22 Note that 1.6.6.0 was not released. ## Features * Unified Node and NodeSet implementations of #search, #xpath and #css. * Added Node#lang and Node#lang=. * bin/nokogiri passes the URI to parse() if an HTTP URL is given. * bin/nokogiri now loads ~/.nokogirirc so user can define helper methods, etc. * bin/nokogiri can be configured to use Pry instead of IRB by adding a couple of lines to ~/.nokogirirc. (#1198) * bin/nokogiri can better handle urls from STDIN (aiding use of xargs). (#1065) * JRuby 9K support. ## Bug fixes * DocumentFragment#search now matches against root nodes. (#1205) * (MRI) More fixes related to handling libxml2 parse errors during DocumentFragment#dup. (#1196) * (JRuby) Builder now handles namespace hrefs properly when there is a default ns. (#1039) * (JRuby) Clear the XPath cache on attr removal. (#1109) * `XML::Comment.new` argument types are now consistent and safe (and documented) across MRI and JRuby. (#1224) * (MRI) Restoring support for Ruby 1.9.2 that was broken in v1.6.4.1 and v1.6.5. (#1207) * Check if `zlib` is available before building `libxml2`. (#1188) * (JRuby) HtmlSaxPushParser now exists. (#1147) (Thanks, Piotr Szmielew!) # 1.6.5 / 2014-11-26 ## Features * Implement Slop#respond_to_missing?. (#1176) * Optimized the XPath query generated by an `an+b` CSS query. ## Bug fixes * Capture non-parse errors from Document#dup in Document#errors. (#1196) * (JRuby) Document#canonicalize parameters are now consistent with MRI. (#1189) # 1.6.4.1 / 2014-11-05 ## Bug fixes * (MRI) Fix a bug where CFLAGS passed in are dropped. (#1188) * Fix a bug where CSS selector :nth(n) did not work. (#1187) # 1.6.4 / 2014-11-04 ## Features * (MRI) Bundled Libxml2 is upgraded to 2.9.2. * (MRI) `nokogiri --version` will include a list of applied patches. * (MRI) Nokogiri no longer prints messages directly to TTY while building the extension. * (MRI) Detect and help user fix a missing /usr/include/iconv.h on OS X. (#1111) * (MRI) Improve the iconv detection for building libxml2. ## Bug fixes * (MRI) Fix DocumentFragment#element_children (#1138). * Fix a bug with CSS attribute selector without any prefix where "foo [bar]" was treated as "foo[bar]". (#1174) # 1.6.3.1 / 2014-07-21 ## Bug fixes * Addressing an Apple Macintosh installation problem for GCC users. #1130 (Thanks, @zenspider!) # 1.6.3 / 2014-07-20 ## Features * Added Node#document? and Node#processing_instruction? ## Bug fixes * [JRuby] Fix Ruby memory exhaustion vulnerability. #1087 (Thanks, @ocher) * [MRI] Fix segfault during GC when using `libxml-ruby` and `nokogiri` together in multi-threaded environment. #895 (Thanks, @ender672!) * Building on OSX 10.9 stock ruby 2.0.0 now works. #1101 (Thanks, @zenspider!) * Node#parse now works again for HTML document nodes (broken in 1.6.2+). * Processing instructions can now be added via Node#add_next_sibling. # 1.6.2.1 / 2014-05-13 ## Bug fixes * Fix statically-linked libxml2 installation when using universal builds of Ruby. #1104 * Patching `mini_portile` to address the git dependency detailed in #1102. * Library load fix to address segfault reported on some systems. #1097 # 1.6.2 / 2014-05-12 ## Security Note A set of security and bugfix patches have been backported from the libxml2 and libxslt repositories onto the version of 2.8.0 packaged with Nokogiri, including these notable security fixes: * https://git.gnome.org/browse/libxml2/commit/?id=4629ee02ac649c27f9c0cf98ba017c6b5526070f * CVE-2013-2877 https://git.gnome.org/browse/libxml2/commit/?id=e50ba8164eee06461c73cd8abb9b46aa0be81869 * CVE-2014-0191 https://git.gnome.org/browse/libxml2/commit/?id=9cd1c3cfbd32655d60572c0a413e017260c854df It is recommended that you upgrade from 1.6.x to this version as soon as possible. ## Compatibility Note Now requires libxml >= 2.6.21 (was previously >= 2.6.17). ## Features * Add cross building of fat binary gems for 64-Bit Windows (x64-mingw32) and add support for native builds on Windows. #864, #989, #1072 * (MRI) Alias CP932 to Windows-31J if iconv does not support Windows-31J. * (MRI) Nokogiri now links packaged libraries statically. To disable static linking, pass --disable-static to extconf.rb. #923 * (MRI) Fix a library path (LIBPATH) precedence problem caused by CRuby bug #9760. * (MRI) Nokogiri automatically deletes directories of packaged libraries only used during build. To keep them for debugging purposes, pass --disable-clean to extconf.rb. #952 * (MRI) Nokogiri now builds libxml2 properly with iconv support on platforms where libiconv is installed outside the system default directories, such as FreeBSD. * Add support for an-b in nth selectors. #886 (Thanks, Magnus Bergmark!) * Add support for bare and multiple :not() functions in selectors. #887 (Thanks, Magnus Bergmark!) * (MRI) Add an extconf.rb option --use-system-libraries, alternative to setting the environment variable NOKOGIRI_USE_SYSTEM_LIBRARIES. * (MRI) Update packaged libraries: libxslt to 1.1.28, zlib to 1.2.8, and libiconv to 1.14, respectively. * Nokogiri::HTML::Document#title= and #meta_encoding= now always add an element if not present, trying hard to find the best place to put it. * Nokogiri::XML::DTD#html_dtd? and #html5_dtd? are added. * Nokogiri::XML::Node#prepend_child is added. #664 * Nokogiri::XML::SAX::ParserContext#recovery is added. #453 * Fix documentation for XML::Node#namespace. #803 #802 (Thanks, Hoylen Sue) * Allow Nokogiri::XML::Node#parse from unparented non-element nodes. #407 ## Bugfixes * Ensure :only-child pseudo class works within :not pseudo class. #858 (Thanks, Yamagishi Kazutoshi!) * Don't call pkg_config when using bundled libraries in extconf.rb #931 (Thanks, Shota Fukumori!) * Nokogiri.parse() does not mistake a non-HTML document like a RSS document as HTML document. #932 (Thanks, Yamagishi Kazutoshi!) * (MRI) Perform a node type check before adding a child node to another. Previously adding a text node to another as a child could cause a SEGV. #1092 * (JRuby) XSD validation crashes in Java version. #373 * (JRuby) Document already has a root node error while using Builder. #646 * (JRuby) c14n tests are all passing on JRuby. #226 * Parsing empty documents raise SyntaxError in strict mode. #1005 * (JRuby) Make xpath faster by caching the xpath context. #741 * (JRuby) XML SAX push parser leaks memory on JRuby, but not on MRI. #998 * (JRuby) Inconsistent behavior aliasing the default namespace. #940 * (JRuby) Inconsistent behavior between parsing and adding namespaces. #943 * (JRuby) Xpath returns inconsistent result set on cloned document with namespaces and attributes. #1034 * (JRuby) Java-Implementation forgets element namespaces #902 * (JRuby) JRuby-Nokogiri does not recognise attributes inside namespaces #1081 * (JRuby) JRuby-Nokogiri has different comment node name #1080 * (JRuby) JAXPExtensionsProvider / Java 7 / Secure Processing #1070 # 1.6.1 / 2013-12-14 * Bugfixes * (JRuby) Fix out of memory bug when certain invalid documents are parsed. * (JRuby) Fix regression of billion-laughs vulnerability. #586 # 1.6.0 / 2013-06-08 This release was based on v1.5.10 and 1.6.0.rc1, and contains changes mentioned in both. * Deprecations * Remove pre 1.9 monitoring from Travis. # 1.6.0.rc1 / 2013-04-14 This release was based on v1.5.9, and so does not contain any fixes mentioned in the notes for v1.5.10. * Notes * mini_portile is now a runtime dependency * Ruby 1.9.2 and higher now required * Features * (MRI) Source code for libxml 2.8.0 and libxslt 1.2.26 is packaged with the gem. These libraries are compiled at gem install time unless the environment variable NOKOGIRI_USE_SYSTEM_LIBRARIES is set. VERSION_INFO (also `nokogiri -v`) exposes whether libxml was compiled from packaged source, or the system library was used. * (Windows) libxml upgraded to 2.8.0 * Deprecations * Support for Ruby 1.8.7 and prior has been dropped # 1.5.11 / 2013-12-14 * Bugfixes * (JRuby) Fix out of memory bug when certain invalid documents are parsed. * (JRuby) Fix regression of billion-laughs vulnerability. #586 # 1.5.10 / 2013-06-07 * Bugfixes * (JRuby) Fix "null document" error when parsing an empty IO in jruby 1.7.3. #883 * (JRuby) Fix schema validation when XSD has DOCTYPE set to DTD. #912 (Thanks, Patrick Cheng!) * (MRI) Fix segfault when there is no default subelement for an HTML node. #917 * Notes * Use rb_ary_entry instead of RARRAY_PTR (you know, for Rubinius). #877 (Thanks, Dirkjan Bussink!) * Fix TypeError when running tests. #900 (Thanks, Cédric Boutillier!) # 1.5.9 / 2013-03-21 * Bugfixes * Ensure that prefixed attributes are properly namespaced when reparented. #869 * Fix for inconsistent namespaced attribute access for SVG nested in HTML. #861 * (MRI) Fixed a memory leak in fragment parsing if nodes are not all subsequently reparented. #856 # 1.5.8 / 2013-03-19 * Bugfixes * (JRuby) Fix EmptyStackException thrown by elements with xlink:href attributes and no base_uri #534, #805. (Thanks, Patrick Quinn and Brian Hoffman!) * Fixes duplicate attributes issue introduced in 1.5.7. #865 * Allow use of a prefixed namespace on a root node using Nokogiri::XML::Builder #868 # 1.5.7 / 2013-03-18 * Features * Windows support for Ruby 2.0. * Bugfixes * SAX::Parser.parse_io throw an error when used with lower case encoding. #828 * (JRuby) Java Nokogiri is finally green (passes all tests) under 1.8 and 1.9 mode. High five everyone. #798, #705 * (JRuby) Nokogiri::XML::Reader broken (as a pull parser) on jruby - reads the whole XML document. #831 * (JRuby) JRuby hangs parsing "&". #837 * (JRuby) JRuby NPE parsing an invalid XML instruction. #838 * (JRuby) Node#content= incompatibility. #839 * (JRuby) to_xhtml doesn't print the last slash for self-closing tags in JRuby. #834 * (JRuby) Adding an EntityReference after a Text node mangles the entity in JRuby. #835 * (JRuby) JRuby version inconsistency: nil for empty attributes. #818 * CSS queries for classes (e.g., ".foo") now treat all whitespace identically. #854 * Namespace behavior cleaned up and made consistent between JRuby and MRI. #846, #801 (Thanks, Michael Klein!) * (MRI) SAX parser handles empty processing instructions. #845 # 1.5.6 / 2012-12-19 * Features * Improved performance of XML::Document#collect_namespaces. #761 (Thanks, Juergen Mangler!) * New callback SAX::Document#processing_instruction (Thanks, Kitaiti Makoto!) * Node#native_content= allows setting unescaped node contant. #768 * XPath lookup with namespaces supports symbol keys. #729 (Thanks, Ben Langfeld.) * XML::Node#[]= stringifies values. #729 (Thanks, Ben Langfeld.) * bin/nokogiri will process a document from $stdin * bin/nokogiri -e will execute a program from the command line * (JRuby) bin/nokogiri --version will print the Xerces and NekoHTML versions. * Bugfixes * Nokogiri now detects XSLT transform errors. #731 (Thanks, Justin Fitzsimmons!) * Don't throw an Error when trying to replace top-level text node in DocumentFragment. #775 * Raise an ArgumentError if an invalid encoding is passed to the SAX parser. #756 (Thanks, Bradley Schaefer!) * Prefixed element inconsistency between CRuby and JRuby. #712 * (JRuby) space prior to xml preamble causes nokogiri to fail parsing. (fixed along with #748) #790 * (JRuby) Fixed the bug Nokogiri::XML::Node#content inconsistency between Java and C. #794, #797 * (JRuby) raises INVALID_CHARACTER_ERR exception when EntityReference name starts with '#'. #719 * (JRuby) doesn't coerce namespaces out of strings on a direct subclass of Node. #715 * (JRuby) Node#content now renders newlines properly. #737 (Thanks, Piotr Szmielew!) * (JRuby) Unknown namespace are ignore when the recover option is used. #748 * (JRuby) XPath queries for namespaces should not throw exceptions when called twice in a row. #764 * (JRuby) More consistent (with libxml2) whitespace formatting when emitting XML. #771 * (JRuby) namespaced attributes broken when appending raw xml to builder. #770 * (JRuby) Nokogiri::XML::Document#wrap raises undefined method `length' for nil:NilClass when trying to << to a node. #781 * (JRuby) Fixed "bad file descriptor" bug when closing open file descriptors. #495 * (JRuby) JRuby/CRuby incompatibility for attribute decorators. #785 * (JRuby) Issues parsing valid XML with no internal subset in the DTD. #547, #811 * (JRuby) Issues parsing valid node content when it contains colons. #728 * (JRuby) Correctly parse the doc type of html documents. #733 * (JRuby) Include dtd in the xml output when a builder is used with create_internal_subset. #751 * (JRuby) builder requires textwrappers for valid utf8 in jruby, not in mri. #784 # 1.5.5 / 2012-06-24 * Features * Much-improved support for JRuby in 1.9 mode! Yay! * Bugfixes * Regression in JRuby Nokogiri add_previous_sibling (1.5.0 -> 1.5.1) #691 (Thanks, John Shahid!) * JRuby unable to create HTML doc if URL arg provided #674 (Thanks, John Shahid!) * JRuby raises NullPointerException when given HTML document is nil or empty string. #699 * JRuby 1.9 error, uncaught throw 'encoding_found', has been fixed. #673 * Invalid encoding returned in JRuby with US-ASCII. #583 * XmlSaxPushParser raises IndexOutOfBoundsException when over 512 characters are given. #567, #615 * When xpath evaluation returns empty NodeSet, decorating NodeSet's base document raises exception. #514 * JRuby raises exception when xpath with namespace is specified. pull request #681 (Thanks, Piotr Szmielew) * JRuby renders nodes without their namespace when subclassing Node. #695 * JRuby raises NAMESPACE_ERR (org.w3c.dom.DOMException) while instantiating RDF::RDFXML::Writer. #683 * JRuby is not able to use namespaces in xpath. #493 * JRuby's Entity resolving should be consistent with C-Nokogiri #704, #647, #703 # 1.5.4 / 2012-06-12 * Features * The "nokogiri" script now has more verbose output when passed the `--rng` option. #675 (Thanks, Dan Radez!) * Build support on hardened Debian systems that use `-Werror=format-security`. #680. * Better build support for systems with pkg-config. #584 * Better build support for systems with multiple iconv installations. * Bugfixes * Segmentation fault when creating a comment node for a DocumentFragment. #677, #678. * Treat '.' as xpath in at() and search(). #690 * (MRI, Security) Default parse options for XML documents were changed to not make network connections during document parsing, to avoid XXE vulnerability. #693 To re-enable this behavior, the configuration method `nononet` may be called, like this: Nokogiri::XML::Document.parse(xml) { |config| config.nononet } Insert your own joke about double-negatives here. # 1.5.3 / 2012-06-01 * Features * Support for "prefixless" CSS selectors ~, > and + like jQuery supports. #621, #623. (Thanks, David Lee!) * Attempting to improve installation on homebrew 0.9 (with regards to iconv). Isn't package management convenient? * Bugfixes * Custom xpath functions with empty nodeset arguments cause a segfault. #634. * Nokogiri::XML::Node#css now works for XML documents with default namespaces when the rule contains attribute selector without namespace. * Fixed marshalling bugs around how arguments are passed to (and returned from) XSLT custom xpath functions. #640. * Nokogiri::XML::Reader#outer_xml is broken in JRuby #617 * Nokogiri::XML::Attribute on JRuby returns a nil namespace #647 * Nokogiri::XML::Node#namespace= cannot set a namespace without a prefix on JRuby #648 * (JRuby) 1.9 mode causes dead lock while running rake #571 * HTML::Document#meta_encoding does not raise exception on docs with malformed content-type. #655 * Fixing segfault related to unsupported encodings in in-context parsing on 1.8.7. #643 * (JRuby) Concurrency issue in XPath parsing. #682 # 1.5.2 / 2012-03-09 Repackaging of 1.5.1 with a gemspec that is compatible with older Rubies. #631, #632. # 1.5.1 / 2012-03-09 * Features * XML::Builder#comment allows creation of comment nodes. * CSS searches now support namespaced attributes. #593 * Java integration feature is added. Now, XML::Document.wrap and XML::Document#to_java methods are available. * RelaxNG validator support in the `nokogiri` cli utility. #591 (thanks, Dan Radez!) * Bugfixes * Fix many memory leaks and segfault opportunities. Thanks, Tim Elliott! * extconf searches homebrew paths if homebrew is installed. * Inconsistent behavior of Nokogiri 1.5.0 Java #620 * Inheriting from Nokogiri::XML::Node on JRuby (1.6.4/5) fails #560 * XML::Attr nodes are not allowed to be added as node children, so an exception is raised. #558 * No longer defensively "pickle" adjacent text nodes on Node#add_next_sibling and Node#add_previous_sibling calls. #595. * Java version inconsistency: it returns nil for empty attributes #589 * to_xhtml incorrectly generates

when tag is empty #557 * Document#add_child now accepts a Node, NodeSet, DocumentFragment, or String. #546. * Document#create_element now recognizes namespaces containing non-word characters (like "SOAP-ENV"). This is mostly relevant to users of Builder, which calls Document#create_element for nearly everything. #531. * File encoding broken in 1.5.0 / jruby / windows #529 * Java version does not return namespace defs as attrs for ::HTML #542 * Bad file descriptor with Nokogiri 1.5.0 #495 * remove_namespace! doesn't work in pure java version #492 * The Nokogiri Java native build throws a null pointer exception when ActiveSupport's .blank? method is called directly on a parsed object. #489 * 1.5.0 Not using correct character encoding #488 * Raw XML string in XML Builder broken on JRuby #486 * Nokogiri 1.5.0 XML generation broken on JRuby #484 * Do not allow multiple root nodes. #550 * Fixes for custom XPath functions. #605, #606 (thanks, Juan Wajnerman!) * Node#to_xml does not override :save_with if it is provided. #505 * Node#set is a private method (JRuby). #564 (thanks, Nick Sieger!) * C14n cleanup and Node#canonicalize (thanks, Ivan Pirlik!) #563 # 1.5.0 / 2011-07-01 * Notes * See changelog from 1.4.7 * Features * extracted sets of Node::SaveOptions into Node::SaveOptions::DEFAULT_{X,H,XH}TML (refactor) * Bugfixes * default output of XML on JRuby is no longer formatted due to inconsistent whitespace handling. #415 * (JRuby) making empty NodeSets with null `nodes` member safe to operate on. #443 * Fix a bug in advanced encoding detection that leads to partially duplicated document when parsing an HTML file with unknown encoding. * Add support for . # 1.5.0 beta3 / 2010/12/02 * Notes * JRuby performance tuning * See changelog from 1.4.4 * Bugfixes * Node#inner_text no longer returns nil. (JRuby) #264 # 1.5.0 beta2 / 2010/07/30 * Notes * See changelog from 1.4.3 # 1.5.0 beta1 / 2010/05/22 * Notes * JRuby support is provided by a new pure-java backend. * Deprecations * Ruby 1.8.6 is deprecated. Nokogiri will install, but official support is ended. * LibXML 2.6.16 and earlier are deprecated. Nokogiri will refuse to install. * FFI support is removed. # 1.4.7 / 2011-07-01 * Bugfixes * Fix a bug in advanced encoding detection that leads to partially duplicated document when parsing an HTML file with unknown encoding. Thanks, Timothy Elliott (@ender672)! #478 # 1.4.6 / 2011-06-19 * Notes * This version is functionally identical to 1.4.5. * Ruby 1.8.6 support has been restored. # 1.4.5 / 2011-05-19 * New Features * Nokogiri::HTML::Document#title accessor gets and sets the document title. * extracted sets of Node::SaveOptions into Node::SaveOptions::DEFAULT_{X,H,XH}TML (refactor) * Raise an exception if a string is passed to Nokogiri::XML::Schema#validate. #406 * Bugfixes * Node#serialize-and-friends now accepts a SaveOption object as the, erm, save object. * Nokogiri::CSS::Parser has-a Nokogiri::CSS::Tokenizer * (JRUBY+FFI only) Weak references are now threadsafe. #355 * Make direct start_element() callback (currently used for HTML::SAX::Parser) pass attributes in assoc array, just as emulated start_element() callback does. rel. #356 * HTML::SAX::Parser should call back a block given to parse*() if any, just as XML::SAX::Parser does. * Add further encoding detection to HTML parser that libxml2 does not do. * Document#remove_namespaces! now handles attributes with namespaces. #396 * XSLT::Stylesheet#transform no longer segfaults when handed a non-XML::Document. #452 * XML::Reader no longer segfaults when under GC pressure. #439 # 1.4.4 / 2010-11-15 * New Features * XML::Node#children= sets the node's inner html (much like #inner_html=), but returns the reparent node(s). * XSLT supports function extensions. #336 * XPath bind parameter substitution. #329 * XML::Reader node type constants. #369 * SAX Parser context provides line and column information * Bugfixes * XML::DTD#attributes returns an empty hash instead of nil when there are no attributes. * XML::DTD#{keys,each} now work as expected. #324 * {XML,HTML}::DocumentFragment.{new,parse} no longer strip leading and trailing whitespace. #319 * XML::Node#{add_child,add_previous_sibling,add_next_sibling,replace} return a NodeSet when passed a string. * Unclosed tags parsed more robustly in fragments. #315 * XML::Node#{replace,add_previous_sibling,add_next_sibling} edge cases fixed related to libxml's text node merging. #308 * Fixed a segfault when GC occurs during xpath handler argument marshalling. #345 * Added hack to Slop decorator to work with previously defined methods. #330 * Fix a memory leak when duplicating child nodes. #353 * Fixed off-by-one bug with nth-last-{child,of-type} CSS selectors when NOT using an+b notation. #354 * Fixed passing of non-namespace attributes to SAX::Document#start_element. #356 * Workaround for libxml2 in-context parsing bug. #362 * Fixed NodeSet#wrap on nodes within a fragment. #331 # 1.4.3 / 2010/07/28 * New Features * XML::Reader#empty_element? returns true for empty elements. #262 * Node#remove_namespaces! now removes namespace *declarations* as well. #294 * NodeSet#at_xpath, NodeSet#at_css and NodeSet#> do what the corresponding methods of Node do. * Bugfixes * XML::NodeSet#{include?,delete,push} accept an XML::Namespace * XML::Document#parse added for parsing in the context of a document * XML::DocumentFragment#inner_html= works with contextual parsing! #298, #281 * lib/nokogiri/css/parser.y Combined CSS functions + pseudo selectors fixed * Reparenting text nodes is safe, even when the operation frees adjacent merged nodes. #283 * Fixed libxml2 versionitis issue with xmlFirstElementChild et al. #303 * XML::Attr#add_namespace now works as expected. #252 * HTML::DocumentFragment uses the string's encoding. #305 * Fix the CSS3 selector translation rule for the general sibling combinator (a.k.a. preceding selector) that incorrectly converted "E ~ F G" to "//F//G[preceding-sibling::E]". # 1.4.2 / 2010/05/22 * New Features * XML::Node#parse will parse XML or HTML fragments with respect to the context node. * XML::Node#namespaces returns all namespaces defined in the node and all ancestor nodes (previously did not return ancestors' namespace definitions). * Added Enumerable to XML::Node * Nokogiri::XML::Schema#validate now uses xmlSchemaValidateFile if a filename is passed, which is faster and more memory-efficient. GH #219 * XML::Document#create_entity will create new EntityDecl objects. GH #174 * JRuby FFI implementation no longer uses ObjectSpace._id2ref, instead using Charles Nutter's rocking Weakling gem. * Nokogiri::XML::Node#first_element_child fetch the first child node that is an ELEMENT node. * Nokogiri::XML::Node#last_element_child fetch the last child node that is an ELEMENT node. * Nokogiri::XML::Node#elements fetch all children nodes that are ELEMENT nodes. * Nokogiri::XML::Node#add_child, #add_previous_sibling, #before, #add_next_sibling, #after, #inner_html, #swap and #replace all now accept a Node, DocumentFragment, NodeSet, or a string containing markup. * Node#fragment? indicates whether a node is a DocumentFragment. * Bugfixes * XML::NodeSet is now always decorated (if the document has decorators). GH #198 * XML::NodeSet#slice gracefully handles offset+length larger than the set length. GH #200 * XML::Node#content= safely unlinks previous content. GH #203 * XML::Node#namespace= takes nil as a parameter * XML::Node#xpath returns things other than NodeSet objects. GH #208 * XSLT::StyleSheet#transform accepts hashes for parameters. GH #223 * Psuedo selectors inside not() work. GH #205 * XML::Builder doesn't break when nodes are unlinked. Thanks to vihai! GH #228 * Encoding can be forced on the SAX parser. Thanks Eugene Pimenov! GH #204 * XML::DocumentFragment uses XML::Node#parse to determine children. * Fixed a memory leak in xml reader. Thanks sdor! GH #244 * Node#replace returns the new child node as claimed in the RDoc. Previously returned +self+. * Notes * The Windows gems now bundle DLLs for libxml 2.7.6 and libxslt 1.1.26. Prior to this release, libxml 2.7.3 and libxslt 1.1.24 were bundled. # 1.4.1 / 2009/12/10 * New Features * Added Nokogiri::LIBXML_ICONV_ENABLED * Alias Node#[] to Node#attr * XML::Node#next_element added * XML::Node#> added for searching a nodes immediate children * XML::NodeSet#reverse added * Added fragment support to Node#add_child, Node#add_next_sibling, Node#add_previous_sibling, and Node#replace. * XML::Node#previous_element implemented * Rubinius support * Ths CSS selector engine now supports :has() * XML::NodeSet#filter() was added * XML::Node.next= and .previous= are aliases for add_next_sibling and add_previous_sibling. GH #183 * Bugfixes * XML fragments with namespaces do not raise an exception (regression in 1.4.0) * Node#matches? works in nodes contained by a DocumentFragment. GH #158 * Document should not define add_namespace() method. GH #169 * XPath queries returning namespace declarations do not segfault. * Node#replace works with nodes from different documents. GH #162 * Adding XML::Document#collect_namespaces * Fixed bugs in the SOAP4R adapter * Fixed bug in XML::Node#next_element for certain edge cases * Fixed load path issue with JRuby under Windows. GH #160. * XSLT#apply_to will honor the "output method". Thanks richardlehane! * Fragments containing leading text nodes with newlines now parse properly. GH #178. # 1.4.0 / 2009/10/30 * Happy Birthday! * New Features * Node#at_xpath returns the first element of the NodeSet matching the XPath expression. * Node#at_css returns the first element of the NodeSet matching the CSS selector. * NodeSet#| for unions GH #119 (Thanks Serabe!) * NodeSet#inspect makes prettier output * Node#inspect implemented for more rubyish document inspecting * Added XML::DTD#external_id * Added XML::DTD#system_id * Added XML::ElementContent for DTD Element content validity * Better namespace declaration support in Nokogiri::XML::Builder * Added XML::Node#external_subset * Added XML::Node#create_external_subset * Added XML::Node#create_internal_subset * XML Builder can append raw strings (GH #141, patch from dudleyf) * XML::SAX::ParserContext added * XML::Document#remove_namespaces! for the namespace-impaired * Bugfixes * returns nil when HTML documents do not declare a meta encoding tag. GH #115 * Uses RbConfig::CONFIG['host_os'] to adjust ENV['PATH'] GH #113 * NodeSet#search is more efficient GH #119 (Thanks Serabe!) * NodeSet#xpath handles custom xpath functions * Fixing a SEGV when XML::Reader gets attributes for current node * Node#inner_html takes the same arguments as Node#to_html GH #117 * DocumentFragment#css delegates to it's child nodes GH #123 * NodeSet#[] works with slices larger than NodeSet#length GH #131 * Reparented nodes maintain their namespace. GH #134 * Fixed SEGV when adding an XML::Document to NodeSet * XML::SyntaxError can be duplicated. GH #148 * Deprecations * Hpricot compatibility layer removed # 1.3.3 / 2009/07/26 * New Features * NodeSet#children returns all children of all nodes * Bugfixes * Override libxml-ruby's global error handler * ParseOption#strict fixed * Fixed a segfault when sending an empty string to Node#inner_html= GH #88 * String encoding is now set to UTF-8 in Ruby 1.9 * Fixed a segfault when moving root nodes between documents. GH #91 * Fixed an O(n) penalty on node creation. GH #101 * Allowing XML documents to be output as HTML documents * Deprecations * Hpricot compatibility layer will be removed in 1.4.0 # 1.3.2 / 2009-06-22 * New Features * Nokogiri::XML::DTD#validate will validate your document * Bugfixes * Nokogiri::XML::NodeSet#search will search top level nodes. GH #73 * Removed namespace related methods from Nokogiri::XML::Document * Fixed a segfault when a namespace was added twice * Made nokogiri work with Snow Leopard GH #79 * Mailing list has moved to: http://groups.google.com/group/nokogiri-talk * HTML fragments now correctly handle comments and CDATA blocks. GH #78 * Nokogiri::XML::Document#clone is now an alias of dup * Deprecations * Nokogiri::XML::SAX::Document#start_element_ns is deprecated, please switch to Nokogiri::XML::SAX::Document#start_element_namespace * Nokogiri::XML::SAX::Document#end_element_ns is deprecated, please switch to Nokogiri::XML::SAX::Document#end_element_namespace # 1.3.1 / 2009-06-07 * Bugfixes * extconf.rb checks for optional RelaxNG and Schema functions * Namespace nodes are added to the Document node cache # 1.3.0 / 2009-05-30 * New Features * Builder changes scope based on block arity * Builder supports methods ending in underscore similar to tagz * Nokogiri::XML::Node#<=> compares nodes based on Document position * Nokogiri::XML::Node#matches? returns true if Node can be found with given selector. * Nokogiri::XML::Node#ancestors now returns an Nokogiri::XML::NodeSet * Nokogiri::XML::Node#ancestors will match parents against optional selector * Nokogiri::HTML::Document#meta_encoding for getting the meta encoding * Nokogiri::HTML::Document#meta_encoding= for setting the meta encoding * Nokogiri::XML::Document#encoding= to set the document encoding * Nokogiri::XML::Schema for validating documents against XSD schema * Nokogiri::XML::RelaxNG for validating documents against RelaxNG schema * Nokogiri::HTML::ElementDescription for fetching HTML element descriptions * Nokogiri::XML::Node#description to fetch the node description * Nokogiri::XML::Node#accept implements Visitor pattern * bin/nokogiri for easily examining documents (Thanks Yutaka HARA!) * Nokogiri::XML::NodeSet now supports more Array and Enumerable operators: index, delete, slice, - (difference), + (concatenation), & (intersection), push, pop, shift, == * Nokogiri.XML, Nokogiri.HTML take blocks that receive Nokogiri::XML::ParseOptions objects * Nokogiri::XML::Node#namespace returns a Nokogiri::XML::Namespace * Nokogiri::XML::Node#namespace= for setting a node's namespace * Nokogiri::XML::DocumentFragment and Nokogiri::HTML::DocumentFragment have a sensible API and a more robust implementation. * JRuby 1.3.0 support via FFI. * Bugfixes * Fixed a problem with nil passed to CDATA constructor * Fragment method deals with regular expression characters (Thanks Joel!) LH #73 * Fixing builder scope issues LH #61, LH #74, LH #70 * Fixed a problem when adding a child could remove the child namespace LH#78 * Fixed bug with unlinking a node then reparenting it. (GH#22) * Fixed failure to catch errors during XSLT parsing (GH#32) * Fixed a bug with attribute conditions in CSS selectors (GH#36) * Fixed intolerance of HTML attributes without values in Node#before/after/inner_html=. (GH#35) # 1.2.3 / 2009-03-22 * Bugfixes * Fixing bug where a node is passed in to Node#new * Namespace should be assigned on DocumentFragment creation. LH #66 * Nokogiri::XML::NodeSet#dup works GH #10 * Nokogiri::HTML returns an empty Document when given a blank string GH#11 * Adding a child will remove duplicate namespace declarations LH #67 * Builder methods take a hash as a second argument # 1.2.2 / 2009-03-14 * New features * Nokogiri may be used with soap4r. See XSD::XMLParser::Nokogiri * Nokogiri::XML::Node#inner_html= to set the inner html for a node * Nokogiri builder interface improvements * Nokogiri::XML::Node#swap swaps html for current node (LH #50) * Bugfixes * Fixed a tag nesting problem in the Builder API (LH #41) * Nokogiri::HTML.fragment will properly handle text only nodes (LH #43) * Nokogiri::XML::Node#before will prepend text nodes (LH #44) * Nokogiri::XML::Node#after will append text nodes * Nokogiri::XML::Node#search automatically registers root namespaces (LH #42) * Nokogiri::XML::NodeSet#search automatically registers namespaces * Nokogiri::HTML::NamedCharacters delegates to libxml2 * Nokogiri::XML::Node#[] can take a symbol (LH #48) * vasprintf for windows updated. Thanks Geoffroy Couprie! * Nokogiri::XML::Node#[]= should not encode entities (LH #55) * Namespaces should be copied to reparented nodes (LH #56) * Nokogiri uses encoding set on the string for default in Ruby 1.9 * Document#dup should create a new document of the same type (LH #59) * Document should not have a parent method (LH #64) # 1.2.1 / 2009-02-23 * Bugfixes * Fixed a CSS selector space bug * Fixed Ruby 1.9 String Encoding (Thanks 角谷さん!) # 1.2.0 / 2009-02-22 * New features * CSS search now supports CSS3 namespace queries * Namespaces on the root node are automatically registered * CSS queries use the default namespace * Nokogiri::XML::Document#encoding get encoding used for this document * Nokogiri::XML::Document#url get the document url * Nokogiri::XML::Node#add_namespace add a namespace to the node LH#38 * Nokogiri::XML::Node#each iterate over attribute name, value pairs * Nokogiri::XML::Node#keys get all attribute names * Nokogiri::XML::Node#line get the line number for a node (Thanks Dirkjan Bussink!) * Nokogiri::XML::Node#serialize now takes an optional encoding parameter * Nokogiri::XML::Node#to_html, to_xml, and to_xhtml take an optional encoding * Nokogiri::XML::Node#to_str * Nokogiri::XML::Node#to_xhtml to produce XHTML documents * Nokogiri::XML::Node#values get all attribute values * Nokogiri::XML::Node#write_to writes the node to an IO object with optional encoding * Nokogiri::XML::ProcessingInstrunction.new * Nokogiri::XML::SAX::PushParser for all your push parsing needs. * Bugfixes * Fixed Nokogiri::XML::Document#dup * Fixed header detection. Thanks rubikitch! * Fixed a problem where invalid CSS would cause the parser to hang * Deprecations * Nokogiri::XML::Node.new_from_str will be deprecated in 1.3.0 * API Changes * Nokogiri::HTML.fragment now returns an XML::DocumentFragment (LH #32) # 1.1.1 * New features * Added XML::Node#elem? * Added XML::Node#attribute_nodes * Added XML::Attr * XML::Node#delete added. * XML::NodeSet#inner_html added. * Bugfixes * Not including an HTML entity for \r for HTML nodes. * Removed CSS::SelectorHandler and XML::XPathHandler * XML::Node#attributes returns an Attr node for the value. * XML::NodeSet implements to_xml # 1.1.0 * New Features * Custom XPath functions are now supported. See Nokogiri::XML::Node#xpath * Custom CSS pseudo classes are now supported. See Nokogiri::XML::Node#css * Nokogiri::XML::Node#<< will add a child to the current node * Bugfixes * Mutex lock on CSS cache access * Fixed build problems with GCC 3.3.5 * XML::Node#to_xml now takes an indentation argument * XML::Node#dup takes an optional depth argument * XML::Node#add_previous_sibling returns new sibling node. # 1.0.7 * Bugfixes * Fixed memory leak when using Dike * SAX parser now parses IO streams * Comment nodes have their own class * Nokogiri() should delegate to Nokogiri.parse() * Prepending rather than appending to ENV['PATH'] on windows * Fixed a bug in complex CSS negation selectors # 1.0.6 * 5 Bugfixes * XPath Parser raises a SyntaxError on parse failure * CSS Parser raises a SyntaxError on parse failure * filter() and not() hpricot compatibility added * CSS searches via Node#search are now always relative * CSS to XPath conversion is now cached # 1.0.5 * Bugfixes * Added mailing list and ticket tracking information to the README.txt * Sets ENV['PATH'] on windows if it doesn't exist * Caching results of NodeSet#[] on Document # 1.0.4 * Bugfixes * Changed memory management from weak refs to document refs * Plugged some memory leaks * Builder blocks can call methods from surrounding contexts # 1.0.3 * 5 Bugfixes * NodeSet now implements to_ary * XML::Document should not implement parent * More GC Bugs fixed. (Mike is AWESOME!) * Removed RARRAY_LEN for 1.8.5 compatibility. Thanks Shane Hanna. * inner_html fixed. (Thanks Yehuda!) # 1.0.2 * 1 Bugfix * extconf.rb should not check for frex and racc # 1.0.1 * 1 Bugfix * Made sure extconf.rb searched libdir and prefix so that ports libxml/ruby will link properly. Thanks lucsky! # 1.0.0 / 2008-07-13 * 1 major enhancement * Birthday! nokogiri-1.8.2/nokogiri.gemspec0000644000004100000410000003266613235345655016611 0ustar www-datawww-data######################################################### # This file has been automatically generated by gem2tgz # ######################################################### # -*- encoding: utf-8 -*- Gem::Specification.new do |s| s.name = "nokogiri" s.version = "1.8.2" s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version= s.authors = ["Aaron Patterson", "Mike Dalessio", "Yoko Harada", "Tim Elliott", "Akinori MUSHA"] s.date = "2018-01-29" s.description = "Nokogiri (\u{92f8}) is an HTML, XML, SAX, and Reader parser. Among\nNokogiri's many features is the ability to search documents via XPath\nor CSS3 selectors." s.email = ["aaronp@rubyforge.org", "mike.dalessio@gmail.com", "yokolet@gmail.com", "tle@holymonkey.com", "knu@idaemons.org"] s.executables = ["nokogiri"] s.extensions = ["ext/nokogiri/extconf.rb"] s.extra_rdoc_files = ["CHANGELOG.md", "CONTRIBUTING.md", "C_CODING_STYLE.rdoc", "LICENSE-DEPENDENCIES.md", "LICENSE.md", "Manifest.txt", "README.md", "ROADMAP.md", "STANDARD_RESPONSES.md", "Y_U_NO_GEMSPEC.md", "ext/nokogiri/html_document.c", "ext/nokogiri/html_element_description.c", "ext/nokogiri/html_entity_lookup.c", "ext/nokogiri/html_sax_parser_context.c", "ext/nokogiri/html_sax_push_parser.c", "ext/nokogiri/nokogiri.c", "ext/nokogiri/xml_attr.c", "ext/nokogiri/xml_attribute_decl.c", "ext/nokogiri/xml_cdata.c", "ext/nokogiri/xml_comment.c", "ext/nokogiri/xml_document.c", "ext/nokogiri/xml_document_fragment.c", "ext/nokogiri/xml_dtd.c", "ext/nokogiri/xml_element_content.c", "ext/nokogiri/xml_element_decl.c", "ext/nokogiri/xml_encoding_handler.c", "ext/nokogiri/xml_entity_decl.c", "ext/nokogiri/xml_entity_reference.c", "ext/nokogiri/xml_io.c", "ext/nokogiri/xml_libxml2_hacks.c", "ext/nokogiri/xml_namespace.c", "ext/nokogiri/xml_node.c", "ext/nokogiri/xml_node_set.c", "ext/nokogiri/xml_processing_instruction.c", "ext/nokogiri/xml_reader.c", "ext/nokogiri/xml_relax_ng.c", "ext/nokogiri/xml_sax_parser.c", "ext/nokogiri/xml_sax_parser_context.c", "ext/nokogiri/xml_sax_push_parser.c", "ext/nokogiri/xml_schema.c", "ext/nokogiri/xml_syntax_error.c", "ext/nokogiri/xml_text.c", "ext/nokogiri/xml_xpath_context.c", "ext/nokogiri/xslt_stylesheet.c", "suppressions/README.txt"] s.files = [".autotest", ".cross_rubies", ".editorconfig", ".gemtest", ".travis.yml", "CHANGELOG.md", "CONTRIBUTING.md", "C_CODING_STYLE.rdoc", "Gemfile", "Gemfile-libxml-ruby", "LICENSE-DEPENDENCIES.md", "LICENSE.md", "Manifest.txt", "README.md", "ROADMAP.md", "Rakefile", "STANDARD_RESPONSES.md", "Y_U_NO_GEMSPEC.md", "appveyor.yml", "bin/nokogiri", "build_all", "dependencies.yml", "ext/nokogiri/depend", "ext/nokogiri/extconf.rb", "ext/nokogiri/html_document.c", "ext/nokogiri/html_document.h", "ext/nokogiri/html_element_description.c", "ext/nokogiri/html_element_description.h", "ext/nokogiri/html_entity_lookup.c", "ext/nokogiri/html_entity_lookup.h", "ext/nokogiri/html_sax_parser_context.c", "ext/nokogiri/html_sax_parser_context.h", "ext/nokogiri/html_sax_push_parser.c", "ext/nokogiri/html_sax_push_parser.h", "ext/nokogiri/nokogiri.c", "ext/nokogiri/nokogiri.h", "ext/nokogiri/xml_attr.c", "ext/nokogiri/xml_attr.h", "ext/nokogiri/xml_attribute_decl.c", "ext/nokogiri/xml_attribute_decl.h", "ext/nokogiri/xml_cdata.c", "ext/nokogiri/xml_cdata.h", "ext/nokogiri/xml_comment.c", "ext/nokogiri/xml_comment.h", "ext/nokogiri/xml_document.c", "ext/nokogiri/xml_document.h", "ext/nokogiri/xml_document_fragment.c", "ext/nokogiri/xml_document_fragment.h", "ext/nokogiri/xml_dtd.c", "ext/nokogiri/xml_dtd.h", "ext/nokogiri/xml_element_content.c", "ext/nokogiri/xml_element_content.h", "ext/nokogiri/xml_element_decl.c", "ext/nokogiri/xml_element_decl.h", "ext/nokogiri/xml_encoding_handler.c", "ext/nokogiri/xml_encoding_handler.h", "ext/nokogiri/xml_entity_decl.c", "ext/nokogiri/xml_entity_decl.h", "ext/nokogiri/xml_entity_reference.c", "ext/nokogiri/xml_entity_reference.h", "ext/nokogiri/xml_io.c", "ext/nokogiri/xml_io.h", "ext/nokogiri/xml_libxml2_hacks.c", "ext/nokogiri/xml_libxml2_hacks.h", "ext/nokogiri/xml_namespace.c", "ext/nokogiri/xml_namespace.h", "ext/nokogiri/xml_node.c", "ext/nokogiri/xml_node.h", "ext/nokogiri/xml_node_set.c", "ext/nokogiri/xml_node_set.h", "ext/nokogiri/xml_processing_instruction.c", "ext/nokogiri/xml_processing_instruction.h", "ext/nokogiri/xml_reader.c", "ext/nokogiri/xml_reader.h", "ext/nokogiri/xml_relax_ng.c", "ext/nokogiri/xml_relax_ng.h", "ext/nokogiri/xml_sax_parser.c", "ext/nokogiri/xml_sax_parser.h", "ext/nokogiri/xml_sax_parser_context.c", "ext/nokogiri/xml_sax_parser_context.h", "ext/nokogiri/xml_sax_push_parser.c", "ext/nokogiri/xml_sax_push_parser.h", "ext/nokogiri/xml_schema.c", "ext/nokogiri/xml_schema.h", "ext/nokogiri/xml_syntax_error.c", "ext/nokogiri/xml_syntax_error.h", "ext/nokogiri/xml_text.c", "ext/nokogiri/xml_text.h", "ext/nokogiri/xml_xpath_context.c", "ext/nokogiri/xml_xpath_context.h", "ext/nokogiri/xslt_stylesheet.c", "ext/nokogiri/xslt_stylesheet.h", "lib/nokogiri.rb", "lib/nokogiri/css.rb", "lib/nokogiri/css/node.rb", "lib/nokogiri/css/parser.rb", "lib/nokogiri/css/parser.y", "lib/nokogiri/css/parser_extras.rb", "lib/nokogiri/css/syntax_error.rb", "lib/nokogiri/css/tokenizer.rb", "lib/nokogiri/css/tokenizer.rex", "lib/nokogiri/css/xpath_visitor.rb", "lib/nokogiri/decorators/slop.rb", "lib/nokogiri/html.rb", "lib/nokogiri/html/builder.rb", "lib/nokogiri/html/document.rb", "lib/nokogiri/html/document_fragment.rb", "lib/nokogiri/html/element_description.rb", "lib/nokogiri/html/element_description_defaults.rb", "lib/nokogiri/html/entity_lookup.rb", "lib/nokogiri/html/sax/parser.rb", "lib/nokogiri/html/sax/parser_context.rb", "lib/nokogiri/html/sax/push_parser.rb", "lib/nokogiri/syntax_error.rb", "lib/nokogiri/version.rb", "lib/nokogiri/xml.rb", "lib/nokogiri/xml/attr.rb", "lib/nokogiri/xml/attribute_decl.rb", "lib/nokogiri/xml/builder.rb", "lib/nokogiri/xml/cdata.rb", "lib/nokogiri/xml/character_data.rb", "lib/nokogiri/xml/document.rb", "lib/nokogiri/xml/document_fragment.rb", "lib/nokogiri/xml/dtd.rb", "lib/nokogiri/xml/element_content.rb", "lib/nokogiri/xml/element_decl.rb", "lib/nokogiri/xml/entity_decl.rb", "lib/nokogiri/xml/entity_reference.rb", "lib/nokogiri/xml/namespace.rb", "lib/nokogiri/xml/node.rb", "lib/nokogiri/xml/node/save_options.rb", "lib/nokogiri/xml/node_set.rb", "lib/nokogiri/xml/notation.rb", "lib/nokogiri/xml/parse_options.rb", "lib/nokogiri/xml/pp.rb", "lib/nokogiri/xml/pp/character_data.rb", "lib/nokogiri/xml/pp/node.rb", "lib/nokogiri/xml/processing_instruction.rb", "lib/nokogiri/xml/reader.rb", "lib/nokogiri/xml/relax_ng.rb", "lib/nokogiri/xml/sax.rb", "lib/nokogiri/xml/sax/document.rb", "lib/nokogiri/xml/sax/parser.rb", "lib/nokogiri/xml/sax/parser_context.rb", "lib/nokogiri/xml/sax/push_parser.rb", "lib/nokogiri/xml/schema.rb", "lib/nokogiri/xml/searchable.rb", "lib/nokogiri/xml/syntax_error.rb", "lib/nokogiri/xml/text.rb", "lib/nokogiri/xml/xpath.rb", "lib/nokogiri/xml/xpath/syntax_error.rb", "lib/nokogiri/xml/xpath_context.rb", "lib/nokogiri/xslt.rb", "lib/nokogiri/xslt/stylesheet.rb", "lib/xsd/xmlparser/nokogiri.rb", "patches/sort-patches-by-date", "ports/archives/libxml2-2.9.7.tar.gz", "ports/archives/libxslt-1.1.32.tar.gz", "suppressions/README.txt", "suppressions/nokogiri_ruby-2.supp", "tasks/test.rb", "test/css/test_nthiness.rb", "test/css/test_parser.rb", "test/css/test_tokenizer.rb", "test/css/test_xpath_visitor.rb", "test/decorators/test_slop.rb", "test/files/2ch.html", "test/files/GH_1042.html", "test/files/address_book.rlx", "test/files/address_book.xml", "test/files/atom.xml", "test/files/bar/bar.xsd", "test/files/bogus.xml", "test/files/dont_hurt_em_why.xml", "test/files/encoding.html", "test/files/encoding.xhtml", "test/files/exslt.xml", "test/files/exslt.xslt", "test/files/foo/foo.xsd", "test/files/metacharset.html", "test/files/namespace_pressure_test.xml", "test/files/noencoding.html", "test/files/po.xml", "test/files/po.xsd", "test/files/saml/saml20assertion_schema.xsd", "test/files/saml/saml20protocol_schema.xsd", "test/files/saml/xenc_schema.xsd", "test/files/saml/xmldsig_schema.xsd", "test/files/shift_jis.html", "test/files/shift_jis.xml", "test/files/shift_jis_no_charset.html", "test/files/slow-xpath.xml", "test/files/snuggles.xml", "test/files/staff.dtd", "test/files/staff.xml", "test/files/staff.xslt", "test/files/test_document_url/bar.xml", "test/files/test_document_url/document.dtd", "test/files/test_document_url/document.xml", "test/files/tlm.html", "test/files/to_be_xincluded.xml", "test/files/valid_bar.xml", "test/files/xinclude.xml", "test/helper.rb", "test/html/sax/test_parser.rb", "test/html/sax/test_parser_context.rb", "test/html/sax/test_parser_text.rb", "test/html/sax/test_push_parser.rb", "test/html/test_builder.rb", "test/html/test_document.rb", "test/html/test_document_encoding.rb", "test/html/test_document_fragment.rb", "test/html/test_element_description.rb", "test/html/test_named_characters.rb", "test/html/test_node.rb", "test/html/test_node_encoding.rb", "test/namespaces/test_additional_namespaces_in_builder_doc.rb", "test/namespaces/test_namespaces_aliased_default.rb", "test/namespaces/test_namespaces_in_builder_doc.rb", "test/namespaces/test_namespaces_in_cloned_doc.rb", "test/namespaces/test_namespaces_in_created_doc.rb", "test/namespaces/test_namespaces_in_parsed_doc.rb", "test/namespaces/test_namespaces_preservation.rb", "test/test_convert_xpath.rb", "test/test_css_cache.rb", "test/test_encoding_handler.rb", "test/test_memory_leak.rb", "test/test_nokogiri.rb", "test/test_soap4r_sax.rb", "test/test_xslt_transforms.rb", "test/xml/node/test_save_options.rb", "test/xml/node/test_subclass.rb", "test/xml/sax/test_parser.rb", "test/xml/sax/test_parser_context.rb", "test/xml/sax/test_parser_text.rb", "test/xml/sax/test_push_parser.rb", "test/xml/test_attr.rb", "test/xml/test_attribute_decl.rb", "test/xml/test_builder.rb", "test/xml/test_c14n.rb", "test/xml/test_cdata.rb", "test/xml/test_comment.rb", "test/xml/test_document.rb", "test/xml/test_document_encoding.rb", "test/xml/test_document_fragment.rb", "test/xml/test_dtd.rb", "test/xml/test_dtd_encoding.rb", "test/xml/test_element_content.rb", "test/xml/test_element_decl.rb", "test/xml/test_entity_decl.rb", "test/xml/test_entity_reference.rb", "test/xml/test_namespace.rb", "test/xml/test_node.rb", "test/xml/test_node_attributes.rb", "test/xml/test_node_encoding.rb", "test/xml/test_node_inheritance.rb", "test/xml/test_node_reparenting.rb", "test/xml/test_node_set.rb", "test/xml/test_parse_options.rb", "test/xml/test_processing_instruction.rb", "test/xml/test_reader.rb", "test/xml/test_reader_encoding.rb", "test/xml/test_relax_ng.rb", "test/xml/test_schema.rb", "test/xml/test_syntax_error.rb", "test/xml/test_text.rb", "test/xml/test_unparented_node.rb", "test/xml/test_xinclude.rb", "test/xml/test_xpath.rb", "test/xslt/test_custom_functions.rb", "test/xslt/test_exception_handling.rb"] s.homepage = "http://nokogiri.org" s.licenses = ["MIT"] s.rdoc_options = ["--main", "README.md"] s.require_paths = ["lib"] s.required_ruby_version = Gem::Requirement.new(">= 2.1.0") s.rubygems_version = "1.8.23" s.summary = "Nokogiri (\u{92f8}) is an HTML, XML, SAX, and Reader parser" if s.respond_to? :specification_version then s.specification_version = 4 if Gem::Version.new(Gem::VERSION) >= Gem::Version.new('1.2.0') then s.add_development_dependency(%q, ["~> 0.15"]) s.add_development_dependency(%q, ["~> 3.16"]) s.add_development_dependency(%q, ["~> 1.2"]) s.add_development_dependency(%q, ["~> 1.4"]) s.add_development_dependency(%q, ["~> 1.0"]) s.add_development_dependency(%q, ["~> 1.6"]) s.add_runtime_dependency(%q, ["~> 2.3.0"]) s.add_development_dependency(%q, ["~> 5.8.4"]) s.add_development_dependency(%q, ["~> 1.4.14"]) s.add_development_dependency(%q, ["~> 12.0"]) s.add_development_dependency(%q, ["~> 1.0.3"]) s.add_development_dependency(%q, ["~> 0.6.2"]) s.add_development_dependency(%q, ["~> 4.0"]) s.add_development_dependency(%q, ["~> 1.0.5"]) else s.add_dependency(%q, ["~> 0.15"]) s.add_dependency(%q, ["~> 3.16"]) s.add_dependency(%q, ["~> 1.2"]) s.add_dependency(%q, ["~> 1.4"]) s.add_dependency(%q, ["~> 1.0"]) s.add_dependency(%q, ["~> 1.6"]) s.add_dependency(%q, ["~> 2.3.0"]) s.add_dependency(%q, ["~> 5.8.4"]) s.add_dependency(%q, ["~> 1.4.14"]) s.add_dependency(%q, ["~> 12.0"]) s.add_dependency(%q, ["~> 1.0.3"]) s.add_dependency(%q, ["~> 0.6.2"]) s.add_dependency(%q, ["~> 4.0"]) s.add_dependency(%q, ["~> 1.0.5"]) end else s.add_dependency(%q, ["~> 0.15"]) s.add_dependency(%q, ["~> 3.16"]) s.add_dependency(%q, ["~> 1.2"]) s.add_dependency(%q, ["~> 1.4"]) s.add_dependency(%q, ["~> 1.0"]) s.add_dependency(%q, ["~> 1.6"]) s.add_dependency(%q, ["~> 2.3.0"]) s.add_dependency(%q, ["~> 5.8.4"]) s.add_dependency(%q, ["~> 1.4.14"]) s.add_dependency(%q, ["~> 12.0"]) s.add_dependency(%q, ["~> 1.0.3"]) s.add_dependency(%q, ["~> 0.6.2"]) s.add_dependency(%q, ["~> 4.0"]) s.add_dependency(%q, ["~> 1.0.5"]) end end nokogiri-1.8.2/ports/0000755000004100000410000000000013235345655014555 5ustar www-datawww-datanokogiri-1.8.2/ext/0000755000004100000410000000000013235345655014206 5ustar www-datawww-datanokogiri-1.8.2/ext/nokogiri/0000755000004100000410000000000013235345655016027 5ustar www-datawww-datanokogiri-1.8.2/ext/nokogiri/xml_attribute_decl.c0000644000004100000410000000262413235345655022051 0ustar www-datawww-data#include /* * call-seq: * attribute_type * * The attribute_type for this AttributeDecl */ static VALUE attribute_type(VALUE self) { xmlAttributePtr node; Data_Get_Struct(self, xmlAttribute, node); return INT2NUM((long)node->atype); } /* * call-seq: * default * * The default value */ static VALUE default_value(VALUE self) { xmlAttributePtr node; Data_Get_Struct(self, xmlAttribute, node); if(node->defaultValue) return NOKOGIRI_STR_NEW2(node->defaultValue); return Qnil; } /* * call-seq: * enumeration * * An enumeration of possible values */ static VALUE enumeration(VALUE self) { xmlAttributePtr node; xmlEnumerationPtr enm; VALUE list; Data_Get_Struct(self, xmlAttribute, node); list = rb_ary_new(); enm = node->tree; while(enm) { rb_ary_push(list, NOKOGIRI_STR_NEW2(enm->name)); enm = enm->next; } return list; } VALUE cNokogiriXmlAttributeDecl; void init_xml_attribute_decl() { VALUE nokogiri = rb_define_module("Nokogiri"); VALUE xml = rb_define_module_under(nokogiri, "XML"); VALUE node = rb_define_class_under(xml, "Node", rb_cObject); VALUE klass = rb_define_class_under(xml, "AttributeDecl", node); cNokogiriXmlAttributeDecl = klass; rb_define_method(klass, "attribute_type", attribute_type, 0); rb_define_method(klass, "default", default_value, 0); rb_define_method(klass, "enumeration", enumeration, 0); } nokogiri-1.8.2/ext/nokogiri/xml_sax_parser_context.h0000644000004100000410000000030013235345655022764 0ustar www-datawww-data#ifndef NOKOGIRI_XML_SAX_PARSER_CONTEXT #define NOKOGIRI_XML_SAX_PARSER_CONTEXT #include extern VALUE cNokogiriXmlSaxParserContext; void init_xml_sax_parser_context(); #endif nokogiri-1.8.2/ext/nokogiri/xml_libxml2_hacks.c0000644000004100000410000000563313235345655021604 0ustar www-datawww-data#ifndef HAVE_XMLFIRSTELEMENTCHILD #include /** * xmlFirstElementChild: * @parent: the parent node * * Finds the first child node of that element which is a Element node * Note the handling of entities references is different than in * the W3C DOM element traversal spec since we don't have back reference * from entities content to entities references. * * Returns the first element child or NULL if not available */ xmlNodePtr xmlFirstElementChild(xmlNodePtr parent) { xmlNodePtr cur = NULL; if (parent == NULL) return(NULL); switch (parent->type) { case XML_ELEMENT_NODE: case XML_ENTITY_NODE: case XML_DOCUMENT_NODE: case XML_HTML_DOCUMENT_NODE: cur = parent->children; break; default: return(NULL); } while (cur != NULL) { if (cur->type == XML_ELEMENT_NODE) return(cur); cur = cur->next; } return(NULL); } /** * xmlNextElementSibling: * @node: the current node * * Finds the first closest next sibling of the node which is an * element node. * Note the handling of entities references is different than in * the W3C DOM element traversal spec since we don't have back reference * from entities content to entities references. * * Returns the next element sibling or NULL if not available */ xmlNodePtr xmlNextElementSibling(xmlNodePtr node) { if (node == NULL) return(NULL); switch (node->type) { case XML_ELEMENT_NODE: case XML_TEXT_NODE: case XML_CDATA_SECTION_NODE: case XML_ENTITY_REF_NODE: case XML_ENTITY_NODE: case XML_PI_NODE: case XML_COMMENT_NODE: case XML_DTD_NODE: case XML_XINCLUDE_START: case XML_XINCLUDE_END: node = node->next; break; default: return(NULL); } while (node != NULL) { if (node->type == XML_ELEMENT_NODE) return(node); node = node->next; } return(NULL); } /** * xmlLastElementChild: * @parent: the parent node * * Finds the last child node of that element which is a Element node * Note the handling of entities references is different than in * the W3C DOM element traversal spec since we don't have back reference * from entities content to entities references. * * Returns the last element child or NULL if not available */ xmlNodePtr xmlLastElementChild(xmlNodePtr parent) { xmlNodePtr cur = NULL; if (parent == NULL) return(NULL); switch (parent->type) { case XML_ELEMENT_NODE: case XML_ENTITY_NODE: case XML_DOCUMENT_NODE: case XML_HTML_DOCUMENT_NODE: cur = parent->last; break; default: return(NULL); } while (cur != NULL) { if (cur->type == XML_ELEMENT_NODE) return(cur); cur = cur->prev; } return(NULL); } #endif nokogiri-1.8.2/ext/nokogiri/html_element_description.c0000644000004100000410000001341513235345655023257 0ustar www-datawww-data#include /* * call-seq: * required_attributes * * A list of required attributes for this element */ static VALUE required_attributes(VALUE self) { htmlElemDesc * description; VALUE list; int i; Data_Get_Struct(self, htmlElemDesc, description); list = rb_ary_new(); if(NULL == description->attrs_req) return list; for(i = 0; description->attrs_depr[i]; i++) { rb_ary_push(list, NOKOGIRI_STR_NEW2(description->attrs_req[i])); } return list; } /* * call-seq: * deprecated_attributes * * A list of deprecated attributes for this element */ static VALUE deprecated_attributes(VALUE self) { htmlElemDesc * description; VALUE list; int i; Data_Get_Struct(self, htmlElemDesc, description); list = rb_ary_new(); if(NULL == description->attrs_depr) return list; for(i = 0; description->attrs_depr[i]; i++) { rb_ary_push(list, NOKOGIRI_STR_NEW2(description->attrs_depr[i])); } return list; } /* * call-seq: * optional_attributes * * A list of optional attributes for this element */ static VALUE optional_attributes(VALUE self) { htmlElemDesc * description; VALUE list; int i; Data_Get_Struct(self, htmlElemDesc, description); list = rb_ary_new(); if(NULL == description->attrs_opt) return list; for(i = 0; description->attrs_opt[i]; i++) { rb_ary_push(list, NOKOGIRI_STR_NEW2(description->attrs_opt[i])); } return list; } /* * call-seq: * default_sub_element * * The default sub element for this element */ static VALUE default_sub_element(VALUE self) { htmlElemDesc * description; Data_Get_Struct(self, htmlElemDesc, description); if (description->defaultsubelt) return NOKOGIRI_STR_NEW2(description->defaultsubelt); return Qnil; } /* * call-seq: * sub_elements * * A list of allowed sub elements for this element. */ static VALUE sub_elements(VALUE self) { htmlElemDesc * description; VALUE list; int i; Data_Get_Struct(self, htmlElemDesc, description); list = rb_ary_new(); if(NULL == description->subelts) return list; for(i = 0; description->subelts[i]; i++) { rb_ary_push(list, NOKOGIRI_STR_NEW2(description->subelts[i])); } return list; } /* * call-seq: * description * * The description for this element */ static VALUE description(VALUE self) { htmlElemDesc * description; Data_Get_Struct(self, htmlElemDesc, description); return NOKOGIRI_STR_NEW2(description->desc); } /* * call-seq: * inline? * * Is this element an inline element? */ static VALUE inline_eh(VALUE self) { htmlElemDesc * description; Data_Get_Struct(self, htmlElemDesc, description); if(description->isinline) return Qtrue; return Qfalse; } /* * call-seq: * deprecated? * * Is this element deprecated? */ static VALUE deprecated_eh(VALUE self) { htmlElemDesc * description; Data_Get_Struct(self, htmlElemDesc, description); if(description->depr) return Qtrue; return Qfalse; } /* * call-seq: * empty? * * Is this an empty element? */ static VALUE empty_eh(VALUE self) { htmlElemDesc * description; Data_Get_Struct(self, htmlElemDesc, description); if(description->empty) return Qtrue; return Qfalse; } /* * call-seq: * save_end_tag? * * Should the end tag be saved? */ static VALUE save_end_tag_eh(VALUE self) { htmlElemDesc * description; Data_Get_Struct(self, htmlElemDesc, description); if(description->saveEndTag) return Qtrue; return Qfalse; } /* * call-seq: * implied_end_tag? * * Can the end tag be implied for this tag? */ static VALUE implied_end_tag_eh(VALUE self) { htmlElemDesc * description; Data_Get_Struct(self, htmlElemDesc, description); if(description->endTag) return Qtrue; return Qfalse; } /* * call-seq: * implied_start_tag? * * Can the start tag be implied for this tag? */ static VALUE implied_start_tag_eh(VALUE self) { htmlElemDesc * description; Data_Get_Struct(self, htmlElemDesc, description); if(description->startTag) return Qtrue; return Qfalse; } /* * call-seq: * name * * Get the tag name for this ElemementDescription */ static VALUE name(VALUE self) { htmlElemDesc * description; Data_Get_Struct(self, htmlElemDesc, description); if(NULL == description->name) return Qnil; return NOKOGIRI_STR_NEW2(description->name); } /* * call-seq: * [](tag_name) * * Get ElemementDescription for +tag_name+ */ static VALUE get_description(VALUE klass, VALUE tag_name) { const htmlElemDesc * description = htmlTagLookup( (const xmlChar *)StringValueCStr(tag_name) ); if(NULL == description) return Qnil; return Data_Wrap_Struct(klass, 0, 0, (void *)description); } VALUE cNokogiriHtmlElementDescription ; void init_html_element_description() { VALUE nokogiri = rb_define_module("Nokogiri"); VALUE html = rb_define_module_under(nokogiri, "HTML"); VALUE klass = rb_define_class_under(html, "ElementDescription",rb_cObject); cNokogiriHtmlElementDescription = klass; rb_define_singleton_method(klass, "[]", get_description, 1); rb_define_method(klass, "name", name, 0); rb_define_method(klass, "implied_start_tag?", implied_start_tag_eh, 0); rb_define_method(klass, "implied_end_tag?", implied_end_tag_eh, 0); rb_define_method(klass, "save_end_tag?", save_end_tag_eh, 0); rb_define_method(klass, "empty?", empty_eh, 0); rb_define_method(klass, "deprecated?", deprecated_eh, 0); rb_define_method(klass, "inline?", inline_eh, 0); rb_define_method(klass, "description", description, 0); rb_define_method(klass, "sub_elements", sub_elements, 0); rb_define_method(klass, "default_sub_element", default_sub_element, 0); rb_define_method(klass, "optional_attributes", optional_attributes, 0); rb_define_method(klass, "deprecated_attributes", deprecated_attributes, 0); rb_define_method(klass, "required_attributes", required_attributes, 0); } nokogiri-1.8.2/ext/nokogiri/xml_io.c0000644000004100000410000000227413235345655017467 0ustar www-datawww-data#include static ID id_read, id_write; VALUE read_check(VALUE *args) { return rb_funcall(args[0], id_read, 1, args[1]); } VALUE read_failed(void) { return Qundef; } int io_read_callback(void * ctx, char * buffer, int len) { VALUE string, args[2]; size_t str_len, safe_len; args[0] = (VALUE)ctx; args[1] = INT2NUM(len); string = rb_rescue(read_check, (VALUE)args, read_failed, 0); if (NIL_P(string)) return 0; if (string == Qundef) return -1; str_len = (size_t)RSTRING_LEN(string); safe_len = str_len > (size_t)len ? (size_t)len : str_len; memcpy(buffer, StringValuePtr(string), safe_len); return (int)safe_len; } VALUE write_check(VALUE *args) { return rb_funcall(args[0], id_write, 1, args[1]); } VALUE write_failed(void) { return Qundef; } int io_write_callback(void * ctx, char * buffer, int len) { VALUE args[2], size; args[0] = (VALUE)ctx; args[1] = rb_str_new(buffer, (long)len); size = rb_rescue(write_check, (VALUE)args, write_failed, 0); if (size == Qundef) return -1; return NUM2INT(size); } int io_close_callback(void * ctx) { return 0; } void init_nokogiri_io() { id_read = rb_intern("read"); id_write = rb_intern("write"); } nokogiri-1.8.2/ext/nokogiri/html_sax_parser_context.c0000644000004100000410000000600713235345655023135 0ustar www-datawww-data#include VALUE cNokogiriHtmlSaxParserContext ; static void deallocate(xmlParserCtxtPtr ctxt) { NOKOGIRI_DEBUG_START(handler); ctxt->sax = NULL; htmlFreeParserCtxt(ctxt); NOKOGIRI_DEBUG_END(handler); } static VALUE parse_memory(VALUE klass, VALUE data, VALUE encoding) { htmlParserCtxtPtr ctxt; if (NIL_P(data)) rb_raise(rb_eArgError, "data cannot be nil"); if (!(int)RSTRING_LEN(data)) rb_raise(rb_eRuntimeError, "data cannot be empty"); ctxt = htmlCreateMemoryParserCtxt(StringValuePtr(data), (int)RSTRING_LEN(data)); if (ctxt->sax) { xmlFree(ctxt->sax); ctxt->sax = NULL; } if (RTEST(encoding)) { xmlCharEncodingHandlerPtr enc = xmlFindCharEncodingHandler(StringValueCStr(encoding)); if (enc != NULL) { xmlSwitchToEncoding(ctxt, enc); if (ctxt->errNo == XML_ERR_UNSUPPORTED_ENCODING) { rb_raise(rb_eRuntimeError, "Unsupported encoding %s", StringValueCStr(encoding)); } } } return Data_Wrap_Struct(klass, NULL, deallocate, ctxt); } static VALUE parse_file(VALUE klass, VALUE filename, VALUE encoding) { htmlParserCtxtPtr ctxt = htmlCreateFileParserCtxt( StringValueCStr(filename), StringValueCStr(encoding) ); return Data_Wrap_Struct(klass, NULL, deallocate, ctxt); } static VALUE parse_doc(VALUE ctxt_val) { htmlParserCtxtPtr ctxt = (htmlParserCtxtPtr)ctxt_val; htmlParseDocument(ctxt); return Qnil; } static VALUE parse_doc_finalize(VALUE ctxt_val) { htmlParserCtxtPtr ctxt = (htmlParserCtxtPtr)ctxt_val; if (ctxt->myDoc) xmlFreeDoc(ctxt->myDoc); NOKOGIRI_SAX_TUPLE_DESTROY(ctxt->userData); return Qnil; } static VALUE parse_with(VALUE self, VALUE sax_handler) { htmlParserCtxtPtr ctxt; htmlSAXHandlerPtr sax; if (!rb_obj_is_kind_of(sax_handler, cNokogiriXmlSaxParser)) rb_raise(rb_eArgError, "argument must be a Nokogiri::XML::SAX::Parser"); Data_Get_Struct(self, htmlParserCtxt, ctxt); Data_Get_Struct(sax_handler, htmlSAXHandler, sax); /* Free the sax handler since we'll assign our own */ if (ctxt->sax && ctxt->sax != (xmlSAXHandlerPtr)&xmlDefaultSAXHandler) xmlFree(ctxt->sax); ctxt->sax = sax; ctxt->userData = (void *)NOKOGIRI_SAX_TUPLE_NEW(ctxt, sax_handler); rb_ensure(parse_doc, (VALUE)ctxt, parse_doc_finalize, (VALUE)ctxt); return self; } void init_html_sax_parser_context() { VALUE nokogiri = rb_define_module("Nokogiri"); VALUE xml = rb_define_module_under(nokogiri, "XML"); VALUE html = rb_define_module_under(nokogiri, "HTML"); VALUE sax = rb_define_module_under(xml, "SAX"); VALUE hsax = rb_define_module_under(html, "SAX"); VALUE pc = rb_define_class_under(sax, "ParserContext", rb_cObject); VALUE klass = rb_define_class_under(hsax, "ParserContext", pc); cNokogiriHtmlSaxParserContext = klass; rb_define_singleton_method(klass, "memory", parse_memory, 2); rb_define_singleton_method(klass, "file", parse_file, 2); rb_define_method(klass, "parse_with", parse_with, 1); } nokogiri-1.8.2/ext/nokogiri/xml_processing_instruction.c0000644000004100000410000000247013235345655023673 0ustar www-datawww-data#include /* * call-seq: * new(document, name, content) * * Create a new ProcessingInstruction element on the +document+ with +name+ * and +content+ */ static VALUE new(int argc, VALUE *argv, VALUE klass) { xmlDocPtr xml_doc; xmlNodePtr node; VALUE document; VALUE name; VALUE content; VALUE rest; VALUE rb_node; rb_scan_args(argc, argv, "3*", &document, &name, &content, &rest); Data_Get_Struct(document, xmlDoc, xml_doc); node = xmlNewDocPI( xml_doc, (const xmlChar *)StringValueCStr(name), (const xmlChar *)StringValueCStr(content) ); nokogiri_root_node(node); rb_node = Nokogiri_wrap_xml_node(klass, node); rb_obj_call_init(rb_node, argc, argv); if(rb_block_given_p()) rb_yield(rb_node); return rb_node; } VALUE cNokogiriXmlProcessingInstruction; void init_xml_processing_instruction() { VALUE nokogiri = rb_define_module("Nokogiri"); VALUE xml = rb_define_module_under(nokogiri, "XML"); VALUE node = rb_define_class_under(xml, "Node", rb_cObject); /* * ProcessingInstruction represents a ProcessingInstruction node in an xml * document. */ VALUE klass = rb_define_class_under(xml, "ProcessingInstruction", node); cNokogiriXmlProcessingInstruction = klass; rb_define_singleton_method(klass, "new", new, -1); } nokogiri-1.8.2/ext/nokogiri/xslt_stylesheet.c0000644000004100000410000001637613235345655021453 0ustar www-datawww-data#include #include #include #include #include VALUE xslt; int vasprintf (char **strp, const char *fmt, va_list ap); void vasprintf_free (void *p); static void mark(nokogiriXsltStylesheetTuple *wrapper) { rb_gc_mark(wrapper->func_instances); } static void dealloc(nokogiriXsltStylesheetTuple *wrapper) { xsltStylesheetPtr doc = wrapper->ss; NOKOGIRI_DEBUG_START(doc); xsltFreeStylesheet(doc); /* commented out for now. */ NOKOGIRI_DEBUG_END(doc); free(wrapper); } static void xslt_generic_error_handler(void * ctx, const char *msg, ...) { char * message; va_list args; va_start(args, msg); vasprintf(&message, msg, args); va_end(args); rb_str_cat2((VALUE)ctx, message); vasprintf_free(message); } VALUE Nokogiri_wrap_xslt_stylesheet(xsltStylesheetPtr ss) { VALUE self; nokogiriXsltStylesheetTuple *wrapper; self = Data_Make_Struct(cNokogiriXsltStylesheet, nokogiriXsltStylesheetTuple, mark, dealloc, wrapper); ss->_private = (void *)self; wrapper->ss = ss; wrapper->func_instances = rb_ary_new(); return self; } /* * call-seq: * parse_stylesheet_doc(document) * * Parse a stylesheet from +document+. */ static VALUE parse_stylesheet_doc(VALUE klass, VALUE xmldocobj) { xmlDocPtr xml, xml_cpy; VALUE errstr, exception; xsltStylesheetPtr ss ; Data_Get_Struct(xmldocobj, xmlDoc, xml); exsltRegisterAll(); errstr = rb_str_new(0, 0); xsltSetGenericErrorFunc((void *)errstr, xslt_generic_error_handler); xml_cpy = xmlCopyDoc(xml, 1); /* 1 => recursive */ ss = xsltParseStylesheetDoc(xml_cpy); xsltSetGenericErrorFunc(NULL, NULL); if (!ss) { xmlFreeDoc(xml_cpy); exception = rb_exc_new3(rb_eRuntimeError, errstr); rb_exc_raise(exception); } return Nokogiri_wrap_xslt_stylesheet(ss); } /* * call-seq: * serialize(document) * * Serialize +document+ to an xml string. */ static VALUE serialize(VALUE self, VALUE xmlobj) { xmlDocPtr xml ; nokogiriXsltStylesheetTuple *wrapper; xmlChar* doc_ptr ; int doc_len ; VALUE rval ; Data_Get_Struct(xmlobj, xmlDoc, xml); Data_Get_Struct(self, nokogiriXsltStylesheetTuple, wrapper); xsltSaveResultToString(&doc_ptr, &doc_len, xml, wrapper->ss); rval = NOKOGIRI_STR_NEW(doc_ptr, doc_len); xmlFree(doc_ptr); return rval ; } static void swallow_superfluous_xml_errors(void * userdata, xmlErrorPtr error, ...) { } /* * call-seq: * transform(document, params = []) * * Apply an XSLT stylesheet to an XML::Document. * +params+ is an array of strings used as XSLT parameters. * returns Nokogiri::XML::Document * * Example: * * doc = Nokogiri::XML(File.read(ARGV[0])) * xslt = Nokogiri::XSLT(File.read(ARGV[1])) * puts xslt.transform(doc, ['key', 'value']) * */ static VALUE transform(int argc, VALUE* argv, VALUE self) { VALUE xmldoc, paramobj, errstr, exception ; xmlDocPtr xml ; xmlDocPtr result ; nokogiriXsltStylesheetTuple *wrapper; const char** params ; long param_len, j ; int parse_error_occurred ; rb_scan_args(argc, argv, "11", &xmldoc, ¶mobj); if (NIL_P(paramobj)) { paramobj = rb_ary_new2(0L) ; } if (!rb_obj_is_kind_of(xmldoc, cNokogiriXmlDocument)) rb_raise(rb_eArgError, "argument must be a Nokogiri::XML::Document"); /* handle hashes as arguments. */ if(T_HASH == TYPE(paramobj)) { paramobj = rb_funcall(paramobj, rb_intern("to_a"), 0); paramobj = rb_funcall(paramobj, rb_intern("flatten"), 0); } Check_Type(paramobj, T_ARRAY); Data_Get_Struct(xmldoc, xmlDoc, xml); Data_Get_Struct(self, nokogiriXsltStylesheetTuple, wrapper); param_len = RARRAY_LEN(paramobj); params = calloc((size_t)param_len+1, sizeof(char*)); for (j = 0 ; j < param_len ; j++) { VALUE entry = rb_ary_entry(paramobj, j); const char * ptr = StringValueCStr(entry); params[j] = ptr; } params[param_len] = 0 ; errstr = rb_str_new(0, 0); xsltSetGenericErrorFunc((void *)errstr, xslt_generic_error_handler); xmlSetGenericErrorFunc(NULL, (xmlGenericErrorFunc)&swallow_superfluous_xml_errors); result = xsltApplyStylesheet(wrapper->ss, xml, params); free(params); xsltSetGenericErrorFunc(NULL, NULL); xmlSetGenericErrorFunc(NULL, NULL); parse_error_occurred = (Qfalse == rb_funcall(errstr, rb_intern("empty?"), 0)); if (parse_error_occurred) { exception = rb_exc_new3(rb_eRuntimeError, errstr); rb_exc_raise(exception); } return Nokogiri_wrap_xml_document((VALUE)0, result) ; } static void method_caller(xmlXPathParserContextPtr ctxt, int nargs) { VALUE handler; const char *function_name; xsltTransformContextPtr transform; const xmlChar *functionURI; transform = xsltXPathGetTransformContext(ctxt); functionURI = ctxt->context->functionURI; handler = (VALUE)xsltGetExtData(transform, functionURI); function_name = (const char*)(ctxt->context->function); Nokogiri_marshal_xpath_funcall_and_return_values(ctxt, nargs, handler, (const char*)function_name); } static void * initFunc(xsltTransformContextPtr ctxt, const xmlChar *uri) { VALUE modules = rb_iv_get(xslt, "@modules"); VALUE obj = rb_hash_aref(modules, rb_str_new2((const char *)uri)); VALUE args = { Qfalse }; VALUE methods = rb_funcall(obj, rb_intern("instance_methods"), 1, args); VALUE inst; nokogiriXsltStylesheetTuple *wrapper; int i; for(i = 0; i < RARRAY_LEN(methods); i++) { VALUE method_name = rb_obj_as_string(rb_ary_entry(methods, i)); xsltRegisterExtFunction(ctxt, (unsigned char *)StringValueCStr(method_name), uri, method_caller); } Data_Get_Struct(ctxt->style->_private, nokogiriXsltStylesheetTuple, wrapper); inst = rb_class_new_instance(0, NULL, obj); rb_ary_push(wrapper->func_instances, inst); return (void *)inst; } static void shutdownFunc(xsltTransformContextPtr ctxt, const xmlChar *uri, void *data) { nokogiriXsltStylesheetTuple *wrapper; Data_Get_Struct(ctxt->style->_private, nokogiriXsltStylesheetTuple, wrapper); rb_ary_clear(wrapper->func_instances); } /* * call-seq: * register(uri, custom_handler_class) * * Register a class that implements custom XSLT transformation functions. */ static VALUE registr(VALUE self, VALUE uri, VALUE obj) { VALUE modules = rb_iv_get(self, "@modules"); if(NIL_P(modules)) rb_raise(rb_eRuntimeError, "wtf! @modules isn't set"); rb_hash_aset(modules, uri, obj); xsltRegisterExtModule((unsigned char *)StringValueCStr(uri), initFunc, shutdownFunc); return self; } VALUE cNokogiriXsltStylesheet ; void init_xslt_stylesheet() { VALUE nokogiri; VALUE klass; nokogiri = rb_define_module("Nokogiri"); xslt = rb_define_module_under(nokogiri, "XSLT"); klass = rb_define_class_under(xslt, "Stylesheet", rb_cObject); rb_iv_set(xslt, "@modules", rb_hash_new()); cNokogiriXsltStylesheet = klass; rb_define_singleton_method(klass, "parse_stylesheet_doc", parse_stylesheet_doc, 1); rb_define_singleton_method(xslt, "register", registr, 2); rb_define_method(klass, "serialize", serialize, 1); rb_define_method(klass, "transform", transform, -1); } nokogiri-1.8.2/ext/nokogiri/xml_text.c0000644000004100000410000000216713235345655020045 0ustar www-datawww-data#include /* * call-seq: * new(content, document) * * Create a new Text element on the +document+ with +content+ */ static VALUE new(int argc, VALUE *argv, VALUE klass) { xmlDocPtr doc; xmlNodePtr node; VALUE string; VALUE document; VALUE rest; VALUE rb_node; rb_scan_args(argc, argv, "2*", &string, &document, &rest); Data_Get_Struct(document, xmlDoc, doc); node = xmlNewText((xmlChar *)StringValueCStr(string)); node->doc = doc->doc; nokogiri_root_node(node); rb_node = Nokogiri_wrap_xml_node(klass, node) ; rb_obj_call_init(rb_node, argc, argv); if(rb_block_given_p()) rb_yield(rb_node); return rb_node; } VALUE cNokogiriXmlText ; void init_xml_text() { VALUE nokogiri = rb_define_module("Nokogiri"); VALUE xml = rb_define_module_under(nokogiri, "XML"); /* */ VALUE node = rb_define_class_under(xml, "Node", rb_cObject); VALUE char_data = rb_define_class_under(xml, "CharacterData", node); /* * Wraps Text nodes. */ VALUE klass = rb_define_class_under(xml, "Text", char_data); cNokogiriXmlText = klass; rb_define_singleton_method(klass, "new", new, -1); } nokogiri-1.8.2/ext/nokogiri/xml_node_set.h0000644000004100000410000000064613235345655020666 0ustar www-datawww-data#ifndef NOKOGIRI_XML_NODE_SET #define NOKOGIRI_XML_NODE_SET #include void init_xml_node_set(); extern VALUE cNokogiriXmlNodeSet ; VALUE Nokogiri_wrap_xml_node_set(xmlNodeSetPtr node_set, VALUE document) ; VALUE Nokogiri_wrap_xml_node_set_node(xmlNodePtr node, VALUE node_set) ; VALUE Nokogiri_wrap_xml_node_set_namespace(xmlNsPtr node, VALUE node_set) ; int Nokogiri_namespace_eh(xmlNodePtr node) ; #endif nokogiri-1.8.2/ext/nokogiri/xml_text.h0000644000004100000410000000021213235345655020037 0ustar www-datawww-data#ifndef NOKOGIRI_XML_TEXT #define NOKOGIRI_XML_TEXT #include void init_xml_text(); extern VALUE cNokogiriXmlText ; #endif nokogiri-1.8.2/ext/nokogiri/html_sax_push_parser.h0000644000004100000410000000027013235345655022431 0ustar www-datawww-data#ifndef NOKOGIRI_HTML_SAX_PUSH_PARSER #define NOKOGIRI_HTML_SAX_PUSH_PARSER #include void init_html_sax_push_parser(); extern VALUE cNokogiriHtmlSaxPushParser ; #endif nokogiri-1.8.2/ext/nokogiri/xml_comment.c0000644000004100000410000000324713235345655020523 0ustar www-datawww-data#include static ID document_id ; /* * call-seq: * new(document_or_node, content) * * Create a new Comment element on the +document+ with +content+. * Alternatively, if a +node+ is passed, the +node+'s document is used. */ static VALUE new(int argc, VALUE *argv, VALUE klass) { xmlDocPtr xml_doc; xmlNodePtr node; VALUE document; VALUE content; VALUE rest; VALUE rb_node; rb_scan_args(argc, argv, "2*", &document, &content, &rest); if (rb_obj_is_kind_of(document, cNokogiriXmlNode)) { document = rb_funcall(document, document_id, 0); } else if ( !rb_obj_is_kind_of(document, cNokogiriXmlDocument) && !rb_obj_is_kind_of(document, cNokogiriXmlDocumentFragment)) { rb_raise(rb_eArgError, "first argument must be a XML::Document or XML::Node"); } Data_Get_Struct(document, xmlDoc, xml_doc); node = xmlNewDocComment( xml_doc, (const xmlChar *)StringValueCStr(content) ); rb_node = Nokogiri_wrap_xml_node(klass, node); rb_obj_call_init(rb_node, argc, argv); nokogiri_root_node(node); if(rb_block_given_p()) rb_yield(rb_node); return rb_node; } VALUE cNokogiriXmlComment; void init_xml_comment() { VALUE nokogiri = rb_define_module("Nokogiri"); VALUE xml = rb_define_module_under(nokogiri, "XML"); VALUE node = rb_define_class_under(xml, "Node", rb_cObject); VALUE char_data = rb_define_class_under(xml, "CharacterData", node); /* * Comment represents a comment node in an xml document. */ VALUE klass = rb_define_class_under(xml, "Comment", char_data); cNokogiriXmlComment = klass; rb_define_singleton_method(klass, "new", new, -1); document_id = rb_intern("document"); } nokogiri-1.8.2/ext/nokogiri/extconf.rb0000644000004100000410000004504013235345655020025 0ustar www-datawww-data# :stopdoc: ENV['RC_ARCHS'] = '' if RUBY_PLATFORM =~ /darwin/ require 'mkmf' ROOT = File.expand_path(File.join(File.dirname(__FILE__), '..', '..')) # # functions # def windows? RbConfig::CONFIG['target_os'] =~ /mingw32|mswin/ end def solaris? RbConfig::CONFIG['target_os'] =~ /solaris/ end def darwin? RbConfig::CONFIG['target_os'] =~ /darwin/ end def openbsd? RbConfig::CONFIG['target_os'] =~ /openbsd/ end def nix? ! (windows? || solaris? || darwin?) end def sh_export_path path # because libxslt 1.1.29 configure.in uses AC_PATH_TOOL which treats ":" # as a $PATH separator, we need to convert windows paths from # # C:/path/to/foo # # to # # /C/path/to/foo # # which is sh-compatible, in order to find things properly during # configuration if windows? match = Regexp.new("^([A-Z]):(/.*)").match(path) if match && match.length == 3 return File.join("/", match[1], match[2]) end end path end def do_help print < SRC else version_int = sprintf "%d%2.2d%2.2d", *(version.split(".")) <<-SRC #include #if LIBXML_VERSION < #{version_int} #error libxml2 is older than #{version} #endif SRC end try_cpp source end def add_cflags(flags) print "checking if the C compiler accepts #{flags}... " with_cflags("#{$CFLAGS} #{flags}") do if nokogiri_try_compile puts 'yes' true else puts 'no' false end end end def preserving_globals values = [ $arg_config, $CFLAGS, $CPPFLAGS, $LDFLAGS, $LIBPATH, $libs ].map(&:dup) yield ensure $arg_config, $CFLAGS, $CPPFLAGS, $LDFLAGS, $LIBPATH, $libs = values end def asplode(lib) abort "-----\n#{lib} is missing. Please locate mkmf.log to investigate how it is failing.\n-----" end def have_iconv?(using = nil) checking_for(using ? "iconv using #{using}" : 'iconv') do ['', '-liconv'].any? do |opt| preserving_globals do yield if block_given? try_link(<<-'SRC', opt) #include #include int main(void) { iconv_t cd = iconv_open("", ""); iconv(cd, NULL, NULL, NULL, NULL); return EXIT_SUCCESS; } SRC end end end end def iconv_configure_flags # If --with-iconv-dir or --with-opt-dir is given, it should be # the first priority %w[iconv opt].each do |name| if (config = preserving_globals { dir_config(name) }).any? && have_iconv?("--with-#{name}-* flags") { dir_config(name) } idirs, ldirs = config.map do |dirs| Array(dirs).flat_map do |dir| dir.split(File::PATH_SEPARATOR) end if dirs end return [ '--with-iconv=yes', *("CPPFLAGS=#{idirs.map { |dir| '-I' + dir }.join(' ')}" if idirs), *("LDFLAGS=#{ldirs.map { |dir| '-L' + dir }.join(' ')}" if ldirs), ] end end if have_iconv? return ['--with-iconv=yes'] end if (config = preserving_globals { package_config('libiconv') }) && have_iconv?('pkg-config libiconv') { package_config('libiconv') } cflags, ldflags, libs = config return [ '--with-iconv=yes', "CPPFLAGS=#{cflags}", "LDFLAGS=#{ldflags}", "LIBS=#{libs}", ] end asplode "libiconv" end # When using rake-compiler-dock on Windows, the underlying Virtualbox shared # folders don't support symlinks, but libiconv expects it for a build on # Linux. We work around this limitation by using the temp dir for cooking. def chdir_for_build build_dir = ENV['RCD_HOST_RUBY_PLATFORM'].to_s =~ /mingw|mswin|cygwin/ ? '/tmp' : '.' Dir.chdir(build_dir) do yield end end def process_recipe(name, version, static_p, cross_p) MiniPortile.new(name, version).tap do |recipe| recipe.target = File.join(ROOT, "ports") # Prefer host_alias over host in order to use i586-mingw32msvc as # correct compiler prefix for cross build, but use host if not set. recipe.host = RbConfig::CONFIG["host_alias"].empty? ? RbConfig::CONFIG["host"] : RbConfig::CONFIG["host_alias"] recipe.patch_files = Dir[File.join(ROOT, "patches", name, "*.patch")].sort recipe.configure_options << "--libdir=#{File.join(recipe.path, "lib")}" yield recipe env = Hash.new do |hash, key| hash[key] = "#{ENV[key]}" # (ENV[key].dup rescue '') end recipe.configure_options.flatten! recipe.configure_options.delete_if do |option| case option when /\A(\w+)=(.*)\z/ env[$1] = $2 true else false end end if static_p recipe.configure_options += [ "--disable-shared", "--enable-static", ] env['CFLAGS'] = "-fPIC #{env['CFLAGS']}" else recipe.configure_options += [ "--enable-shared", "--disable-static", ] end if cross_p recipe.configure_options += [ "--target=#{recipe.host}", "--host=#{recipe.host}", ] end if RbConfig::CONFIG['target_cpu'] == 'universal' %w[CFLAGS LDFLAGS].each do |key| unless env[key].include?('-arch') env[key] += ' ' + RbConfig::CONFIG['ARCH_FLAG'] end end end recipe.configure_options += env.map do |key, value| "#{key}=#{value}" end message <<-"EOS" ************************************************************************ IMPORTANT NOTICE: Building Nokogiri with a packaged version of #{name}-#{version}#{'.' if recipe.patch_files.empty?} EOS unless recipe.patch_files.empty? message "with the following patches applied:\n" recipe.patch_files.each do |patch| message "\t- %s\n" % File.basename(patch) end end message <<-"EOS" Team Nokogiri will keep on doing their best to provide security updates in a timely manner, but if this is a concern for you and want to use the system library instead; abort this installation process and reinstall nokogiri as follows: gem install nokogiri -- --use-system-libraries [--with-xml2-config=/path/to/xml2-config] [--with-xslt-config=/path/to/xslt-config] If you are using Bundler, tell it to use the option: bundle config build.nokogiri --use-system-libraries bundle install EOS message <<-"EOS" if name == 'libxml2' Note, however, that nokogiri is not fully compatible with arbitrary versions of libxml2 provided by OS/package vendors. EOS message <<-"EOS" ************************************************************************ EOS checkpoint = "#{recipe.target}/#{recipe.name}-#{recipe.version}-#{recipe.host}.installed" unless File.exist?(checkpoint) chdir_for_build do recipe.cook end FileUtils.touch checkpoint end recipe.activate end end def lib_a(ldflag) case ldflag when /\A-l(.+)/ "lib#{$1}.#{$LIBEXT}" end end def using_system_libraries? arg_config('--use-system-libraries', !!ENV['NOKOGIRI_USE_SYSTEM_LIBRARIES']) end # # main # case when arg_config('--help') do_help when arg_config('--clean') do_clean end if openbsd? && !using_system_libraries? if `#{ENV['CC'] || '/usr/bin/cc'} -v 2>&1` !~ /clang/ ENV['CC'] ||= find_executable('egcc') or abort "Please install gcc 4.9+ from ports using `pkg_add -v gcc`" end ENV['CFLAGS'] = "#{ENV['CFLAGS']} -I /usr/local/include" end RbConfig::MAKEFILE_CONFIG['CC'] = ENV['CC'] if ENV['CC'] # use same c compiler for libxml and libxslt ENV['CC'] = RbConfig::MAKEFILE_CONFIG['CC'] $LIBS << " #{ENV["LIBS"]}" # Read CFLAGS from ENV and make sure compiling works. add_cflags(ENV["CFLAGS"]) if windows? $CFLAGS << " -DXP_WIN -DXP_WIN32 -DUSE_INCLUDED_VASPRINTF" end if solaris? $CFLAGS << " -DUSE_INCLUDED_VASPRINTF" end if darwin? # Let Apple LLVM/clang 5.1 ignore unknown compiler flags add_cflags("-Wno-error=unused-command-line-argument-hard-error-in-future") end if nix? $CFLAGS << " -g -DXP_UNIX" end if RUBY_PLATFORM =~ /mingw/i # Work around a character escaping bug in MSYS by passing an arbitrary # double quoted parameter to gcc. See https://sourceforge.net/p/mingw/bugs/2142 $CPPFLAGS << ' "-Idummypath"' end if RbConfig::MAKEFILE_CONFIG['CC'] =~ /gcc/ $CFLAGS << " -O3" unless $CFLAGS[/-O\d/] $CFLAGS << " -Wall -Wcast-qual -Wwrite-strings -Wconversion -Wmissing-noreturn -Winline" end case when using_system_libraries? message "Building nokogiri using system libraries.\n" dir_config('zlib') # Using system libraries means we rely on the system libxml2 with # regard to the iconv support. dir_config('xml2').any? or package_config('libxml-2.0') dir_config('xslt').any? or package_config('libxslt') dir_config('exslt').any? or package_config('libexslt') check_libxml_version or abort "ERROR: cannot discover where libxml2 is located on your system. please make sure `pkg-config` is installed." check_libxml_version("2.6.21") or abort "ERROR: libxml2 version 2.6.21 or later is required!" check_libxml_version("2.9.3") or warn "WARNING: libxml2 version 2.9.3 or later is highly recommended, but proceeding anyway." else message "Building nokogiri using packaged libraries.\n" # The gem version constraint in the Rakefile is not respected at install time. # Keep this version in sync with the one in the Rakefile ! require 'rubygems' gem 'mini_portile2', '~> 2.3.0' require 'mini_portile2' message "Using mini_portile version #{MiniPortile::VERSION}\n" require 'yaml' static_p = enable_config('static', true) or message "Static linking is disabled.\n" dir_config('zlib') dependencies = YAML.load_file(File.join(ROOT, "dependencies.yml")) cross_build_p = enable_config("cross-build") if cross_build_p || windows? zlib_recipe = process_recipe("zlib", dependencies["zlib"]["version"], static_p, cross_build_p) do |recipe| recipe.files = [{ url: "http://zlib.net/fossils/#{recipe.name}-#{recipe.version}.tar.gz", sha256: dependencies["zlib"]["sha256"] }] class << recipe attr_accessor :cross_build_p def configure Dir.chdir work_path do mk = File.read 'win32/Makefile.gcc' File.open 'win32/Makefile.gcc', 'wb' do |f| f.puts "BINARY_PATH = #{path}/bin" f.puts "LIBRARY_PATH = #{path}/lib" f.puts "INCLUDE_PATH = #{path}/include" mk.sub!(/^PREFIX\s*=\s*$/, "PREFIX = #{host}-") if cross_build_p f.puts mk end end end def configured? Dir.chdir work_path do !! (File.read('win32/Makefile.gcc') =~ /^BINARY_PATH/) end end def compile execute "compile", "make -f win32/Makefile.gcc" end def install execute "install", "make -f win32/Makefile.gcc install" end end recipe.cross_build_p = cross_build_p end libiconv_recipe = process_recipe("libiconv", dependencies["libiconv"]["version"], static_p, cross_build_p) do |recipe| recipe.files = [{ url: "http://ftp.gnu.org/pub/gnu/libiconv/#{recipe.name}-#{recipe.version}.tar.gz", sha256: dependencies["libiconv"]["sha256"] }] recipe.configure_options += [ "CPPFLAGS=-Wall", "CFLAGS=-O2 -g", "CXXFLAGS=-O2 -g", "LDFLAGS=" ] end else if darwin? && !have_header('iconv.h') abort <<'EOM'.chomp ----- The file "iconv.h" is missing in your build environment, which means you haven't installed Xcode Command Line Tools properly. To install Command Line Tools, try running `xcode-select --install` on terminal and follow the instructions. If it fails, open Xcode.app, select from the menu "Xcode" - "Open Developer Tool" - "More Developer Tools" to open the developer site, download the installer for your OS version and run it. ----- EOM end end unless windows? preserving_globals { have_library('z', 'gzdopen', 'zlib.h') } or abort 'zlib is missing; necessary for building libxml2' end libxml2_recipe = process_recipe("libxml2", dependencies["libxml2"]["version"], static_p, cross_build_p) do |recipe| recipe.files = [{ url: "http://xmlsoft.org/sources/#{recipe.name}-#{recipe.version}.tar.gz", sha256: dependencies["libxml2"]["sha256"] }] recipe.configure_options += [ "--without-python", "--without-readline", *(zlib_recipe ? ["--with-zlib=#{zlib_recipe.path}", "CFLAGS=-I#{zlib_recipe.path}/include"] : []), *(libiconv_recipe ? "--with-iconv=#{libiconv_recipe.path}" : iconv_configure_flags), "--with-c14n", "--with-debug", "--with-threads" ] end libxslt_recipe = process_recipe("libxslt", dependencies["libxslt"]["version"], static_p, cross_build_p) do |recipe| recipe.files = [{ url: "http://xmlsoft.org/sources/#{recipe.name}-#{recipe.version}.tar.gz", sha256: dependencies["libxslt"]["sha256"] }] recipe.configure_options += [ "--without-python", "--without-crypto", "--with-debug", "--with-libxml-prefix=#{sh_export_path(libxml2_recipe.path)}" ] end $CFLAGS << ' ' << '-DNOKOGIRI_USE_PACKAGED_LIBRARIES' $LIBPATH = ["#{zlib_recipe.path}/lib"] | $LIBPATH if zlib_recipe $LIBPATH = ["#{libiconv_recipe.path}/lib"] | $LIBPATH if libiconv_recipe have_lzma = preserving_globals { have_library('lzma') } $libs = $libs.shellsplit.tap do |libs| [libxml2_recipe, libxslt_recipe].each do |recipe| libname = recipe.name[/\Alib(.+)\z/, 1] File.join(recipe.path, "bin", "#{libname}-config").tap do |config| # call config scripts explicit with 'sh' for compat with Windows $CPPFLAGS = `sh #{config} --cflags`.strip << ' ' << $CPPFLAGS `sh #{config} --libs`.strip.shellsplit.each do |arg| case arg when /\A-L(.+)\z/ # Prioritize ports' directories if $1.start_with?(ROOT + '/') $LIBPATH = [$1] | $LIBPATH else $LIBPATH = $LIBPATH | [$1] end when /\A-l./ libs.unshift(arg) else $LDFLAGS << ' ' << arg.shellescape end end end # Defining a macro that expands to a C string; double quotes are significant. $CPPFLAGS << ' ' << "-DNOKOGIRI_#{recipe.name.upcase}_PATH=\"#{recipe.path}\"".inspect $CPPFLAGS << ' ' << "-DNOKOGIRI_#{recipe.name.upcase}_PATCHES=\"#{recipe.patch_files.map { |path| File.basename(path) }.join(' ')}\"".inspect case libname when 'xml2' # xslt-config --libs or pkg-config libxslt --libs does not include # -llzma, so we need to add it manually when linking statically. if static_p && have_lzma # Add it at the end; GH #988 libs << '-llzma' end when 'xslt' # xslt-config does not have a flag to emit options including # -lexslt, so add it manually. libs.unshift('-lexslt') end end end.shelljoin if static_p $libs = $libs.shellsplit.map do |arg| case arg when '-lxml2' File.join(libxml2_recipe.path, 'lib', lib_a(arg)) when '-lxslt', '-lexslt' File.join(libxslt_recipe.path, 'lib', lib_a(arg)) else arg end end.shelljoin end end { "xml2" => ['xmlParseDoc', 'libxml/parser.h'], "xslt" => ['xsltParseStylesheetDoc', 'libxslt/xslt.h'], "exslt" => ['exsltFuncRegister', 'libexslt/exslt.h'], }.each do |lib, (func, header)| have_func(func, header) || have_library(lib, func, header) || have_library("lib#{lib}", func, header) or asplode("lib#{lib}") end have_func('xmlHasFeature') or abort "xmlHasFeature() is missing." have_func('xmlFirstElementChild') have_func('xmlRelaxNGSetParserStructuredErrors') have_func('xmlRelaxNGSetParserStructuredErrors') have_func('xmlRelaxNGSetValidStructuredErrors') have_func('xmlSchemaSetValidStructuredErrors') have_func('xmlSchemaSetParserStructuredErrors') create_makefile('nokogiri/nokogiri') if enable_config('clean', true) # Do not clean if run in a development work tree. File.open('Makefile', 'at') do |mk| mk.print < static void deallocate(xmlParserCtxtPtr ctx) { NOKOGIRI_DEBUG_START(ctx); if (ctx != NULL) { NOKOGIRI_SAX_TUPLE_DESTROY(ctx->userData); xmlFreeParserCtxt(ctx); } NOKOGIRI_DEBUG_END(ctx); } static VALUE allocate(VALUE klass) { return Data_Wrap_Struct(klass, NULL, deallocate, NULL); } /* * call-seq: * native_write(chunk, last_chunk) * * Write +chunk+ to PushParser. +last_chunk+ triggers the end_document handle */ static VALUE native_write(VALUE self, VALUE _chunk, VALUE _last_chunk) { xmlParserCtxtPtr ctx; const char * chunk = NULL; int size = 0; Data_Get_Struct(self, xmlParserCtxt, ctx); if (Qnil != _chunk) { chunk = StringValuePtr(_chunk); size = (int)RSTRING_LEN(_chunk); } if (xmlParseChunk(ctx, chunk, size, Qtrue == _last_chunk ? 1 : 0)) { if (!(ctx->options & XML_PARSE_RECOVER)) { xmlErrorPtr e = xmlCtxtGetLastError(ctx); Nokogiri_error_raise(NULL, e); } } return self; } /* * call-seq: * initialize_native(xml_sax, filename) * * Initialize the push parser with +xml_sax+ using +filename+ */ static VALUE initialize_native(VALUE self, VALUE _xml_sax, VALUE _filename) { xmlSAXHandlerPtr sax; const char * filename = NULL; xmlParserCtxtPtr ctx; Data_Get_Struct(_xml_sax, xmlSAXHandler, sax); if (_filename != Qnil) { filename = StringValueCStr(_filename); } ctx = xmlCreatePushParserCtxt( sax, NULL, NULL, 0, filename ); if (ctx == NULL) { rb_raise(rb_eRuntimeError, "Could not create a parser context"); } ctx->userData = NOKOGIRI_SAX_TUPLE_NEW(ctx, self); ctx->sax2 = 1; DATA_PTR(self) = ctx; return self; } static VALUE get_options(VALUE self) { xmlParserCtxtPtr ctx; Data_Get_Struct(self, xmlParserCtxt, ctx); return INT2NUM(ctx->options); } static VALUE set_options(VALUE self, VALUE options) { xmlParserCtxtPtr ctx; Data_Get_Struct(self, xmlParserCtxt, ctx); if (xmlCtxtUseOptions(ctx, (int)NUM2INT(options)) != 0) { rb_raise(rb_eRuntimeError, "Cannot set XML parser context options"); } return Qnil; } /* * call-seq: * replace_entities * * Should this parser replace entities? & will get converted to '&' if * set to true */ static VALUE get_replace_entities(VALUE self) { xmlParserCtxtPtr ctx; Data_Get_Struct(self, xmlParserCtxt, ctx); if (0 == ctx->replaceEntities) { return Qfalse; } else { return Qtrue; } } /* * call-seq: * replace_entities=(boolean) * * Should this parser replace entities? & will get converted to '&' if * set to true */ static VALUE set_replace_entities(VALUE self, VALUE value) { xmlParserCtxtPtr ctx; Data_Get_Struct(self, xmlParserCtxt, ctx); if (Qfalse == value) { ctx->replaceEntities = 0; } else { ctx->replaceEntities = 1; } return value; } VALUE cNokogiriXmlSaxPushParser ; void init_xml_sax_push_parser() { VALUE nokogiri = rb_define_module("Nokogiri"); VALUE xml = rb_define_module_under(nokogiri, "XML"); VALUE sax = rb_define_module_under(xml, "SAX"); VALUE klass = rb_define_class_under(sax, "PushParser", rb_cObject); cNokogiriXmlSaxPushParser = klass; rb_define_alloc_func(klass, allocate); rb_define_private_method(klass, "initialize_native", initialize_native, 2); rb_define_private_method(klass, "native_write", native_write, 2); rb_define_method(klass, "options", get_options, 0); rb_define_method(klass, "options=", set_options, 1); rb_define_method(klass, "replace_entities", get_replace_entities, 0); rb_define_method(klass, "replace_entities=", set_replace_entities, 1); } nokogiri-1.8.2/ext/nokogiri/xml_node.h0000644000004100000410000000046113235345655020006 0ustar www-datawww-data#ifndef NOKOGIRI_XML_NODE #define NOKOGIRI_XML_NODE #include void init_xml_node(); extern VALUE cNokogiriXmlNode ; extern VALUE cNokogiriXmlElement ; VALUE Nokogiri_wrap_xml_node(VALUE klass, xmlNodePtr node) ; void Nokogiri_xml_node_properties(xmlNodePtr node, VALUE attr_hash) ; #endif nokogiri-1.8.2/ext/nokogiri/xml_sax_push_parser.h0000644000004100000410000000026413235345655022270 0ustar www-datawww-data#ifndef NOKOGIRI_XML_SAX_PUSH_PARSER #define NOKOGIRI_XML_SAX_PUSH_PARSER #include void init_xml_sax_push_parser(); extern VALUE cNokogiriXmlSaxPushParser ; #endif nokogiri-1.8.2/ext/nokogiri/xml_schema.h0000644000004100000410000000022113235345655020313 0ustar www-datawww-data#ifndef NOKOGIRI_XML_SCHEMA #define NOKOGIRI_XML_SCHEMA #include void init_xml_schema(); extern VALUE cNokogiriXmlSchema; #endif nokogiri-1.8.2/ext/nokogiri/html_entity_lookup.c0000644000004100000410000000145513235345655022131 0ustar www-datawww-data#include /* * call-seq: * get(key) * * Get the HTML::EntityDescription for +key+ */ static VALUE get(VALUE self, VALUE key) { const htmlEntityDesc * desc = htmlEntityLookup((const xmlChar *)StringValueCStr(key)); VALUE klass, args[3]; if(NULL == desc) return Qnil; klass = rb_const_get(mNokogiriHtml, rb_intern("EntityDescription")); args[0] = INT2NUM((long)desc->value); args[1] = NOKOGIRI_STR_NEW2(desc->name); args[2] = NOKOGIRI_STR_NEW2(desc->desc); return rb_class_new_instance(3, args, klass); } void init_html_entity_lookup() { VALUE nokogiri = rb_define_module("Nokogiri"); VALUE html = rb_define_module_under(nokogiri, "HTML"); VALUE klass = rb_define_class_under(html, "EntityLookup", rb_cObject); rb_define_method(klass, "get", get, 1); } nokogiri-1.8.2/ext/nokogiri/xml_xpath_context.h0000644000004100000410000000046713235345655021757 0ustar www-datawww-data#ifndef NOKOGIRI_XML_XPATH_CONTEXT #define NOKOGIRI_XML_XPATH_CONTEXT #include void init_xml_xpath_context(); void Nokogiri_marshal_xpath_funcall_and_return_values(xmlXPathParserContextPtr ctx, int nargs, VALUE handler, const char* function_name) ; extern VALUE cNokogiriXmlXpathContext; #endif nokogiri-1.8.2/ext/nokogiri/xml_node_set.c0000644000004100000410000002733313235345655020663 0ustar www-datawww-data#include #include #include static ID decorate ; static void xpath_node_set_del(xmlNodeSetPtr cur, xmlNodePtr val); static void Check_Node_Set_Node_Type(VALUE node) { if (!(rb_obj_is_kind_of(node, cNokogiriXmlNode) || rb_obj_is_kind_of(node, cNokogiriXmlNamespace))) { rb_raise(rb_eArgError, "node must be a Nokogiri::XML::Node or Nokogiri::XML::Namespace"); } } static void deallocate(xmlNodeSetPtr node_set) { /* * * since xpath queries return copies of the xmlNs structs, * xmlXPathFreeNodeSet() frees those xmlNs structs that are in the * NodeSet. * * this is bad if someone is still trying to use the Namespace object wrapped * around the xmlNs, so we need to avoid that. * * here we reproduce xmlXPathFreeNodeSet() without the xmlNs logic. * * this doesn't cause a leak because Namespace objects that are in an XPath * query NodeSet are given their own lifecycle in * Nokogiri_wrap_xml_namespace(). */ NOKOGIRI_DEBUG_START(node_set) ; if (node_set->nodeTab != NULL) xmlFree(node_set->nodeTab); xmlFree(node_set); NOKOGIRI_DEBUG_END(node_set) ; } static VALUE allocate(VALUE klass) { return Nokogiri_wrap_xml_node_set(xmlXPathNodeSetCreate(NULL), Qnil); } /* * call-seq: * dup * * Duplicate this node set */ static VALUE duplicate(VALUE self) { xmlNodeSetPtr node_set; xmlNodeSetPtr dupl; Data_Get_Struct(self, xmlNodeSet, node_set); dupl = xmlXPathNodeSetMerge(NULL, node_set); return Nokogiri_wrap_xml_node_set(dupl, rb_iv_get(self, "@document")); } /* * call-seq: * length * * Get the length of the node set */ static VALUE length(VALUE self) { xmlNodeSetPtr node_set; Data_Get_Struct(self, xmlNodeSet, node_set); return node_set ? INT2NUM(node_set->nodeNr) : INT2NUM(0); } /* * call-seq: * push(node) * * Append +node+ to the NodeSet. */ static VALUE push(VALUE self, VALUE rb_node) { xmlNodeSetPtr node_set; xmlNodePtr node; Check_Node_Set_Node_Type(rb_node); Data_Get_Struct(self, xmlNodeSet, node_set); Data_Get_Struct(rb_node, xmlNode, node); xmlXPathNodeSetAdd(node_set, node); return self; } /* * call-seq: * delete(node) * * Delete +node+ from the Nodeset, if it is a member. Returns the deleted node * if found, otherwise returns nil. */ static VALUE delete(VALUE self, VALUE rb_node) { xmlNodeSetPtr node_set; xmlNodePtr node; Check_Node_Set_Node_Type(rb_node); Data_Get_Struct(self, xmlNodeSet, node_set); Data_Get_Struct(rb_node, xmlNode, node); if (xmlXPathNodeSetContains(node_set, node)) { xpath_node_set_del(node_set, node); return rb_node; } return Qnil ; } /* * call-seq: * &(node_set) * * Set Intersection — Returns a new NodeSet containing nodes common to the two NodeSets. */ static VALUE intersection(VALUE self, VALUE rb_other) { xmlNodeSetPtr node_set, other ; xmlNodeSetPtr intersection; if(!rb_obj_is_kind_of(rb_other, cNokogiriXmlNodeSet)) rb_raise(rb_eArgError, "node_set must be a Nokogiri::XML::NodeSet"); Data_Get_Struct(self, xmlNodeSet, node_set); Data_Get_Struct(rb_other, xmlNodeSet, other); intersection = xmlXPathIntersection(node_set, other); return Nokogiri_wrap_xml_node_set(intersection, rb_iv_get(self, "@document")); } /* * call-seq: * include?(node) * * Returns true if any member of node set equals +node+. */ static VALUE include_eh(VALUE self, VALUE rb_node) { xmlNodeSetPtr node_set; xmlNodePtr node; Check_Node_Set_Node_Type(rb_node); Data_Get_Struct(self, xmlNodeSet, node_set); Data_Get_Struct(rb_node, xmlNode, node); return (xmlXPathNodeSetContains(node_set, node) ? Qtrue : Qfalse); } /* * call-seq: * |(node_set) * * Returns a new set built by merging the set and the elements of the given * set. */ static VALUE set_union(VALUE self, VALUE rb_other) { xmlNodeSetPtr node_set, other; xmlNodeSetPtr new; if(!rb_obj_is_kind_of(rb_other, cNokogiriXmlNodeSet)) rb_raise(rb_eArgError, "node_set must be a Nokogiri::XML::NodeSet"); Data_Get_Struct(self, xmlNodeSet, node_set); Data_Get_Struct(rb_other, xmlNodeSet, other); new = xmlXPathNodeSetMerge(NULL, node_set); new = xmlXPathNodeSetMerge(new, other); return Nokogiri_wrap_xml_node_set(new, rb_iv_get(self, "@document")); } /* * call-seq: * -(node_set) * * Difference - returns a new NodeSet that is a copy of this NodeSet, removing * each item that also appears in +node_set+ */ static VALUE minus(VALUE self, VALUE rb_other) { xmlNodeSetPtr node_set, other; xmlNodeSetPtr new; int j ; if(!rb_obj_is_kind_of(rb_other, cNokogiriXmlNodeSet)) rb_raise(rb_eArgError, "node_set must be a Nokogiri::XML::NodeSet"); Data_Get_Struct(self, xmlNodeSet, node_set); Data_Get_Struct(rb_other, xmlNodeSet, other); new = xmlXPathNodeSetMerge(NULL, node_set); for (j = 0 ; j < other->nodeNr ; ++j) { xpath_node_set_del(new, other->nodeTab[j]); } return Nokogiri_wrap_xml_node_set(new, rb_iv_get(self, "@document")); } static VALUE index_at(VALUE self, long offset) { xmlNodeSetPtr node_set; Data_Get_Struct(self, xmlNodeSet, node_set); if (offset >= node_set->nodeNr || abs((int)offset) > node_set->nodeNr) { return Qnil; } if (offset < 0) { offset += node_set->nodeNr ; } return Nokogiri_wrap_xml_node_set_node(node_set->nodeTab[offset], self); } static VALUE subseq(VALUE self, long beg, long len) { long j; xmlNodeSetPtr node_set; xmlNodeSetPtr new_set ; Data_Get_Struct(self, xmlNodeSet, node_set); if (beg > node_set->nodeNr) return Qnil ; if (beg < 0 || len < 0) return Qnil ; if ((beg + len) > node_set->nodeNr) { len = node_set->nodeNr - beg ; } new_set = xmlXPathNodeSetCreate(NULL); for (j = beg ; j < beg+len ; ++j) { xmlXPathNodeSetAddUnique(new_set, node_set->nodeTab[j]); } return Nokogiri_wrap_xml_node_set(new_set, rb_iv_get(self, "@document")); } /* * call-seq: * [index] -> Node or nil * [start, length] -> NodeSet or nil * [range] -> NodeSet or nil * slice(index) -> Node or nil * slice(start, length) -> NodeSet or nil * slice(range) -> NodeSet or nil * * Element reference - returns the node at +index+, or returns a NodeSet * containing nodes starting at +start+ and continuing for +length+ elements, or * returns a NodeSet containing nodes specified by +range+. Negative +indices+ * count backward from the end of the +node_set+ (-1 is the last node). Returns * nil if the +index+ (or +start+) are out of range. */ static VALUE slice(int argc, VALUE *argv, VALUE self) { VALUE arg ; long beg, len ; xmlNodeSetPtr node_set; Data_Get_Struct(self, xmlNodeSet, node_set); if (argc == 2) { beg = NUM2LONG(argv[0]); len = NUM2LONG(argv[1]); if (beg < 0) { beg += node_set->nodeNr ; } return subseq(self, beg, len); } if (argc != 1) { rb_scan_args(argc, argv, "11", NULL, NULL); } arg = argv[0]; if (FIXNUM_P(arg)) { return index_at(self, FIX2LONG(arg)); } /* if arg is Range */ switch (rb_range_beg_len(arg, &beg, &len, (long)node_set->nodeNr, 0)) { case Qfalse: break; case Qnil: return Qnil; default: return subseq(self, beg, len); } return index_at(self, NUM2LONG(arg)); } /* * call-seq: * to_a * * Return this list as an Array */ static VALUE to_array(VALUE self, VALUE rb_node) { xmlNodeSetPtr node_set ; VALUE list; int i; Data_Get_Struct(self, xmlNodeSet, node_set); list = rb_ary_new2(node_set->nodeNr); for(i = 0; i < node_set->nodeNr; i++) { VALUE elt = Nokogiri_wrap_xml_node_set_node(node_set->nodeTab[i], self); rb_ary_push( list, elt ); } return list; } /* * call-seq: * unlink * * Unlink this NodeSet and all Node objects it contains from their current context. */ static VALUE unlink_nodeset(VALUE self) { xmlNodeSetPtr node_set; int j, nodeNr ; Data_Get_Struct(self, xmlNodeSet, node_set); nodeNr = node_set->nodeNr ; for (j = 0 ; j < nodeNr ; j++) { if (! Nokogiri_namespace_eh(node_set->nodeTab[j])) { VALUE node ; xmlNodePtr node_ptr; node = Nokogiri_wrap_xml_node(Qnil, node_set->nodeTab[j]); rb_funcall(node, rb_intern("unlink"), 0); /* modifies the C struct out from under the object */ Data_Get_Struct(node, xmlNode, node_ptr); node_set->nodeTab[j] = node_ptr ; } } return self ; } static void reify_node_set_namespaces(VALUE self) { /* * as mentioned in deallocate() above, xmlNs structs returned in an XPath * NodeSet are duplicates, and we don't clean them up at deallocate() time. * * as a result, we need to make sure the Ruby manages this memory. we do this * by forcing the creation of a Ruby object wrapped around the xmlNs. * * we also have to make sure that the NodeSet has a reference to the * Namespace object, otherwise GC will kick in and the Namespace won't be * marked. * * we *could* do this safely with *all* the nodes in the NodeSet, but we only * *need* to do it for xmlNs structs, and so you get the code we have here. */ int j ; xmlNodeSetPtr node_set ; VALUE namespace_cache ; Data_Get_Struct(self, xmlNodeSet, node_set); namespace_cache = rb_iv_get(self, "@namespace_cache"); for (j = 0 ; j < node_set->nodeNr ; j++) { if (Nokogiri_namespace_eh(node_set->nodeTab[j])) { rb_ary_push(namespace_cache, Nokogiri_wrap_xml_node_set_node(node_set->nodeTab[j], self)); } } } VALUE Nokogiri_wrap_xml_node_set(xmlNodeSetPtr node_set, VALUE document) { VALUE new_set ; if (node_set == NULL) { node_set = xmlXPathNodeSetCreate(NULL); } new_set = Data_Wrap_Struct(cNokogiriXmlNodeSet, 0, deallocate, node_set); if (!NIL_P(document)) { rb_iv_set(new_set, "@document", document); rb_funcall(document, decorate, 1, new_set); } rb_iv_set(new_set, "@namespace_cache", rb_ary_new()); reify_node_set_namespaces(new_set); return new_set ; } VALUE Nokogiri_wrap_xml_node_set_node(xmlNodePtr node, VALUE node_set) { xmlDocPtr document ; if (Nokogiri_namespace_eh(node)) { Data_Get_Struct(rb_iv_get(node_set, "@document"), xmlDoc, document); return Nokogiri_wrap_xml_namespace(document, (xmlNsPtr)node); } else { return Nokogiri_wrap_xml_node(Qnil, node); } } static void xpath_node_set_del(xmlNodeSetPtr cur, xmlNodePtr val) { /* * as mentioned a few times above, we do not want to free xmlNs structs * outside of the Namespace lifecycle. * * xmlXPathNodeSetDel() frees xmlNs structs, and so here we reproduce that * function with the xmlNs logic. */ int i; if (cur == NULL) return; if (val == NULL) return; /* * find node in nodeTab */ for (i = 0;i < cur->nodeNr;i++) if (cur->nodeTab[i] == val) break; if (i >= cur->nodeNr) { /* not found */ return; } cur->nodeNr--; for (;i < cur->nodeNr;i++) cur->nodeTab[i] = cur->nodeTab[i + 1]; cur->nodeTab[cur->nodeNr] = NULL; } VALUE cNokogiriXmlNodeSet ; void init_xml_node_set(void) { VALUE nokogiri = rb_define_module("Nokogiri"); VALUE xml = rb_define_module_under(nokogiri, "XML"); VALUE klass = rb_define_class_under(xml, "NodeSet", rb_cObject); cNokogiriXmlNodeSet = klass; rb_define_alloc_func(klass, allocate); rb_define_method(klass, "length", length, 0); rb_define_method(klass, "[]", slice, -1); rb_define_method(klass, "slice", slice, -1); rb_define_method(klass, "push", push, 1); rb_define_method(klass, "|", set_union, 1); rb_define_method(klass, "-", minus, 1); rb_define_method(klass, "unlink", unlink_nodeset, 0); rb_define_method(klass, "to_a", to_array, 0); rb_define_method(klass, "dup", duplicate, 0); rb_define_method(klass, "delete", delete, 1); rb_define_method(klass, "&", intersection, 1); rb_define_method(klass, "include?", include_eh, 1); decorate = rb_intern("decorate"); } nokogiri-1.8.2/ext/nokogiri/xml_relax_ng.h0000644000004100000410000000023013235345655020652 0ustar www-datawww-data#ifndef NOKOGIRI_XML_RELAX_NG #define NOKOGIRI_XML_RELAX_NG #include void init_xml_relax_ng(); extern VALUE cNokogiriXmlRelaxNG; #endif nokogiri-1.8.2/ext/nokogiri/xml_reader.h0000644000004100000410000000022213235345655020316 0ustar www-datawww-data#ifndef NOKOGIRI_XML_READER #define NOKOGIRI_XML_READER #include void init_xml_reader(); extern VALUE cNokogiriXmlReader; #endif nokogiri-1.8.2/ext/nokogiri/xml_reader.c0000644000004100000410000003420713235345655020323 0ustar www-datawww-data#include static void dealloc(xmlTextReaderPtr reader) { NOKOGIRI_DEBUG_START(reader); xmlFreeTextReader(reader); NOKOGIRI_DEBUG_END(reader); } static int has_attributes(xmlTextReaderPtr reader) { /* * this implementation of xmlTextReaderHasAttributes explicitly includes * namespaces and properties, because some earlier versions ignore * namespaces. */ xmlNodePtr node ; node = xmlTextReaderCurrentNode(reader); if (node == NULL) return(0); if ((node->type == XML_ELEMENT_NODE) && ((node->properties != NULL) || (node->nsDef != NULL))) return(1); return(0); } static void Nokogiri_xml_node_namespaces(xmlNodePtr node, VALUE attr_hash) { xmlNsPtr ns; static char buffer[XMLNS_BUFFER_LEN] ; char *key ; size_t keylen ; if (node->type != XML_ELEMENT_NODE) return ; ns = node->nsDef; while (ns != NULL) { keylen = XMLNS_PREFIX_LEN + (ns->prefix ? (strlen((const char*)ns->prefix) + 1) : 0) ; if (keylen > XMLNS_BUFFER_LEN) { key = (char*)malloc(keylen) ; } else { key = buffer ; } if (ns->prefix) { sprintf(key, "%s:%s", XMLNS_PREFIX, ns->prefix); } else { sprintf(key, "%s", XMLNS_PREFIX); } rb_hash_aset(attr_hash, NOKOGIRI_STR_NEW2(key), (ns->href ? NOKOGIRI_STR_NEW2(ns->href) : Qnil) ); if (key != buffer) { free(key); } ns = ns->next ; } } /* * call-seq: * default? * * Was an attribute generated from the default value in the DTD or schema? */ static VALUE default_eh(VALUE self) { xmlTextReaderPtr reader; int eh; Data_Get_Struct(self, xmlTextReader, reader); eh = xmlTextReaderIsDefault(reader); if(eh == 0) return Qfalse; if(eh == 1) return Qtrue; return Qnil; } /* * call-seq: * value? * * Does this node have a text value? */ static VALUE value_eh(VALUE self) { xmlTextReaderPtr reader; int eh; Data_Get_Struct(self, xmlTextReader, reader); eh = xmlTextReaderHasValue(reader); if(eh == 0) return Qfalse; if(eh == 1) return Qtrue; return Qnil; } /* * call-seq: * attributes? * * Does this node have attributes? */ static VALUE attributes_eh(VALUE self) { xmlTextReaderPtr reader; int eh; Data_Get_Struct(self, xmlTextReader, reader); eh = has_attributes(reader); if(eh == 0) return Qfalse; if(eh == 1) return Qtrue; return Qnil; } /* * call-seq: * namespaces * * Get a hash of namespaces for this Node */ static VALUE namespaces(VALUE self) { xmlTextReaderPtr reader; xmlNodePtr ptr; VALUE attr ; Data_Get_Struct(self, xmlTextReader, reader); attr = rb_hash_new() ; if (! has_attributes(reader)) return attr ; ptr = xmlTextReaderExpand(reader); if(ptr == NULL) return Qnil; Nokogiri_xml_node_namespaces(ptr, attr); return attr ; } /* * call-seq: * attribute_nodes * * Get a list of attributes for this Node */ static VALUE attribute_nodes(VALUE self) { xmlTextReaderPtr reader; xmlNodePtr ptr; VALUE attr ; Data_Get_Struct(self, xmlTextReader, reader); attr = rb_ary_new() ; if (! has_attributes(reader)) return attr ; ptr = xmlTextReaderExpand(reader); if(ptr == NULL) return Qnil; Nokogiri_xml_node_properties(ptr, attr); return attr ; } /* * call-seq: * attribute_at(index) * * Get the value of attribute at +index+ */ static VALUE attribute_at(VALUE self, VALUE index) { xmlTextReaderPtr reader; xmlChar *value; VALUE rb_value; Data_Get_Struct(self, xmlTextReader, reader); if(NIL_P(index)) return Qnil; index = rb_Integer(index); value = xmlTextReaderGetAttributeNo( reader, (int)NUM2INT(index) ); if(value == NULL) return Qnil; rb_value = NOKOGIRI_STR_NEW2(value); xmlFree(value); return rb_value; } /* * call-seq: * attribute(name) * * Get the value of attribute named +name+ */ static VALUE reader_attribute(VALUE self, VALUE name) { xmlTextReaderPtr reader; xmlChar *value ; VALUE rb_value; Data_Get_Struct(self, xmlTextReader, reader); if(NIL_P(name)) return Qnil; name = StringValue(name) ; value = xmlTextReaderGetAttribute(reader, (xmlChar*)StringValueCStr(name)); if(value == NULL) return Qnil; rb_value = NOKOGIRI_STR_NEW2(value); xmlFree(value); return rb_value; } /* * call-seq: * attribute_count * * Get the number of attributes for the current node */ static VALUE attribute_count(VALUE self) { xmlTextReaderPtr reader; int count; Data_Get_Struct(self, xmlTextReader, reader); count = xmlTextReaderAttributeCount(reader); if(count == -1) return Qnil; return INT2NUM((long)count); } /* * call-seq: * depth * * Get the depth of the node */ static VALUE depth(VALUE self) { xmlTextReaderPtr reader; int depth; Data_Get_Struct(self, xmlTextReader, reader); depth = xmlTextReaderDepth(reader); if(depth == -1) return Qnil; return INT2NUM((long)depth); } /* * call-seq: * xml_version * * Get the XML version of the document being read */ static VALUE xml_version(VALUE self) { xmlTextReaderPtr reader; const char *version; Data_Get_Struct(self, xmlTextReader, reader); version = (const char *)xmlTextReaderConstXmlVersion(reader); if(version == NULL) return Qnil; return NOKOGIRI_STR_NEW2(version); } /* * call-seq: * lang * * Get the xml:lang scope within which the node resides. */ static VALUE lang(VALUE self) { xmlTextReaderPtr reader; const char *lang; Data_Get_Struct(self, xmlTextReader, reader); lang = (const char *)xmlTextReaderConstXmlLang(reader); if(lang == NULL) return Qnil; return NOKOGIRI_STR_NEW2(lang); } /* * call-seq: * value * * Get the text value of the node if present. Returns a utf-8 encoded string. */ static VALUE value(VALUE self) { xmlTextReaderPtr reader; const char *value; Data_Get_Struct(self, xmlTextReader, reader); value = (const char *)xmlTextReaderConstValue(reader); if(value == NULL) return Qnil; return NOKOGIRI_STR_NEW2(value); } /* * call-seq: * prefix * * Get the shorthand reference to the namespace associated with the node. */ static VALUE prefix(VALUE self) { xmlTextReaderPtr reader; const char *prefix; Data_Get_Struct(self, xmlTextReader, reader); prefix = (const char *)xmlTextReaderConstPrefix(reader); if(prefix == NULL) return Qnil; return NOKOGIRI_STR_NEW2(prefix); } /* * call-seq: * namespace_uri * * Get the URI defining the namespace associated with the node */ static VALUE namespace_uri(VALUE self) { xmlTextReaderPtr reader; const char *uri; Data_Get_Struct(self, xmlTextReader, reader); uri = (const char *)xmlTextReaderConstNamespaceUri(reader); if(uri == NULL) return Qnil; return NOKOGIRI_STR_NEW2(uri); } /* * call-seq: * local_name * * Get the local name of the node */ static VALUE local_name(VALUE self) { xmlTextReaderPtr reader; const char *name; Data_Get_Struct(self, xmlTextReader, reader); name = (const char *)xmlTextReaderConstLocalName(reader); if(name == NULL) return Qnil; return NOKOGIRI_STR_NEW2(name); } /* * call-seq: * name * * Get the name of the node. Returns a utf-8 encoded string. */ static VALUE name(VALUE self) { xmlTextReaderPtr reader; const char *name; Data_Get_Struct(self, xmlTextReader, reader); name = (const char *)xmlTextReaderConstName(reader); if(name == NULL) return Qnil; return NOKOGIRI_STR_NEW2(name); } /* * call-seq: * base_uri * * Get the xml:base of the node */ static VALUE base_uri(VALUE self) { xmlTextReaderPtr reader; const char * base_uri; Data_Get_Struct(self, xmlTextReader, reader); base_uri = (const char *)xmlTextReaderBaseUri(reader); if (base_uri == NULL) return Qnil; return NOKOGIRI_STR_NEW2(base_uri); } /* * call-seq: * state * * Get the state of the reader */ static VALUE state(VALUE self) { xmlTextReaderPtr reader; Data_Get_Struct(self, xmlTextReader, reader); return INT2NUM((long)xmlTextReaderReadState(reader)); } /* * call-seq: * node_type * * Get the type of readers current node */ static VALUE node_type(VALUE self) { xmlTextReaderPtr reader; Data_Get_Struct(self, xmlTextReader, reader); return INT2NUM((long)xmlTextReaderNodeType(reader)); } /* * call-seq: * read * * Move the Reader forward through the XML document. */ static VALUE read_more(VALUE self) { xmlTextReaderPtr reader; xmlErrorPtr error; VALUE error_list; int ret; Data_Get_Struct(self, xmlTextReader, reader); error_list = rb_funcall(self, rb_intern("errors"), 0); xmlSetStructuredErrorFunc((void *)error_list, Nokogiri_error_array_pusher); ret = xmlTextReaderRead(reader); xmlSetStructuredErrorFunc(NULL, NULL); if(ret == 1) return self; if(ret == 0) return Qnil; error = xmlGetLastError(); if(error) rb_exc_raise(Nokogiri_wrap_xml_syntax_error(error)); else rb_raise(rb_eRuntimeError, "Error pulling: %d", ret); return Qnil; } /* * call-seq: * inner_xml * * Read the contents of the current node, including child nodes and markup. * Returns a utf-8 encoded string. */ static VALUE inner_xml(VALUE self) { xmlTextReaderPtr reader; xmlChar* value; VALUE str; Data_Get_Struct(self, xmlTextReader, reader); value = xmlTextReaderReadInnerXml(reader); str = Qnil; if(value) { str = NOKOGIRI_STR_NEW2((char*)value); xmlFree(value); } return str; } /* * call-seq: * outer_xml * * Read the current node and its contents, including child nodes and markup. * Returns a utf-8 encoded string. */ static VALUE outer_xml(VALUE self) { xmlTextReaderPtr reader; xmlChar *value; VALUE str = Qnil; Data_Get_Struct(self, xmlTextReader, reader); value = xmlTextReaderReadOuterXml(reader); if(value) { str = NOKOGIRI_STR_NEW2((char*)value); xmlFree(value); } return str; } /* * call-seq: * from_memory(string, url = nil, encoding = nil, options = 0) * * Create a new reader that parses +string+ */ static VALUE from_memory(int argc, VALUE *argv, VALUE klass) { VALUE rb_buffer, rb_url, encoding, rb_options; xmlTextReaderPtr reader; const char * c_url = NULL; const char * c_encoding = NULL; int c_options = 0; VALUE rb_reader, args[3]; rb_scan_args(argc, argv, "13", &rb_buffer, &rb_url, &encoding, &rb_options); if (!RTEST(rb_buffer)) rb_raise(rb_eArgError, "string cannot be nil"); if (RTEST(rb_url)) c_url = StringValueCStr(rb_url); if (RTEST(encoding)) c_encoding = StringValueCStr(encoding); if (RTEST(rb_options)) c_options = (int)NUM2INT(rb_options); reader = xmlReaderForMemory( StringValuePtr(rb_buffer), (int)RSTRING_LEN(rb_buffer), c_url, c_encoding, c_options ); if(reader == NULL) { xmlFreeTextReader(reader); rb_raise(rb_eRuntimeError, "couldn't create a parser"); } rb_reader = Data_Wrap_Struct(klass, NULL, dealloc, reader); args[0] = rb_buffer; args[1] = rb_url; args[2] = encoding; rb_obj_call_init(rb_reader, 3, args); return rb_reader; } /* * call-seq: * from_io(io, url = nil, encoding = nil, options = 0) * * Create a new reader that parses +io+ */ static VALUE from_io(int argc, VALUE *argv, VALUE klass) { VALUE rb_io, rb_url, encoding, rb_options; xmlTextReaderPtr reader; const char * c_url = NULL; const char * c_encoding = NULL; int c_options = 0; VALUE rb_reader, args[3]; rb_scan_args(argc, argv, "13", &rb_io, &rb_url, &encoding, &rb_options); if (!RTEST(rb_io)) rb_raise(rb_eArgError, "io cannot be nil"); if (RTEST(rb_url)) c_url = StringValueCStr(rb_url); if (RTEST(encoding)) c_encoding = StringValueCStr(encoding); if (RTEST(rb_options)) c_options = (int)NUM2INT(rb_options); reader = xmlReaderForIO( (xmlInputReadCallback)io_read_callback, (xmlInputCloseCallback)io_close_callback, (void *)rb_io, c_url, c_encoding, c_options ); if(reader == NULL) { xmlFreeTextReader(reader); rb_raise(rb_eRuntimeError, "couldn't create a parser"); } rb_reader = Data_Wrap_Struct(klass, NULL, dealloc, reader); args[0] = rb_io; args[1] = rb_url; args[2] = encoding; rb_obj_call_init(rb_reader, 3, args); return rb_reader; } /* * call-seq: * reader.empty_element? # => true or false * * Returns true if the current node is empty, otherwise false. */ static VALUE empty_element_p(VALUE self) { xmlTextReaderPtr reader; Data_Get_Struct(self, xmlTextReader, reader); if(xmlTextReaderIsEmptyElement(reader)) return Qtrue; return Qfalse; } VALUE cNokogiriXmlReader; void init_xml_reader() { VALUE module = rb_define_module("Nokogiri"); VALUE xml = rb_define_module_under(module, "XML"); /* * The Reader parser allows you to effectively pull parse an XML document. * Once instantiated, call Nokogiri::XML::Reader#each to iterate over each * node. Note that you may only iterate over the document once! */ VALUE klass = rb_define_class_under(xml, "Reader", rb_cObject); cNokogiriXmlReader = klass; rb_define_singleton_method(klass, "from_memory", from_memory, -1); rb_define_singleton_method(klass, "from_io", from_io, -1); rb_define_method(klass, "read", read_more, 0); rb_define_method(klass, "inner_xml", inner_xml, 0); rb_define_method(klass, "outer_xml", outer_xml, 0); rb_define_method(klass, "state", state, 0); rb_define_method(klass, "node_type", node_type, 0); rb_define_method(klass, "name", name, 0); rb_define_method(klass, "local_name", local_name, 0); rb_define_method(klass, "namespace_uri", namespace_uri, 0); rb_define_method(klass, "prefix", prefix, 0); rb_define_method(klass, "value", value, 0); rb_define_method(klass, "lang", lang, 0); rb_define_method(klass, "xml_version", xml_version, 0); rb_define_method(klass, "depth", depth, 0); rb_define_method(klass, "attribute_count", attribute_count, 0); rb_define_method(klass, "attribute", reader_attribute, 1); rb_define_method(klass, "namespaces", namespaces, 0); rb_define_method(klass, "attribute_at", attribute_at, 1); rb_define_method(klass, "empty_element?", empty_element_p, 0); rb_define_method(klass, "attributes?", attributes_eh, 0); rb_define_method(klass, "value?", value_eh, 0); rb_define_method(klass, "default?", default_eh, 0); rb_define_method(klass, "base_uri", base_uri, 0); rb_define_private_method(klass, "attr_nodes", attribute_nodes, 0); } nokogiri-1.8.2/ext/nokogiri/xml_cdata.c0000644000004100000410000000300013235345655020120 0ustar www-datawww-data#include /* * call-seq: * new(document, content) * * Create a new CDATA element on the +document+ with +content+ * * If +content+ cannot be implicitly converted to a string, this method will * raise a TypeError exception. */ static VALUE new(int argc, VALUE *argv, VALUE klass) { xmlDocPtr xml_doc; xmlNodePtr node; VALUE doc; VALUE content; VALUE rest; VALUE rb_node; const xmlChar *content_str; int content_str_len; rb_scan_args(argc, argv, "2*", &doc, &content, &rest); Data_Get_Struct(doc, xmlDoc, xml_doc); content_str = NIL_P(content) ? NULL : (const xmlChar *)StringValueCStr(content); content_str_len = (content_str == NULL) ? 0 : strlen(content_str); node = xmlNewCDataBlock(xml_doc->doc, content_str, content_str_len); nokogiri_root_node(node); rb_node = Nokogiri_wrap_xml_node(klass, node); rb_obj_call_init(rb_node, argc, argv); if(rb_block_given_p()) { rb_yield(rb_node); } return rb_node; } VALUE cNokogiriXmlCData; void init_xml_cdata() { VALUE nokogiri = rb_define_module("Nokogiri"); VALUE xml = rb_define_module_under(nokogiri, "XML"); VALUE node = rb_define_class_under(xml, "Node", rb_cObject); VALUE char_data = rb_define_class_under(xml, "CharacterData", node); VALUE text = rb_define_class_under(xml, "Text", char_data); /* * CData represents a CData node in an xml document. */ VALUE klass = rb_define_class_under(xml, "CDATA", text); cNokogiriXmlCData = klass; rb_define_singleton_method(klass, "new", new, -1); } nokogiri-1.8.2/ext/nokogiri/xml_sax_parser.h0000644000004100000410000000151113235345655021225 0ustar www-datawww-data#ifndef NOKOGIRI_XML_SAX_PARSER #define NOKOGIRI_XML_SAX_PARSER #include void init_xml_sax_parser(); extern VALUE cNokogiriXmlSaxParser ; typedef struct _nokogiriSAXTuple { xmlParserCtxtPtr ctxt; VALUE self; } nokogiriSAXTuple; typedef nokogiriSAXTuple * nokogiriSAXTuplePtr; #define NOKOGIRI_SAX_SELF(_ctxt) \ ((nokogiriSAXTuplePtr)(_ctxt))->self #define NOKOGIRI_SAX_CTXT(_ctxt) \ ((nokogiriSAXTuplePtr)(_ctxt))->ctxt #define NOKOGIRI_SAX_TUPLE_NEW(_ctxt, _self) \ nokogiri_sax_tuple_new(_ctxt, _self) static inline nokogiriSAXTuplePtr nokogiri_sax_tuple_new(xmlParserCtxtPtr ctxt, VALUE self) { nokogiriSAXTuplePtr tuple = malloc(sizeof(nokogiriSAXTuple)); tuple->self = self; tuple->ctxt = ctxt; return tuple; } #define NOKOGIRI_SAX_TUPLE_DESTROY(_tuple) \ free(_tuple) \ #endif nokogiri-1.8.2/ext/nokogiri/html_sax_parser_context.h0000644000004100000410000000030513235345655023135 0ustar www-datawww-data#ifndef NOKOGIRI_HTML_SAX_PARSER_CONTEXT #define NOKOGIRI_HTML_SAX_PARSER_CONTEXT #include extern VALUE cNokogiriHtmlSaxParserContext; void init_html_sax_parser_context(); #endif nokogiri-1.8.2/ext/nokogiri/xml_namespace.c0000644000004100000410000000501413235345655021007 0ustar www-datawww-data#include VALUE cNokogiriXmlNamespace ; static void dealloc_namespace(xmlNsPtr ns) { /* * * this deallocator is only used for namespace nodes that are part of an xpath * node set. * * see Nokogiri_wrap_xml_namespace() for more details. * */ NOKOGIRI_DEBUG_START(ns) ; if (ns->href) { xmlFree((xmlChar *)ns->href); } if (ns->prefix) { xmlFree((xmlChar *)ns->prefix); } xmlFree(ns); NOKOGIRI_DEBUG_END(ns) ; } int Nokogiri_namespace_eh(xmlNodePtr node) { return (node->type == XML_NAMESPACE_DECL); } /* * call-seq: * prefix * * Get the prefix for this namespace. Returns +nil+ if there is no prefix. */ static VALUE prefix(VALUE self) { xmlNsPtr ns; Data_Get_Struct(self, xmlNs, ns); if(!ns->prefix) return Qnil; return NOKOGIRI_STR_NEW2(ns->prefix); } /* * call-seq: * href * * Get the href for this namespace */ static VALUE href(VALUE self) { xmlNsPtr ns; Data_Get_Struct(self, xmlNs, ns); if(!ns->href) return Qnil; return NOKOGIRI_STR_NEW2(ns->href); } static int part_of_an_xpath_node_set_eh(xmlNsPtr node) { return (node->next && ! Nokogiri_namespace_eh(node->next)); } VALUE Nokogiri_wrap_xml_namespace(xmlDocPtr doc, xmlNsPtr node) { VALUE ns, document, node_cache; assert(doc->type == XML_DOCUMENT_NODE || doc->type == XML_HTML_DOCUMENT_NODE); if (node->_private) return (VALUE)node->_private; if (doc->type == XML_DOCUMENT_FRAG_NODE) doc = doc->doc; ns = Data_Wrap_Struct(cNokogiriXmlNamespace, 0, 0, node); if (DOC_RUBY_OBJECT_TEST(doc)) { document = DOC_RUBY_OBJECT(doc); if (part_of_an_xpath_node_set_eh(node)) { /* * this is a duplicate returned as part of an xpath query node set, and so * we need to make sure we manage this memory. * * see comments in xml_node_set.c for more details. */ ns = Data_Wrap_Struct(cNokogiriXmlNamespace, 0, dealloc_namespace, node); } else { ns = Data_Wrap_Struct(cNokogiriXmlNamespace, 0, 0, node); node_cache = rb_iv_get(document, "@node_cache"); rb_ary_push(node_cache, ns); } rb_iv_set(ns, "@document", document); } node->_private = (void *)ns; return ns; } void init_xml_namespace() { VALUE nokogiri = rb_define_module("Nokogiri"); VALUE xml = rb_define_module_under(nokogiri, "XML"); VALUE klass = rb_define_class_under(xml, "Namespace", rb_cObject); cNokogiriXmlNamespace = klass; rb_define_method(klass, "prefix", prefix, 0); rb_define_method(klass, "href", href, 0); } nokogiri-1.8.2/ext/nokogiri/xml_processing_instruction.h0000644000004100000410000000032013235345655023670 0ustar www-datawww-data#ifndef NOKOGIRI_XML_PROCESSING_INSTRUCTION #define NOKOGIRI_XML_PROCESSING_INSTRUCTION #include void init_xml_processing_instruction(); extern VALUE cNokogiriXmlProcessingInstruction; #endif nokogiri-1.8.2/ext/nokogiri/xml_relax_ng.c0000644000004100000410000000711413235345655020655 0ustar www-datawww-data#include static void dealloc(xmlRelaxNGPtr schema) { NOKOGIRI_DEBUG_START(schema); xmlRelaxNGFree(schema); NOKOGIRI_DEBUG_END(schema); } /* * call-seq: * validate_document(document) * * Validate a Nokogiri::XML::Document against this RelaxNG schema. */ static VALUE validate_document(VALUE self, VALUE document) { xmlDocPtr doc; xmlRelaxNGPtr schema; VALUE errors; xmlRelaxNGValidCtxtPtr valid_ctxt; Data_Get_Struct(self, xmlRelaxNG, schema); Data_Get_Struct(document, xmlDoc, doc); errors = rb_ary_new(); valid_ctxt = xmlRelaxNGNewValidCtxt(schema); if(NULL == valid_ctxt) { /* we have a problem */ rb_raise(rb_eRuntimeError, "Could not create a validation context"); } #ifdef HAVE_XMLRELAXNGSETVALIDSTRUCTUREDERRORS xmlRelaxNGSetValidStructuredErrors( valid_ctxt, Nokogiri_error_array_pusher, (void *)errors ); #endif xmlRelaxNGValidateDoc(valid_ctxt, doc); xmlRelaxNGFreeValidCtxt(valid_ctxt); return errors; } /* * call-seq: * read_memory(string) * * Create a new RelaxNG from the contents of +string+ */ static VALUE read_memory(VALUE klass, VALUE content) { xmlRelaxNGParserCtxtPtr ctx = xmlRelaxNGNewMemParserCtxt( (const char *)StringValuePtr(content), (int)RSTRING_LEN(content) ); xmlRelaxNGPtr schema; VALUE errors = rb_ary_new(); VALUE rb_schema; xmlSetStructuredErrorFunc((void *)errors, Nokogiri_error_array_pusher); #ifdef HAVE_XMLRELAXNGSETPARSERSTRUCTUREDERRORS xmlRelaxNGSetParserStructuredErrors( ctx, Nokogiri_error_array_pusher, (void *)errors ); #endif schema = xmlRelaxNGParse(ctx); xmlSetStructuredErrorFunc(NULL, NULL); xmlRelaxNGFreeParserCtxt(ctx); if(NULL == schema) { xmlErrorPtr error = xmlGetLastError(); if(error) Nokogiri_error_raise(NULL, error); else rb_raise(rb_eRuntimeError, "Could not parse document"); return Qnil; } rb_schema = Data_Wrap_Struct(klass, 0, dealloc, schema); rb_iv_set(rb_schema, "@errors", errors); return rb_schema; } /* * call-seq: * from_document(doc) * * Create a new RelaxNG schema from the Nokogiri::XML::Document +doc+ */ static VALUE from_document(VALUE klass, VALUE document) { xmlDocPtr doc; xmlRelaxNGParserCtxtPtr ctx; xmlRelaxNGPtr schema; VALUE errors; VALUE rb_schema; Data_Get_Struct(document, xmlDoc, doc); /* In case someone passes us a node. ugh. */ doc = doc->doc; ctx = xmlRelaxNGNewDocParserCtxt(doc); errors = rb_ary_new(); xmlSetStructuredErrorFunc((void *)errors, Nokogiri_error_array_pusher); #ifdef HAVE_XMLRELAXNGSETPARSERSTRUCTUREDERRORS xmlRelaxNGSetParserStructuredErrors( ctx, Nokogiri_error_array_pusher, (void *)errors ); #endif schema = xmlRelaxNGParse(ctx); xmlSetStructuredErrorFunc(NULL, NULL); if(NULL == schema) { xmlErrorPtr error = xmlGetLastError(); if(error) Nokogiri_error_raise(NULL, error); else rb_raise(rb_eRuntimeError, "Could not parse document"); return Qnil; } rb_schema = Data_Wrap_Struct(klass, 0, dealloc, schema); rb_iv_set(rb_schema, "@errors", errors); return rb_schema; } VALUE cNokogiriXmlRelaxNG; void init_xml_relax_ng() { VALUE nokogiri = rb_define_module("Nokogiri"); VALUE xml = rb_define_module_under(nokogiri, "XML"); VALUE klass = rb_define_class_under(xml, "RelaxNG", cNokogiriXmlSchema); cNokogiriXmlRelaxNG = klass; rb_define_singleton_method(klass, "read_memory", read_memory, 1); rb_define_singleton_method(klass, "from_document", from_document, 1); rb_define_private_method(klass, "validate_document", validate_document, 1); } nokogiri-1.8.2/ext/nokogiri/xml_syntax_error.c0000644000004100000410000000337413235345655021621 0ustar www-datawww-data#include void Nokogiri_error_array_pusher(void * ctx, xmlErrorPtr error) { VALUE list = (VALUE)ctx; Check_Type(list, T_ARRAY); rb_ary_push(list, Nokogiri_wrap_xml_syntax_error(error)); } void Nokogiri_error_raise(void * ctx, xmlErrorPtr error) { rb_exc_raise(Nokogiri_wrap_xml_syntax_error(error)); } VALUE Nokogiri_wrap_xml_syntax_error(xmlErrorPtr error) { VALUE msg, e, klass; klass = cNokogiriXmlSyntaxError; if (error && error->domain == XML_FROM_XPATH) { VALUE xpath = rb_const_get(mNokogiriXml, rb_intern("XPath")); klass = rb_const_get(xpath, rb_intern("SyntaxError")); } msg = (error && error->message) ? NOKOGIRI_STR_NEW2(error->message) : Qnil; e = rb_class_new_instance( 1, &msg, klass ); if (error) { rb_iv_set(e, "@domain", INT2NUM(error->domain)); rb_iv_set(e, "@code", INT2NUM(error->code)); rb_iv_set(e, "@level", INT2NUM((short)error->level)); rb_iv_set(e, "@file", RBSTR_OR_QNIL(error->file)); rb_iv_set(e, "@line", INT2NUM(error->line)); rb_iv_set(e, "@str1", RBSTR_OR_QNIL(error->str1)); rb_iv_set(e, "@str2", RBSTR_OR_QNIL(error->str2)); rb_iv_set(e, "@str3", RBSTR_OR_QNIL(error->str3)); rb_iv_set(e, "@int1", INT2NUM(error->int1)); rb_iv_set(e, "@column", INT2NUM(error->int2)); } return e; } VALUE cNokogiriXmlSyntaxError; void init_xml_syntax_error() { VALUE nokogiri = rb_define_module("Nokogiri"); VALUE xml = rb_define_module_under(nokogiri, "XML"); /* * The XML::SyntaxError is raised on parse errors */ VALUE syntax_error_mommy = rb_define_class_under(nokogiri, "SyntaxError", rb_eStandardError); VALUE klass = rb_define_class_under(xml, "SyntaxError", syntax_error_mommy); cNokogiriXmlSyntaxError = klass; } nokogiri-1.8.2/ext/nokogiri/xml_attr.c0000644000004100000410000000426113235345655020030 0ustar www-datawww-data#include /* * call-seq: * value=(content) * * Set the value for this Attr to +content+ */ static VALUE set_value(VALUE self, VALUE content) { xmlAttrPtr attr; Data_Get_Struct(self, xmlAttr, attr); if (attr->children) { xmlFreeNodeList(attr->children); } attr->children = attr->last = NULL; if (content) { xmlChar *buffer; xmlNode *tmp; /* Encode our content */ buffer = xmlEncodeEntitiesReentrant(attr->doc, (unsigned char *)StringValueCStr(content)); attr->children = xmlStringGetNodeList(attr->doc, buffer); attr->last = NULL; tmp = attr->children; /* Loop through the children */ for(tmp = attr->children; tmp; tmp = tmp->next) { tmp->parent = (xmlNode *)attr; tmp->doc = attr->doc; if (tmp->next == NULL) { attr->last = tmp; } } /* Free up memory */ xmlFree(buffer); } return content; } /* * call-seq: * new(document, name) * * Create a new Attr element on the +document+ with +name+ */ static VALUE new(int argc, VALUE *argv, VALUE klass) { xmlDocPtr xml_doc; VALUE document; VALUE name; VALUE rest; xmlAttrPtr node; VALUE rb_node; rb_scan_args(argc, argv, "2*", &document, &name, &rest); if (! rb_obj_is_kind_of(document, cNokogiriXmlDocument)) { rb_raise(rb_eArgError, "parameter must be a Nokogiri::XML::Document"); } Data_Get_Struct(document, xmlDoc, xml_doc); node = xmlNewDocProp( xml_doc, (const xmlChar *)StringValueCStr(name), NULL ); nokogiri_root_node((xmlNodePtr)node); rb_node = Nokogiri_wrap_xml_node(klass, (xmlNodePtr)node); rb_obj_call_init(rb_node, argc, argv); if (rb_block_given_p()) { rb_yield(rb_node); } return rb_node; } VALUE cNokogiriXmlAttr; void init_xml_attr() { VALUE nokogiri = rb_define_module("Nokogiri"); VALUE xml = rb_define_module_under(nokogiri, "XML"); VALUE node = rb_define_class_under(xml, "Node", rb_cObject); /* * Attr represents a Attr node in an xml document. */ VALUE klass = rb_define_class_under(xml, "Attr", node); cNokogiriXmlAttr = klass; rb_define_singleton_method(klass, "new", new, -1); rb_define_method(klass, "value=", set_value, 1); } nokogiri-1.8.2/ext/nokogiri/xml_document.c0000644000004100000410000003646513235345655020707 0ustar www-datawww-data#include static int dealloc_node_i(xmlNodePtr key, xmlNodePtr node, xmlDocPtr doc) { switch(node->type) { case XML_ATTRIBUTE_NODE: xmlFreePropList((xmlAttrPtr)node); break; case XML_NAMESPACE_DECL: xmlFree(node); break; default: if(node->parent == NULL) { xmlAddChild((xmlNodePtr)doc, node); } } return ST_CONTINUE; } static void remove_private(xmlNodePtr node) { xmlNodePtr child; for (child = node->children; child; child = child->next) remove_private(child); if ((node->type == XML_ELEMENT_NODE || node->type == XML_XINCLUDE_START || node->type == XML_XINCLUDE_END) && node->properties) { for (child = (xmlNodePtr)node->properties; child; child = child->next) remove_private(child); } node->_private = NULL; } static void dealloc(xmlDocPtr doc) { st_table *node_hash; NOKOGIRI_DEBUG_START(doc); node_hash = DOC_UNLINKED_NODE_HASH(doc); st_foreach(node_hash, dealloc_node_i, (st_data_t)doc); st_free_table(node_hash); free(doc->_private); /* When both Nokogiri and libxml-ruby are loaded, make sure that all nodes * have their _private pointers cleared. This is to avoid libxml-ruby's * xmlDeregisterNode callback from accessing VALUE pointers from ruby's GC * free context, which can result in segfaults. */ if (xmlDeregisterNodeDefaultValue) remove_private((xmlNodePtr)doc); xmlFreeDoc(doc); NOKOGIRI_DEBUG_END(doc); } static void recursively_remove_namespaces_from_node(xmlNodePtr node) { xmlNodePtr child ; xmlAttrPtr property ; xmlSetNs(node, NULL); for (child = node->children ; child ; child = child->next) recursively_remove_namespaces_from_node(child); if (((node->type == XML_ELEMENT_NODE) || (node->type == XML_XINCLUDE_START) || (node->type == XML_XINCLUDE_END)) && node->nsDef) { xmlFreeNsList(node->nsDef); node->nsDef = NULL; } if (node->type == XML_ELEMENT_NODE && node->properties != NULL) { property = node->properties ; while (property != NULL) { if (property->ns) property->ns = NULL ; property = property->next ; } } } /* * call-seq: * url * * Get the url name for this document. */ static VALUE url(VALUE self) { xmlDocPtr doc; Data_Get_Struct(self, xmlDoc, doc); if(doc->URL) return NOKOGIRI_STR_NEW2(doc->URL); return Qnil; } /* * call-seq: * root= * * Set the root element on this document */ static VALUE set_root(VALUE self, VALUE root) { xmlDocPtr doc; xmlNodePtr new_root; xmlNodePtr old_root; Data_Get_Struct(self, xmlDoc, doc); old_root = NULL; if(NIL_P(root)) { old_root = xmlDocGetRootElement(doc); if(old_root) { xmlUnlinkNode(old_root); nokogiri_root_node(old_root); } return root; } Data_Get_Struct(root, xmlNode, new_root); /* If the new root's document is not the same as the current document, * then we need to dup the node in to this document. */ if(new_root->doc != doc) { old_root = xmlDocGetRootElement(doc); if (!(new_root = xmlDocCopyNode(new_root, doc, 1))) { rb_raise(rb_eRuntimeError, "Could not reparent node (xmlDocCopyNode)"); } } xmlDocSetRootElement(doc, new_root); if(old_root) nokogiri_root_node(old_root); return root; } /* * call-seq: * root * * Get the root node for this document. */ static VALUE root(VALUE self) { xmlDocPtr doc; xmlNodePtr root; Data_Get_Struct(self, xmlDoc, doc); root = xmlDocGetRootElement(doc); if(!root) return Qnil; return Nokogiri_wrap_xml_node(Qnil, root) ; } /* * call-seq: * encoding= encoding * * Set the encoding string for this Document */ static VALUE set_encoding(VALUE self, VALUE encoding) { xmlDocPtr doc; Data_Get_Struct(self, xmlDoc, doc); if (doc->encoding) free((char *) doc->encoding); /* this may produce a gcc cast warning */ doc->encoding = xmlStrdup((xmlChar *)StringValueCStr(encoding)); return encoding; } /* * call-seq: * encoding * * Get the encoding for this Document */ static VALUE encoding(VALUE self) { xmlDocPtr doc; Data_Get_Struct(self, xmlDoc, doc); if(!doc->encoding) return Qnil; return NOKOGIRI_STR_NEW2(doc->encoding); } /* * call-seq: * version * * Get the XML version for this Document */ static VALUE version(VALUE self) { xmlDocPtr doc; Data_Get_Struct(self, xmlDoc, doc); if(!doc->version) return Qnil; return NOKOGIRI_STR_NEW2(doc->version); } /* * call-seq: * read_io(io, url, encoding, options) * * Create a new document from an IO object */ static VALUE read_io( VALUE klass, VALUE io, VALUE url, VALUE encoding, VALUE options ) { const char * c_url = NIL_P(url) ? NULL : StringValueCStr(url); const char * c_enc = NIL_P(encoding) ? NULL : StringValueCStr(encoding); VALUE error_list = rb_ary_new(); VALUE document; xmlDocPtr doc; xmlResetLastError(); xmlSetStructuredErrorFunc((void *)error_list, Nokogiri_error_array_pusher); doc = xmlReadIO( (xmlInputReadCallback)io_read_callback, (xmlInputCloseCallback)io_close_callback, (void *)io, c_url, c_enc, (int)NUM2INT(options) ); xmlSetStructuredErrorFunc(NULL, NULL); if(doc == NULL) { xmlErrorPtr error; xmlFreeDoc(doc); error = xmlGetLastError(); if(error) rb_exc_raise(Nokogiri_wrap_xml_syntax_error(error)); else rb_raise(rb_eRuntimeError, "Could not parse document"); return Qnil; } document = Nokogiri_wrap_xml_document(klass, doc); rb_iv_set(document, "@errors", error_list); return document; } /* * call-seq: * read_memory(string, url, encoding, options) * * Create a new document from a String */ static VALUE read_memory( VALUE klass, VALUE string, VALUE url, VALUE encoding, VALUE options ) { const char * c_buffer = StringValuePtr(string); const char * c_url = NIL_P(url) ? NULL : StringValueCStr(url); const char * c_enc = NIL_P(encoding) ? NULL : StringValueCStr(encoding); int len = (int)RSTRING_LEN(string); VALUE error_list = rb_ary_new(); VALUE document; xmlDocPtr doc; xmlResetLastError(); xmlSetStructuredErrorFunc((void *)error_list, Nokogiri_error_array_pusher); doc = xmlReadMemory(c_buffer, len, c_url, c_enc, (int)NUM2INT(options)); xmlSetStructuredErrorFunc(NULL, NULL); if(doc == NULL) { xmlErrorPtr error; xmlFreeDoc(doc); error = xmlGetLastError(); if(error) rb_exc_raise(Nokogiri_wrap_xml_syntax_error(error)); else rb_raise(rb_eRuntimeError, "Could not parse document"); return Qnil; } document = Nokogiri_wrap_xml_document(klass, doc); rb_iv_set(document, "@errors", error_list); return document; } /* * call-seq: * dup * * Copy this Document. An optional depth may be passed in, but it defaults * to a deep copy. 0 is a shallow copy, 1 is a deep copy. */ static VALUE duplicate_document(int argc, VALUE *argv, VALUE self) { xmlDocPtr doc, dup; VALUE copy; VALUE level; VALUE error_list; if(rb_scan_args(argc, argv, "01", &level) == 0) level = INT2NUM((long)1); Data_Get_Struct(self, xmlDoc, doc); dup = xmlCopyDoc(doc, (int)NUM2INT(level)); if(dup == NULL) return Qnil; dup->type = doc->type; copy = Nokogiri_wrap_xml_document(rb_obj_class(self), dup); error_list = rb_iv_get(self, "@errors"); rb_iv_set(copy, "@errors", error_list); return copy ; } /* * call-seq: * new(version = default) * * Create a new document with +version+ (defaults to "1.0") */ static VALUE new(int argc, VALUE *argv, VALUE klass) { xmlDocPtr doc; VALUE version, rest, rb_doc ; rb_scan_args(argc, argv, "0*", &rest); version = rb_ary_entry(rest, (long)0); if (NIL_P(version)) version = rb_str_new2("1.0"); doc = xmlNewDoc((xmlChar *)StringValueCStr(version)); rb_doc = Nokogiri_wrap_xml_document(klass, doc); rb_obj_call_init(rb_doc, argc, argv); return rb_doc ; } /* * call-seq: * remove_namespaces! * * Remove all namespaces from all nodes in the document. * * This could be useful for developers who either don't understand namespaces * or don't care about them. * * The following example shows a use case, and you can decide for yourself * whether this is a good thing or not: * * doc = Nokogiri::XML <<-EOXML * * * Michelin Model XGV * * * I'm a bicycle tire! * * * EOXML * * doc.xpath("//tire").to_s # => "" * doc.xpath("//part:tire", "part" => "http://general-motors.com/").to_s # => "Michelin Model XGV" * doc.xpath("//part:tire", "part" => "http://schwinn.com/").to_s # => "I'm a bicycle tire!" * * doc.remove_namespaces! * * doc.xpath("//tire").to_s # => "Michelin Model XGVI'm a bicycle tire!" * doc.xpath("//part:tire", "part" => "http://general-motors.com/").to_s # => "" * doc.xpath("//part:tire", "part" => "http://schwinn.com/").to_s # => "" * * For more information on why this probably is *not* a good thing in general, * please direct your browser to * http://tenderlovemaking.com/2009/04/23/namespaces-in-xml.html */ VALUE remove_namespaces_bang(VALUE self) { xmlDocPtr doc ; Data_Get_Struct(self, xmlDoc, doc); recursively_remove_namespaces_from_node((xmlNodePtr)doc); return self; } /* call-seq: doc.create_entity(name, type, external_id, system_id, content) * * Create a new entity named +name+. * * +type+ is an integer representing the type of entity to be created, and it * defaults to Nokogiri::XML::EntityDecl::INTERNAL_GENERAL. See * the constants on Nokogiri::XML::EntityDecl for more information. * * +external_id+, +system_id+, and +content+ set the External ID, System ID, * and content respectively. All of these parameters are optional. */ static VALUE create_entity(int argc, VALUE *argv, VALUE self) { VALUE name; VALUE type; VALUE external_id; VALUE system_id; VALUE content; xmlEntityPtr ptr; xmlDocPtr doc ; Data_Get_Struct(self, xmlDoc, doc); rb_scan_args(argc, argv, "14", &name, &type, &external_id, &system_id, &content); xmlResetLastError(); ptr = xmlAddDocEntity( doc, (xmlChar *)(NIL_P(name) ? NULL : StringValueCStr(name)), (int) (NIL_P(type) ? XML_INTERNAL_GENERAL_ENTITY : NUM2INT(type)), (xmlChar *)(NIL_P(external_id) ? NULL : StringValueCStr(external_id)), (xmlChar *)(NIL_P(system_id) ? NULL : StringValueCStr(system_id)), (xmlChar *)(NIL_P(content) ? NULL : StringValueCStr(content)) ); if(NULL == ptr) { xmlErrorPtr error = xmlGetLastError(); if(error) rb_exc_raise(Nokogiri_wrap_xml_syntax_error(error)); else rb_raise(rb_eRuntimeError, "Could not create entity"); return Qnil; } return Nokogiri_wrap_xml_node(cNokogiriXmlEntityDecl, (xmlNodePtr)ptr); } static int block_caller(void * ctx, xmlNodePtr _node, xmlNodePtr _parent) { VALUE block; VALUE node; VALUE parent; VALUE ret; if(_node->type == XML_NAMESPACE_DECL){ node = Nokogiri_wrap_xml_namespace(_parent->doc, (xmlNsPtr) _node); } else{ node = Nokogiri_wrap_xml_node(Qnil, _node); } parent = _parent ? Nokogiri_wrap_xml_node(Qnil, _parent) : Qnil; block = (VALUE)ctx; ret = rb_funcall(block, rb_intern("call"), 2, node, parent); if(Qfalse == ret || Qnil == ret) return 0; return 1; } /* call-seq: * doc.canonicalize(mode=XML_C14N_1_0,inclusive_namespaces=nil,with_comments=false) * doc.canonicalize { |obj, parent| ... } * * Canonicalize a document and return the results. Takes an optional block * that takes two parameters: the +obj+ and that node's +parent+. * The +obj+ will be either a Nokogiri::XML::Node, or a Nokogiri::XML::Namespace * The block must return a non-nil, non-false value if the +obj+ passed in * should be included in the canonicalized document. */ static VALUE canonicalize(int argc, VALUE* argv, VALUE self) { VALUE mode; VALUE incl_ns; VALUE with_comments; xmlChar **ns; long ns_len, i; xmlDocPtr doc; xmlOutputBufferPtr buf; xmlC14NIsVisibleCallback cb = NULL; void * ctx = NULL; VALUE rb_cStringIO; VALUE io; rb_scan_args(argc, argv, "03", &mode, &incl_ns, &with_comments); Data_Get_Struct(self, xmlDoc, doc); rb_cStringIO = rb_const_get_at(rb_cObject, rb_intern("StringIO")); io = rb_class_new_instance(0, 0, rb_cStringIO); buf = xmlAllocOutputBuffer(NULL); buf->writecallback = (xmlOutputWriteCallback)io_write_callback; buf->closecallback = (xmlOutputCloseCallback)io_close_callback; buf->context = (void *)io; if(rb_block_given_p()) { cb = block_caller; ctx = (void *)rb_block_proc(); } if(NIL_P(incl_ns)){ ns = NULL; } else{ Check_Type(incl_ns, T_ARRAY); ns_len = RARRAY_LEN(incl_ns); ns = calloc((size_t)ns_len+1, sizeof(xmlChar *)); for (i = 0 ; i < ns_len ; i++) { VALUE entry = rb_ary_entry(incl_ns, i); const char * ptr = StringValueCStr(entry); ns[i] = (xmlChar*) ptr; } } xmlC14NExecute(doc, cb, ctx, (int) (NIL_P(mode) ? 0 : NUM2INT(mode)), ns, (int) RTEST(with_comments), buf); xmlOutputBufferClose(buf); return rb_funcall(io, rb_intern("string"), 0); } VALUE cNokogiriXmlDocument ; void init_xml_document() { VALUE nokogiri = rb_define_module("Nokogiri"); VALUE xml = rb_define_module_under(nokogiri, "XML"); VALUE node = rb_define_class_under(xml, "Node", rb_cObject); /* * Nokogiri::XML::Document wraps an xml document. */ VALUE klass = rb_define_class_under(xml, "Document", node); cNokogiriXmlDocument = klass; rb_define_singleton_method(klass, "read_memory", read_memory, 4); rb_define_singleton_method(klass, "read_io", read_io, 4); rb_define_singleton_method(klass, "new", new, -1); rb_define_method(klass, "root", root, 0); rb_define_method(klass, "root=", set_root, 1); rb_define_method(klass, "encoding", encoding, 0); rb_define_method(klass, "encoding=", set_encoding, 1); rb_define_method(klass, "version", version, 0); rb_define_method(klass, "canonicalize", canonicalize, -1); rb_define_method(klass, "dup", duplicate_document, -1); rb_define_method(klass, "url", url, 0); rb_define_method(klass, "create_entity", create_entity, -1); rb_define_method(klass, "remove_namespaces!", remove_namespaces_bang, 0); } /* this takes klass as a param because it's used for HtmlDocument, too. */ VALUE Nokogiri_wrap_xml_document(VALUE klass, xmlDocPtr doc) { nokogiriTuplePtr tuple = (nokogiriTuplePtr)malloc(sizeof(nokogiriTuple)); VALUE rb_doc = Data_Wrap_Struct( klass ? klass : cNokogiriXmlDocument, 0, dealloc, doc ); VALUE cache = rb_ary_new(); rb_iv_set(rb_doc, "@decorators", Qnil); rb_iv_set(rb_doc, "@node_cache", cache); tuple->doc = rb_doc; tuple->unlinkedNodes = st_init_numtable_with_size(128); tuple->node_cache = cache; doc->_private = tuple ; rb_obj_call_init(rb_doc, 0, NULL); return rb_doc ; } nokogiri-1.8.2/ext/nokogiri/xml_sax_parser_context.c0000644000004100000410000001315013235345655022766 0ustar www-datawww-data#include VALUE cNokogiriXmlSaxParserContext ; static void deallocate(xmlParserCtxtPtr ctxt) { NOKOGIRI_DEBUG_START(handler); ctxt->sax = NULL; xmlFreeParserCtxt(ctxt); NOKOGIRI_DEBUG_END(handler); } /* * call-seq: * parse_io(io, encoding) * * Parse +io+ object with +encoding+ */ static VALUE parse_io(VALUE klass, VALUE io, VALUE encoding) { xmlParserCtxtPtr ctxt; xmlCharEncoding enc = (xmlCharEncoding)NUM2INT(encoding); ctxt = xmlCreateIOParserCtxt(NULL, NULL, (xmlInputReadCallback)io_read_callback, (xmlInputCloseCallback)io_close_callback, (void *)io, enc); if (ctxt->sax) { xmlFree(ctxt->sax); ctxt->sax = NULL; } return Data_Wrap_Struct(klass, NULL, deallocate, ctxt); } /* * call-seq: * parse_file(filename) * * Parse file given +filename+ */ static VALUE parse_file(VALUE klass, VALUE filename) { xmlParserCtxtPtr ctxt = xmlCreateFileParserCtxt(StringValueCStr(filename)); return Data_Wrap_Struct(klass, NULL, deallocate, ctxt); } /* * call-seq: * parse_memory(data) * * Parse the XML stored in memory in +data+ */ static VALUE parse_memory(VALUE klass, VALUE data) { xmlParserCtxtPtr ctxt; if (NIL_P(data)) rb_raise(rb_eArgError, "data cannot be nil"); if (!(int)RSTRING_LEN(data)) rb_raise(rb_eRuntimeError, "data cannot be empty"); ctxt = xmlCreateMemoryParserCtxt(StringValuePtr(data), (int)RSTRING_LEN(data)); if (ctxt->sax) { xmlFree(ctxt->sax); ctxt->sax = NULL; } return Data_Wrap_Struct(klass, NULL, deallocate, ctxt); } static VALUE parse_doc(VALUE ctxt_val) { xmlParserCtxtPtr ctxt = (xmlParserCtxtPtr)ctxt_val; xmlParseDocument(ctxt); return Qnil; } static VALUE parse_doc_finalize(VALUE ctxt_val) { xmlParserCtxtPtr ctxt = (xmlParserCtxtPtr)ctxt_val; if (NULL != ctxt->myDoc) xmlFreeDoc(ctxt->myDoc); NOKOGIRI_SAX_TUPLE_DESTROY(ctxt->userData); return Qnil; } /* * call-seq: * parse_with(sax_handler) * * Use +sax_handler+ and parse the current document */ static VALUE parse_with(VALUE self, VALUE sax_handler) { xmlParserCtxtPtr ctxt; xmlSAXHandlerPtr sax; if (!rb_obj_is_kind_of(sax_handler, cNokogiriXmlSaxParser)) rb_raise(rb_eArgError, "argument must be a Nokogiri::XML::SAX::Parser"); Data_Get_Struct(self, xmlParserCtxt, ctxt); Data_Get_Struct(sax_handler, xmlSAXHandler, sax); /* Free the sax handler since we'll assign our own */ if (ctxt->sax && ctxt->sax != (xmlSAXHandlerPtr)&xmlDefaultSAXHandler) xmlFree(ctxt->sax); ctxt->sax = sax; ctxt->userData = (void *)NOKOGIRI_SAX_TUPLE_NEW(ctxt, sax_handler); rb_ensure(parse_doc, (VALUE)ctxt, parse_doc_finalize, (VALUE)ctxt); return Qnil; } /* * call-seq: * replace_entities=(boolean) * * Should this parser replace entities? & will get converted to '&' if * set to true */ static VALUE set_replace_entities(VALUE self, VALUE value) { xmlParserCtxtPtr ctxt; Data_Get_Struct(self, xmlParserCtxt, ctxt); if(Qfalse == value) ctxt->replaceEntities = 0; else ctxt->replaceEntities = 1; return value; } /* * call-seq: * replace_entities * * Should this parser replace entities? & will get converted to '&' if * set to true */ static VALUE get_replace_entities(VALUE self) { xmlParserCtxtPtr ctxt; Data_Get_Struct(self, xmlParserCtxt, ctxt); if(0 == ctxt->replaceEntities) return Qfalse; else return Qtrue; } /* * call-seq: line * * Get the current line the parser context is processing. */ static VALUE line(VALUE self) { xmlParserCtxtPtr ctxt; xmlParserInputPtr io; Data_Get_Struct(self, xmlParserCtxt, ctxt); io = ctxt->input; if(io) return INT2NUM(io->line); return Qnil; } /* * call-seq: column * * Get the current column the parser context is processing. */ static VALUE column(VALUE self) { xmlParserCtxtPtr ctxt; xmlParserInputPtr io; Data_Get_Struct(self, xmlParserCtxt, ctxt); io = ctxt->input; if(io) return INT2NUM(io->col); return Qnil; } /* * call-seq: * recovery=(boolean) * * Should this parser recover from structural errors? It will not stop processing * file on structural errors if set to true */ static VALUE set_recovery(VALUE self, VALUE value) { xmlParserCtxtPtr ctxt; Data_Get_Struct(self, xmlParserCtxt, ctxt); if(value == Qfalse) ctxt->recovery = 0; else ctxt->recovery = 1; return value; } /* * call-seq: * recovery * * Should this parser recover from structural errors? It will not stop processing * file on structural errors if set to true */ static VALUE get_recovery(VALUE self) { xmlParserCtxtPtr ctxt; Data_Get_Struct(self, xmlParserCtxt, ctxt); if(ctxt->recovery == 0) return Qfalse; else return Qtrue; } void init_xml_sax_parser_context() { VALUE nokogiri = rb_define_module("Nokogiri"); VALUE xml = rb_define_module_under(nokogiri, "XML"); VALUE sax = rb_define_module_under(xml, "SAX"); VALUE klass = rb_define_class_under(sax, "ParserContext", rb_cObject); cNokogiriXmlSaxParserContext = klass; rb_define_singleton_method(klass, "io", parse_io, 2); rb_define_singleton_method(klass, "memory", parse_memory, 1); rb_define_singleton_method(klass, "file", parse_file, 1); rb_define_method(klass, "parse_with", parse_with, 1); rb_define_method(klass, "replace_entities=", set_replace_entities, 1); rb_define_method(klass, "replace_entities", get_replace_entities, 0); rb_define_method(klass, "recovery=", set_recovery, 1); rb_define_method(klass, "recovery", get_recovery, 0); rb_define_method(klass, "line", line, 0); rb_define_method(klass, "column", column, 0); } nokogiri-1.8.2/ext/nokogiri/xml_cdata.h0000644000004100000410000000021513235345655020132 0ustar www-datawww-data#ifndef NOKOGIRI_XML_CDATA #define NOKOGIRI_XML_CDATA #include void init_xml_cdata(); extern VALUE cNokogiriXmlCData; #endif nokogiri-1.8.2/ext/nokogiri/xml_element_content.h0000644000004100000410000000033213235345655022241 0ustar www-datawww-data#ifndef NOKOGIRI_XML_ELEMENT_CONTENT #define NOKOGIRI_XML_ELEMENT_CONTENT #include VALUE Nokogiri_wrap_element_content(VALUE doc, xmlElementContentPtr element); void init_xml_element_content(); #endif nokogiri-1.8.2/ext/nokogiri/xml_libxml2_hacks.h0000644000004100000410000000040213235345655021576 0ustar www-datawww-data#ifndef HAVE_XMLFIRSTELEMENTCHILD #ifndef XML_LIBXML2_HACKS #define XML_LIBXML2_HACKS xmlNodePtr xmlFirstElementChild(xmlNodePtr parent); xmlNodePtr xmlNextElementSibling(xmlNodePtr node); xmlNodePtr xmlLastElementChild(xmlNodePtr parent); #endif #endif nokogiri-1.8.2/ext/nokogiri/xml_dtd.c0000644000004100000410000001003113235345655017621 0ustar www-datawww-data#include static void notation_copier(void *payload, void *data, xmlChar *name) { VALUE hash = (VALUE)data; VALUE klass = rb_const_get(mNokogiriXml, rb_intern("Notation")); xmlNotationPtr c_notation = (xmlNotationPtr)payload; VALUE notation; VALUE argv[3]; argv[0] = (c_notation->name ? NOKOGIRI_STR_NEW2(c_notation->name) : Qnil); argv[1] = (c_notation->PublicID ? NOKOGIRI_STR_NEW2(c_notation->PublicID) : Qnil); argv[2] = (c_notation->SystemID ? NOKOGIRI_STR_NEW2(c_notation->SystemID) : Qnil); notation = rb_class_new_instance(3, argv, klass); rb_hash_aset(hash, NOKOGIRI_STR_NEW2(name),notation); } static void element_copier(void *_payload, void *data, xmlChar *name) { VALUE hash = (VALUE)data; xmlNodePtr payload = (xmlNodePtr)_payload; VALUE element = Nokogiri_wrap_xml_node(Qnil, payload); rb_hash_aset(hash, NOKOGIRI_STR_NEW2(name), element); } /* * call-seq: * entities * * Get a hash of the elements for this DTD. */ static VALUE entities(VALUE self) { xmlDtdPtr dtd; VALUE hash; Data_Get_Struct(self, xmlDtd, dtd); if(!dtd->entities) return Qnil; hash = rb_hash_new(); xmlHashScan((xmlHashTablePtr)dtd->entities, element_copier, (void *)hash); return hash; } /* * call-seq: * notations * * Get a hash of the notations for this DTD. */ static VALUE notations(VALUE self) { xmlDtdPtr dtd; VALUE hash; Data_Get_Struct(self, xmlDtd, dtd); if(!dtd->notations) return Qnil; hash = rb_hash_new(); xmlHashScan((xmlHashTablePtr)dtd->notations, notation_copier, (void *)hash); return hash; } /* * call-seq: * attributes * * Get a hash of the attributes for this DTD. */ static VALUE attributes(VALUE self) { xmlDtdPtr dtd; VALUE hash; Data_Get_Struct(self, xmlDtd, dtd); hash = rb_hash_new(); if(!dtd->attributes) return hash; xmlHashScan((xmlHashTablePtr)dtd->attributes, element_copier, (void *)hash); return hash; } /* * call-seq: * elements * * Get a hash of the elements for this DTD. */ static VALUE elements(VALUE self) { xmlDtdPtr dtd; VALUE hash; Data_Get_Struct(self, xmlDtd, dtd); if(!dtd->elements) return Qnil; hash = rb_hash_new(); xmlHashScan((xmlHashTablePtr)dtd->elements, element_copier, (void *)hash); return hash; } /* * call-seq: * validate(document) * * Validate +document+ returning a list of errors */ static VALUE validate(VALUE self, VALUE document) { xmlDocPtr doc; xmlDtdPtr dtd; xmlValidCtxtPtr ctxt; VALUE error_list; Data_Get_Struct(self, xmlDtd, dtd); Data_Get_Struct(document, xmlDoc, doc); error_list = rb_ary_new(); ctxt = xmlNewValidCtxt(); xmlSetStructuredErrorFunc((void *)error_list, Nokogiri_error_array_pusher); xmlValidateDtd(ctxt, doc, dtd); xmlSetStructuredErrorFunc(NULL, NULL); xmlFreeValidCtxt(ctxt); return error_list; } /* * call-seq: * system_id * * Get the System ID for this DTD */ static VALUE system_id(VALUE self) { xmlDtdPtr dtd; Data_Get_Struct(self, xmlDtd, dtd); if(!dtd->SystemID) return Qnil; return NOKOGIRI_STR_NEW2(dtd->SystemID); } /* * call-seq: * external_id * * Get the External ID for this DTD */ static VALUE external_id(VALUE self) { xmlDtdPtr dtd; Data_Get_Struct(self, xmlDtd, dtd); if(!dtd->ExternalID) return Qnil; return NOKOGIRI_STR_NEW2(dtd->ExternalID); } VALUE cNokogiriXmlDtd; void init_xml_dtd() { VALUE nokogiri = rb_define_module("Nokogiri"); VALUE xml = rb_define_module_under(nokogiri, "XML"); VALUE node = rb_define_class_under(xml, "Node", rb_cObject); /* * Nokogiri::XML::DTD wraps DTD nodes in an XML document */ VALUE klass = rb_define_class_under(xml, "DTD", node); cNokogiriXmlDtd = klass; rb_define_method(klass, "notations", notations, 0); rb_define_method(klass, "elements", elements, 0); rb_define_method(klass, "entities", entities, 0); rb_define_method(klass, "validate", validate, 1); rb_define_method(klass, "attributes", attributes, 0); rb_define_method(klass, "system_id", system_id, 0); rb_define_method(klass, "external_id", external_id, 0); } nokogiri-1.8.2/ext/nokogiri/xml_schema.c0000644000004100000410000001072213235345655020315 0ustar www-datawww-data#include static void dealloc(xmlSchemaPtr schema) { NOKOGIRI_DEBUG_START(schema); xmlSchemaFree(schema); NOKOGIRI_DEBUG_END(schema); } /* * call-seq: * validate_document(document) * * Validate a Nokogiri::XML::Document against this Schema. */ static VALUE validate_document(VALUE self, VALUE document) { xmlDocPtr doc; xmlSchemaPtr schema; xmlSchemaValidCtxtPtr valid_ctxt; VALUE errors; Data_Get_Struct(self, xmlSchema, schema); Data_Get_Struct(document, xmlDoc, doc); errors = rb_ary_new(); valid_ctxt = xmlSchemaNewValidCtxt(schema); if(NULL == valid_ctxt) { /* we have a problem */ rb_raise(rb_eRuntimeError, "Could not create a validation context"); } #ifdef HAVE_XMLSCHEMASETVALIDSTRUCTUREDERRORS xmlSchemaSetValidStructuredErrors( valid_ctxt, Nokogiri_error_array_pusher, (void *)errors ); #endif xmlSchemaValidateDoc(valid_ctxt, doc); xmlSchemaFreeValidCtxt(valid_ctxt); return errors; } /* * call-seq: * validate_file(filename) * * Validate a file against this Schema. */ static VALUE validate_file(VALUE self, VALUE rb_filename) { xmlSchemaPtr schema; xmlSchemaValidCtxtPtr valid_ctxt; const char *filename ; VALUE errors; Data_Get_Struct(self, xmlSchema, schema); filename = (const char*)StringValueCStr(rb_filename) ; errors = rb_ary_new(); valid_ctxt = xmlSchemaNewValidCtxt(schema); if(NULL == valid_ctxt) { /* we have a problem */ rb_raise(rb_eRuntimeError, "Could not create a validation context"); } #ifdef HAVE_XMLSCHEMASETVALIDSTRUCTUREDERRORS xmlSchemaSetValidStructuredErrors( valid_ctxt, Nokogiri_error_array_pusher, (void *)errors ); #endif xmlSchemaValidateFile(valid_ctxt, filename, 0); xmlSchemaFreeValidCtxt(valid_ctxt); return errors; } /* * call-seq: * read_memory(string) * * Create a new Schema from the contents of +string+ */ static VALUE read_memory(VALUE klass, VALUE content) { xmlSchemaPtr schema; xmlSchemaParserCtxtPtr ctx = xmlSchemaNewMemParserCtxt( (const char *)StringValuePtr(content), (int)RSTRING_LEN(content) ); VALUE rb_schema; VALUE errors = rb_ary_new(); xmlSetStructuredErrorFunc((void *)errors, Nokogiri_error_array_pusher); #ifdef HAVE_XMLSCHEMASETPARSERSTRUCTUREDERRORS xmlSchemaSetParserStructuredErrors( ctx, Nokogiri_error_array_pusher, (void *)errors ); #endif schema = xmlSchemaParse(ctx); xmlSetStructuredErrorFunc(NULL, NULL); xmlSchemaFreeParserCtxt(ctx); if(NULL == schema) { xmlErrorPtr error = xmlGetLastError(); if(error) Nokogiri_error_raise(NULL, error); else rb_raise(rb_eRuntimeError, "Could not parse document"); return Qnil; } rb_schema = Data_Wrap_Struct(klass, 0, dealloc, schema); rb_iv_set(rb_schema, "@errors", errors); return rb_schema; } /* * call-seq: * from_document(doc) * * Create a new Schema from the Nokogiri::XML::Document +doc+ */ static VALUE from_document(VALUE klass, VALUE document) { xmlDocPtr doc; xmlSchemaParserCtxtPtr ctx; xmlSchemaPtr schema; VALUE errors; VALUE rb_schema; Data_Get_Struct(document, xmlDoc, doc); /* In case someone passes us a node. ugh. */ doc = doc->doc; ctx = xmlSchemaNewDocParserCtxt(doc); errors = rb_ary_new(); xmlSetStructuredErrorFunc((void *)errors, Nokogiri_error_array_pusher); #ifdef HAVE_XMLSCHEMASETPARSERSTRUCTUREDERRORS xmlSchemaSetParserStructuredErrors( ctx, Nokogiri_error_array_pusher, (void *)errors ); #endif schema = xmlSchemaParse(ctx); xmlSetStructuredErrorFunc(NULL, NULL); xmlSchemaFreeParserCtxt(ctx); if(NULL == schema) { xmlErrorPtr error = xmlGetLastError(); if(error) Nokogiri_error_raise(NULL, error); else rb_raise(rb_eRuntimeError, "Could not parse document"); return Qnil; } rb_schema = Data_Wrap_Struct(klass, 0, dealloc, schema); rb_iv_set(rb_schema, "@errors", errors); return rb_schema; return Qnil; } VALUE cNokogiriXmlSchema; void init_xml_schema() { VALUE nokogiri = rb_define_module("Nokogiri"); VALUE xml = rb_define_module_under(nokogiri, "XML"); VALUE klass = rb_define_class_under(xml, "Schema", rb_cObject); cNokogiriXmlSchema = klass; rb_define_singleton_method(klass, "read_memory", read_memory, 1); rb_define_singleton_method(klass, "from_document", from_document, 1); rb_define_private_method(klass, "validate_document", validate_document, 1); rb_define_private_method(klass, "validate_file", validate_file, 1); } nokogiri-1.8.2/ext/nokogiri/xml_entity_decl.h0000644000004100000410000000024513235345655021364 0ustar www-datawww-data#ifndef NOKOGIRI_XML_ENTITY_DECL #define NOKOGIRI_XML_ENTITY_DECL #include void init_xml_entity_decl(); extern VALUE cNokogiriXmlEntityDecl; #endif nokogiri-1.8.2/ext/nokogiri/xml_document.h0000644000004100000410000000130113235345655020671 0ustar www-datawww-data#ifndef NOKOGIRI_XML_DOCUMENT #define NOKOGIRI_XML_DOCUMENT #include struct _nokogiriTuple { VALUE doc; st_table *unlinkedNodes; VALUE node_cache; }; typedef struct _nokogiriTuple nokogiriTuple; typedef nokogiriTuple * nokogiriTuplePtr; void init_xml_document(); VALUE Nokogiri_wrap_xml_document(VALUE klass, xmlDocPtr doc); #define DOC_RUBY_OBJECT_TEST(x) ((nokogiriTuplePtr)(x->_private)) #define DOC_RUBY_OBJECT(x) (((nokogiriTuplePtr)(x->_private))->doc) #define DOC_UNLINKED_NODE_HASH(x) (((nokogiriTuplePtr)(x->_private))->unlinkedNodes) #define DOC_NODE_CACHE(x) (((nokogiriTuplePtr)(x->_private))->node_cache) extern VALUE cNokogiriXmlDocument ; #endif nokogiri-1.8.2/ext/nokogiri/xml_document_fragment.c0000644000004100000410000000212113235345655022550 0ustar www-datawww-data#include /* * call-seq: * new(document) * * Create a new DocumentFragment element on the +document+ */ static VALUE new(int argc, VALUE *argv, VALUE klass) { xmlDocPtr xml_doc; xmlNodePtr node; VALUE document; VALUE rest; VALUE rb_node; rb_scan_args(argc, argv, "1*", &document, &rest); Data_Get_Struct(document, xmlDoc, xml_doc); node = xmlNewDocFragment(xml_doc->doc); nokogiri_root_node(node); rb_node = Nokogiri_wrap_xml_node(klass, node); rb_obj_call_init(rb_node, argc, argv); if(rb_block_given_p()) rb_yield(rb_node); return rb_node; } VALUE cNokogiriXmlDocumentFragment; void init_xml_document_fragment() { VALUE nokogiri = rb_define_module("Nokogiri"); VALUE xml = rb_define_module_under(nokogiri, "XML"); VALUE node = rb_define_class_under(xml, "Node", rb_cObject); /* * DocumentFragment represents a DocumentFragment node in an xml document. */ VALUE klass = rb_define_class_under(xml, "DocumentFragment", node); cNokogiriXmlDocumentFragment = klass; rb_define_singleton_method(klass, "new", new, -1); } nokogiri-1.8.2/ext/nokogiri/xslt_stylesheet.h0000644000004100000410000000044413235345655021445 0ustar www-datawww-data#ifndef NOKOGIRI_XSLT_STYLESHEET #define NOKOGIRI_XSLT_STYLESHEET #include void init_xslt_stylesheet(); extern VALUE cNokogiriXsltStylesheet ; typedef struct _nokogiriXsltStylesheetTuple { xsltStylesheetPtr ss; VALUE func_instances; } nokogiriXsltStylesheetTuple; #endif nokogiri-1.8.2/ext/nokogiri/xml_entity_reference.c0000644000004100000410000000224513235345655022410 0ustar www-datawww-data#include /* * call-seq: * new(document, content) * * Create a new EntityReference element on the +document+ with +name+ */ static VALUE new(int argc, VALUE *argv, VALUE klass) { xmlDocPtr xml_doc; xmlNodePtr node; VALUE document; VALUE name; VALUE rest; VALUE rb_node; rb_scan_args(argc, argv, "2*", &document, &name, &rest); Data_Get_Struct(document, xmlDoc, xml_doc); node = xmlNewReference( xml_doc, (const xmlChar *)StringValueCStr(name) ); nokogiri_root_node(node); rb_node = Nokogiri_wrap_xml_node(klass, node); rb_obj_call_init(rb_node, argc, argv); if(rb_block_given_p()) rb_yield(rb_node); return rb_node; } VALUE cNokogiriXmlEntityReference; void init_xml_entity_reference() { VALUE nokogiri = rb_define_module("Nokogiri"); VALUE xml = rb_define_module_under(nokogiri, "XML"); VALUE node = rb_define_class_under(xml, "Node", rb_cObject); /* * EntityReference represents an EntityReference node in an xml document. */ VALUE klass = rb_define_class_under(xml, "EntityReference", node); cNokogiriXmlEntityReference = klass; rb_define_singleton_method(klass, "new", new, -1); } nokogiri-1.8.2/ext/nokogiri/xml_encoding_handler.h0000644000004100000410000000021613235345655022342 0ustar www-datawww-data#ifndef NOKOGIRI_XML_ENCODING_HANDLER #define NOKOGIRI_XML_ENCODING_HANDLER #include void init_xml_encoding_handler(); #endif nokogiri-1.8.2/ext/nokogiri/xml_dtd.h0000644000004100000410000000020613235345655017631 0ustar www-datawww-data#ifndef NOKOGIRI_XML_DTD #define NOKOGIRI_XML_DTD #include extern VALUE cNokogiriXmlDtd; void init_xml_dtd(); #endif nokogiri-1.8.2/ext/nokogiri/xml_entity_reference.h0000644000004100000410000000027013235345655022411 0ustar www-datawww-data#ifndef NOKOGIRI_XML_ENTITY_REFERENCE #define NOKOGIRI_XML_ENTITY_REFERENCE #include void init_xml_entity_reference(); extern VALUE cNokogiriXmlEntityReference; #endif nokogiri-1.8.2/ext/nokogiri/html_sax_push_parser.c0000644000004100000410000000417713235345655022436 0ustar www-datawww-data#include /* * call-seq: * native_write(chunk, last_chunk) * * Write +chunk+ to PushParser. +last_chunk+ triggers the end_document handle */ static VALUE native_write(VALUE self, VALUE _chunk, VALUE _last_chunk) { xmlParserCtxtPtr ctx; const char * chunk = NULL; int size = 0; Data_Get_Struct(self, xmlParserCtxt, ctx); if(Qnil != _chunk) { chunk = StringValuePtr(_chunk); size = (int)RSTRING_LEN(_chunk); } if(htmlParseChunk(ctx, chunk, size, Qtrue == _last_chunk ? 1 : 0)) { if (!(ctx->options & XML_PARSE_RECOVER)) { xmlErrorPtr e = xmlCtxtGetLastError(ctx); Nokogiri_error_raise(NULL, e); } } return self; } /* * call-seq: * initialize_native(xml_sax, filename) * * Initialize the push parser with +xml_sax+ using +filename+ */ static VALUE initialize_native(VALUE self, VALUE _xml_sax, VALUE _filename, VALUE encoding) { htmlSAXHandlerPtr sax; const char * filename = NULL; htmlParserCtxtPtr ctx; xmlCharEncoding enc = XML_CHAR_ENCODING_NONE; Data_Get_Struct(_xml_sax, xmlSAXHandler, sax); if(_filename != Qnil) filename = StringValueCStr(_filename); if (!NIL_P(encoding)) { enc = xmlParseCharEncoding(StringValueCStr(encoding)); if (enc == XML_CHAR_ENCODING_ERROR) rb_raise(rb_eArgError, "Unsupported Encoding"); } ctx = htmlCreatePushParserCtxt( sax, NULL, NULL, 0, filename, enc ); if(ctx == NULL) rb_raise(rb_eRuntimeError, "Could not create a parser context"); ctx->userData = NOKOGIRI_SAX_TUPLE_NEW(ctx, self); ctx->sax2 = 1; DATA_PTR(self) = ctx; return self; } VALUE cNokogiriHtmlSaxPushParser; void init_html_sax_push_parser() { VALUE nokogiri = rb_define_module("Nokogiri"); VALUE html = rb_define_module_under(nokogiri, "HTML"); VALUE sax = rb_define_module_under(html, "SAX"); VALUE klass = rb_define_class_under(sax, "PushParser", cNokogiriXmlSaxPushParser); cNokogiriHtmlSaxPushParser = klass; rb_define_private_method(klass, "initialize_native", initialize_native, 3); rb_define_private_method(klass, "native_write", native_write, 2); } nokogiri-1.8.2/ext/nokogiri/xml_element_decl.c0000644000004100000410000000253513235345655021500 0ustar www-datawww-data#include static ID id_document; /* * call-seq: * element_type * * The element_type */ static VALUE element_type(VALUE self) { xmlElementPtr node; Data_Get_Struct(self, xmlElement, node); return INT2NUM((long)node->etype); } /* * call-seq: * content * * The allowed content for this ElementDecl */ static VALUE content(VALUE self) { xmlElementPtr node; Data_Get_Struct(self, xmlElement, node); if(!node->content) return Qnil; return Nokogiri_wrap_element_content( rb_funcall(self, id_document, 0), node->content ); } /* * call-seq: * prefix * * The namespace prefix for this ElementDecl */ static VALUE prefix(VALUE self) { xmlElementPtr node; Data_Get_Struct(self, xmlElement, node); if(!node->prefix) return Qnil; return NOKOGIRI_STR_NEW2(node->prefix); } VALUE cNokogiriXmlElementDecl; void init_xml_element_decl() { VALUE nokogiri = rb_define_module("Nokogiri"); VALUE xml = rb_define_module_under(nokogiri, "XML"); VALUE node = rb_define_class_under(xml, "Node", rb_cObject); VALUE klass = rb_define_class_under(xml, "ElementDecl", node); cNokogiriXmlElementDecl = klass; rb_define_method(klass, "element_type", element_type, 0); rb_define_method(klass, "content", content, 0); rb_define_method(klass, "prefix", prefix, 0); id_document = rb_intern("document"); } nokogiri-1.8.2/ext/nokogiri/html_document.h0000644000004100000410000000023713235345655021044 0ustar www-datawww-data#ifndef NOKOGIRI_HTML_DOCUMENT #define NOKOGIRI_HTML_DOCUMENT #include void init_html_document(); extern VALUE cNokogiriHtmlDocument ; #endif nokogiri-1.8.2/ext/nokogiri/xml_node.c0000644000004100000410000012172313235345655020006 0ustar www-datawww-data#include static ID decorate, decorate_bang; #ifdef DEBUG static void debug_node_dealloc(xmlNodePtr x) { NOKOGIRI_DEBUG_START(x) NOKOGIRI_DEBUG_END(x) } #else # define debug_node_dealloc 0 #endif static void mark(xmlNodePtr node) { xmlDocPtr doc = node->doc; if(doc->type == XML_DOCUMENT_NODE || doc->type == XML_HTML_DOCUMENT_NODE) { if(DOC_RUBY_OBJECT_TEST(doc)) { rb_gc_mark(DOC_RUBY_OBJECT(doc)); } } else if(node->doc->_private) { rb_gc_mark((VALUE)doc->_private); } } /* :nodoc: */ typedef xmlNodePtr (*pivot_reparentee_func)(xmlNodePtr, xmlNodePtr); /* :nodoc: */ static void relink_namespace(xmlNodePtr reparented) { xmlChar *name, *prefix; xmlNodePtr child; xmlNsPtr ns; if (reparented->type != XML_ATTRIBUTE_NODE && reparented->type != XML_ELEMENT_NODE) { return; } if (reparented->ns == NULL || reparented->ns->prefix == NULL) { name = xmlSplitQName2(reparented->name, &prefix); if(reparented->type == XML_ATTRIBUTE_NODE) { if (prefix == NULL || strcmp((char*)prefix, XMLNS_PREFIX) == 0) { return; } } ns = xmlSearchNs(reparented->doc, reparented, prefix); if (ns == NULL && reparented->parent) { ns = xmlSearchNs(reparented->doc, reparented->parent, prefix); } if (ns != NULL) { xmlNodeSetName(reparented, name); xmlSetNs(reparented, ns); } } /* Avoid segv when relinking against unlinked nodes. */ if (reparented->type != XML_ELEMENT_NODE || !reparented->parent) { return; } /* Make sure that our reparented node has the correct namespaces */ if (!reparented->ns && reparented->doc != (xmlDocPtr)reparented->parent) { xmlSetNs(reparented, reparented->parent->ns); } /* Search our parents for an existing definition */ if (reparented->nsDef) { xmlNsPtr curr = reparented->nsDef; xmlNsPtr prev = NULL; while (curr) { xmlNsPtr ns = xmlSearchNsByHref( reparented->doc, reparented->parent, curr->href ); /* If we find the namespace is already declared, remove it from this * definition list. */ if (ns && ns != curr && xmlStrEqual(ns->prefix, curr->prefix)) { if (prev) { prev->next = curr->next; } else { reparented->nsDef = curr->next; } nokogiri_root_nsdef(curr, reparented->doc); } else { prev = curr; } curr = curr->next; } } /* Only walk all children if there actually is a namespace we need to */ /* reparent. */ if (NULL == reparented->ns) { return; } /* When a node gets reparented, walk it's children to make sure that */ /* their namespaces are reparented as well. */ child = reparented->children; while (NULL != child) { relink_namespace(child); child = child->next; } if (reparented->type == XML_ELEMENT_NODE) { child = (xmlNodePtr)((xmlElementPtr)reparented)->attributes; while(NULL != child) { relink_namespace(child); child = child->next; } } } /* :nodoc: */ static xmlNodePtr xmlReplaceNodeWrapper(xmlNodePtr pivot, xmlNodePtr new_node) { xmlNodePtr retval ; retval = xmlReplaceNode(pivot, new_node) ; if (retval == pivot) { retval = new_node ; /* return semantics for reparent_node_with */ } /* work around libxml2 issue: https://bugzilla.gnome.org/show_bug.cgi?id=615612 */ if (retval && retval->type == XML_TEXT_NODE) { if (retval->prev && retval->prev->type == XML_TEXT_NODE) { retval = xmlTextMerge(retval->prev, retval); } if (retval->next && retval->next->type == XML_TEXT_NODE) { retval = xmlTextMerge(retval, retval->next); } } return retval ; } /* :nodoc: */ static VALUE reparent_node_with(VALUE pivot_obj, VALUE reparentee_obj, pivot_reparentee_func prf) { VALUE reparented_obj ; xmlNodePtr reparentee, pivot, reparented, next_text, new_next_text, parent ; int original_ns_prefix_is_default = 0 ; if(!rb_obj_is_kind_of(reparentee_obj, cNokogiriXmlNode)) rb_raise(rb_eArgError, "node must be a Nokogiri::XML::Node"); if(rb_obj_is_kind_of(reparentee_obj, cNokogiriXmlDocument)) rb_raise(rb_eArgError, "node must be a Nokogiri::XML::Node"); Data_Get_Struct(reparentee_obj, xmlNode, reparentee); Data_Get_Struct(pivot_obj, xmlNode, pivot); /* * Check if nodes given are appropriate to have a parent-child * relationship, based on the DOM specification. * * cf. http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core.html#ID-1590626202 */ if (prf == xmlAddChild) { parent = pivot; } else { parent = pivot->parent; } if (parent) { switch (parent->type) { case XML_DOCUMENT_NODE: case XML_HTML_DOCUMENT_NODE: switch (reparentee->type) { case XML_ELEMENT_NODE: case XML_PI_NODE: case XML_COMMENT_NODE: case XML_DOCUMENT_TYPE_NODE: /* * The DOM specification says no to adding text-like nodes * directly to a document, but we allow it for compatibility. */ case XML_TEXT_NODE: case XML_CDATA_SECTION_NODE: case XML_ENTITY_REF_NODE: goto ok; } break; case XML_DOCUMENT_FRAG_NODE: case XML_ENTITY_REF_NODE: case XML_ELEMENT_NODE: switch (reparentee->type) { case XML_ELEMENT_NODE: case XML_PI_NODE: case XML_COMMENT_NODE: case XML_TEXT_NODE: case XML_CDATA_SECTION_NODE: case XML_ENTITY_REF_NODE: goto ok; } break; case XML_ATTRIBUTE_NODE: switch (reparentee->type) { case XML_TEXT_NODE: case XML_ENTITY_REF_NODE: goto ok; } break; case XML_TEXT_NODE: /* * xmlAddChild() breaks the DOM specification in that it allows * adding a text node to another, in which case text nodes are * coalesced, but since our JRuby version does not support such * operation, we should inhibit it. */ break; } rb_raise(rb_eArgError, "cannot reparent %s there", rb_obj_classname(reparentee_obj)); } ok: xmlUnlinkNode(reparentee); if (reparentee->doc != pivot->doc || reparentee->type == XML_TEXT_NODE) { /* * if the reparentee is a text node, there's a very good chance it will be * merged with an adjacent text node after being reparented, and in that case * libxml will free the underlying C struct. * * since we clearly have a ruby object which references the underlying * memory, we can't let the C struct get freed. let's pickle the original * reparentee by rooting it; and then we'll reparent a duplicate of the * node that we don't care about preserving. * * alternatively, if the reparentee is from a different document than the * pivot node, libxml2 is going to get confused about which document's * "dictionary" the node's strings belong to (this is an otherwise * uninteresting libxml2 implementation detail). as a result, we cannot * reparent the actual reparentee, so we reparent a duplicate. */ if (reparentee->type == XML_TEXT_NODE && reparentee->_private) { /* * additionally, since we know this C struct isn't going to be related to * a Ruby object anymore, let's break the relationship on this end as * well. * * this is not absolutely necessary unless libxml-ruby is also in effect, * in which case its global callback `rxml_node_deregisterNode` will try * to do things to our data. * * for more details on this particular (and particularly nasty) edge * case, see: * * https://github.com/sparklemotion/nokogiri/issues/1426 */ reparentee->_private = NULL ; } if (reparentee->ns != NULL && reparentee->ns->prefix == NULL) { original_ns_prefix_is_default = 1; } nokogiri_root_node(reparentee); if (!(reparentee = xmlDocCopyNode(reparentee, pivot->doc, 1))) { rb_raise(rb_eRuntimeError, "Could not reparent node (xmlDocCopyNode)"); } if (original_ns_prefix_is_default && reparentee->ns != NULL && reparentee->ns->prefix != NULL) { /* issue #391, where new node's prefix may become the string "default" */ reparentee->ns->prefix = NULL; } } if (prf != xmlAddPrevSibling && prf != xmlAddNextSibling && reparentee->type == XML_TEXT_NODE && pivot->next && pivot->next->type == XML_TEXT_NODE) { /* * libxml merges text nodes in a right-to-left fashion, meaning that if * there are two text nodes who would be adjacent, the right (or following, * or next) node will be merged into the left (or preceding, or previous) * node. * * and by "merged" I mean the string contents will be concatenated onto the * left node's contents, and then the node will be freed. * * which means that if we have a ruby object wrapped around the right node, * its memory would be freed out from under it. * * so, we detect this edge case and unlink-and-root the text node before it gets * merged. then we dup the node and insert that duplicate back into the * document where the real node was. * * yes, this is totally lame. */ next_text = pivot->next ; new_next_text = xmlDocCopyNode(next_text, pivot->doc, 1) ; xmlUnlinkNode(next_text); nokogiri_root_node(next_text); xmlAddNextSibling(pivot, new_next_text); } if(!(reparented = (*prf)(pivot, reparentee))) { rb_raise(rb_eRuntimeError, "Could not reparent node"); } /* * make sure the ruby object is pointed at the just-reparented node, which * might be a duplicate (see above) or might be the result of merging * adjacent text nodes. */ DATA_PTR(reparentee_obj) = reparented ; relink_namespace(reparented); reparented_obj = Nokogiri_wrap_xml_node(Qnil, reparented); rb_funcall(reparented_obj, decorate_bang, 0); return reparented_obj ; } /* * call-seq: * document * * Get the document for this Node */ static VALUE document(VALUE self) { xmlNodePtr node; Data_Get_Struct(self, xmlNode, node); return DOC_RUBY_OBJECT(node->doc); } /* * call-seq: * pointer_id * * Get the internal pointer number */ static VALUE pointer_id(VALUE self) { xmlNodePtr node; Data_Get_Struct(self, xmlNode, node); return INT2NUM((long)(node)); } /* * call-seq: * encode_special_chars(string) * * Encode any special characters in +string+ */ static VALUE encode_special_chars(VALUE self, VALUE string) { xmlNodePtr node; xmlChar *encoded; VALUE encoded_str; Data_Get_Struct(self, xmlNode, node); encoded = xmlEncodeSpecialChars( node->doc, (const xmlChar *)StringValueCStr(string) ); encoded_str = NOKOGIRI_STR_NEW2(encoded); xmlFree(encoded); return encoded_str; } /* * call-seq: * create_internal_subset(name, external_id, system_id) * * Create the internal subset of a document. * * doc.create_internal_subset("chapter", "-//OASIS//DTD DocBook XML//EN", "chapter.dtd") * # => * * doc.create_internal_subset("chapter", nil, "chapter.dtd") * # => */ static VALUE create_internal_subset(VALUE self, VALUE name, VALUE external_id, VALUE system_id) { xmlNodePtr node; xmlDocPtr doc; xmlDtdPtr dtd; Data_Get_Struct(self, xmlNode, node); doc = node->doc; if(xmlGetIntSubset(doc)) rb_raise(rb_eRuntimeError, "Document already has an internal subset"); dtd = xmlCreateIntSubset( doc, NIL_P(name) ? NULL : (const xmlChar *)StringValueCStr(name), NIL_P(external_id) ? NULL : (const xmlChar *)StringValueCStr(external_id), NIL_P(system_id) ? NULL : (const xmlChar *)StringValueCStr(system_id) ); if(!dtd) return Qnil; return Nokogiri_wrap_xml_node(Qnil, (xmlNodePtr)dtd); } /* * call-seq: * create_external_subset(name, external_id, system_id) * * Create an external subset */ static VALUE create_external_subset(VALUE self, VALUE name, VALUE external_id, VALUE system_id) { xmlNodePtr node; xmlDocPtr doc; xmlDtdPtr dtd; Data_Get_Struct(self, xmlNode, node); doc = node->doc; if(doc->extSubset) rb_raise(rb_eRuntimeError, "Document already has an external subset"); dtd = xmlNewDtd( doc, NIL_P(name) ? NULL : (const xmlChar *)StringValueCStr(name), NIL_P(external_id) ? NULL : (const xmlChar *)StringValueCStr(external_id), NIL_P(system_id) ? NULL : (const xmlChar *)StringValueCStr(system_id) ); if(!dtd) return Qnil; return Nokogiri_wrap_xml_node(Qnil, (xmlNodePtr)dtd); } /* * call-seq: * external_subset * * Get the external subset */ static VALUE external_subset(VALUE self) { xmlNodePtr node; xmlDocPtr doc; xmlDtdPtr dtd; Data_Get_Struct(self, xmlNode, node); if(!node->doc) return Qnil; doc = node->doc; dtd = doc->extSubset; if(!dtd) return Qnil; return Nokogiri_wrap_xml_node(Qnil, (xmlNodePtr)dtd); } /* * call-seq: * internal_subset * * Get the internal subset */ static VALUE internal_subset(VALUE self) { xmlNodePtr node; xmlDocPtr doc; xmlDtdPtr dtd; Data_Get_Struct(self, xmlNode, node); if(!node->doc) return Qnil; doc = node->doc; dtd = xmlGetIntSubset(doc); if(!dtd) return Qnil; return Nokogiri_wrap_xml_node(Qnil, (xmlNodePtr)dtd); } /* * call-seq: * dup * * Copy this node. An optional depth may be passed in, but it defaults * to a deep copy. 0 is a shallow copy, 1 is a deep copy. */ static VALUE duplicate_node(int argc, VALUE *argv, VALUE self) { VALUE level; xmlNodePtr node, dup; if(rb_scan_args(argc, argv, "01", &level) == 0) level = INT2NUM((long)1); Data_Get_Struct(self, xmlNode, node); dup = xmlDocCopyNode(node, node->doc, (int)NUM2INT(level)); if(dup == NULL) return Qnil; nokogiri_root_node(dup); return Nokogiri_wrap_xml_node(rb_obj_class(self), dup); } /* * call-seq: * unlink * * Unlink this node from its current context. */ static VALUE unlink_node(VALUE self) { xmlNodePtr node; Data_Get_Struct(self, xmlNode, node); xmlUnlinkNode(node); nokogiri_root_node(node); return self; } /* * call-seq: * blank? * * Is this node blank? */ static VALUE blank_eh(VALUE self) { xmlNodePtr node; Data_Get_Struct(self, xmlNode, node); return (1 == xmlIsBlankNode(node)) ? Qtrue : Qfalse ; } /* * call-seq: * next_sibling * * Returns the next sibling node */ static VALUE next_sibling(VALUE self) { xmlNodePtr node, sibling; Data_Get_Struct(self, xmlNode, node); sibling = node->next; if(!sibling) return Qnil; return Nokogiri_wrap_xml_node(Qnil, sibling) ; } /* * call-seq: * previous_sibling * * Returns the previous sibling node */ static VALUE previous_sibling(VALUE self) { xmlNodePtr node, sibling; Data_Get_Struct(self, xmlNode, node); sibling = node->prev; if(!sibling) return Qnil; return Nokogiri_wrap_xml_node(Qnil, sibling); } /* * call-seq: * next_element * * Returns the next Nokogiri::XML::Element type sibling node. */ static VALUE next_element(VALUE self) { xmlNodePtr node, sibling; Data_Get_Struct(self, xmlNode, node); sibling = xmlNextElementSibling(node); if(!sibling) return Qnil; return Nokogiri_wrap_xml_node(Qnil, sibling); } /* * call-seq: * previous_element * * Returns the previous Nokogiri::XML::Element type sibling node. */ static VALUE previous_element(VALUE self) { xmlNodePtr node, sibling; Data_Get_Struct(self, xmlNode, node); /* * note that we don't use xmlPreviousElementSibling here because it's buggy pre-2.7.7. */ sibling = node->prev; if(!sibling) return Qnil; while(sibling && sibling->type != XML_ELEMENT_NODE) sibling = sibling->prev; return sibling ? Nokogiri_wrap_xml_node(Qnil, sibling) : Qnil ; } /* :nodoc: */ static VALUE replace(VALUE self, VALUE new_node) { VALUE reparent = reparent_node_with(self, new_node, xmlReplaceNodeWrapper); xmlNodePtr pivot; Data_Get_Struct(self, xmlNode, pivot); nokogiri_root_node(pivot); return reparent; } /* * call-seq: * children * * Get the list of children for this node as a NodeSet */ static VALUE children(VALUE self) { xmlNodePtr node; xmlNodePtr child; xmlNodeSetPtr set; VALUE document; VALUE node_set; Data_Get_Struct(self, xmlNode, node); child = node->children; set = xmlXPathNodeSetCreate(child); document = DOC_RUBY_OBJECT(node->doc); if(!child) return Nokogiri_wrap_xml_node_set(set, document); child = child->next; while(NULL != child) { xmlXPathNodeSetAddUnique(set, child); child = child->next; } node_set = Nokogiri_wrap_xml_node_set(set, document); return node_set; } /* * call-seq: * element_children * * Get the list of children for this node as a NodeSet. All nodes will be * element nodes. * * Example: * * @doc.root.element_children.all? { |x| x.element? } # => true */ static VALUE element_children(VALUE self) { xmlNodePtr node; xmlNodePtr child; xmlNodeSetPtr set; VALUE document; VALUE node_set; Data_Get_Struct(self, xmlNode, node); child = xmlFirstElementChild(node); set = xmlXPathNodeSetCreate(child); document = DOC_RUBY_OBJECT(node->doc); if(!child) return Nokogiri_wrap_xml_node_set(set, document); child = xmlNextElementSibling(child); while(NULL != child) { xmlXPathNodeSetAddUnique(set, child); child = xmlNextElementSibling(child); } node_set = Nokogiri_wrap_xml_node_set(set, document); return node_set; } /* * call-seq: * child * * Returns the child node */ static VALUE child(VALUE self) { xmlNodePtr node, child; Data_Get_Struct(self, xmlNode, node); child = node->children; if(!child) return Qnil; return Nokogiri_wrap_xml_node(Qnil, child); } /* * call-seq: * first_element_child * * Returns the first child node of this node that is an element. * * Example: * * @doc.root.first_element_child.element? # => true */ static VALUE first_element_child(VALUE self) { xmlNodePtr node, child; Data_Get_Struct(self, xmlNode, node); child = xmlFirstElementChild(node); if(!child) return Qnil; return Nokogiri_wrap_xml_node(Qnil, child); } /* * call-seq: * last_element_child * * Returns the last child node of this node that is an element. * * Example: * * @doc.root.last_element_child.element? # => true */ static VALUE last_element_child(VALUE self) { xmlNodePtr node, child; Data_Get_Struct(self, xmlNode, node); child = xmlLastElementChild(node); if(!child) return Qnil; return Nokogiri_wrap_xml_node(Qnil, child); } /* * call-seq: * key?(attribute) * * Returns true if +attribute+ is set */ static VALUE key_eh(VALUE self, VALUE attribute) { xmlNodePtr node; Data_Get_Struct(self, xmlNode, node); if(xmlHasProp(node, (xmlChar *)StringValueCStr(attribute))) return Qtrue; return Qfalse; } /* * call-seq: * namespaced_key?(attribute, namespace) * * Returns true if +attribute+ is set with +namespace+ */ static VALUE namespaced_key_eh(VALUE self, VALUE attribute, VALUE namespace) { xmlNodePtr node; Data_Get_Struct(self, xmlNode, node); if(xmlHasNsProp(node, (xmlChar *)StringValueCStr(attribute), NIL_P(namespace) ? NULL : (xmlChar *)StringValueCStr(namespace))) return Qtrue; return Qfalse; } /* * call-seq: * []=(property, value) * * Set the +property+ to +value+ */ static VALUE set(VALUE self, VALUE property, VALUE value) { xmlNodePtr node, cur; xmlAttrPtr prop; Data_Get_Struct(self, xmlNode, node); /* If a matching attribute node already exists, then xmlSetProp will destroy * the existing node's children. However, if Nokogiri has a node object * pointing to one of those children, we are left with a broken reference. * * We can avoid this by unlinking these nodes first. */ if (node->type != XML_ELEMENT_NODE) return(Qnil); prop = xmlHasProp(node, (xmlChar *)StringValueCStr(property)); if (prop && prop->children) { for (cur = prop->children; cur; cur = cur->next) { if (cur->_private) { nokogiri_root_node(cur); xmlUnlinkNode(cur); } } } xmlSetProp(node, (xmlChar *)StringValueCStr(property), (xmlChar *)StringValueCStr(value)); return value; } /* * call-seq: * get(attribute) * * Get the value for +attribute+ */ static VALUE get(VALUE self, VALUE rattribute) { xmlNodePtr node; const xmlChar *value = 0; VALUE rvalue; xmlChar *colon; const xmlChar *attribute, *attr_name, *prefix; xmlNsPtr ns; if (NIL_P(rattribute)) return Qnil; Data_Get_Struct(self, xmlNode, node); attribute = xmlCharStrdup(StringValueCStr(rattribute)); colon = (xmlChar *)xmlStrchr(attribute, (const xmlChar)':'); if (colon) { /* split the attribute string into separate prefix and name by * null-terminating the prefix at the colon */ prefix = attribute; attr_name = colon + 1; (*colon) = 0; ns = xmlSearchNs(node->doc, node, prefix); if (ns) { value = xmlGetNsProp(node, attr_name, ns->href); } else { value = xmlGetProp(node, (xmlChar*)StringValueCStr(rattribute)); } } else { value = xmlGetNoNsProp(node, attribute); } xmlFree((void *)attribute); if (!value) return Qnil; rvalue = NOKOGIRI_STR_NEW2(value); xmlFree((void *)value); return rvalue ; } /* * call-seq: * set_namespace(namespace) * * Set the namespace to +namespace+ */ static VALUE set_namespace(VALUE self, VALUE namespace) { xmlNodePtr node; xmlNsPtr ns = NULL; Data_Get_Struct(self, xmlNode, node); if(!NIL_P(namespace)) Data_Get_Struct(namespace, xmlNs, ns); xmlSetNs(node, ns); return self; } /* * call-seq: * attribute(name) * * Get the attribute node with +name+ */ static VALUE attr(VALUE self, VALUE name) { xmlNodePtr node; xmlAttrPtr prop; Data_Get_Struct(self, xmlNode, node); prop = xmlHasProp(node, (xmlChar *)StringValueCStr(name)); if(! prop) return Qnil; return Nokogiri_wrap_xml_node(Qnil, (xmlNodePtr)prop); } /* * call-seq: * attribute_with_ns(name, namespace) * * Get the attribute node with +name+ and +namespace+ */ static VALUE attribute_with_ns(VALUE self, VALUE name, VALUE namespace) { xmlNodePtr node; xmlAttrPtr prop; Data_Get_Struct(self, xmlNode, node); prop = xmlHasNsProp(node, (xmlChar *)StringValueCStr(name), NIL_P(namespace) ? NULL : (xmlChar *)StringValueCStr(namespace)); if(! prop) return Qnil; return Nokogiri_wrap_xml_node(Qnil, (xmlNodePtr)prop); } /* * call-seq: * attribute_nodes() * * returns a list containing the Node attributes. */ static VALUE attribute_nodes(VALUE self) { /* this code in the mode of xmlHasProp() */ xmlNodePtr node; VALUE attr; Data_Get_Struct(self, xmlNode, node); attr = rb_ary_new(); Nokogiri_xml_node_properties(node, attr); return attr ; } /* * call-seq: * namespace() * * returns the namespace of the element or attribute node as a Namespace * object, or nil if there is no namespace for the element or attribute. */ static VALUE namespace(VALUE self) { xmlNodePtr node ; Data_Get_Struct(self, xmlNode, node); if (node->ns) return Nokogiri_wrap_xml_namespace(node->doc, node->ns); return Qnil ; } /* * call-seq: * namespace_definitions() * * returns namespaces defined on self element directly, as an array of Namespace objects. Includes both a default namespace (as in"xmlns="), and prefixed namespaces (as in "xmlns:prefix="). */ static VALUE namespace_definitions(VALUE self) { /* this code in the mode of xmlHasProp() */ xmlNodePtr node ; VALUE list; xmlNsPtr ns; Data_Get_Struct(self, xmlNode, node); list = rb_ary_new(); ns = node->nsDef; if(!ns) return list; while(NULL != ns) { rb_ary_push(list, Nokogiri_wrap_xml_namespace(node->doc, ns)); ns = ns->next; } return list; } /* * call-seq: * namespace_scopes() * * returns namespaces in scope for self -- those defined on self element * directly or any ancestor node -- as an array of Namespace objects. Default * namespaces ("xmlns=" style) for self are included in this array; Default * namespaces for ancestors, however, are not. See also #namespaces */ static VALUE namespace_scopes(VALUE self) { xmlNodePtr node ; VALUE list; xmlNsPtr *ns_list; int j; Data_Get_Struct(self, xmlNode, node); list = rb_ary_new(); ns_list = xmlGetNsList(node->doc, node); if(!ns_list) return list; for (j = 0 ; ns_list[j] != NULL ; ++j) { rb_ary_push(list, Nokogiri_wrap_xml_namespace(node->doc, ns_list[j])); } xmlFree(ns_list); return list; } /* * call-seq: * node_type * * Get the type for this Node */ static VALUE node_type(VALUE self) { xmlNodePtr node; Data_Get_Struct(self, xmlNode, node); return INT2NUM((long)node->type); } /* * call-seq: * content= * * Set the content for this Node */ static VALUE set_native_content(VALUE self, VALUE content) { xmlNodePtr node, child, next ; Data_Get_Struct(self, xmlNode, node); child = node->children; while (NULL != child) { next = child->next ; xmlUnlinkNode(child) ; nokogiri_root_node(child); child = next ; } xmlNodeSetContent(node, (xmlChar *)StringValueCStr(content)); return content; } /* * call-seq: * content * * Returns the content for this Node */ static VALUE get_native_content(VALUE self) { xmlNodePtr node; xmlChar * content; Data_Get_Struct(self, xmlNode, node); content = xmlNodeGetContent(node); if(content) { VALUE rval = NOKOGIRI_STR_NEW2(content); xmlFree(content); return rval; } return Qnil; } /* * call-seq: * lang= * * Set the language of a node, i.e. the values of the xml:lang attribute. */ static VALUE set_lang(VALUE self_rb, VALUE lang_rb) { xmlNodePtr self ; xmlChar* lang ; Data_Get_Struct(self_rb, xmlNode, self); lang = (xmlChar*)StringValueCStr(lang_rb); xmlNodeSetLang(self, lang); return Qnil ; } /* * call-seq: * lang * * Searches the language of a node, i.e. the values of the xml:lang attribute or * the one carried by the nearest ancestor. */ static VALUE get_lang(VALUE self_rb) { xmlNodePtr self ; xmlChar* lang ; VALUE lang_rb ; Data_Get_Struct(self_rb, xmlNode, self); lang = xmlNodeGetLang(self); if (lang) { lang_rb = NOKOGIRI_STR_NEW2(lang); xmlFree(lang); return lang_rb ; } return Qnil ; } /* :nodoc: */ static VALUE add_child(VALUE self, VALUE new_child) { return reparent_node_with(self, new_child, xmlAddChild); } /* * call-seq: * parent * * Get the parent Node for this Node */ static VALUE get_parent(VALUE self) { xmlNodePtr node, parent; Data_Get_Struct(self, xmlNode, node); parent = node->parent; if(!parent) return Qnil; return Nokogiri_wrap_xml_node(Qnil, parent) ; } /* * call-seq: * name=(new_name) * * Set the name for this Node */ static VALUE set_name(VALUE self, VALUE new_name) { xmlNodePtr node; Data_Get_Struct(self, xmlNode, node); xmlNodeSetName(node, (xmlChar*)StringValueCStr(new_name)); return new_name; } /* * call-seq: * name * * Returns the name for this Node */ static VALUE get_name(VALUE self) { xmlNodePtr node; Data_Get_Struct(self, xmlNode, node); if(node->name) return NOKOGIRI_STR_NEW2(node->name); return Qnil; } /* * call-seq: * path * * Returns the path associated with this Node */ static VALUE path(VALUE self) { xmlNodePtr node; xmlChar *path ; VALUE rval; Data_Get_Struct(self, xmlNode, node); path = xmlGetNodePath(node); rval = NOKOGIRI_STR_NEW2(path); xmlFree(path); return rval ; } /* :nodoc: */ static VALUE add_next_sibling(VALUE self, VALUE new_sibling) { return reparent_node_with(self, new_sibling, xmlAddNextSibling) ; } /* :nodoc: */ static VALUE add_previous_sibling(VALUE self, VALUE new_sibling) { return reparent_node_with(self, new_sibling, xmlAddPrevSibling) ; } /* * call-seq: * native_write_to(io, encoding, options) * * Write this Node to +io+ with +encoding+ and +options+ */ static VALUE native_write_to( VALUE self, VALUE io, VALUE encoding, VALUE indent_string, VALUE options ) { xmlNodePtr node; const char * before_indent; xmlSaveCtxtPtr savectx; Data_Get_Struct(self, xmlNode, node); xmlIndentTreeOutput = 1; before_indent = xmlTreeIndentString; xmlTreeIndentString = StringValueCStr(indent_string); savectx = xmlSaveToIO( (xmlOutputWriteCallback)io_write_callback, (xmlOutputCloseCallback)io_close_callback, (void *)io, RTEST(encoding) ? StringValueCStr(encoding) : NULL, (int)NUM2INT(options) ); xmlSaveTree(savectx, node); xmlSaveClose(savectx); xmlTreeIndentString = before_indent; return io; } /* * call-seq: * line * * Returns the line for this Node */ static VALUE line(VALUE self) { xmlNodePtr node; Data_Get_Struct(self, xmlNode, node); return INT2NUM(xmlGetLineNo(node)); } /* * call-seq: * add_namespace_definition(prefix, href) * * Adds a namespace definition with +prefix+ using +href+ value. The result is * as if parsed XML for this node had included an attribute * 'xmlns:prefix=value'. A default namespace for this node ("xmlns=") can be * added by passing 'nil' for prefix. Namespaces added this way will not * show up in #attributes, but they will be included as an xmlns attribute * when the node is serialized to XML. */ static VALUE add_namespace_definition(VALUE self, VALUE prefix, VALUE href) { xmlNodePtr node, namespacee; xmlNsPtr ns; Data_Get_Struct(self, xmlNode, node); namespacee = node ; ns = xmlSearchNs( node->doc, node, (const xmlChar *)(NIL_P(prefix) ? NULL : StringValueCStr(prefix)) ); if(!ns) { if (node->type != XML_ELEMENT_NODE) { namespacee = node->parent; } ns = xmlNewNs( namespacee, (const xmlChar *)StringValueCStr(href), (const xmlChar *)(NIL_P(prefix) ? NULL : StringValueCStr(prefix)) ); } if (!ns) return Qnil ; if(NIL_P(prefix) || node != namespacee) xmlSetNs(node, ns); return Nokogiri_wrap_xml_namespace(node->doc, ns); } /* * call-seq: * new(name, document) * * Create a new node with +name+ sharing GC lifecycle with +document+ */ static VALUE new(int argc, VALUE *argv, VALUE klass) { xmlDocPtr doc; xmlNodePtr node; VALUE name; VALUE document; VALUE rest; VALUE rb_node; rb_scan_args(argc, argv, "2*", &name, &document, &rest); Data_Get_Struct(document, xmlDoc, doc); node = xmlNewNode(NULL, (xmlChar *)StringValueCStr(name)); node->doc = doc->doc; nokogiri_root_node(node); rb_node = Nokogiri_wrap_xml_node( klass == cNokogiriXmlNode ? (VALUE)NULL : klass, node ); rb_obj_call_init(rb_node, argc, argv); if(rb_block_given_p()) rb_yield(rb_node); return rb_node; } /* * call-seq: * dump_html * * Returns the Node as html. */ static VALUE dump_html(VALUE self) { xmlBufferPtr buf ; xmlNodePtr node ; VALUE html; Data_Get_Struct(self, xmlNode, node); buf = xmlBufferCreate() ; htmlNodeDump(buf, node->doc, node); html = NOKOGIRI_STR_NEW2(buf->content); xmlBufferFree(buf); return html ; } /* * call-seq: * compare(other) * * Compare this Node to +other+ with respect to their Document */ static VALUE compare(VALUE self, VALUE _other) { xmlNodePtr node, other; Data_Get_Struct(self, xmlNode, node); Data_Get_Struct(_other, xmlNode, other); return INT2NUM((long)xmlXPathCmpNodes(other, node)); } /* * call-seq: * process_xincludes(options) * * Loads and substitutes all xinclude elements below the node. The * parser context will be initialized with +options+. */ static VALUE process_xincludes(VALUE self, VALUE options) { int rcode ; xmlNodePtr node; VALUE error_list = rb_ary_new(); Data_Get_Struct(self, xmlNode, node); xmlSetStructuredErrorFunc((void *)error_list, Nokogiri_error_array_pusher); rcode = xmlXIncludeProcessTreeFlags(node, (int)NUM2INT(options)); xmlSetStructuredErrorFunc(NULL, NULL); if (rcode < 0) { xmlErrorPtr error; error = xmlGetLastError(); if(error) rb_exc_raise(Nokogiri_wrap_xml_syntax_error(error)); else rb_raise(rb_eRuntimeError, "Could not perform xinclude substitution"); } return self; } /* TODO: DOCUMENT ME */ static VALUE in_context(VALUE self, VALUE _str, VALUE _options) { xmlNodePtr node, list = 0, tmp, child_iter, node_children, doc_children; xmlNodeSetPtr set; xmlParserErrors error; VALUE doc, err; int doc_is_empty; Data_Get_Struct(self, xmlNode, node); doc = DOC_RUBY_OBJECT(node->doc); err = rb_iv_get(doc, "@errors"); doc_is_empty = (node->doc->children == NULL) ? 1 : 0; node_children = node->children; doc_children = node->doc->children; xmlSetStructuredErrorFunc((void *)err, Nokogiri_error_array_pusher); /* Twiddle global variable because of a bug in libxml2. * http://git.gnome.org/browse/libxml2/commit/?id=e20fb5a72c83cbfc8e4a8aa3943c6be8febadab7 */ #ifndef HTML_PARSE_NOIMPLIED htmlHandleOmittedElem(0); #endif /* This function adds a fake node to the child of +node+. If the parser * does not exit cleanly with XML_ERR_OK, the list is freed. This can * leave the child pointers in a bad state if they were originally empty. * * http://git.gnome.org/browse/libxml2/tree/parser.c#n13177 * */ error = xmlParseInNodeContext(node, StringValuePtr(_str), (int)RSTRING_LEN(_str), (int)NUM2INT(_options), &list); /* xmlParseInNodeContext should not mutate the original document or node, * so reassigning these pointers should be OK. The reason we're reassigning * is because if there were errors, it's possible for the child pointers * to be manipulated. */ if (error != XML_ERR_OK) { node->doc->children = doc_children; node->children = node_children; } /* make sure parent/child pointers are coherent so an unlink will work * properly (#331) */ child_iter = node->doc->children ; while (child_iter) { if (child_iter->parent != (xmlNodePtr)node->doc) child_iter->parent = (xmlNodePtr)node->doc; child_iter = child_iter->next; } #ifndef HTML_PARSE_NOIMPLIED htmlHandleOmittedElem(1); #endif xmlSetStructuredErrorFunc(NULL, NULL); /* Workaround for a libxml2 bug where a parsing error may leave a broken * node reference in node->doc->children. * This workaround is limited to when a parse error occurs, the document * went from having no children to having children, and the context node is * part of a document fragment. * https://bugzilla.gnome.org/show_bug.cgi?id=668155 */ if (error != XML_ERR_OK && doc_is_empty && node->doc->children != NULL) { child_iter = node; while (child_iter->parent) child_iter = child_iter->parent; if (child_iter->type == XML_DOCUMENT_FRAG_NODE) node->doc->children = NULL; } /* FIXME: This probably needs to handle more constants... */ switch (error) { case XML_ERR_INTERNAL_ERROR: case XML_ERR_NO_MEMORY: rb_raise(rb_eRuntimeError, "error parsing fragment (%d)", error); break; default: break; } set = xmlXPathNodeSetCreate(NULL); while (list) { tmp = list->next; list->next = NULL; xmlXPathNodeSetAddUnique(set, list); nokogiri_root_node(list); list = tmp; } return Nokogiri_wrap_xml_node_set(set, doc); } VALUE Nokogiri_wrap_xml_node(VALUE klass, xmlNodePtr node) { VALUE document = Qnil ; VALUE node_cache = Qnil ; VALUE rb_node = Qnil ; nokogiriTuplePtr node_has_a_document; xmlDocPtr doc; void (*mark_method)(xmlNodePtr) = NULL ; assert(node); if(node->type == XML_DOCUMENT_NODE || node->type == XML_HTML_DOCUMENT_NODE) return DOC_RUBY_OBJECT(node->doc); /* It's OK if the node doesn't have a fully-realized document (as in XML::Reader). */ /* see https://github.com/sparklemotion/nokogiri/issues/95 */ /* and https://github.com/sparklemotion/nokogiri/issues/439 */ doc = node->doc; if (doc->type == XML_DOCUMENT_FRAG_NODE) doc = doc->doc; node_has_a_document = DOC_RUBY_OBJECT_TEST(doc); if(node->_private && node_has_a_document) return (VALUE)node->_private; if(!RTEST(klass)) { switch(node->type) { case XML_ELEMENT_NODE: klass = cNokogiriXmlElement; break; case XML_TEXT_NODE: klass = cNokogiriXmlText; break; case XML_ATTRIBUTE_NODE: klass = cNokogiriXmlAttr; break; case XML_ENTITY_REF_NODE: klass = cNokogiriXmlEntityReference; break; case XML_COMMENT_NODE: klass = cNokogiriXmlComment; break; case XML_DOCUMENT_FRAG_NODE: klass = cNokogiriXmlDocumentFragment; break; case XML_PI_NODE: klass = cNokogiriXmlProcessingInstruction; break; case XML_ENTITY_DECL: klass = cNokogiriXmlEntityDecl; break; case XML_CDATA_SECTION_NODE: klass = cNokogiriXmlCData; break; case XML_DTD_NODE: klass = cNokogiriXmlDtd; break; case XML_ATTRIBUTE_DECL: klass = cNokogiriXmlAttributeDecl; break; case XML_ELEMENT_DECL: klass = cNokogiriXmlElementDecl; break; default: klass = cNokogiriXmlNode; } } mark_method = node_has_a_document ? mark : NULL ; rb_node = Data_Wrap_Struct(klass, mark_method, debug_node_dealloc, node) ; node->_private = (void *)rb_node; if (node_has_a_document) { document = DOC_RUBY_OBJECT(doc); node_cache = DOC_NODE_CACHE(doc); rb_ary_push(node_cache, rb_node); rb_funcall(document, decorate, 1, rb_node); } return rb_node ; } void Nokogiri_xml_node_properties(xmlNodePtr node, VALUE attr_list) { xmlAttrPtr prop; prop = node->properties ; while (prop != NULL) { rb_ary_push(attr_list, Nokogiri_wrap_xml_node(Qnil, (xmlNodePtr)prop)); prop = prop->next ; } } VALUE cNokogiriXmlNode ; VALUE cNokogiriXmlElement ; void init_xml_node() { VALUE nokogiri = rb_define_module("Nokogiri"); VALUE xml = rb_define_module_under(nokogiri, "XML"); VALUE klass = rb_define_class_under(xml, "Node", rb_cObject); cNokogiriXmlNode = klass; cNokogiriXmlElement = rb_define_class_under(xml, "Element", klass); rb_define_singleton_method(klass, "new", new, -1); rb_define_method(klass, "add_namespace_definition", add_namespace_definition, 2); rb_define_method(klass, "node_name", get_name, 0); rb_define_method(klass, "document", document, 0); rb_define_method(klass, "node_name=", set_name, 1); rb_define_method(klass, "parent", get_parent, 0); rb_define_method(klass, "child", child, 0); rb_define_method(klass, "first_element_child", first_element_child, 0); rb_define_method(klass, "last_element_child", last_element_child, 0); rb_define_method(klass, "children", children, 0); rb_define_method(klass, "element_children", element_children, 0); rb_define_method(klass, "next_sibling", next_sibling, 0); rb_define_method(klass, "previous_sibling", previous_sibling, 0); rb_define_method(klass, "next_element", next_element, 0); rb_define_method(klass, "previous_element", previous_element, 0); rb_define_method(klass, "node_type", node_type, 0); rb_define_method(klass, "path", path, 0); rb_define_method(klass, "key?", key_eh, 1); rb_define_method(klass, "namespaced_key?", namespaced_key_eh, 2); rb_define_method(klass, "blank?", blank_eh, 0); rb_define_method(klass, "attribute_nodes", attribute_nodes, 0); rb_define_method(klass, "attribute", attr, 1); rb_define_method(klass, "attribute_with_ns", attribute_with_ns, 2); rb_define_method(klass, "namespace", namespace, 0); rb_define_method(klass, "namespace_definitions", namespace_definitions, 0); rb_define_method(klass, "namespace_scopes", namespace_scopes, 0); rb_define_method(klass, "encode_special_chars", encode_special_chars, 1); rb_define_method(klass, "dup", duplicate_node, -1); rb_define_method(klass, "unlink", unlink_node, 0); rb_define_method(klass, "internal_subset", internal_subset, 0); rb_define_method(klass, "external_subset", external_subset, 0); rb_define_method(klass, "create_internal_subset", create_internal_subset, 3); rb_define_method(klass, "create_external_subset", create_external_subset, 3); rb_define_method(klass, "pointer_id", pointer_id, 0); rb_define_method(klass, "line", line, 0); rb_define_method(klass, "content", get_native_content, 0); rb_define_method(klass, "native_content=", set_native_content, 1); rb_define_method(klass, "lang", get_lang, 0); rb_define_method(klass, "lang=", set_lang, 1); rb_define_private_method(klass, "process_xincludes", process_xincludes, 1); rb_define_private_method(klass, "in_context", in_context, 2); rb_define_private_method(klass, "add_child_node", add_child, 1); rb_define_private_method(klass, "add_previous_sibling_node", add_previous_sibling, 1); rb_define_private_method(klass, "add_next_sibling_node", add_next_sibling, 1); rb_define_private_method(klass, "replace_node", replace, 1); rb_define_private_method(klass, "dump_html", dump_html, 0); rb_define_private_method(klass, "native_write_to", native_write_to, 4); rb_define_private_method(klass, "get", get, 1); rb_define_private_method(klass, "set", set, 2); rb_define_private_method(klass, "set_namespace", set_namespace, 1); rb_define_private_method(klass, "compare", compare, 1); decorate = rb_intern("decorate"); decorate_bang = rb_intern("decorate!"); } /* vim: set noet sw=4 sws=4 */ nokogiri-1.8.2/ext/nokogiri/html_element_description.h0000644000004100000410000000031213235345655023254 0ustar www-datawww-data#ifndef NOKOGIRI_HTML_ELEMENT_DESCRIPTION #define NOKOGIRI_HTML_ELEMENT_DESCRIPTION #include void init_html_element_description(); extern VALUE cNokogiriHtmlElementDescription ; #endif nokogiri-1.8.2/ext/nokogiri/xml_sax_parser.c0000644000004100000410000002054013235345655021223 0ustar www-datawww-data#include int vasprintf (char **strp, const char *fmt, va_list ap); void vasprintf_free (void *p); static ID id_start_document, id_end_document, id_start_element, id_end_element; static ID id_start_element_namespace, id_end_element_namespace; static ID id_comment, id_characters, id_xmldecl, id_error, id_warning; static ID id_cdata_block, id_cAttribute; static ID id_processing_instruction; static void start_document(void * ctx) { VALUE self = NOKOGIRI_SAX_SELF(ctx); VALUE doc = rb_iv_get(self, "@document"); xmlParserCtxtPtr ctxt = NOKOGIRI_SAX_CTXT(ctx); if(NULL != ctxt && ctxt->html != 1) { if(ctxt->standalone != -1) { /* -1 means there was no declaration */ VALUE encoding = Qnil ; VALUE standalone = Qnil; VALUE version; if (ctxt->encoding) { encoding = NOKOGIRI_STR_NEW2(ctxt->encoding) ; } else if (ctxt->input && ctxt->input->encoding) { encoding = NOKOGIRI_STR_NEW2(ctxt->input->encoding) ; } version = ctxt->version ? NOKOGIRI_STR_NEW2(ctxt->version) : Qnil; switch(ctxt->standalone) { case 0: standalone = NOKOGIRI_STR_NEW2("no"); break; case 1: standalone = NOKOGIRI_STR_NEW2("yes"); break; } rb_funcall(doc, id_xmldecl, 3, version, encoding, standalone); } } rb_funcall(doc, id_start_document, 0); } static void end_document(void * ctx) { VALUE self = NOKOGIRI_SAX_SELF(ctx); VALUE doc = rb_iv_get(self, "@document"); rb_funcall(doc, id_end_document, 0); } static void start_element(void * ctx, const xmlChar *name, const xmlChar **atts) { VALUE self = NOKOGIRI_SAX_SELF(ctx); VALUE doc = rb_iv_get(self, "@document"); VALUE attributes = rb_ary_new(); const xmlChar * attr; int i = 0; if(atts) { while((attr = atts[i]) != NULL) { const xmlChar * val = atts[i+1]; VALUE value = val != NULL ? NOKOGIRI_STR_NEW2(val) : Qnil; rb_ary_push(attributes, rb_ary_new3(2, NOKOGIRI_STR_NEW2(attr), value)); i+=2; } } rb_funcall( doc, id_start_element, 2, NOKOGIRI_STR_NEW2(name), attributes ); } static void end_element(void * ctx, const xmlChar *name) { VALUE self = NOKOGIRI_SAX_SELF(ctx); VALUE doc = rb_iv_get(self, "@document"); rb_funcall(doc, id_end_element, 1, NOKOGIRI_STR_NEW2(name)); } static VALUE attributes_as_list( VALUE self, int nb_attributes, const xmlChar ** attributes) { VALUE list = rb_ary_new2((long)nb_attributes); VALUE attr_klass = rb_const_get(cNokogiriXmlSaxParser, id_cAttribute); if (attributes) { /* Each attribute is an array of [localname, prefix, URI, value, end] */ int i; for (i = 0; i < nb_attributes * 5; i += 5) { VALUE argv[4], attribute; argv[0] = RBSTR_OR_QNIL(attributes[i + 0]); /* localname */ argv[1] = RBSTR_OR_QNIL(attributes[i + 1]); /* prefix */ argv[2] = RBSTR_OR_QNIL(attributes[i + 2]); /* URI */ /* value */ argv[3] = NOKOGIRI_STR_NEW((const char*)attributes[i+3], (attributes[i+4] - attributes[i+3])); attribute = rb_class_new_instance(4, argv, attr_klass); rb_ary_push(list, attribute); } } return list; } static void start_element_ns ( void * ctx, const xmlChar * localname, const xmlChar * prefix, const xmlChar * uri, int nb_namespaces, const xmlChar ** namespaces, int nb_attributes, int nb_defaulted, const xmlChar ** attributes) { VALUE self = NOKOGIRI_SAX_SELF(ctx); VALUE doc = rb_iv_get(self, "@document"); VALUE attribute_list = attributes_as_list(self, nb_attributes, attributes); VALUE ns_list = rb_ary_new2((long)nb_namespaces); if (namespaces) { int i; for (i = 0; i < nb_namespaces * 2; i += 2) { rb_ary_push(ns_list, rb_ary_new3((long)2, RBSTR_OR_QNIL(namespaces[i + 0]), RBSTR_OR_QNIL(namespaces[i + 1]) ) ); } } rb_funcall( doc, id_start_element_namespace, 5, NOKOGIRI_STR_NEW2(localname), attribute_list, RBSTR_OR_QNIL(prefix), RBSTR_OR_QNIL(uri), ns_list ); } /** * end_element_ns was borrowed heavily from libxml-ruby. */ static void end_element_ns ( void * ctx, const xmlChar * localname, const xmlChar * prefix, const xmlChar * uri) { VALUE self = NOKOGIRI_SAX_SELF(ctx); VALUE doc = rb_iv_get(self, "@document"); rb_funcall(doc, id_end_element_namespace, 3, NOKOGIRI_STR_NEW2(localname), RBSTR_OR_QNIL(prefix), RBSTR_OR_QNIL(uri) ); } static void characters_func(void * ctx, const xmlChar * ch, int len) { VALUE self = NOKOGIRI_SAX_SELF(ctx); VALUE doc = rb_iv_get(self, "@document"); VALUE str = NOKOGIRI_STR_NEW(ch, len); rb_funcall(doc, id_characters, 1, str); } static void comment_func(void * ctx, const xmlChar * value) { VALUE self = NOKOGIRI_SAX_SELF(ctx); VALUE doc = rb_iv_get(self, "@document"); VALUE str = NOKOGIRI_STR_NEW2(value); rb_funcall(doc, id_comment, 1, str); } static void warning_func(void * ctx, const char *msg, ...) { VALUE self = NOKOGIRI_SAX_SELF(ctx); VALUE doc = rb_iv_get(self, "@document"); char * message; VALUE ruby_message; va_list args; va_start(args, msg); vasprintf(&message, msg, args); va_end(args); ruby_message = NOKOGIRI_STR_NEW2(message); vasprintf_free(message); rb_funcall(doc, id_warning, 1, ruby_message); } static void error_func(void * ctx, const char *msg, ...) { VALUE self = NOKOGIRI_SAX_SELF(ctx); VALUE doc = rb_iv_get(self, "@document"); char * message; VALUE ruby_message; va_list args; va_start(args, msg); vasprintf(&message, msg, args); va_end(args); ruby_message = NOKOGIRI_STR_NEW2(message); vasprintf_free(message); rb_funcall(doc, id_error, 1, ruby_message); } static void cdata_block(void * ctx, const xmlChar * value, int len) { VALUE self = NOKOGIRI_SAX_SELF(ctx); VALUE doc = rb_iv_get(self, "@document"); VALUE string = NOKOGIRI_STR_NEW(value, len); rb_funcall(doc, id_cdata_block, 1, string); } static void processing_instruction(void * ctx, const xmlChar * name, const xmlChar * content) { VALUE rb_content; VALUE self = NOKOGIRI_SAX_SELF(ctx); VALUE doc = rb_iv_get(self, "@document"); rb_content = content ? NOKOGIRI_STR_NEW2(content) : Qnil; rb_funcall( doc, id_processing_instruction, 2, NOKOGIRI_STR_NEW2(name), rb_content ); } static void deallocate(xmlSAXHandlerPtr handler) { NOKOGIRI_DEBUG_START(handler); free(handler); NOKOGIRI_DEBUG_END(handler); } static VALUE allocate(VALUE klass) { xmlSAXHandlerPtr handler = calloc((size_t)1, sizeof(xmlSAXHandler)); xmlSetStructuredErrorFunc(NULL, NULL); handler->startDocument = start_document; handler->endDocument = end_document; handler->startElement = start_element; handler->endElement = end_element; handler->startElementNs = start_element_ns; handler->endElementNs = end_element_ns; handler->characters = characters_func; handler->comment = comment_func; handler->warning = warning_func; handler->error = error_func; handler->cdataBlock = cdata_block; handler->processingInstruction = processing_instruction; handler->initialized = XML_SAX2_MAGIC; return Data_Wrap_Struct(klass, NULL, deallocate, handler); } VALUE cNokogiriXmlSaxParser ; void init_xml_sax_parser() { VALUE nokogiri = rb_define_module("Nokogiri"); VALUE xml = rb_define_module_under(nokogiri, "XML"); VALUE sax = rb_define_module_under(xml, "SAX"); VALUE klass = rb_define_class_under(sax, "Parser", rb_cObject); cNokogiriXmlSaxParser = klass; rb_define_alloc_func(klass, allocate); id_start_document = rb_intern("start_document"); id_end_document = rb_intern("end_document"); id_start_element = rb_intern("start_element"); id_end_element = rb_intern("end_element"); id_comment = rb_intern("comment"); id_characters = rb_intern("characters"); id_xmldecl = rb_intern("xmldecl"); id_error = rb_intern("error"); id_warning = rb_intern("warning"); id_cdata_block = rb_intern("cdata_block"); id_cAttribute = rb_intern("Attribute"); id_start_element_namespace = rb_intern("start_element_namespace"); id_end_element_namespace = rb_intern("end_element_namespace"); id_processing_instruction = rb_intern("processing_instruction"); } nokogiri-1.8.2/ext/nokogiri/xml_syntax_error.h0000644000004100000410000000054713235345655021625 0ustar www-datawww-data#ifndef NOKOGIRI_XML_SYNTAX_ERROR #define NOKOGIRI_XML_SYNTAX_ERROR #include void init_xml_syntax_error(); VALUE Nokogiri_wrap_xml_syntax_error(xmlErrorPtr error); void Nokogiri_error_array_pusher(void * ctx, xmlErrorPtr error); NORETURN(void Nokogiri_error_raise(void * ctx, xmlErrorPtr error)); extern VALUE cNokogiriXmlSyntaxError; #endif nokogiri-1.8.2/ext/nokogiri/xml_element_decl.h0000644000004100000410000000025013235345655021475 0ustar www-datawww-data#ifndef NOKOGIRI_XML_ELEMENT_DECL #define NOKOGIRI_XML_ELEMENT_DECL #include void init_xml_element_decl(); extern VALUE cNokogiriXmlElementDecl; #endif nokogiri-1.8.2/ext/nokogiri/nokogiri.h0000644000004100000410000000602613235345655020025 0ustar www-datawww-data#ifndef NOKOGIRI_NATIVE #define NOKOGIRI_NATIVE #include #include #include #include #ifdef USE_INCLUDED_VASPRINTF int vasprintf (char **strp, const char *fmt, va_list ap); #else #define _GNU_SOURCE # include #undef _GNU_SOURCE #endif #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #ifndef NORETURN # if defined(__GNUC__) # define NORETURN(name) __attribute__((noreturn)) name # else # define NORETURN(name) name # endif #endif #define NOKOGIRI_STR_NEW2(str) \ NOKOGIRI_STR_NEW(str, strlen((const char *)(str))) #define NOKOGIRI_STR_NEW(str, len) \ rb_external_str_new_with_enc((const char *)(str), (long)(len), rb_utf8_encoding()) #define RBSTR_OR_QNIL(_str) \ (_str ? NOKOGIRI_STR_NEW2(_str) : Qnil) #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include extern VALUE mNokogiri ; extern VALUE mNokogiriXml ; extern VALUE mNokogiriXmlSax ; extern VALUE mNokogiriHtml ; extern VALUE mNokogiriHtmlSax ; extern VALUE mNokogiriXslt ; void nokogiri_root_node(xmlNodePtr); void nokogiri_root_nsdef(xmlNsPtr, xmlDocPtr); #ifdef DEBUG #define NOKOGIRI_DEBUG_START(p) if (getenv("NOKOGIRI_NO_FREE")) return ; if (getenv("NOKOGIRI_DEBUG")) fprintf(stderr,"nokogiri: %s:%d %p start\n", __FILE__, __LINE__, p); #define NOKOGIRI_DEBUG_END(p) if (getenv("NOKOGIRI_DEBUG")) fprintf(stderr,"nokogiri: %s:%d %p end\n", __FILE__, __LINE__, p); #else #define NOKOGIRI_DEBUG_START(p) #define NOKOGIRI_DEBUG_END(p) #endif #ifndef __builtin_expect # if defined(__GNUC__) # define __builtin_expect(expr, c) __builtin_expect((long)(expr), (long)(c)) # endif #endif #define XMLNS_PREFIX "xmlns" #define XMLNS_PREFIX_LEN 6 /* including either colon or \0 */ #define XMLNS_BUFFER_LEN 128 #endif nokogiri-1.8.2/ext/nokogiri/html_entity_lookup.h0000644000004100000410000000021013235345655022122 0ustar www-datawww-data#ifndef NOKOGIRI_HTML_ENTITY_LOOKUP #define NOKOGIRI_HTML_ENTITY_LOOKUP #include void init_html_entity_lookup(); #endif nokogiri-1.8.2/ext/nokogiri/html_document.c0000644000004100000410000001062413235345655021040 0ustar www-datawww-data#include static ID id_encoding_found; /* * call-seq: * new * * Create a new document */ static VALUE new(int argc, VALUE *argv, VALUE klass) { VALUE uri, external_id, rest, rb_doc; htmlDocPtr doc; rb_scan_args(argc, argv, "0*", &rest); uri = rb_ary_entry(rest, (long)0); external_id = rb_ary_entry(rest, (long)1); doc = htmlNewDoc( RTEST(uri) ? (const xmlChar *)StringValueCStr(uri) : NULL, RTEST(external_id) ? (const xmlChar *)StringValueCStr(external_id) : NULL ); rb_doc = Nokogiri_wrap_xml_document(klass, doc); rb_obj_call_init(rb_doc, argc, argv); return rb_doc ; } /* * call-seq: * read_io(io, url, encoding, options) * * Read the HTML document from +io+ with given +url+, +encoding+, * and +options+. See Nokogiri::HTML.parse */ static VALUE read_io( VALUE klass, VALUE io, VALUE url, VALUE encoding, VALUE options ) { const char * c_url = NIL_P(url) ? NULL : StringValueCStr(url); const char * c_enc = NIL_P(encoding) ? NULL : StringValueCStr(encoding); VALUE error_list = rb_ary_new(); VALUE document; htmlDocPtr doc; xmlResetLastError(); xmlSetStructuredErrorFunc((void *)error_list, Nokogiri_error_array_pusher); doc = htmlReadIO( io_read_callback, io_close_callback, (void *)io, c_url, c_enc, (int)NUM2INT(options) ); xmlSetStructuredErrorFunc(NULL, NULL); /* * If EncodingFound has occurred in EncodingReader, make sure to do * a cleanup and propagate the error. */ if (rb_respond_to(io, id_encoding_found)) { VALUE encoding_found = rb_funcall(io, id_encoding_found, 0); if (!NIL_P(encoding_found)) { xmlFreeDoc(doc); rb_exc_raise(encoding_found); } } if(doc == NULL) { xmlErrorPtr error; xmlFreeDoc(doc); error = xmlGetLastError(); if(error) rb_exc_raise(Nokogiri_wrap_xml_syntax_error(error)); else rb_raise(rb_eRuntimeError, "Could not parse document"); return Qnil; } document = Nokogiri_wrap_xml_document(klass, doc); rb_iv_set(document, "@errors", error_list); return document; } /* * call-seq: * read_memory(string, url, encoding, options) * * Read the HTML document contained in +string+ with given +url+, +encoding+, * and +options+. See Nokogiri::HTML.parse */ static VALUE read_memory( VALUE klass, VALUE string, VALUE url, VALUE encoding, VALUE options ) { const char * c_buffer = StringValuePtr(string); const char * c_url = NIL_P(url) ? NULL : StringValueCStr(url); const char * c_enc = NIL_P(encoding) ? NULL : StringValueCStr(encoding); int len = (int)RSTRING_LEN(string); VALUE error_list = rb_ary_new(); VALUE document; htmlDocPtr doc; xmlResetLastError(); xmlSetStructuredErrorFunc((void *)error_list, Nokogiri_error_array_pusher); doc = htmlReadMemory(c_buffer, len, c_url, c_enc, (int)NUM2INT(options)); xmlSetStructuredErrorFunc(NULL, NULL); if(doc == NULL) { xmlErrorPtr error; xmlFreeDoc(doc); error = xmlGetLastError(); if(error) rb_exc_raise(Nokogiri_wrap_xml_syntax_error(error)); else rb_raise(rb_eRuntimeError, "Could not parse document"); return Qnil; } document = Nokogiri_wrap_xml_document(klass, doc); rb_iv_set(document, "@errors", error_list); return document; } /* * call-seq: * type * * The type for this document */ static VALUE type(VALUE self) { htmlDocPtr doc; Data_Get_Struct(self, xmlDoc, doc); return INT2NUM((long)doc->type); } VALUE cNokogiriHtmlDocument ; void init_html_document() { VALUE nokogiri = rb_define_module("Nokogiri"); VALUE html = rb_define_module_under(nokogiri, "HTML"); VALUE xml = rb_define_module_under(nokogiri, "XML"); VALUE node = rb_define_class_under(xml, "Node", rb_cObject); VALUE xml_doc = rb_define_class_under(xml, "Document", node); VALUE klass = rb_define_class_under(html, "Document", xml_doc); cNokogiriHtmlDocument = klass; rb_define_singleton_method(klass, "read_memory", read_memory, 4); rb_define_singleton_method(klass, "read_io", read_io, 4); rb_define_singleton_method(klass, "new", new, -1); rb_define_method(klass, "type", type, 0); id_encoding_found = rb_intern("encoding_found"); } nokogiri-1.8.2/ext/nokogiri/xml_xpath_context.c0000644000004100000410000001701713235345655021751 0ustar www-datawww-data#include int vasprintf (char **strp, const char *fmt, va_list ap); static void deallocate(xmlXPathContextPtr ctx) { NOKOGIRI_DEBUG_START(ctx); xmlXPathFreeContext(ctx); NOKOGIRI_DEBUG_END(ctx); } /* * call-seq: * register_ns(prefix, uri) * * Register the namespace with +prefix+ and +uri+. */ static VALUE register_ns(VALUE self, VALUE prefix, VALUE uri) { xmlXPathContextPtr ctx; Data_Get_Struct(self, xmlXPathContext, ctx); xmlXPathRegisterNs( ctx, (const xmlChar *)StringValueCStr(prefix), (const xmlChar *)StringValueCStr(uri) ); return self; } /* * call-seq: * register_variable(name, value) * * Register the variable +name+ with +value+. */ static VALUE register_variable(VALUE self, VALUE name, VALUE value) { xmlXPathContextPtr ctx; xmlXPathObjectPtr xmlValue; Data_Get_Struct(self, xmlXPathContext, ctx); xmlValue = xmlXPathNewCString(StringValueCStr(value)); xmlXPathRegisterVariable( ctx, (const xmlChar *)StringValueCStr(name), xmlValue ); return self; } void Nokogiri_marshal_xpath_funcall_and_return_values(xmlXPathParserContextPtr ctx, int nargs, VALUE handler, const char* function_name) { int i; VALUE result, doc; VALUE *argv; VALUE node_set = Qnil; xmlNodeSetPtr xml_node_set = NULL; xmlXPathObjectPtr obj; assert(ctx->context->doc); assert(DOC_RUBY_OBJECT_TEST(ctx->context->doc)); argv = (VALUE *)calloc((size_t)nargs, sizeof(VALUE)); for (i = 0 ; i < nargs ; ++i) { rb_gc_register_address(&argv[i]); } doc = DOC_RUBY_OBJECT(ctx->context->doc); if (nargs > 0) { i = nargs - 1; do { obj = valuePop(ctx); switch(obj->type) { case XPATH_STRING: argv[i] = NOKOGIRI_STR_NEW2(obj->stringval); break; case XPATH_BOOLEAN: argv[i] = obj->boolval == 1 ? Qtrue : Qfalse; break; case XPATH_NUMBER: argv[i] = rb_float_new(obj->floatval); break; case XPATH_NODESET: argv[i] = Nokogiri_wrap_xml_node_set(obj->nodesetval, doc); break; default: argv[i] = NOKOGIRI_STR_NEW2(xmlXPathCastToString(obj)); } xmlXPathFreeNodeSetList(obj); } while(i-- > 0); } result = rb_funcall2(handler, rb_intern((const char*)function_name), nargs, argv); for (i = 0 ; i < nargs ; ++i) { rb_gc_unregister_address(&argv[i]); } free(argv); switch(TYPE(result)) { case T_FLOAT: case T_BIGNUM: case T_FIXNUM: xmlXPathReturnNumber(ctx, NUM2DBL(result)); break; case T_STRING: xmlXPathReturnString( ctx, xmlCharStrdup(StringValueCStr(result)) ); break; case T_TRUE: xmlXPathReturnTrue(ctx); break; case T_FALSE: xmlXPathReturnFalse(ctx); break; case T_NIL: break; case T_ARRAY: { VALUE args[2]; args[0] = doc; args[1] = result; node_set = rb_class_new_instance(2, args, cNokogiriXmlNodeSet); Data_Get_Struct(node_set, xmlNodeSet, xml_node_set); xmlXPathReturnNodeSet(ctx, xmlXPathNodeSetMerge(NULL, xml_node_set)); } break; case T_DATA: if(rb_obj_is_kind_of(result, cNokogiriXmlNodeSet)) { Data_Get_Struct(result, xmlNodeSet, xml_node_set); /* Copy the node set, otherwise it will get GC'd. */ xmlXPathReturnNodeSet(ctx, xmlXPathNodeSetMerge(NULL, xml_node_set)); break; } default: rb_raise(rb_eRuntimeError, "Invalid return type"); } } static void ruby_funcall(xmlXPathParserContextPtr ctx, int nargs) { VALUE handler = Qnil; const char *function = NULL ; assert(ctx); assert(ctx->context); assert(ctx->context->userData); assert(ctx->context->function); handler = (VALUE)(ctx->context->userData); function = (const char*)(ctx->context->function); Nokogiri_marshal_xpath_funcall_and_return_values(ctx, nargs, handler, function); } static xmlXPathFunction lookup( void *ctx, const xmlChar * name, const xmlChar* ns_uri ) { VALUE xpath_handler = (VALUE)ctx; if(rb_respond_to(xpath_handler, rb_intern((const char *)name))) return ruby_funcall; return NULL; } NORETURN(static void xpath_generic_exception_handler(void * ctx, const char *msg, ...)); static void xpath_generic_exception_handler(void * ctx, const char *msg, ...) { char * message; va_list args; va_start(args, msg); vasprintf(&message, msg, args); va_end(args); rb_raise(rb_eRuntimeError, "%s", message); } /* * call-seq: * evaluate(search_path, handler = nil) * * Evaluate the +search_path+ returning an XML::XPath object. */ static VALUE evaluate(int argc, VALUE *argv, VALUE self) { VALUE search_path, xpath_handler; VALUE thing = Qnil; xmlXPathContextPtr ctx; xmlXPathObjectPtr xpath; xmlChar *query; Data_Get_Struct(self, xmlXPathContext, ctx); if(rb_scan_args(argc, argv, "11", &search_path, &xpath_handler) == 1) xpath_handler = Qnil; query = (xmlChar *)StringValueCStr(search_path); if(Qnil != xpath_handler) { /* FIXME: not sure if this is the correct place to shove private data. */ ctx->userData = (void *)xpath_handler; xmlXPathRegisterFuncLookup(ctx, lookup, (void *)xpath_handler); } xmlResetLastError(); xmlSetStructuredErrorFunc(NULL, Nokogiri_error_raise); /* For some reason, xmlXPathEvalExpression will blow up with a generic error */ /* when there is a non existent function. */ xmlSetGenericErrorFunc(NULL, xpath_generic_exception_handler); xpath = xmlXPathEvalExpression(query, ctx); xmlSetStructuredErrorFunc(NULL, NULL); xmlSetGenericErrorFunc(NULL, NULL); if(xpath == NULL) { xmlErrorPtr error = xmlGetLastError(); rb_exc_raise(Nokogiri_wrap_xml_syntax_error(error)); } assert(ctx->doc); assert(DOC_RUBY_OBJECT_TEST(ctx->doc)); switch(xpath->type) { case XPATH_STRING: thing = NOKOGIRI_STR_NEW2(xpath->stringval); xmlFree(xpath->stringval); break; case XPATH_NODESET: thing = Nokogiri_wrap_xml_node_set(xpath->nodesetval, DOC_RUBY_OBJECT(ctx->doc)); break; case XPATH_NUMBER: thing = rb_float_new(xpath->floatval); break; case XPATH_BOOLEAN: thing = xpath->boolval == 1 ? Qtrue : Qfalse; break; default: thing = Nokogiri_wrap_xml_node_set(NULL, DOC_RUBY_OBJECT(ctx->doc)); } xmlXPathFreeNodeSetList(xpath); return thing; } /* * call-seq: * new(node) * * Create a new XPathContext with +node+ as the reference point. */ static VALUE new(VALUE klass, VALUE nodeobj) { xmlNodePtr node; xmlXPathContextPtr ctx; VALUE self; xmlXPathInit(); Data_Get_Struct(nodeobj, xmlNode, node); ctx = xmlXPathNewContext(node->doc); ctx->node = node; self = Data_Wrap_Struct(klass, 0, deallocate, ctx); /*rb_iv_set(self, "@xpath_handler", Qnil); */ return self; } VALUE cNokogiriXmlXpathContext; void init_xml_xpath_context(void) { VALUE module = rb_define_module("Nokogiri"); /* * Nokogiri::XML */ VALUE xml = rb_define_module_under(module, "XML"); /* * XPathContext is the entry point for searching a Document by using XPath. */ VALUE klass = rb_define_class_under(xml, "XPathContext", rb_cObject); cNokogiriXmlXpathContext = klass; rb_define_singleton_method(klass, "new", new, 1); rb_define_method(klass, "evaluate", evaluate, -1); rb_define_method(klass, "register_variable", register_variable, 2); rb_define_method(klass, "register_ns", register_ns, 2); } nokogiri-1.8.2/ext/nokogiri/xml_entity_decl.c0000644000004100000410000000514413235345655021362 0ustar www-datawww-data#include /* * call-seq: * original_content * * Get the original_content before ref substitution */ static VALUE original_content(VALUE self) { xmlEntityPtr node; Data_Get_Struct(self, xmlEntity, node); if(!node->orig) return Qnil; return NOKOGIRI_STR_NEW2(node->orig); } /* * call-seq: * content * * Get the content */ static VALUE get_content(VALUE self) { xmlEntityPtr node; Data_Get_Struct(self, xmlEntity, node); if(!node->content) return Qnil; return NOKOGIRI_STR_NEW(node->content, node->length); } /* * call-seq: * entity_type * * Get the entity type */ static VALUE entity_type(VALUE self) { xmlEntityPtr node; Data_Get_Struct(self, xmlEntity, node); return INT2NUM((int)node->etype); } /* * call-seq: * external_id * * Get the external identifier for PUBLIC */ static VALUE external_id(VALUE self) { xmlEntityPtr node; Data_Get_Struct(self, xmlEntity, node); if(!node->ExternalID) return Qnil; return NOKOGIRI_STR_NEW2(node->ExternalID); } /* * call-seq: * system_id * * Get the URI for a SYSTEM or PUBLIC Entity */ static VALUE system_id(VALUE self) { xmlEntityPtr node; Data_Get_Struct(self, xmlEntity, node); if(!node->SystemID) return Qnil; return NOKOGIRI_STR_NEW2(node->SystemID); } VALUE cNokogiriXmlEntityDecl; void init_xml_entity_decl() { VALUE nokogiri = rb_define_module("Nokogiri"); VALUE xml = rb_define_module_under(nokogiri, "XML"); VALUE node = rb_define_class_under(xml, "Node", rb_cObject); VALUE klass = rb_define_class_under(xml, "EntityDecl", node); cNokogiriXmlEntityDecl = klass; rb_define_method(klass, "original_content", original_content, 0); rb_define_method(klass, "content", get_content, 0); rb_define_method(klass, "entity_type", entity_type, 0); rb_define_method(klass, "external_id", external_id, 0); rb_define_method(klass, "system_id", system_id, 0); rb_const_set(cNokogiriXmlEntityDecl, rb_intern("INTERNAL_GENERAL"), INT2NUM(XML_INTERNAL_GENERAL_ENTITY)); rb_const_set(cNokogiriXmlEntityDecl, rb_intern("EXTERNAL_GENERAL_PARSED"), INT2NUM(XML_EXTERNAL_GENERAL_PARSED_ENTITY)); rb_const_set(cNokogiriXmlEntityDecl, rb_intern("EXTERNAL_GENERAL_UNPARSED"), INT2NUM(XML_EXTERNAL_GENERAL_UNPARSED_ENTITY)); rb_const_set(cNokogiriXmlEntityDecl, rb_intern("INTERNAL_PARAMETER"), INT2NUM(XML_INTERNAL_PARAMETER_ENTITY)); rb_const_set(cNokogiriXmlEntityDecl, rb_intern("EXTERNAL_PARAMETER"), INT2NUM(XML_EXTERNAL_PARAMETER_ENTITY)); rb_const_set(cNokogiriXmlEntityDecl, rb_intern("INTERNAL_PREDEFINED"), INT2NUM(XML_INTERNAL_PREDEFINED_ENTITY)); } nokogiri-1.8.2/ext/nokogiri/xml_namespace.h0000644000004100000410000000044613235345655021020 0ustar www-datawww-data#ifndef NOKOGIRI_XML_NAMESPACE #define NOKOGIRI_XML_NAMESPACE #include void init_xml_namespace(); extern VALUE cNokogiriXmlNamespace ; VALUE Nokogiri_wrap_xml_namespace(xmlDocPtr doc, xmlNsPtr node) ; VALUE Nokogiri_wrap_xml_namespace2(VALUE document, xmlNsPtr node) ; #endif nokogiri-1.8.2/ext/nokogiri/xml_comment.h0000644000004100000410000000022513235345655020521 0ustar www-datawww-data#ifndef NOKOGIRI_XML_COMMENT #define NOKOGIRI_XML_COMMENT #include void init_xml_comment(); extern VALUE cNokogiriXmlComment; #endif nokogiri-1.8.2/ext/nokogiri/xml_document_fragment.h0000644000004100000410000000027513235345655022565 0ustar www-datawww-data#ifndef NOKOGIRI_XML_DOCUMENT_FRAGMENT #define NOKOGIRI_XML_DOCUMENT_FRAGMENT #include void init_xml_document_fragment(); extern VALUE cNokogiriXmlDocumentFragment; #endif nokogiri-1.8.2/ext/nokogiri/xml_attr.h0000644000004100000410000000021113235345655020024 0ustar www-datawww-data#ifndef NOKOGIRI_XML_ATTR #define NOKOGIRI_XML_ATTR #include void init_xml_attr(); extern VALUE cNokogiriXmlAttr; #endif nokogiri-1.8.2/ext/nokogiri/xml_element_content.c0000644000004100000410000000504313235345655022240 0ustar www-datawww-data#include VALUE cNokogiriXmlElementContent; /* * call-seq: * name * * Get the require element +name+ */ static VALUE get_name(VALUE self) { xmlElementContentPtr elem; Data_Get_Struct(self, xmlElementContent, elem); if(!elem->name) return Qnil; return NOKOGIRI_STR_NEW2(elem->name); } /* * call-seq: * type * * Get the element content +type+. Possible values are PCDATA, ELEMENT, SEQ, * or OR. */ static VALUE get_type(VALUE self) { xmlElementContentPtr elem; Data_Get_Struct(self, xmlElementContent, elem); return INT2NUM((long)elem->type); } /* * call-seq: * c1 * * Get the first child. */ static VALUE get_c1(VALUE self) { xmlElementContentPtr elem; Data_Get_Struct(self, xmlElementContent, elem); if(!elem->c1) return Qnil; return Nokogiri_wrap_element_content(rb_iv_get(self, "@document"), elem->c1); } /* * call-seq: * c2 * * Get the first child. */ static VALUE get_c2(VALUE self) { xmlElementContentPtr elem; Data_Get_Struct(self, xmlElementContent, elem); if(!elem->c2) return Qnil; return Nokogiri_wrap_element_content(rb_iv_get(self, "@document"), elem->c2); } /* * call-seq: * occur * * Get the element content +occur+ flag. Possible values are ONCE, OPT, MULT * or PLUS. */ static VALUE get_occur(VALUE self) { xmlElementContentPtr elem; Data_Get_Struct(self, xmlElementContent, elem); return INT2NUM((long)elem->ocur); } /* * call-seq: * prefix * * Get the element content namespace +prefix+. */ static VALUE get_prefix(VALUE self) { xmlElementContentPtr elem; Data_Get_Struct(self, xmlElementContent, elem); if(!elem->prefix) return Qnil; return NOKOGIRI_STR_NEW2(elem->prefix); } VALUE Nokogiri_wrap_element_content(VALUE doc, xmlElementContentPtr element) { VALUE elem = Data_Wrap_Struct(cNokogiriXmlElementContent, 0, 0, element); /* Setting the document is necessary so that this does not get GC'd until */ /* the document is GC'd */ rb_iv_set(elem, "@document", doc); return elem; } void init_xml_element_content() { VALUE nokogiri = rb_define_module("Nokogiri"); VALUE xml = rb_define_module_under(nokogiri, "XML"); VALUE klass = rb_define_class_under(xml, "ElementContent", rb_cObject); cNokogiriXmlElementContent = klass; rb_define_method(klass, "name", get_name, 0); rb_define_method(klass, "type", get_type, 0); rb_define_method(klass, "occur", get_occur, 0); rb_define_method(klass, "prefix", get_prefix, 0); rb_define_private_method(klass, "c1", get_c1, 0); rb_define_private_method(klass, "c2", get_c2, 0); } nokogiri-1.8.2/ext/nokogiri/nokogiri.c0000644000004100000410000001031613235345655020015 0ustar www-datawww-data#include VALUE mNokogiri ; VALUE mNokogiriXml ; VALUE mNokogiriHtml ; VALUE mNokogiriXslt ; VALUE mNokogiriXmlSax ; VALUE mNokogiriHtmlSax ; #ifdef USE_INCLUDED_VASPRINTF /* * I srsly hate windows. it doesn't have vasprintf. * Thank you Geoffroy Couprie for this implementation of vasprintf! */ int vasprintf (char **strp, const char *fmt, va_list ap) { /* Mingw32/64 have a broken vsnprintf implementation that fails when * using a zero-byte limit in order to retrieve the required size for malloc. * So we use a one byte buffer instead. */ char tmp[1]; int len = vsnprintf (tmp, 1, fmt, ap) + 1; char *res = (char *)malloc((unsigned int)len); if (res == NULL) return -1; *strp = res; return vsnprintf(res, (unsigned int)len, fmt, ap); } #endif void vasprintf_free (void *p) { free(p); } #ifdef HAVE_RUBY_UTIL_H #include "ruby/util.h" #else #include "util.h" #endif void nokogiri_root_node(xmlNodePtr node) { xmlDocPtr doc; nokogiriTuplePtr tuple; doc = node->doc; if (doc->type == XML_DOCUMENT_FRAG_NODE) doc = doc->doc; tuple = (nokogiriTuplePtr)doc->_private; st_insert(tuple->unlinkedNodes, (st_data_t)node, (st_data_t)node); } void nokogiri_root_nsdef(xmlNsPtr ns, xmlDocPtr doc) { nokogiriTuplePtr tuple; if (doc->type == XML_DOCUMENT_FRAG_NODE) doc = doc->doc; tuple = (nokogiriTuplePtr)doc->_private; st_insert(tuple->unlinkedNodes, (st_data_t)ns, (st_data_t)ns); } void Init_nokogiri() { xmlMemSetup( (xmlFreeFunc)ruby_xfree, (xmlMallocFunc)ruby_xmalloc, (xmlReallocFunc)ruby_xrealloc, ruby_strdup ); mNokogiri = rb_define_module("Nokogiri"); mNokogiriXml = rb_define_module_under(mNokogiri, "XML"); mNokogiriHtml = rb_define_module_under(mNokogiri, "HTML"); mNokogiriXslt = rb_define_module_under(mNokogiri, "XSLT"); mNokogiriXmlSax = rb_define_module_under(mNokogiriXml, "SAX"); mNokogiriHtmlSax = rb_define_module_under(mNokogiriHtml, "SAX"); rb_const_set( mNokogiri, rb_intern("LIBXML_VERSION"), NOKOGIRI_STR_NEW2(LIBXML_DOTTED_VERSION) ); rb_const_set( mNokogiri, rb_intern("LIBXML_PARSER_VERSION"), NOKOGIRI_STR_NEW2(xmlParserVersion) ); #ifdef NOKOGIRI_USE_PACKAGED_LIBRARIES rb_const_set(mNokogiri, rb_intern("NOKOGIRI_USE_PACKAGED_LIBRARIES"), Qtrue); rb_const_set(mNokogiri, rb_intern("NOKOGIRI_LIBXML2_PATH"), NOKOGIRI_STR_NEW2(NOKOGIRI_LIBXML2_PATH)); rb_const_set(mNokogiri, rb_intern("NOKOGIRI_LIBXSLT_PATH"), NOKOGIRI_STR_NEW2(NOKOGIRI_LIBXSLT_PATH)); rb_const_set(mNokogiri, rb_intern("NOKOGIRI_LIBXML2_PATCHES"), rb_str_split(NOKOGIRI_STR_NEW2(NOKOGIRI_LIBXML2_PATCHES), " ")); rb_const_set(mNokogiri, rb_intern("NOKOGIRI_LIBXSLT_PATCHES"), rb_str_split(NOKOGIRI_STR_NEW2(NOKOGIRI_LIBXSLT_PATCHES), " ")); #else rb_const_set(mNokogiri, rb_intern("NOKOGIRI_USE_PACKAGED_LIBRARIES"), Qfalse); rb_const_set(mNokogiri, rb_intern("NOKOGIRI_LIBXML2_PATH"), Qnil); rb_const_set(mNokogiri, rb_intern("NOKOGIRI_LIBXSLT_PATH"), Qnil); rb_const_set(mNokogiri, rb_intern("NOKOGIRI_LIBXML2_PATCHES"), Qnil); rb_const_set(mNokogiri, rb_intern("NOKOGIRI_LIBXSLT_PATCHES"), Qnil); #endif #ifdef LIBXML_ICONV_ENABLED rb_const_set(mNokogiri, rb_intern("LIBXML_ICONV_ENABLED"), Qtrue); #else rb_const_set(mNokogiri, rb_intern("LIBXML_ICONV_ENABLED"), Qfalse); #endif xmlInitParser(); init_xml_document(); init_html_document(); init_xml_node(); init_xml_document_fragment(); init_xml_text(); init_xml_cdata(); init_xml_processing_instruction(); init_xml_attr(); init_xml_entity_reference(); init_xml_comment(); init_xml_node_set(); init_xml_xpath_context(); init_xml_sax_parser_context(); init_xml_sax_parser(); init_xml_sax_push_parser(); init_xml_reader(); init_xml_dtd(); init_xml_element_content(); init_xml_attribute_decl(); init_xml_element_decl(); init_xml_entity_decl(); init_xml_namespace(); init_html_sax_parser_context(); init_html_sax_push_parser(); init_xslt_stylesheet(); init_xml_syntax_error(); init_html_entity_lookup(); init_html_element_description(); init_xml_schema(); init_xml_relax_ng(); init_nokogiri_io(); init_xml_encoding_handler(); } nokogiri-1.8.2/ext/nokogiri/xml_io.h0000644000004100000410000000040113235345655017462 0ustar www-datawww-data#ifndef NOKOGIRI_XML_IO #define NOKOGIRI_XML_IO #include int io_read_callback(void * ctx, char * buffer, int len); int io_write_callback(void * ctx, char * buffer, int len); int io_close_callback(void * ctx); void init_nokogiri_io(); #endif nokogiri-1.8.2/ext/nokogiri/xml_attribute_decl.h0000644000004100000410000000026013235345655022050 0ustar www-datawww-data#ifndef NOKOGIRI_XML_ATTRIBUTE_DECL #define NOKOGIRI_XML_ATTRIBUTE_DECL #include void init_xml_attribute_decl(); extern VALUE cNokogiriXmlAttributeDecl; #endif nokogiri-1.8.2/ext/nokogiri/depend0000644000004100000410000005031613235345655017216 0ustar www-datawww-datahtml_document.o: html_document.c html_document.h nokogiri.h xml_io.h \ xml_document.h html_entity_lookup.h xml_node.h xml_text.h \ xml_cdata.h xml_attr.h xml_processing_instruction.h \ xml_entity_reference.h xml_document_fragment.h xml_comment.h \ xml_node_set.h xml_dtd.h xml_attribute_decl.h xml_element_decl.h \ xml_entity_decl.h xml_xpath_context.h xml_element_content.h \ xml_sax_parser_context.h xml_sax_parser.h xml_sax_push_parser.h \ xml_reader.h html_sax_parser_context.h xslt_stylesheet.h \ xml_syntax_error.h xml_schema.h xml_relax_ng.h \ html_element_description.h xml_namespace.h xml_encoding_handler.h html_element_description.o: html_element_description.c \ html_element_description.h nokogiri.h xml_io.h xml_document.h \ html_entity_lookup.h html_document.h xml_node.h xml_text.h \ xml_cdata.h xml_attr.h xml_processing_instruction.h \ xml_entity_reference.h xml_document_fragment.h xml_comment.h \ xml_node_set.h xml_dtd.h xml_attribute_decl.h xml_element_decl.h \ xml_entity_decl.h xml_xpath_context.h xml_element_content.h \ xml_sax_parser_context.h xml_sax_parser.h xml_sax_push_parser.h \ xml_reader.h html_sax_parser_context.h xslt_stylesheet.h \ xml_syntax_error.h xml_schema.h xml_relax_ng.h xml_namespace.h \ xml_encoding_handler.h html_entity_lookup.o: html_entity_lookup.c html_entity_lookup.h \ nokogiri.h xml_io.h xml_document.h html_document.h xml_node.h \ xml_text.h xml_cdata.h xml_attr.h xml_processing_instruction.h \ xml_entity_reference.h xml_document_fragment.h xml_comment.h \ xml_node_set.h xml_dtd.h xml_attribute_decl.h xml_element_decl.h \ xml_entity_decl.h xml_xpath_context.h xml_element_content.h \ xml_sax_parser_context.h xml_sax_parser.h xml_sax_push_parser.h \ xml_reader.h html_sax_parser_context.h xslt_stylesheet.h \ xml_syntax_error.h xml_schema.h xml_relax_ng.h \ html_element_description.h xml_namespace.h xml_encoding_handler.h html_sax_parser_context.o: html_sax_parser_context.c \ html_sax_parser_context.h nokogiri.h xml_io.h xml_document.h \ html_entity_lookup.h html_document.h xml_node.h xml_text.h \ xml_cdata.h xml_attr.h xml_processing_instruction.h \ xml_entity_reference.h xml_document_fragment.h xml_comment.h \ xml_node_set.h xml_dtd.h xml_attribute_decl.h xml_element_decl.h \ xml_entity_decl.h xml_xpath_context.h xml_element_content.h \ xml_sax_parser_context.h xml_sax_parser.h xml_sax_push_parser.h \ xml_reader.h xslt_stylesheet.h xml_syntax_error.h xml_schema.h \ xml_relax_ng.h html_element_description.h xml_namespace.h \ xml_encoding_handler.h nokogiri.o: nokogiri.c nokogiri.h xml_io.h xml_document.h \ html_entity_lookup.h html_document.h xml_node.h xml_text.h \ xml_cdata.h xml_attr.h xml_processing_instruction.h \ xml_entity_reference.h xml_document_fragment.h xml_comment.h \ xml_node_set.h xml_dtd.h xml_attribute_decl.h xml_element_decl.h \ xml_entity_decl.h xml_xpath_context.h xml_element_content.h \ xml_sax_parser_context.h xml_sax_parser.h xml_sax_push_parser.h \ xml_reader.h html_sax_parser_context.h xslt_stylesheet.h \ xml_syntax_error.h xml_schema.h xml_relax_ng.h \ html_element_description.h xml_namespace.h xml_encoding_handler.h xml_attr.o: xml_attr.c xml_attr.h nokogiri.h xml_io.h xml_document.h \ html_entity_lookup.h html_document.h xml_node.h xml_text.h \ xml_cdata.h xml_processing_instruction.h xml_entity_reference.h \ xml_document_fragment.h xml_comment.h xml_node_set.h xml_dtd.h \ xml_attribute_decl.h xml_element_decl.h xml_entity_decl.h \ xml_xpath_context.h xml_element_content.h xml_sax_parser_context.h \ xml_sax_parser.h xml_sax_push_parser.h xml_reader.h \ html_sax_parser_context.h xslt_stylesheet.h xml_syntax_error.h \ xml_schema.h xml_relax_ng.h html_element_description.h \ xml_namespace.h xml_encoding_handler.h xml_attribute_decl.o: xml_attribute_decl.c xml_attribute_decl.h \ nokogiri.h xml_io.h xml_document.h html_entity_lookup.h \ html_document.h xml_node.h xml_text.h xml_cdata.h xml_attr.h \ xml_processing_instruction.h xml_entity_reference.h \ xml_document_fragment.h xml_comment.h xml_node_set.h xml_dtd.h \ xml_element_decl.h xml_entity_decl.h xml_xpath_context.h \ xml_element_content.h xml_sax_parser_context.h xml_sax_parser.h \ xml_sax_push_parser.h xml_reader.h html_sax_parser_context.h \ xslt_stylesheet.h xml_syntax_error.h xml_schema.h xml_relax_ng.h \ html_element_description.h xml_namespace.h xml_encoding_handler.h xml_cdata.o: xml_cdata.c xml_cdata.h nokogiri.h xml_io.h \ xml_document.h html_entity_lookup.h html_document.h xml_node.h \ xml_text.h xml_attr.h xml_processing_instruction.h \ xml_entity_reference.h xml_document_fragment.h xml_comment.h \ xml_node_set.h xml_dtd.h xml_attribute_decl.h xml_element_decl.h \ xml_entity_decl.h xml_xpath_context.h xml_element_content.h \ xml_sax_parser_context.h xml_sax_parser.h xml_sax_push_parser.h \ xml_reader.h html_sax_parser_context.h xslt_stylesheet.h \ xml_syntax_error.h xml_schema.h xml_relax_ng.h \ html_element_description.h xml_namespace.h xml_encoding_handler.h xml_comment.o: xml_comment.c xml_comment.h nokogiri.h xml_io.h \ xml_document.h html_entity_lookup.h html_document.h xml_node.h \ xml_text.h xml_cdata.h xml_attr.h xml_processing_instruction.h \ xml_entity_reference.h xml_document_fragment.h xml_node_set.h \ xml_dtd.h xml_attribute_decl.h xml_element_decl.h xml_entity_decl.h \ xml_xpath_context.h xml_element_content.h xml_sax_parser_context.h \ xml_sax_parser.h xml_sax_push_parser.h xml_reader.h \ html_sax_parser_context.h xslt_stylesheet.h xml_syntax_error.h \ xml_schema.h xml_relax_ng.h html_element_description.h \ xml_namespace.h xml_encoding_handler.h xml_document.o: xml_document.c xml_document.h nokogiri.h xml_io.h \ html_entity_lookup.h html_document.h xml_node.h xml_text.h \ xml_cdata.h xml_attr.h xml_processing_instruction.h \ xml_entity_reference.h xml_document_fragment.h xml_comment.h \ xml_node_set.h xml_dtd.h xml_attribute_decl.h xml_element_decl.h \ xml_entity_decl.h xml_xpath_context.h xml_element_content.h \ xml_sax_parser_context.h xml_sax_parser.h xml_sax_push_parser.h \ xml_reader.h html_sax_parser_context.h xslt_stylesheet.h \ xml_syntax_error.h xml_schema.h xml_relax_ng.h \ html_element_description.h xml_namespace.h xml_encoding_handler.h xml_document_fragment.o: xml_document_fragment.c \ xml_document_fragment.h nokogiri.h xml_io.h xml_document.h \ html_entity_lookup.h html_document.h xml_node.h xml_text.h \ xml_cdata.h xml_attr.h xml_processing_instruction.h \ xml_entity_reference.h xml_comment.h xml_node_set.h xml_dtd.h \ xml_attribute_decl.h xml_element_decl.h xml_entity_decl.h \ xml_xpath_context.h xml_element_content.h xml_sax_parser_context.h \ xml_sax_parser.h xml_sax_push_parser.h xml_reader.h \ html_sax_parser_context.h xslt_stylesheet.h xml_syntax_error.h \ xml_schema.h xml_relax_ng.h html_element_description.h \ xml_namespace.h xml_encoding_handler.h xml_dtd.o: xml_dtd.c xml_dtd.h nokogiri.h xml_io.h xml_document.h \ html_entity_lookup.h html_document.h xml_node.h xml_text.h \ xml_cdata.h xml_attr.h xml_processing_instruction.h \ xml_entity_reference.h xml_document_fragment.h xml_comment.h \ xml_node_set.h xml_attribute_decl.h xml_element_decl.h \ xml_entity_decl.h xml_xpath_context.h xml_element_content.h \ xml_sax_parser_context.h xml_sax_parser.h xml_sax_push_parser.h \ xml_reader.h html_sax_parser_context.h xslt_stylesheet.h \ xml_syntax_error.h xml_schema.h xml_relax_ng.h \ html_element_description.h xml_namespace.h xml_encoding_handler.h xml_element_content.o: xml_element_content.c xml_element_content.h \ nokogiri.h xml_io.h xml_document.h html_entity_lookup.h \ html_document.h xml_node.h xml_text.h xml_cdata.h xml_attr.h \ xml_processing_instruction.h xml_entity_reference.h \ xml_document_fragment.h xml_comment.h xml_node_set.h xml_dtd.h \ xml_attribute_decl.h xml_element_decl.h xml_entity_decl.h \ xml_xpath_context.h xml_sax_parser_context.h xml_sax_parser.h \ xml_sax_push_parser.h xml_reader.h html_sax_parser_context.h \ xslt_stylesheet.h xml_syntax_error.h xml_schema.h xml_relax_ng.h \ html_element_description.h xml_namespace.h xml_encoding_handler.h xml_element_decl.o: xml_element_decl.c xml_element_decl.h nokogiri.h \ xml_io.h xml_document.h html_entity_lookup.h html_document.h \ xml_node.h xml_text.h xml_cdata.h xml_attr.h \ xml_processing_instruction.h xml_entity_reference.h \ xml_document_fragment.h xml_comment.h xml_node_set.h xml_dtd.h \ xml_attribute_decl.h xml_entity_decl.h xml_xpath_context.h \ xml_element_content.h xml_sax_parser_context.h xml_sax_parser.h \ xml_sax_push_parser.h xml_reader.h html_sax_parser_context.h \ xslt_stylesheet.h xml_syntax_error.h xml_schema.h xml_relax_ng.h \ html_element_description.h xml_namespace.h xml_encoding_handler.h xml_encoding_handler.o: xml_encoding_handler.c xml_encoding_handler.h \ nokogiri.h xml_io.h xml_document.h html_entity_lookup.h \ html_document.h xml_node.h xml_text.h xml_cdata.h xml_attr.h \ xml_processing_instruction.h xml_entity_reference.h \ xml_document_fragment.h xml_comment.h xml_node_set.h xml_dtd.h \ xml_attribute_decl.h xml_element_decl.h xml_entity_decl.h \ xml_xpath_context.h xml_element_content.h xml_sax_parser_context.h \ xml_sax_parser.h xml_sax_push_parser.h xml_reader.h \ html_sax_parser_context.h xslt_stylesheet.h xml_syntax_error.h \ xml_schema.h xml_relax_ng.h html_element_description.h \ xml_namespace.h xml_entity_decl.o: xml_entity_decl.c xml_entity_decl.h nokogiri.h \ xml_io.h xml_document.h html_entity_lookup.h html_document.h \ xml_node.h xml_text.h xml_cdata.h xml_attr.h \ xml_processing_instruction.h xml_entity_reference.h \ xml_document_fragment.h xml_comment.h xml_node_set.h xml_dtd.h \ xml_attribute_decl.h xml_element_decl.h xml_xpath_context.h \ xml_element_content.h xml_sax_parser_context.h xml_sax_parser.h \ xml_sax_push_parser.h xml_reader.h html_sax_parser_context.h \ xslt_stylesheet.h xml_syntax_error.h xml_schema.h xml_relax_ng.h \ html_element_description.h xml_namespace.h xml_encoding_handler.h xml_entity_reference.o: xml_entity_reference.c xml_entity_reference.h \ nokogiri.h xml_io.h xml_document.h html_entity_lookup.h \ html_document.h xml_node.h xml_text.h xml_cdata.h xml_attr.h \ xml_processing_instruction.h xml_document_fragment.h xml_comment.h \ xml_node_set.h xml_dtd.h xml_attribute_decl.h xml_element_decl.h \ xml_entity_decl.h xml_xpath_context.h xml_element_content.h \ xml_sax_parser_context.h xml_sax_parser.h xml_sax_push_parser.h \ xml_reader.h html_sax_parser_context.h xslt_stylesheet.h \ xml_syntax_error.h xml_schema.h xml_relax_ng.h \ html_element_description.h xml_namespace.h xml_encoding_handler.h xml_io.o: xml_io.c xml_io.h nokogiri.h xml_document.h \ html_entity_lookup.h html_document.h xml_node.h xml_text.h \ xml_cdata.h xml_attr.h xml_processing_instruction.h \ xml_entity_reference.h xml_document_fragment.h xml_comment.h \ xml_node_set.h xml_dtd.h xml_attribute_decl.h xml_element_decl.h \ xml_entity_decl.h xml_xpath_context.h xml_element_content.h \ xml_sax_parser_context.h xml_sax_parser.h xml_sax_push_parser.h \ xml_reader.h html_sax_parser_context.h xslt_stylesheet.h \ xml_syntax_error.h xml_schema.h xml_relax_ng.h \ html_element_description.h xml_namespace.h xml_encoding_handler.h xml_namespace.o: xml_namespace.c xml_namespace.h nokogiri.h xml_io.h \ xml_document.h html_entity_lookup.h html_document.h xml_node.h \ xml_text.h xml_cdata.h xml_attr.h xml_processing_instruction.h \ xml_entity_reference.h xml_document_fragment.h xml_comment.h \ xml_node_set.h xml_dtd.h xml_attribute_decl.h xml_element_decl.h \ xml_entity_decl.h xml_xpath_context.h xml_element_content.h \ xml_sax_parser_context.h xml_sax_parser.h xml_sax_push_parser.h \ xml_reader.h html_sax_parser_context.h xslt_stylesheet.h \ xml_syntax_error.h xml_schema.h xml_relax_ng.h \ html_element_description.h xml_encoding_handler.h xml_node.o: xml_node.c xml_node.h nokogiri.h xml_io.h xml_document.h \ html_entity_lookup.h html_document.h xml_text.h xml_cdata.h \ xml_attr.h xml_processing_instruction.h xml_entity_reference.h \ xml_document_fragment.h xml_comment.h xml_node_set.h xml_dtd.h \ xml_attribute_decl.h xml_element_decl.h xml_entity_decl.h \ xml_xpath_context.h xml_element_content.h xml_sax_parser_context.h \ xml_sax_parser.h xml_sax_push_parser.h xml_reader.h \ html_sax_parser_context.h xslt_stylesheet.h xml_syntax_error.h \ xml_schema.h xml_relax_ng.h html_element_description.h \ xml_namespace.h xml_encoding_handler.h xml_node_set.o: xml_node_set.c xml_node_set.h nokogiri.h xml_io.h \ xml_document.h html_entity_lookup.h html_document.h xml_node.h \ xml_text.h xml_cdata.h xml_attr.h xml_processing_instruction.h \ xml_entity_reference.h xml_document_fragment.h xml_comment.h \ xml_dtd.h xml_attribute_decl.h xml_element_decl.h xml_entity_decl.h \ xml_xpath_context.h xml_element_content.h xml_sax_parser_context.h \ xml_sax_parser.h xml_sax_push_parser.h xml_reader.h \ html_sax_parser_context.h xslt_stylesheet.h xml_syntax_error.h \ xml_schema.h xml_relax_ng.h html_element_description.h \ xml_namespace.h xml_encoding_handler.h xml_processing_instruction.o: xml_processing_instruction.c \ xml_processing_instruction.h nokogiri.h xml_io.h xml_document.h \ html_entity_lookup.h html_document.h xml_node.h xml_text.h \ xml_cdata.h xml_attr.h xml_entity_reference.h xml_document_fragment.h \ xml_comment.h xml_node_set.h xml_dtd.h xml_attribute_decl.h \ xml_element_decl.h xml_entity_decl.h xml_xpath_context.h \ xml_element_content.h xml_sax_parser_context.h xml_sax_parser.h \ xml_sax_push_parser.h xml_reader.h html_sax_parser_context.h \ xslt_stylesheet.h xml_syntax_error.h xml_schema.h xml_relax_ng.h \ html_element_description.h xml_namespace.h xml_encoding_handler.h xml_reader.o: xml_reader.c xml_reader.h nokogiri.h xml_io.h \ xml_document.h html_entity_lookup.h html_document.h xml_node.h \ xml_text.h xml_cdata.h xml_attr.h xml_processing_instruction.h \ xml_entity_reference.h xml_document_fragment.h xml_comment.h \ xml_node_set.h xml_dtd.h xml_attribute_decl.h xml_element_decl.h \ xml_entity_decl.h xml_xpath_context.h xml_element_content.h \ xml_sax_parser_context.h xml_sax_parser.h xml_sax_push_parser.h \ html_sax_parser_context.h xslt_stylesheet.h xml_syntax_error.h \ xml_schema.h xml_relax_ng.h html_element_description.h \ xml_namespace.h xml_encoding_handler.h xml_relax_ng.o: xml_relax_ng.c xml_relax_ng.h nokogiri.h xml_io.h \ xml_document.h html_entity_lookup.h html_document.h xml_node.h \ xml_text.h xml_cdata.h xml_attr.h xml_processing_instruction.h \ xml_entity_reference.h xml_document_fragment.h xml_comment.h \ xml_node_set.h xml_dtd.h xml_attribute_decl.h xml_element_decl.h \ xml_entity_decl.h xml_xpath_context.h xml_element_content.h \ xml_sax_parser_context.h xml_sax_parser.h xml_sax_push_parser.h \ xml_reader.h html_sax_parser_context.h xslt_stylesheet.h \ xml_syntax_error.h xml_schema.h html_element_description.h \ xml_namespace.h xml_encoding_handler.h xml_sax_parser.o: xml_sax_parser.c xml_sax_parser.h nokogiri.h \ xml_io.h xml_document.h html_entity_lookup.h html_document.h \ xml_node.h xml_text.h xml_cdata.h xml_attr.h \ xml_processing_instruction.h xml_entity_reference.h \ xml_document_fragment.h xml_comment.h xml_node_set.h xml_dtd.h \ xml_attribute_decl.h xml_element_decl.h xml_entity_decl.h \ xml_xpath_context.h xml_element_content.h xml_sax_parser_context.h \ xml_sax_push_parser.h xml_reader.h html_sax_parser_context.h \ xslt_stylesheet.h xml_syntax_error.h xml_schema.h xml_relax_ng.h \ html_element_description.h xml_namespace.h xml_encoding_handler.h xml_sax_parser_context.o: xml_sax_parser_context.c \ xml_sax_parser_context.h nokogiri.h xml_io.h xml_document.h \ html_entity_lookup.h html_document.h xml_node.h xml_text.h \ xml_cdata.h xml_attr.h xml_processing_instruction.h \ xml_entity_reference.h xml_document_fragment.h xml_comment.h \ xml_node_set.h xml_dtd.h xml_attribute_decl.h xml_element_decl.h \ xml_entity_decl.h xml_xpath_context.h xml_element_content.h \ xml_sax_parser.h xml_sax_push_parser.h xml_reader.h \ html_sax_parser_context.h xslt_stylesheet.h xml_syntax_error.h \ xml_schema.h xml_relax_ng.h html_element_description.h \ xml_namespace.h xml_encoding_handler.h xml_sax_push_parser.o: xml_sax_push_parser.c xml_sax_push_parser.h \ nokogiri.h xml_io.h xml_document.h html_entity_lookup.h \ html_document.h xml_node.h xml_text.h xml_cdata.h xml_attr.h \ xml_processing_instruction.h xml_entity_reference.h \ xml_document_fragment.h xml_comment.h xml_node_set.h xml_dtd.h \ xml_attribute_decl.h xml_element_decl.h xml_entity_decl.h \ xml_xpath_context.h xml_element_content.h xml_sax_parser_context.h \ xml_sax_parser.h xml_reader.h html_sax_parser_context.h \ xslt_stylesheet.h xml_syntax_error.h xml_schema.h xml_relax_ng.h \ html_element_description.h xml_namespace.h xml_encoding_handler.h xml_schema.o: xml_schema.c xml_schema.h nokogiri.h xml_io.h \ xml_document.h html_entity_lookup.h html_document.h xml_node.h \ xml_text.h xml_cdata.h xml_attr.h xml_processing_instruction.h \ xml_entity_reference.h xml_document_fragment.h xml_comment.h \ xml_node_set.h xml_dtd.h xml_attribute_decl.h xml_element_decl.h \ xml_entity_decl.h xml_xpath_context.h xml_element_content.h \ xml_sax_parser_context.h xml_sax_parser.h xml_sax_push_parser.h \ xml_reader.h html_sax_parser_context.h xslt_stylesheet.h \ xml_syntax_error.h xml_relax_ng.h html_element_description.h \ xml_namespace.h xml_encoding_handler.h xml_syntax_error.o: xml_syntax_error.c xml_syntax_error.h nokogiri.h \ xml_io.h xml_document.h html_entity_lookup.h html_document.h \ xml_node.h xml_text.h xml_cdata.h xml_attr.h \ xml_processing_instruction.h xml_entity_reference.h \ xml_document_fragment.h xml_comment.h xml_node_set.h xml_dtd.h \ xml_attribute_decl.h xml_element_decl.h xml_entity_decl.h \ xml_xpath_context.h xml_element_content.h xml_sax_parser_context.h \ xml_sax_parser.h xml_sax_push_parser.h xml_reader.h \ html_sax_parser_context.h xslt_stylesheet.h xml_schema.h \ xml_relax_ng.h html_element_description.h xml_namespace.h \ xml_encoding_handler.h xml_text.o: xml_text.c xml_text.h nokogiri.h xml_io.h xml_document.h \ html_entity_lookup.h html_document.h xml_node.h xml_cdata.h \ xml_attr.h xml_processing_instruction.h xml_entity_reference.h \ xml_document_fragment.h xml_comment.h xml_node_set.h xml_dtd.h \ xml_attribute_decl.h xml_element_decl.h xml_entity_decl.h \ xml_xpath_context.h xml_element_content.h xml_sax_parser_context.h \ xml_sax_parser.h xml_sax_push_parser.h xml_reader.h \ html_sax_parser_context.h xslt_stylesheet.h xml_syntax_error.h \ xml_schema.h xml_relax_ng.h html_element_description.h \ xml_namespace.h xml_encoding_handler.h xml_xpath_context.o: xml_xpath_context.c xml_xpath_context.h \ nokogiri.h xml_io.h xml_document.h html_entity_lookup.h \ html_document.h xml_node.h xml_text.h xml_cdata.h xml_attr.h \ xml_processing_instruction.h xml_entity_reference.h \ xml_document_fragment.h xml_comment.h xml_node_set.h xml_dtd.h \ xml_attribute_decl.h xml_element_decl.h xml_entity_decl.h \ xml_element_content.h xml_sax_parser_context.h xml_sax_parser.h \ xml_sax_push_parser.h xml_reader.h html_sax_parser_context.h \ xslt_stylesheet.h xml_syntax_error.h xml_schema.h xml_relax_ng.h \ html_element_description.h xml_namespace.h xml_encoding_handler.h xslt_stylesheet.o: xslt_stylesheet.c xslt_stylesheet.h nokogiri.h \ xml_io.h xml_document.h html_entity_lookup.h html_document.h \ xml_node.h xml_text.h xml_cdata.h xml_attr.h \ xml_processing_instruction.h xml_entity_reference.h \ xml_document_fragment.h xml_comment.h xml_node_set.h xml_dtd.h \ xml_attribute_decl.h xml_element_decl.h xml_entity_decl.h \ xml_xpath_context.h xml_element_content.h xml_sax_parser_context.h \ xml_sax_parser.h xml_sax_push_parser.h xml_reader.h \ html_sax_parser_context.h xml_syntax_error.h xml_schema.h \ xml_relax_ng.h html_element_description.h xml_namespace.h \ xml_encoding_handler.h nokogiri-1.8.2/ext/nokogiri/xml_encoding_handler.c0000644000004100000410000000331413235345655022337 0ustar www-datawww-data#include /* * call-seq: Nokogiri::EncodingHandler.[](name) * * Get the encoding handler for +name+ */ static VALUE get(VALUE klass, VALUE key) { xmlCharEncodingHandlerPtr handler; handler = xmlFindCharEncodingHandler(StringValueCStr(key)); if(handler) return Data_Wrap_Struct(klass, NULL, NULL, handler); return Qnil; } /* * call-seq: Nokogiri::EncodingHandler.delete(name) * * Delete the encoding alias named +name+ */ static VALUE delete(VALUE klass, VALUE name) { if(xmlDelEncodingAlias(StringValueCStr(name))) return Qnil; return Qtrue; } /* * call-seq: Nokogiri::EncodingHandler.alias(from, to) * * Alias encoding handler with name +from+ to name +to+ */ static VALUE alias(VALUE klass, VALUE from, VALUE to) { xmlAddEncodingAlias(StringValueCStr(from), StringValueCStr(to)); return to; } /* * call-seq: Nokogiri::EncodingHandler.clear_aliases! * * Remove all encoding aliases. */ static VALUE clear_aliases(VALUE klass) { xmlCleanupEncodingAliases(); return klass; } /* * call-seq: name * * Get the name of this EncodingHandler */ static VALUE name(VALUE self) { xmlCharEncodingHandlerPtr handler; Data_Get_Struct(self, xmlCharEncodingHandler, handler); return NOKOGIRI_STR_NEW2(handler->name); } void init_xml_encoding_handler() { VALUE nokogiri = rb_define_module("Nokogiri"); VALUE klass = rb_define_class_under(nokogiri, "EncodingHandler", rb_cObject); rb_define_singleton_method(klass, "[]", get, 1); rb_define_singleton_method(klass, "delete", delete, 1); rb_define_singleton_method(klass, "alias", alias, 2); rb_define_singleton_method(klass, "clear_aliases!", clear_aliases, 0); rb_define_method(klass, "name", name, 0); } nokogiri-1.8.2/README.md0000644000004100000410000001303413235345655014666 0ustar www-datawww-data# Nokogiri * http://nokogiri.org * Installation: http://nokogiri.org/tutorials/installing_nokogiri.html * Tutorials: http://nokogiri.org * README: https://github.com/sparklemotion/nokogiri * Mailing List: https://groups.google.com/group/nokogiri-talk * Bug Reports: https://github.com/sparklemotion/nokogiri/issues ## Status |System|Status| |--|--| | Concourse | [![Concourse CI](https://ci.nokogiri.org/api/v1/teams/nokogiri-core/pipelines/nokogiri/jobs/ruby-2.4-system/badge)](https://ci.nokogiri.org/teams/nokogiri-core/pipelines/nokogiri?groups=master) | | Travis | [![Travis Build Status](https://travis-ci.org/sparklemotion/nokogiri.svg?branch=master)](https://travis-ci.org/sparklemotion/nokogiri) | | Appveyor | [![Appveyor Build Status](https://ci.appveyor.com/api/projects/status/github/sparklemotion/nokogiri?branch=master&svg=true)](https://ci.appveyor.com/project/flavorjones/nokogiri?branch=master) | | Code Climate | [![Code Climate](https://codeclimate.com/github/sparklemotion/nokogiri.svg)](https://codeclimate.com/github/sparklemotion/nokogiri) | | Version Eye | [![Version Eye](https://www.versioneye.com/ruby/nokogiri/badge.png)](https://www.versioneye.com/ruby/nokogiri) | ## Description Nokogiri (鋸) is an HTML, XML, SAX, and Reader parser. Among Nokogiri's many features is the ability to search documents via XPath or CSS3 selectors. ## Features * XML/HTML DOM parser which handles broken HTML * XML/HTML SAX parser * XML/HTML Push parser * XPath 1.0 support for document searching * CSS3 selector support for document searching * XML/HTML builder * XSLT transformer Nokogiri parses and searches XML/HTML using native libraries (either C or Java, depending on your Ruby), which means it's fast and standards-compliant. ## Installation If this doesn't work: ``` gem install nokogiri ``` then please start troubleshooting here: > http://www.nokogiri.org/tutorials/installing_nokogiri.html There are currently 1,237 Stack Overflow questions about Nokogiri installation. The vast majority of them are out of date and therefore incorrect. __Please do not use Stack Overflow.__ Instead, [tell us](http://nokogiri.org/tutorials/getting_help.html) when the above instructions don't work for you. This allows us to both help you directly and improve the documentation. ### Binary packages Binary packages are available for some distributions. * Debian: https://packages.debian.org/sid/ruby-nokogiri * SuSE: https://download.opensuse.org/repositories/devel:/languages:/ruby:/extensions/ * Fedora: http://s390.koji.fedoraproject.org/koji/packageinfo?packageID=6756 ## Support There are open-source tutorials (to which we invite contributions!) here: http://nokogiri.org/tutorials * The Nokogiri mailing list is active: https://groups.google.com/group/nokogiri-talk * The Nokogiri bug tracker is here: https://github.com/sparklemotion/nokogiri/issues * Before filing a bug report, please read our submission guidelines: http://nokogiri.org/tutorials/getting_help.html * The IRC channel is #nokogiri on freenode. ## Synopsis Nokogiri is a large library, but here is example usage for parsing and examining a document: ```ruby #! /usr/bin/env ruby require 'nokogiri' require 'open-uri' # Fetch and parse HTML document doc = Nokogiri::HTML(open('http://www.nokogiri.org/tutorials/installing_nokogiri.html')) puts "### Search for nodes by css" doc.css('nav ul.menu li a', 'article h2').each do |link| puts link.content end puts "### Search for nodes by xpath" doc.xpath('//nav//ul//li/a', '//article//h2').each do |link| puts link.content end puts "### Or mix and match." doc.search('nav ul.menu li a', '//article//h2').each do |link| puts link.content end ``` ## Requirements * Ruby 2.1.0 or higher, including any development packages necessary to compile native extensions. * In Nokogiri 1.6.0 and later libxml2 and libxslt are bundled with the gem, but if you want to use the system versions: * First, check out [the long list](http://www.xmlsoft.org/news.html) of fixes and changes between releases before deciding to use any version older than is bundled with Nokogiri. * At install time, set the environment variable `NOKOGIRI_USE_SYSTEM_LIBRARIES` or else use the `--use-system-libraries` argument. (See http://nokogiri.org/tutorials/installing_nokogiri.html#using_your_system_libraries for specifics.) * libxml2 >=2.6.21 with iconv support (libxml2-dev/-devel is also required) * libxslt, built with and supported by the given libxml2 (libxslt-dev/-devel is also required) ## Encoding Strings are always stored as UTF-8 internally. Methods that return text values will always return UTF-8 encoded strings. Methods that return a string containing markup (like `to_xml`, `to_html` and `inner_html`) will return a string encoded like the source document. __WARNING__ Some documents declare one encoding, but actually use a different one. In these cases, which encoding should the parser choose? Data is just a stream of bytes. Humans add meaning to that stream. Any particular set of bytes could be valid characters in multiple encodings, so detecting encoding with 100% accuracy is not possible. `libxml2` does its best, but it can't be right all the time. If you want Nokogiri to handle the document encoding properly, your best bet is to explicitly set the encoding. Here is an example of explicitly setting the encoding to EUC-JP on the parser: ```ruby doc = Nokogiri.XML('', nil, 'EUC-JP') ``` ## Development ```bash bundle install bundle exec rake ``` ## License MIT. See the `LICENSE.md` file. nokogiri-1.8.2/LICENSE-DEPENDENCIES.md0000644000004100000410000025602513235345655016650 0ustar www-datawww-dataNokogiri ships with some third party dependencies, which are listed here along with their licenses. Note that this document is broken into three sections, each of which will apply to different platform releases of Nokogiri: 1. default platform release 2. `java` platform release 3. binary windows platform releases (`x86-mingw32` and `x64-mingw32`) It's encouraged for anyone consuming this file via license-tracking software to understand which dependencies are used by your particular software, so as not to misinterpret the contents of this file. In particular, I'm sure somebody's lawyer, somewhere, is going to freak out that the LGPL appears in this file; and so I'd like to take special note that the dependency covered by LGPL, `libiconv`, is only being redistributed in the binary Windows platform release. It's not present in any non-Windows releases. ----- # default platform release ## libxml2 MIT http://xmlsoft.org/ Except where otherwise noted in the source code (e.g. the files hash.c, list.c and the trio files, which are covered by a similar licence but with different Copyright notices) all the files are: Copyright (C) 1998-2012 Daniel Veillard. All Rights Reserved. Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is fur- nished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FIT- NESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. ## libxslt MIT http://xmlsoft.org/libxslt/ Licence for libxslt except libexslt ---------------------------------------------------------------------- Copyright (C) 2001-2002 Daniel Veillard. All Rights Reserved. Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is fur- nished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FIT- NESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE DANIEL VEILLARD BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CON- NECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. Except as contained in this notice, the name of Daniel Veillard shall not be used in advertising or otherwise to promote the sale, use or other deal- ings in this Software without prior written authorization from him. ---------------------------------------------------------------------- Licence for libexslt ---------------------------------------------------------------------- Copyright (C) 2001-2002 Thomas Broyer, Charlie Bozeman and Daniel Veillard. All Rights Reserved. Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is fur- nished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FIT- NESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CON- NECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. Except as contained in this notice, the name of the authors shall not be used in advertising or otherwise to promote the sale, use or other deal- ings in this Software without prior written authorization from him. ---------------------------------------------------------------------- # `java` platform release ## isorelax MIT http://iso-relax.sourceforge.net/ Copyright (c) 2001-2002, SourceForge ISO-RELAX Project (ASAMI Tomoharu, Daisuke Okajima, Kohsuke Kawaguchi, and MURATA Makoto) Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. ## jing BSD-3-Clause http://www.thaiopensource.com/relaxng/jing.html Copyright (c) 2001-2003 Thai Open Source Software Center Ltd All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. * Neither the name of the Thai Open Source Software Center Ltd nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ## nekodtd Apache 1.0-derived https://people.apache.org/~andyc/neko/doc/dtd/ The CyberNeko Software License, Version 1.0 (C) Copyright 2002-2005, Andy Clark. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. 3. The end-user documentation included with the redistribution, if any, must include the following acknowledgment: "This product includes software developed by Andy Clark." Alternately, this acknowledgment may appear in the software itself, if and wherever such third-party acknowledgments normally appear. 4. The names "CyberNeko" and "NekoHTML" must not be used to endorse or promote products derived from this software without prior written permission. For written permission, please contact andyc@cyberneko.net. 5. Products derived from this software may not be called "CyberNeko", nor may "CyberNeko" appear in their name, without prior written permission of the author. THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR OTHER CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ==================================================================== This license is based on the Apache Software License, version 1.1. ## nekohtml Apache 2.0 http://nekohtml.sourceforge.net/ Apache License Version 2.0, January 2004 http://www.apache.org/licenses/ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION 1. Definitions. "License" shall mean the terms and conditions for use, reproduction, and distribution as defined by Sections 1 through 9 of this document. "Licensor" shall mean the copyright owner or entity authorized by the copyright owner that is granting the License. "Legal Entity" shall mean the union of the acting entity and all other entities that control, are controlled by, or are under common control with that entity. For the purposes of this definition, "control" means (i) the power, direct or indirect, to cause the direction or management of such entity, whether by contract or otherwise, or (ii) ownership of fifty percent (50%) or more of the outstanding shares, or (iii) beneficial ownership of such entity. "You" (or "Your") shall mean an individual or Legal Entity exercising permissions granted by this License. "Source" form shall mean the preferred form for making modifications, including but not limited to software source code, documentation source, and configuration files. "Object" form shall mean any form resulting from mechanical transformation or translation of a Source form, including but not limited to compiled object code, generated documentation, and conversions to other media types. "Work" shall mean the work of authorship, whether in Source or Object form, made available under the License, as indicated by a copyright notice that is included in or attached to the work (an example is provided in the Appendix below). "Derivative Works" shall mean any work, whether in Source or Object form, that is based on (or derived from) the Work and for which the editorial revisions, annotations, elaborations, or other modifications represent, as a whole, an original work of authorship. For the purposes of this License, Derivative Works shall not include works that remain separable from, or merely link (or bind by name) to the interfaces of, the Work and Derivative Works thereof. "Contribution" shall mean any work of authorship, including the original version of the Work and any modifications or additions to that Work or Derivative Works thereof, that is intentionally submitted to Licensor for inclusion in the Work by the copyright owner or by an individual or Legal Entity authorized to submit on behalf of the copyright owner. For the purposes of this definition, "submitted" means any form of electronic, verbal, or written communication sent to the Licensor or its representatives, including but not limited to communication on electronic mailing lists, source code control systems, and issue tracking systems that are managed by, or on behalf of, the Licensor for the purpose of discussing and improving the Work, but excluding communication that is conspicuously marked or otherwise designated in writing by the copyright owner as "Not a Contribution." "Contributor" shall mean Licensor and any individual or Legal Entity on behalf of whom a Contribution has been received by Licensor and subsequently incorporated within the Work. 2. Grant of Copyright License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable copyright license to reproduce, prepare Derivative Works of, publicly display, publicly perform, sublicense, and distribute the Work and such Derivative Works in Source or Object form. 3. Grant of Patent License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable (except as stated in this section) patent license to make, have made, use, offer to sell, sell, import, and otherwise transfer the Work, where such license applies only to those patent claims licensable by such Contributor that are necessarily infringed by their Contribution(s) alone or by combination of their Contribution(s) with the Work to which such Contribution(s) was submitted. If You institute patent litigation against any entity (including a cross-claim or counterclaim in a lawsuit) alleging that the Work or a Contribution incorporated within the Work constitutes direct or contributory patent infringement, then any patent licenses granted to You under this License for that Work shall terminate as of the date such litigation is filed. 4. Redistribution. You may reproduce and distribute copies of the Work or Derivative Works thereof in any medium, with or without modifications, and in Source or Object form, provided that You meet the following conditions: (a) You must give any other recipients of the Work or Derivative Works a copy of this License; and (b) You must cause any modified files to carry prominent notices stating that You changed the files; and (c) You must retain, in the Source form of any Derivative Works that You distribute, all copyright, patent, trademark, and attribution notices from the Source form of the Work, excluding those notices that do not pertain to any part of the Derivative Works; and (d) If the Work includes a "NOTICE" text file as part of its distribution, then any Derivative Works that You distribute must include a readable copy of the attribution notices contained within such NOTICE file, excluding those notices that do not pertain to any part of the Derivative Works, in at least one of the following places: within a NOTICE text file distributed as part of the Derivative Works; within the Source form or documentation, if provided along with the Derivative Works; or, within a display generated by the Derivative Works, if and wherever such third-party notices normally appear. The contents of the NOTICE file are for informational purposes only and do not modify the License. You may add Your own attribution notices within Derivative Works that You distribute, alongside or as an addendum to the NOTICE text from the Work, provided that such additional attribution notices cannot be construed as modifying the License. You may add Your own copyright statement to Your modifications and may provide additional or different license terms and conditions for use, reproduction, or distribution of Your modifications, or for any such Derivative Works as a whole, provided Your use, reproduction, and distribution of the Work otherwise complies with the conditions stated in this License. 5. Submission of Contributions. Unless You explicitly state otherwise, any Contribution intentionally submitted for inclusion in the Work by You to the Licensor shall be under the terms and conditions of this License, without any additional terms or conditions. Notwithstanding the above, nothing herein shall supersede or modify the terms of any separate license agreement you may have executed with Licensor regarding such Contributions. 6. Trademarks. This License does not grant permission to use the trade names, trademarks, service marks, or product names of the Licensor, except as required for reasonable and customary use in describing the origin of the Work and reproducing the content of the NOTICE file. 7. Disclaimer of Warranty. Unless required by applicable law or agreed to in writing, Licensor provides the Work (and each Contributor provides its Contributions) on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied, including, without limitation, any warranties or conditions of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE. You are solely responsible for determining the appropriateness of using or redistributing the Work and assume any risks associated with Your exercise of permissions under this License. 8. Limitation of Liability. In no event and under no legal theory, whether in tort (including negligence), contract, or otherwise, unless required by applicable law (such as deliberate and grossly negligent acts) or agreed to in writing, shall any Contributor be liable to You for damages, including any direct, indirect, special, incidental, or consequential damages of any character arising as a result of this License or out of the use or inability to use the Work (including but not limited to damages for loss of goodwill, work stoppage, computer failure or malfunction, or any and all other commercial damages or losses), even if such Contributor has been advised of the possibility of such damages. 9. Accepting Warranty or Additional Liability. While redistributing the Work or Derivative Works thereof, You may choose to offer, and charge a fee for, acceptance of support, warranty, indemnity, or other liability obligations and/or rights consistent with this License. However, in accepting such obligations, You may act only on Your own behalf and on Your sole responsibility, not on behalf of any other Contributor, and only if You agree to indemnify, defend, and hold each Contributor harmless for any liability incurred by, or claims asserted against, such Contributor by reason of your accepting any such warranty or additional liability. END OF TERMS AND CONDITIONS APPENDIX: How to apply the Apache License to your work. To apply the Apache License to your work, attach the following boilerplate notice, with the fields enclosed by brackets "[]" replaced with your own identifying information. (Don't include the brackets!) The text should be enclosed in the appropriate comment syntax for the file format. We also recommend that a file or class name and description of purpose be included on the same "printed page" as the copyright notice for easier identification within third-party archives. Copyright [yyyy] [name of copyright owner] Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. ## xalan Apache 2.0 https://xml.apache.org/xalan-j/ covers xalan.jar and serializer.jar Apache License Version 2.0, January 2004 http://www.apache.org/licenses/ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION 1. Definitions. "License" shall mean the terms and conditions for use, reproduction, and distribution as defined by Sections 1 through 9 of this document. "Licensor" shall mean the copyright owner or entity authorized by the copyright owner that is granting the License. "Legal Entity" shall mean the union of the acting entity and all other entities that control, are controlled by, or are under common control with that entity. For the purposes of this definition, "control" means (i) the power, direct or indirect, to cause the direction or management of such entity, whether by contract or otherwise, or (ii) ownership of fifty percent (50%) or more of the outstanding shares, or (iii) beneficial ownership of such entity. "You" (or "Your") shall mean an individual or Legal Entity exercising permissions granted by this License. "Source" form shall mean the preferred form for making modifications, including but not limited to software source code, documentation source, and configuration files. "Object" form shall mean any form resulting from mechanical transformation or translation of a Source form, including but not limited to compiled object code, generated documentation, and conversions to other media types. "Work" shall mean the work of authorship, whether in Source or Object form, made available under the License, as indicated by a copyright notice that is included in or attached to the work (an example is provided in the Appendix below). "Derivative Works" shall mean any work, whether in Source or Object form, that is based on (or derived from) the Work and for which the editorial revisions, annotations, elaborations, or other modifications represent, as a whole, an original work of authorship. For the purposes of this License, Derivative Works shall not include works that remain separable from, or merely link (or bind by name) to the interfaces of, the Work and Derivative Works thereof. "Contribution" shall mean any work of authorship, including the original version of the Work and any modifications or additions to that Work or Derivative Works thereof, that is intentionally submitted to Licensor for inclusion in the Work by the copyright owner or by an individual or Legal Entity authorized to submit on behalf of the copyright owner. For the purposes of this definition, "submitted" means any form of electronic, verbal, or written communication sent to the Licensor or its representatives, including but not limited to communication on electronic mailing lists, source code control systems, and issue tracking systems that are managed by, or on behalf of, the Licensor for the purpose of discussing and improving the Work, but excluding communication that is conspicuously marked or otherwise designated in writing by the copyright owner as "Not a Contribution." "Contributor" shall mean Licensor and any individual or Legal Entity on behalf of whom a Contribution has been received by Licensor and subsequently incorporated within the Work. 2. Grant of Copyright License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable copyright license to reproduce, prepare Derivative Works of, publicly display, publicly perform, sublicense, and distribute the Work and such Derivative Works in Source or Object form. 3. Grant of Patent License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable (except as stated in this section) patent license to make, have made, use, offer to sell, sell, import, and otherwise transfer the Work, where such license applies only to those patent claims licensable by such Contributor that are necessarily infringed by their Contribution(s) alone or by combination of their Contribution(s) with the Work to which such Contribution(s) was submitted. If You institute patent litigation against any entity (including a cross-claim or counterclaim in a lawsuit) alleging that the Work or a Contribution incorporated within the Work constitutes direct or contributory patent infringement, then any patent licenses granted to You under this License for that Work shall terminate as of the date such litigation is filed. 4. Redistribution. You may reproduce and distribute copies of the Work or Derivative Works thereof in any medium, with or without modifications, and in Source or Object form, provided that You meet the following conditions: (a) You must give any other recipients of the Work or Derivative Works a copy of this License; and (b) You must cause any modified files to carry prominent notices stating that You changed the files; and (c) You must retain, in the Source form of any Derivative Works that You distribute, all copyright, patent, trademark, and attribution notices from the Source form of the Work, excluding those notices that do not pertain to any part of the Derivative Works; and (d) If the Work includes a "NOTICE" text file as part of its distribution, then any Derivative Works that You distribute must include a readable copy of the attribution notices contained within such NOTICE file, excluding those notices that do not pertain to any part of the Derivative Works, in at least one of the following places: within a NOTICE text file distributed as part of the Derivative Works; within the Source form or documentation, if provided along with the Derivative Works; or, within a display generated by the Derivative Works, if and wherever such third-party notices normally appear. The contents of the NOTICE file are for informational purposes only and do not modify the License. You may add Your own attribution notices within Derivative Works that You distribute, alongside or as an addendum to the NOTICE text from the Work, provided that such additional attribution notices cannot be construed as modifying the License. You may add Your own copyright statement to Your modifications and may provide additional or different license terms and conditions for use, reproduction, or distribution of Your modifications, or for any such Derivative Works as a whole, provided Your use, reproduction, and distribution of the Work otherwise complies with the conditions stated in this License. 5. Submission of Contributions. Unless You explicitly state otherwise, any Contribution intentionally submitted for inclusion in the Work by You to the Licensor shall be under the terms and conditions of this License, without any additional terms or conditions. Notwithstanding the above, nothing herein shall supersede or modify the terms of any separate license agreement you may have executed with Licensor regarding such Contributions. 6. Trademarks. This License does not grant permission to use the trade names, trademarks, service marks, or product names of the Licensor, except as required for reasonable and customary use in describing the origin of the Work and reproducing the content of the NOTICE file. 7. Disclaimer of Warranty. Unless required by applicable law or agreed to in writing, Licensor provides the Work (and each Contributor provides its Contributions) on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied, including, without limitation, any warranties or conditions of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE. You are solely responsible for determining the appropriateness of using or redistributing the Work and assume any risks associated with Your exercise of permissions under this License. 8. Limitation of Liability. In no event and under no legal theory, whether in tort (including negligence), contract, or otherwise, unless required by applicable law (such as deliberate and grossly negligent acts) or agreed to in writing, shall any Contributor be liable to You for damages, including any direct, indirect, special, incidental, or consequential damages of any character arising as a result of this License or out of the use or inability to use the Work (including but not limited to damages for loss of goodwill, work stoppage, computer failure or malfunction, or any and all other commercial damages or losses), even if such Contributor has been advised of the possibility of such damages. 9. Accepting Warranty or Additional Liability. While redistributing the Work or Derivative Works thereof, You may choose to offer, and charge a fee for, acceptance of support, warranty, indemnity, or other liability obligations and/or rights consistent with this License. However, in accepting such obligations, You may act only on Your own behalf and on Your sole responsibility, not on behalf of any other Contributor, and only if You agree to indemnify, defend, and hold each Contributor harmless for any liability incurred by, or claims asserted against, such Contributor by reason of your accepting any such warranty or additional liability. END OF TERMS AND CONDITIONS APPENDIX: How to apply the Apache License to your work. To apply the Apache License to your work, attach the following boilerplate notice, with the fields enclosed by brackets "[]" replaced with your own identifying information. (Don't include the brackets!) The text should be enclosed in the appropriate comment syntax for the file format. We also recommend that a file or class name and description of purpose be included on the same "printed page" as the copyright notice for easier identification within third-party archives. Copyright [yyyy] [name of copyright owner] Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. ## xerces Apache 2.0 https://xerces.apache.org/xerces2-j/ Apache License Version 2.0, January 2004 http://www.apache.org/licenses/ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION 1. Definitions. "License" shall mean the terms and conditions for use, reproduction, and distribution as defined by Sections 1 through 9 of this document. "Licensor" shall mean the copyright owner or entity authorized by the copyright owner that is granting the License. "Legal Entity" shall mean the union of the acting entity and all other entities that control, are controlled by, or are under common control with that entity. For the purposes of this definition, "control" means (i) the power, direct or indirect, to cause the direction or management of such entity, whether by contract or otherwise, or (ii) ownership of fifty percent (50%) or more of the outstanding shares, or (iii) beneficial ownership of such entity. "You" (or "Your") shall mean an individual or Legal Entity exercising permissions granted by this License. "Source" form shall mean the preferred form for making modifications, including but not limited to software source code, documentation source, and configuration files. "Object" form shall mean any form resulting from mechanical transformation or translation of a Source form, including but not limited to compiled object code, generated documentation, and conversions to other media types. "Work" shall mean the work of authorship, whether in Source or Object form, made available under the License, as indicated by a copyright notice that is included in or attached to the work (an example is provided in the Appendix below). "Derivative Works" shall mean any work, whether in Source or Object form, that is based on (or derived from) the Work and for which the editorial revisions, annotations, elaborations, or other modifications represent, as a whole, an original work of authorship. For the purposes of this License, Derivative Works shall not include works that remain separable from, or merely link (or bind by name) to the interfaces of, the Work and Derivative Works thereof. "Contribution" shall mean any work of authorship, including the original version of the Work and any modifications or additions to that Work or Derivative Works thereof, that is intentionally submitted to Licensor for inclusion in the Work by the copyright owner or by an individual or Legal Entity authorized to submit on behalf of the copyright owner. For the purposes of this definition, "submitted" means any form of electronic, verbal, or written communication sent to the Licensor or its representatives, including but not limited to communication on electronic mailing lists, source code control systems, and issue tracking systems that are managed by, or on behalf of, the Licensor for the purpose of discussing and improving the Work, but excluding communication that is conspicuously marked or otherwise designated in writing by the copyright owner as "Not a Contribution." "Contributor" shall mean Licensor and any individual or Legal Entity on behalf of whom a Contribution has been received by Licensor and subsequently incorporated within the Work. 2. Grant of Copyright License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable copyright license to reproduce, prepare Derivative Works of, publicly display, publicly perform, sublicense, and distribute the Work and such Derivative Works in Source or Object form. 3. Grant of Patent License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable (except as stated in this section) patent license to make, have made, use, offer to sell, sell, import, and otherwise transfer the Work, where such license applies only to those patent claims licensable by such Contributor that are necessarily infringed by their Contribution(s) alone or by combination of their Contribution(s) with the Work to which such Contribution(s) was submitted. If You institute patent litigation against any entity (including a cross-claim or counterclaim in a lawsuit) alleging that the Work or a Contribution incorporated within the Work constitutes direct or contributory patent infringement, then any patent licenses granted to You under this License for that Work shall terminate as of the date such litigation is filed. 4. Redistribution. You may reproduce and distribute copies of the Work or Derivative Works thereof in any medium, with or without modifications, and in Source or Object form, provided that You meet the following conditions: (a) You must give any other recipients of the Work or Derivative Works a copy of this License; and (b) You must cause any modified files to carry prominent notices stating that You changed the files; and (c) You must retain, in the Source form of any Derivative Works that You distribute, all copyright, patent, trademark, and attribution notices from the Source form of the Work, excluding those notices that do not pertain to any part of the Derivative Works; and (d) If the Work includes a "NOTICE" text file as part of its distribution, then any Derivative Works that You distribute must include a readable copy of the attribution notices contained within such NOTICE file, excluding those notices that do not pertain to any part of the Derivative Works, in at least one of the following places: within a NOTICE text file distributed as part of the Derivative Works; within the Source form or documentation, if provided along with the Derivative Works; or, within a display generated by the Derivative Works, if and wherever such third-party notices normally appear. The contents of the NOTICE file are for informational purposes only and do not modify the License. You may add Your own attribution notices within Derivative Works that You distribute, alongside or as an addendum to the NOTICE text from the Work, provided that such additional attribution notices cannot be construed as modifying the License. You may add Your own copyright statement to Your modifications and may provide additional or different license terms and conditions for use, reproduction, or distribution of Your modifications, or for any such Derivative Works as a whole, provided Your use, reproduction, and distribution of the Work otherwise complies with the conditions stated in this License. 5. Submission of Contributions. Unless You explicitly state otherwise, any Contribution intentionally submitted for inclusion in the Work by You to the Licensor shall be under the terms and conditions of this License, without any additional terms or conditions. Notwithstanding the above, nothing herein shall supersede or modify the terms of any separate license agreement you may have executed with Licensor regarding such Contributions. 6. Trademarks. This License does not grant permission to use the trade names, trademarks, service marks, or product names of the Licensor, except as required for reasonable and customary use in describing the origin of the Work and reproducing the content of the NOTICE file. 7. Disclaimer of Warranty. Unless required by applicable law or agreed to in writing, Licensor provides the Work (and each Contributor provides its Contributions) on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied, including, without limitation, any warranties or conditions of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE. You are solely responsible for determining the appropriateness of using or redistributing the Work and assume any risks associated with Your exercise of permissions under this License. 8. Limitation of Liability. In no event and under no legal theory, whether in tort (including negligence), contract, or otherwise, unless required by applicable law (such as deliberate and grossly negligent acts) or agreed to in writing, shall any Contributor be liable to You for damages, including any direct, indirect, special, incidental, or consequential damages of any character arising as a result of this License or out of the use or inability to use the Work (including but not limited to damages for loss of goodwill, work stoppage, computer failure or malfunction, or any and all other commercial damages or losses), even if such Contributor has been advised of the possibility of such damages. 9. Accepting Warranty or Additional Liability. While redistributing the Work or Derivative Works thereof, You may choose to offer, and charge a fee for, acceptance of support, warranty, indemnity, or other liability obligations and/or rights consistent with this License. However, in accepting such obligations, You may act only on Your own behalf and on Your sole responsibility, not on behalf of any other Contributor, and only if You agree to indemnify, defend, and hold each Contributor harmless for any liability incurred by, or claims asserted against, such Contributor by reason of your accepting any such warranty or additional liability. END OF TERMS AND CONDITIONS APPENDIX: How to apply the Apache License to your work. To apply the Apache License to your work, attach the following boilerplate notice, with the fields enclosed by brackets "[]" replaced with your own identifying information. (Don't include the brackets!) The text should be enclosed in the appropriate comment syntax for the file format. We also recommend that a file or class name and description of purpose be included on the same "printed page" as the copyright notice for easier identification within third-party archives. Copyright [yyyy] [name of copyright owner] Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. ## xml-apis Apache 2.0 https://xerces.apache.org/xml-commons/ Unless otherwise noted all files in XML Commons are covered under the Apache License Version 2.0. Please read the LICENSE and NOTICE files. XML Commons contains some software and documentation that is covered under a number of different licenses. This applies particularly to the xml-commons/java/external/ directory. Most files under xml-commons/java/external/ are covered under their respective LICENSE.*.txt files; see the matching README.*.txt files for descriptions. Apache License Version 2.0, January 2004 http://www.apache.org/licenses/ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION 1. Definitions. "License" shall mean the terms and conditions for use, reproduction, and distribution as defined by Sections 1 through 9 of this document. "Licensor" shall mean the copyright owner or entity authorized by the copyright owner that is granting the License. "Legal Entity" shall mean the union of the acting entity and all other entities that control, are controlled by, or are under common control with that entity. For the purposes of this definition, "control" means (i) the power, direct or indirect, to cause the direction or management of such entity, whether by contract or otherwise, or (ii) ownership of fifty percent (50%) or more of the outstanding shares, or (iii) beneficial ownership of such entity. "You" (or "Your") shall mean an individual or Legal Entity exercising permissions granted by this License. "Source" form shall mean the preferred form for making modifications, including but not limited to software source code, documentation source, and configuration files. "Object" form shall mean any form resulting from mechanical transformation or translation of a Source form, including but not limited to compiled object code, generated documentation, and conversions to other media types. "Work" shall mean the work of authorship, whether in Source or Object form, made available under the License, as indicated by a copyright notice that is included in or attached to the work (an example is provided in the Appendix below). "Derivative Works" shall mean any work, whether in Source or Object form, that is based on (or derived from) the Work and for which the editorial revisions, annotations, elaborations, or other modifications represent, as a whole, an original work of authorship. For the purposes of this License, Derivative Works shall not include works that remain separable from, or merely link (or bind by name) to the interfaces of, the Work and Derivative Works thereof. "Contribution" shall mean any work of authorship, including the original version of the Work and any modifications or additions to that Work or Derivative Works thereof, that is intentionally submitted to Licensor for inclusion in the Work by the copyright owner or by an individual or Legal Entity authorized to submit on behalf of the copyright owner. For the purposes of this definition, "submitted" means any form of electronic, verbal, or written communication sent to the Licensor or its representatives, including but not limited to communication on electronic mailing lists, source code control systems, and issue tracking systems that are managed by, or on behalf of, the Licensor for the purpose of discussing and improving the Work, but excluding communication that is conspicuously marked or otherwise designated in writing by the copyright owner as "Not a Contribution." "Contributor" shall mean Licensor and any individual or Legal Entity on behalf of whom a Contribution has been received by Licensor and subsequently incorporated within the Work. 2. Grant of Copyright License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable copyright license to reproduce, prepare Derivative Works of, publicly display, publicly perform, sublicense, and distribute the Work and such Derivative Works in Source or Object form. 3. Grant of Patent License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable (except as stated in this section) patent license to make, have made, use, offer to sell, sell, import, and otherwise transfer the Work, where such license applies only to those patent claims licensable by such Contributor that are necessarily infringed by their Contribution(s) alone or by combination of their Contribution(s) with the Work to which such Contribution(s) was submitted. If You institute patent litigation against any entity (including a cross-claim or counterclaim in a lawsuit) alleging that the Work or a Contribution incorporated within the Work constitutes direct or contributory patent infringement, then any patent licenses granted to You under this License for that Work shall terminate as of the date such litigation is filed. 4. Redistribution. You may reproduce and distribute copies of the Work or Derivative Works thereof in any medium, with or without modifications, and in Source or Object form, provided that You meet the following conditions: (a) You must give any other recipients of the Work or Derivative Works a copy of this License; and (b) You must cause any modified files to carry prominent notices stating that You changed the files; and (c) You must retain, in the Source form of any Derivative Works that You distribute, all copyright, patent, trademark, and attribution notices from the Source form of the Work, excluding those notices that do not pertain to any part of the Derivative Works; and (d) If the Work includes a "NOTICE" text file as part of its distribution, then any Derivative Works that You distribute must include a readable copy of the attribution notices contained within such NOTICE file, excluding those notices that do not pertain to any part of the Derivative Works, in at least one of the following places: within a NOTICE text file distributed as part of the Derivative Works; within the Source form or documentation, if provided along with the Derivative Works; or, within a display generated by the Derivative Works, if and wherever such third-party notices normally appear. The contents of the NOTICE file are for informational purposes only and do not modify the License. You may add Your own attribution notices within Derivative Works that You distribute, alongside or as an addendum to the NOTICE text from the Work, provided that such additional attribution notices cannot be construed as modifying the License. You may add Your own copyright statement to Your modifications and may provide additional or different license terms and conditions for use, reproduction, or distribution of Your modifications, or for any such Derivative Works as a whole, provided Your use, reproduction, and distribution of the Work otherwise complies with the conditions stated in this License. 5. Submission of Contributions. Unless You explicitly state otherwise, any Contribution intentionally submitted for inclusion in the Work by You to the Licensor shall be under the terms and conditions of this License, without any additional terms or conditions. Notwithstanding the above, nothing herein shall supersede or modify the terms of any separate license agreement you may have executed with Licensor regarding such Contributions. 6. Trademarks. This License does not grant permission to use the trade names, trademarks, service marks, or product names of the Licensor, except as required for reasonable and customary use in describing the origin of the Work and reproducing the content of the NOTICE file. 7. Disclaimer of Warranty. Unless required by applicable law or agreed to in writing, Licensor provides the Work (and each Contributor provides its Contributions) on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied, including, without limitation, any warranties or conditions of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE. You are solely responsible for determining the appropriateness of using or redistributing the Work and assume any risks associated with Your exercise of permissions under this License. 8. Limitation of Liability. In no event and under no legal theory, whether in tort (including negligence), contract, or otherwise, unless required by applicable law (such as deliberate and grossly negligent acts) or agreed to in writing, shall any Contributor be liable to You for damages, including any direct, indirect, special, incidental, or consequential damages of any character arising as a result of this License or out of the use or inability to use the Work (including but not limited to damages for loss of goodwill, work stoppage, computer failure or malfunction, or any and all other commercial damages or losses), even if such Contributor has been advised of the possibility of such damages. 9. Accepting Warranty or Additional Liability. While redistributing the Work or Derivative Works thereof, You may choose to offer, and charge a fee for, acceptance of support, warranty, indemnity, or other liability obligations and/or rights consistent with this License. However, in accepting such obligations, You may act only on Your own behalf and on Your sole responsibility, not on behalf of any other Contributor, and only if You agree to indemnify, defend, and hold each Contributor harmless for any liability incurred by, or claims asserted against, such Contributor by reason of your accepting any such warranty or additional liability. END OF TERMS AND CONDITIONS APPENDIX: How to apply the Apache License to your work. To apply the Apache License to your work, attach the following boilerplate notice, with the fields enclosed by brackets "[]" replaced with your own identifying information. (Don't include the brackets!) The text should be enclosed in the appropriate comment syntax for the file format. We also recommend that a file or class name and description of purpose be included on the same "printed page" as the copyright notice for easier identification within third-party archives. Copyright [yyyy] [name of copyright owner] Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. # binary windows release NOTE: these libraries are redistributed ONLY with the binary cross-compiled Windows platform version of Nokogiri, both x86-mingw32 and x64-mingw32. ## zlib zlib license http://www.zlib.net/zlib_license.html Copyright (C) 1995-2017 Jean-loup Gailly and Mark Adler This software is provided 'as-is', without any express or implied warranty. In no event will the authors be held liable for any damages arising from the use of this software. Permission is granted to anyone to use this software for any purpose, including commercial applications, and to alter it and redistribute it freely, subject to the following restrictions: 1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required. 2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. 3. This notice may not be removed or altered from any source distribution. Jean-loup Gailly Mark Adler jloup@gzip.org madler@alumni.caltech.edu ## libiconv LGPL https://www.gnu.org/software/libiconv/ GNU LIBRARY GENERAL PUBLIC LICENSE Version 2, June 1991 Copyright (C) 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. [This is the first released version of the library GPL. It is numbered 2 because it goes with version 2 of the ordinary GPL.] Preamble The licenses for most software are designed to take away your freedom to share and change it. By contrast, the GNU General Public Licenses are intended to guarantee your freedom to share and change free software--to make sure the software is free for all its users. This license, the Library General Public License, applies to some specially designated Free Software Foundation software, and to any other libraries whose authors decide to use it. You can use it for your libraries, 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 library, or if you modify it. For example, if you distribute copies of the library, whether gratis or for a fee, you must give the recipients all the rights that we gave you. You must make sure that they, too, receive or can get the source code. If you link a program with the library, you must provide complete object files to the recipients so that they can relink them with the library, after making changes to the library and recompiling it. And you must show them these terms so they know their rights. Our method of protecting your rights has two steps: (1) copyright the library, and (2) offer you this license which gives you legal permission to copy, distribute and/or modify the library. Also, for each distributor's protection, we want to make certain that everyone understands that there is no warranty for this free library. If the library is modified by someone else and passed on, we want its recipients to know that what they have is not the original version, 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 companies distributing free software will individually obtain patent licenses, thus in effect transforming the program into proprietary software. To prevent this, we have made it clear that any patent must be licensed for everyone's free use or not licensed at all. Most GNU software, including some libraries, is covered by the ordinary GNU General Public License, which was designed for utility programs. This license, the GNU Library General Public License, applies to certain designated libraries. This license is quite different from the ordinary one; be sure to read it in full, and don't assume that anything in it is the same as in the ordinary license. The reason we have a separate public license for some libraries is that they blur the distinction we usually make between modifying or adding to a program and simply using it. Linking a program with a library, without changing the library, is in some sense simply using the library, and is analogous to running a utility program or application program. However, in a textual and legal sense, the linked executable is a combined work, a derivative of the original library, and the ordinary General Public License treats it as such. Because of this blurred distinction, using the ordinary General Public License for libraries did not effectively promote software sharing, because most developers did not use the libraries. We concluded that weaker conditions might promote sharing better. However, unrestricted linking of non-free programs would deprive the users of those programs of all benefit from the free status of the libraries themselves. This Library General Public License is intended to permit developers of non-free programs to use free libraries, while preserving your freedom as a user of such programs to change the free libraries that are incorporated in them. (We have not seen how to achieve this as regards changes in header files, but we have achieved it as regards changes in the actual functions of the Library.) The hope is that this will lead to faster development of free libraries. The precise terms and conditions for copying, distribution and modification follow. Pay close attention to the difference between a "work based on the library" and a "work that uses the library". The former contains code derived from the library, while the latter only works together with the library. Note that it is possible for a library to be covered by the ordinary General Public License rather than by this special one. GNU LIBRARY GENERAL PUBLIC LICENSE TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION 0. This License Agreement applies to any software library which contains a notice placed by the copyright holder or other authorized party saying it may be distributed under the terms of this Library General Public License (also called "this License"). Each licensee is addressed as "you". A "library" means a collection of software functions and/or data prepared so as to be conveniently linked with application programs (which use some of those functions and data) to form executables. The "Library", below, refers to any such software library or work which has been distributed under these terms. A "work based on the Library" means either the Library or any derivative work under copyright law: that is to say, a work containing the Library or a portion of it, either verbatim or with modifications and/or translated straightforwardly into another language. (Hereinafter, translation is included without limitation in the term "modification".) "Source code" for a work means the preferred form of the work for making modifications to it. For a library, 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 library. Activities other than copying, distribution and modification are not covered by this License; they are outside its scope. The act of running a program using the Library is not restricted, and output from such a program is covered only if its contents constitute a work based on the Library (independent of the use of the Library in a tool for writing it). Whether that is true depends on what the Library does and what the program that uses the Library does. 1. You may copy and distribute verbatim copies of the Library's complete 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 distribute a copy of this License along with the Library. 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 Library or any portion of it, thus forming a work based on the Library, 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) The modified work must itself be a software library. b) You must cause the files modified to carry prominent notices stating that you changed the files and the date of any change. c) You must cause the whole of the work to be licensed at no charge to all third parties under the terms of this License. d) If a facility in the modified Library refers to a function or a table of data to be supplied by an application program that uses the facility, other than as an argument passed when the facility is invoked, then you must make a good faith effort to ensure that, in the event an application does not supply such function or table, the facility still operates, and performs whatever part of its purpose remains meaningful. (For example, a function in a library to compute square roots has a purpose that is entirely well-defined independent of the application. Therefore, Subsection 2d requires that any application-supplied function or table used by this function must be optional: if the application does not supply it, the square root function must still compute square roots.) These requirements apply to the modified work as a whole. If identifiable sections of that work are not derived from the Library, 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 Library, 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 Library. In addition, mere aggregation of another work not based on the Library with the Library (or with a work based on the Library) on a volume of a storage or distribution medium does not bring the other work under the scope of this License. 3. You may opt to apply the terms of the ordinary GNU General Public License instead of this License to a given copy of the Library. To do this, you must alter all the notices that refer to this License, so that they refer to the ordinary GNU General Public License, version 2, instead of to this License. (If a newer version than version 2 of the ordinary GNU General Public License has appeared, then you can specify that version instead if you wish.) Do not make any other change in these notices. Once this change is made in a given copy, it is irreversible for that copy, so the ordinary GNU General Public License applies to all subsequent copies and derivative works made from that copy. This option is useful when you wish to copy part of the code of the Library into a program that is not a library. 4. You may copy and distribute the Library (or a portion or derivative of it, under Section 2) in object code or executable form under the terms of Sections 1 and 2 above provided that you 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. If distribution of 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 satisfies the requirement to distribute the source code, even though third parties are not compelled to copy the source along with the object code. 5. A program that contains no derivative of any portion of the Library, but is designed to work with the Library by being compiled or linked with it, is called a "work that uses the Library". Such a work, in isolation, is not a derivative work of the Library, and therefore falls outside the scope of this License. However, linking a "work that uses the Library" with the Library creates an executable that is a derivative of the Library (because it contains portions of the Library), rather than a "work that uses the library". The executable is therefore covered by this License. Section 6 states terms for distribution of such executables. When a "work that uses the Library" uses material from a header file that is part of the Library, the object code for the work may be a derivative work of the Library even though the source code is not. Whether this is true is especially significant if the work can be linked without the Library, or if the work is itself a library. The threshold for this to be true is not precisely defined by law. If such an object file uses only numerical parameters, data structure layouts and accessors, and small macros and small inline functions (ten lines or less in length), then the use of the object file is unrestricted, regardless of whether it is legally a derivative work. (Executables containing this object code plus portions of the Library will still fall under Section 6.) Otherwise, if the work is a derivative of the Library, you may distribute the object code for the work under the terms of Section 6. Any executables containing that work also fall under Section 6, whether or not they are linked directly with the Library itself. 6. As an exception to the Sections above, you may also compile or link a "work that uses the Library" with the Library to produce a work containing portions of the Library, and distribute that work under terms of your choice, provided that the terms permit modification of the work for the customer's own use and reverse engineering for debugging such modifications. You must give prominent notice with each copy of the work that the Library is used in it and that the Library and its use are covered by this License. You must supply a copy of this License. If the work during execution displays copyright notices, you must include the copyright notice for the Library among them, as well as a reference directing the user to the copy of this License. Also, you must do one of these things: a) Accompany the work with the complete corresponding machine-readable source code for the Library including whatever changes were used in the work (which must be distributed under Sections 1 and 2 above); and, if the work is an executable linked with the Library, with the complete machine-readable "work that uses the Library", as object code and/or source code, so that the user can modify the Library and then relink to produce a modified executable containing the modified Library. (It is understood that the user who changes the contents of definitions files in the Library will not necessarily be able to recompile the application to use the modified definitions.) b) Accompany the work with a written offer, valid for at least three years, to give the same user the materials specified in Subsection 6a, above, for a charge no more than the cost of performing this distribution. c) If distribution of the work is made by offering access to copy from a designated place, offer equivalent access to copy the above specified materials from the same place. d) Verify that the user has already received a copy of these materials or that you have already sent this user a copy. For an executable, the required form of the "work that uses the Library" must include any data and utility programs needed for reproducing the executable from it. 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. It may happen that this requirement contradicts the license restrictions of other proprietary libraries that do not normally accompany the operating system. Such a contradiction means you cannot use both them and the Library together in an executable that you distribute. 7. You may place library facilities that are a work based on the Library side-by-side in a single library together with other library facilities not covered by this License, and distribute such a combined library, provided that the separate distribution of the work based on the Library and of the other library facilities is otherwise permitted, and provided that you do these two things: a) Accompany the combined library with a copy of the same work based on the Library, uncombined with any other library facilities. This must be distributed under the terms of the Sections above. b) Give prominent notice with the combined library of the fact that part of it is a work based on the Library, and explaining where to find the accompanying uncombined form of the same work. 8. You may not copy, modify, sublicense, link with, or distribute the Library except as expressly provided under this License. Any attempt otherwise to copy, modify, sublicense, link with, or distribute the Library 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. 9. 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 Library or its derivative works. These actions are prohibited by law if you do not accept this License. Therefore, by modifying or distributing the Library (or any work based on the Library), you indicate your acceptance of this License to do so, and all its terms and conditions for copying, distributing or modifying the Library or works based on it. 10. Each time you redistribute the Library (or any work based on the Library), the recipient automatically receives a license from the original licensor to copy, distribute, link with or modify the Library 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. 11. 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 Library at all. For example, if a patent license would not permit royalty-free redistribution of the Library 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 Library. 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. 12. If the distribution and/or use of the Library is restricted in certain countries either by patents or by copyrighted interfaces, the original copyright holder who places the Library 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. 13. The Free Software Foundation may publish revised and/or new versions of the Library 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 Library 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 Library does not specify a license version number, you may choose any version ever published by the Free Software Foundation. 14. If you wish to incorporate parts of the Library into other free programs whose distribution conditions are incompatible with these, 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 15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE LIBRARY "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 LIBRARY IS WITH YOU. SHOULD THE LIBRARY PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. 16. 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 LIBRARY 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 LIBRARY (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 LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. END OF TERMS AND CONDITIONS Appendix: How to Apply These Terms to Your New Libraries If you develop a new library, and you want it to be of the greatest possible use to the public, we recommend making it free software that everyone can redistribute and change. You can do so by permitting redistribution under these terms (or, alternatively, under the terms of the ordinary General Public License). To apply these terms, attach the following notices to the library. 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 library is free software; you can redistribute it and/or modify it under the terms of the GNU Library General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This library 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 Library General Public License for more details. You should have received a copy of the GNU Library General Public License along with this library; 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. You should also get your employer (if you work as a programmer) or your school, if any, to sign a "copyright disclaimer" for the library, if necessary. Here is a sample; alter the names: Yoyodyne, Inc., hereby disclaims all copyright interest in the library `Frob' (a library for tweaking knobs) written by James Random Hacker. , 1 April 1990 Ty Coon, President of Vice That's all there is to it! nokogiri-1.8.2/Y_U_NO_GEMSPEC.md0000644000004100000410000001334313235345655016167 0ustar www-datawww-data(note: this was originally a blog post published at http://blog.flavorjon.es/2012/03/y-u-no-gemspec.html) ## tl;dr 1. Team Nokogiri are not 10-foot-tall code-crunching robots, so `master` is usually unstable. 2. Unstable code can corrupt your data and crash your application, which would make everybody look bad. 3. Therefore, the _risk_ associated with using unstable code is severe; for you _and_ for Team Nokogiri. 4. The absence of a gemspec is a risk mitigation tactic. 5. You can always ask for an RC release. ## Why Isn't There a Gemspec!? OHAI! Thank you for asking this question! Team Nokogiri gets asked this pretty frequently. Just a sample from the historical record: * [Issue #274](https://github.com/sparklemotion/nokogiri/issues/274) * [Issue #371](https://github.com/sparklemotion/nokogiri/issues/371) * [A commit removing nokogiri.gemspec](https://github.com/sparklemotion/nokogiri/commit/7f17a643a05ca381d65131515b54d4a3a61ca2e1#commitcomment-667477) * [A nokogiri-talk thread](http://groups.google.com/group/nokogiri-talk/browse_thread/thread/4706b002e492d23f) * [Another nokogiri-talk thread](http://groups.google.com/group/nokogiri-talk/browse_thread/thread/0b201bb80ea3eea0) Sometimes people imply that we've forgotten, or that we don't know how to properly manage our codebase. Those people are super fun to respond to! We've gone back and forth a couple of times over the past few years, but the current policy of Team Nokogiri is to **not** provide a gemspec in the Github repo. This is a conscious choice, not an oversight. ## But You Didn't Answer the Question! Ah, I was hoping you wouldn't notice. Well, OK, let's do this, if you're serious about it. I'd like to start by talking about _risk_. Specifically, the risk associated with using a known-unstable version of Nokogiri. ### Risk One common way to evaluate the _risk_ of an incident is: risk = probability x impact You can read more about this on [the internets](http://en.wikipedia.org/wiki/Risk_Matrix). The _risk_ associated with a Nokogiri bug could be loosely defined by answering the questions: * "How likely is it that a bug exists?" (probability) * "How severe will the consequences of a bug be?" (impact) ### Probability The `master` branch should be considered unstable. Team Nokogiri are not 10-foot-tall code-crunching robots; we are humans. We make mistakes, and as a result, any arbitrary commit on `master` is likely to contain bugs. Just as an example, Nokogiri `master` was unstable for about five months between November 2011 and March 2012. It was unstable not because we were sloppy, or didn't care, but because the fixes were hard and unobvious. When we release Nokogiri, we test for memory leaks and invalid memory access on all kinds of platforms with many flavors of Ruby and lots of versions of libxml2. Because these tests are time-consuming, we don't run them on every commit. We run them often when preparing a release. If we're releasing Nokogiri, it means we think it's rock solid. And if we're not releasing it, it means there are probably bugs. ### Impact Nokogiri is a gem with native extensions. This means it's not pure Ruby -- there's C or Java code being compiled and run, which means that there's always a chance that the gem will crash your application, or worse. Possible outcomes include: * leaking memory * corrupting data * making benign code crash (due to memory corruption) So, then, a bug in a native extension can have much worse downside than you might think. It's not just going to do something unexpected; it's possibly going to do terrible, awful things to your application and data. **Nobody** wants that to happen. Especially Team Nokogiri. ### Risk, Redux So, if you accept the equation risk = probability x impact and you believe me when I say that: * the probablility of a bug in unreleased code is high, and * the impact of a bug is likely to be severe, then you should easily see that the _risk_ associated with a bug in Nokogiri is quite high. Part of Team Nokogiri's job is to try to mitigate this risk. We have a number of tactics that we use to accomplish this: * we respond quickly to bug reports, particularly when they are possible memory issues * we review each others' commits * we have a thorough test suite, and we test-drive new features * we discuss code design and issues on a core developer mailing list * we use valgrind to test for memory issues (leaks and invalid access) on multiple combinations of OS, libxml2 and Ruby * we package release candidates, and encourage devs to use them * **we do NOT commit a gemspec in our git repository** Yes, that's right, the absence of a gemspec is a risk mitigation tactic. Not only does Team Nokogiri not want to imply support for `master`, we want to **actively discourage** people from using it. Because it's not stable. ## But I Want to Do It Anyway Another option, is to email the [nokogiri-talk list](http://groups.google.com/group/nokogiri-talk) and ask for a release candidate to be built. We're pretty accommodating if there's a bugfix that's a blocker for you. And if we can't release an RC, we'll tell you why. And in the end, nothing is stopping you from cloning the repo and generating a private gemspec. This is an extra step or two, but it has the benefit of making sure developers have thought through the costs and risks involved; and it tends to select for developers who know what they're doing. ## In Conclusion Team Nokogiri takes stability very seriously. We want everybody who uses Nokogiri to have a pleasant experience. And so we want to make sure that you're using the best software we can make. Please keep in mind that we're trying very hard to do the right thing for all Nokogiri users out there in Rubyland. Nokogiri loves you very much, and we hope you love it back.