issue_owner_repo listlengths 2 2 | issue_body stringlengths 0 262k ⌀ | issue_title stringlengths 1 1.02k | issue_comments_url stringlengths 53 116 | issue_comments_count int64 0 2.49k | issue_created_at stringdate 1999-03-17 02:06:42 2025-06-23 11:41:49 | issue_updated_at stringdate 2000-02-10 06:43:57 2025-06-23 11:43:00 | issue_html_url stringlengths 34 97 | issue_github_id int64 132 3.17B | issue_number int64 1 215k |
|---|---|---|---|---|---|---|---|---|---|
[
"sparklemotion",
"nokogiri"
] | It took me quite a while to find a good source of info on how to install a new version of libxml, until I eventually came across your own documentation here: http://nokogiri.org/tutorials/installing_nokogiri.html
Perhaps it could be worth linking to in the error message?
--Jack
| More informative "You are using a 4 year old version of libxml" error | https://api.github.com/repos/sparklemotion/nokogiri/issues/433/comments | 2 | 2011-03-11T10:21:33Z | 2011-03-14T12:50:44Z | https://github.com/sparklemotion/nokogiri/issues/433 | 664,938 | 433 |
[
"sparklemotion",
"nokogiri"
] | I have a DTD called markup.dtd that contains
```
<!ENTITY % PPBookDTD SYSTEM "../../../PerBook/util/xml/ppbook.dtd">
%PPBookDTD;
```
Then I process a document with a DOCTYPE system that references this, and when I enable DTD valid, the Java version of Nokogiri complains:
```
/Users/dave/BS2/titles/_M2/Book/file:/Us... | [JRUBY] The resolver seems to be leaving the basename of the source on relative paths | https://api.github.com/repos/sparklemotion/nokogiri/issues/432/comments | 6 | 2011-03-09T05:37:49Z | 2011-03-24T17:29:36Z | https://github.com/sparklemotion/nokogiri/issues/432 | 658,243 | 432 |
[
"sparklemotion",
"nokogiri"
] | Since version 2.7.3 libxml has a maximum size of a single textnode by 10 MB.
There is a Parser-Flag, which will disable the limit. It will be good, if nokogiri
would support this option. libxml-ruby supports it. I have made a fork with this support:
https://github.com/jenshimmelreich/nokogiri/commit/cbbf6da9b1f4c744c9... | Support for libxml XML_PARSE_HUGE | https://api.github.com/repos/sparklemotion/nokogiri/issues/430/comments | 2 | 2011-03-04T16:13:57Z | 2011-03-04T16:33:53Z | https://github.com/sparklemotion/nokogiri/issues/430 | 647,095 | 430 |
[
"sparklemotion",
"nokogiri"
] | I'm not sure whether this is a valid bug, but I was trying to validate some XML against my schema using Nokogiri::Schema's validate method. Even when I deleted required elements, the errors array came back empty.
Eventually I realized that I had passed XML after rendering it with Activeview, so it was a string. But in... | No error when checking rendered xml against schema | https://api.github.com/repos/sparklemotion/nokogiri/issues/429/comments | 3 | 2011-03-01T16:05:58Z | 2011-05-19T13:43:40Z | https://github.com/sparklemotion/nokogiri/issues/429 | 637,804 | 429 |
[
"sparklemotion",
"nokogiri"
] | This code generates 100% CPU usage:
```
Nokogiri::HTML("<div>hello").css(nil)
```
Reported on mailing list.
| Node#css(nil) spins | https://api.github.com/repos/sparklemotion/nokogiri/issues/428/comments | 0 | 2011-02-24T15:55:58Z | 2011-05-11T17:07:49Z | https://github.com/sparklemotion/nokogiri/issues/428 | 624,267 | 428 |
[
"sparklemotion",
"nokogiri"
] | The following code prints '<a>foo</a>' when I expect it to print '<a>bar</a>'.
```
n = Nokogiri::XML('<a>foo</a>').root
n2 = n.dup
n2.at_xpath('//a').content = 'bar'
puts n2.to_xml
```
It's something related to the combination of root/dup/xpath because the following variants all work.
Dup the... | Content updates have no affect when combining root/dup/xpath | https://api.github.com/repos/sparklemotion/nokogiri/issues/426/comments | 1 | 2011-02-22T18:41:48Z | 2011-02-22T21:28:03Z | https://github.com/sparklemotion/nokogiri/issues/426 | 618,500 | 426 |
[
"sparklemotion",
"nokogiri"
] | Start with
```
doc = Nokogiri::XML(%{
<my:document xmlns:my="foo:bar">
<my:first-child>Some Text!</my:first-child>
</my:document>
})
```
Then
```
doc.root.add_child(%{<second-child/>})
```
or
```
doc.root.add_child(%{<third-child xmlns=""/>})
```
or even
```
new_child = Nokogiri::XML(%{<fourth-child/>}).root
d... | Adding namespace-less node to namespaced parent attaches the parent namespace to the child | https://api.github.com/repos/sparklemotion/nokogiri/issues/425/comments | 12 | 2011-02-19T05:41:41Z | 2021-08-29T15:47:53Z | https://github.com/sparklemotion/nokogiri/issues/425 | 611,008 | 425 |
[
"sparklemotion",
"nokogiri"
] | reported on mailing list.
| Node#content= escaping is inconsistent on JRuby | https://api.github.com/repos/sparklemotion/nokogiri/issues/423/comments | 4 | 2011-02-16T00:15:43Z | 2011-03-10T18:39:45Z | https://github.com/sparklemotion/nokogiri/issues/423 | 602,145 | 423 |
[
"sparklemotion",
"nokogiri"
] | Backport 5a4b95519c0143bb23dd to 1.4
| backport 5a4b95519c0143bb23dd to 1.4 | https://api.github.com/repos/sparklemotion/nokogiri/issues/422/comments | 1 | 2011-02-15T19:22:26Z | 2013-11-20T07:36:56Z | https://github.com/sparklemotion/nokogiri/issues/422 | 601,391 | 422 |
[
"sparklemotion",
"nokogiri"
] | I'm using 1.5.0.beta.4 but this also occurs in 1.4.4.
ruby-1.9.2-p136 :003 > p.doc.to_html
/usr/local/rvm/gems/ruby-1.9.2-p136/gems/nokogiri-1.5.0.beta.4/lib/nokogiri/xml/node.rb:810: [BUG] Segmentation fault
ruby 1.9.2p136 (2010-12-25 revision 30365) [x86_64-darwin10.5.0]
-- control frame ----------
c:0033 p:---- s... | Crash when calling doc#to_html | https://api.github.com/repos/sparklemotion/nokogiri/issues/420/comments | 1 | 2011-02-15T01:12:51Z | 2012-02-20T22:47:32Z | https://github.com/sparklemotion/nokogiri/issues/420 | 599,277 | 420 |
[
"sparklemotion",
"nokogiri"
] | **Ruby:** ree-1.8.7-2011.01 [ x86_64 ]
**Nokogiri:** nokogiri (1.4.4)
**Issue case:**
```
ree-1.8.7-2011.01 :001 > require 'rubygems'
=> true
ree-1.8.7-2011.01 :002 > require 'nokogiri'
=> true
ree-1.8.7-2011.01 :003 > require 'open-uri'
=> true
ree-1.8.7-2011.01 :004 > doc = Nokogiri::HTML(open('http://alfaba... | REE: Attempt to free invalid pointer | https://api.github.com/repos/sparklemotion/nokogiri/issues/419/comments | 6 | 2011-02-14T13:11:03Z | 2011-02-15T15:50:15Z | https://github.com/sparklemotion/nokogiri/issues/419 | 597,555 | 419 |
[
"sparklemotion",
"nokogiri"
] | Hi, i'm trying to install the Nokogiri gem on bluehost hosting, they have the libxslt like this:
/usr/lib64/libxslt.so
Looking at the install directory for this gem, it's not clear to me why it's not being found and used correctly. The same error occurs whether I do the installation from the command line or using the... | Problem installing gem | https://api.github.com/repos/sparklemotion/nokogiri/issues/418/comments | 2 | 2011-02-11T19:19:37Z | 2014-05-04T09:50:16Z | https://github.com/sparklemotion/nokogiri/issues/418 | 592,607 | 418 |
[
"sparklemotion",
"nokogiri"
] | Reported in jruby-users list, http://www.ruby-forum.com/topic/965450#980782
The bug fix on schemaLocation handling seems to break another case. This is a regression.
| [regression] pure Java Nokogiri of 1.5.0.beta.4 breaks validation with schemaLocation | https://api.github.com/repos/sparklemotion/nokogiri/issues/417/comments | 2 | 2011-02-10T19:41:18Z | 2011-03-30T22:27:42Z | https://github.com/sparklemotion/nokogiri/issues/417 | 590,091 | 417 |
[
"sparklemotion",
"nokogiri"
] | Nokogiri 1.4.4 removes non-breaking spaces from HTML when the encoding is UTF-8. It works fine when the encoding is ascii. Here's my script:
```
# Encoding: utf-8
require 'nokogiri'
x = <<-EOHTML
<html><body><p> </p></body></html>'
EOHTML
puts "Encoding: #{x.encoding.name}"
doc = Nokogiri::HTML.parse(x)
... | nokogiri removes nbsp | https://api.github.com/repos/sparklemotion/nokogiri/issues/416/comments | 3 | 2011-02-08T00:08:24Z | 2011-02-08T00:43:15Z | https://github.com/sparklemotion/nokogiri/issues/416 | 582,049 | 416 |
[
"sparklemotion",
"nokogiri"
] | The code at https://gist.github.com/815162 reads an XML document and then writes it back out. It produces different results with libxml Nokogiri and the pure-Java version. The first and last <codeline> tags are split onto multiple lines by the Java version, but left intact by the libxml version.
_libxml nokogiri_
```... | Document.to_xml is reformatting tags inconsistently | https://api.github.com/repos/sparklemotion/nokogiri/issues/415/comments | 10 | 2011-02-07T20:49:41Z | 2014-04-21T15:11:54Z | https://github.com/sparklemotion/nokogiri/issues/415 | 581,562 | 415 |
[
"sparklemotion",
"nokogiri"
] | I know I am doing something wrong in this method.
def build_html
document = Nokogiri::XML::Builder.new do |doc|
doc.root {
yield doc
}
end.doc
document.root.children.map(&:to_xhtml).join
end
I am trying to output a HTML with some records dynamically getting added.
The above method i... | Xml Cannot be the whole program - HTML Output | https://api.github.com/repos/sparklemotion/nokogiri/issues/412/comments | 1 | 2011-02-02T06:46:57Z | 2011-02-02T12:26:14Z | https://github.com/sparklemotion/nokogiri/issues/412 | 569,178 | 412 |
[
"sparklemotion",
"nokogiri"
] | Hi, I am using RVM/1.9.2
One thing, I found it odd that the dev instructions say that racc and rexical are requirements and then go on to tell you to `gem install hoe rake-compiler`. I don't understand the distinction between racc/rexical and hoe/rake-compiler, here. I would have just said `gem install racc rexical ... | rake wants to `sudo gem install minitest` | https://api.github.com/repos/sparklemotion/nokogiri/issues/411/comments | 5 | 2011-02-02T04:21:45Z | 2011-02-02T19:32:35Z | https://github.com/sparklemotion/nokogiri/issues/411 | 568,969 | 411 |
[
"sparklemotion",
"nokogiri"
] | ```
smagic:Desktop phrogz$ cat test_builder.rb
require 'rubygems'
require 'nokogiri'
builder = Nokogiri::XML::Builder.new do |xml|
xml.root do
xml.GUID "foo"
xml.IDInInfoSource "bar"
end
end
puts "Ruby #{RUBY_VERSION} #{RUBY_PLATFORM}",
"Nokogiri #{Nokogiri::VERSION}",
build... | Sibling nodes from jruby/java-only builder not separated by newline | https://api.github.com/repos/sparklemotion/nokogiri/issues/410/comments | 2 | 2011-02-01T04:31:34Z | 2011-03-30T02:27:20Z | https://github.com/sparklemotion/nokogiri/issues/410 | 566,192 | 410 |
[
"sparklemotion",
"nokogiri"
] | ```
require 'nokogiri'
elems = "<a1 /><a2>foo</a2><a3 /><a4>bar</a4>baz"
rooted = "<r>#{elems}</r>"
doc = Nokogiri::XML rooted
doc.at_xpath('/r/a1').swap( 'x1' ) # Element->text
doc.at_xpath('/r/a2/text()').swap( 'jim' ) # Text->text
doc.at_xpath('/r/a3').swap( '<x3 />' ) # Elem... | Text#swap at root of DocumentFragment fails | https://api.github.com/repos/sparklemotion/nokogiri/issues/407/comments | 5 | 2011-01-31T02:29:00Z | 2014-02-11T00:22:40Z | https://github.com/sparklemotion/nokogiri/issues/407 | 563,288 | 407 |
[
"sparklemotion",
"nokogiri"
] | Nokogiri on Macruby (0.8) is sporadically crashing with `"incorrect checksum for freed object - object was probably modified after being freed."`
It doesn't crash every time I run the test, but if I run it 10 times, I get one or more failures.
**Self-contained script to reproduce:** https://gist.github.com/797346.
*... | Macruby "incorrect checksum for freed object" (w/simple test case) | https://api.github.com/repos/sparklemotion/nokogiri/issues/406/comments | 4 | 2011-01-30T20:19:17Z | 2011-02-03T23:23:06Z | https://github.com/sparklemotion/nokogiri/issues/406 | 562,825 | 406 |
[
"sparklemotion",
"nokogiri"
] | I have a Rake task that processes large (~200 MiB) XML documents using Nokogiri 1.4.4. It performs its duties successfully but crashes on exit, emitting the following Ruby bug trace:
```
/home/cadror/env/nvx/production/tools_64/bin/rake: [BUG] Segmentation fault
ruby 1.9.2p136 (2010-12-25 revision 30365) [x86_64-linu... | nokogiri-1.4.4 crashes ruby 1.9.2p136 on exit | https://api.github.com/repos/sparklemotion/nokogiri/issues/405/comments | 13 | 2011-01-29T22:24:23Z | 2021-02-16T17:05:03Z | https://github.com/sparklemotion/nokogiri/issues/405 | 561,711 | 405 |
[
"sparklemotion",
"nokogiri"
] | Hi,
I got segfault on nokogiri when i use it with ruby-readability:
require 'rubygems'
require 'readability'
require 'open-uri'
source = open('http://lab.arc90.com/experiments/readability/').read
puts Readability::Document.new(source).content
/Users/jd/.rvm/gems/ruby-1.9.2-p136@xxx-xxx/gems/nokogiri-1.4.4/lib/nokog... | Segfault with readability | https://api.github.com/repos/sparklemotion/nokogiri/issues/404/comments | 11 | 2011-01-28T15:25:26Z | 2013-11-22T21:35:51Z | https://github.com/sparklemotion/nokogiri/issues/404 | 559,143 | 404 |
[
"sparklemotion",
"nokogiri"
] | When trying to warble a rails 3 app with nokogiri master and nokogiri a7da3bb installed this happens on both ubuntu and windows:
https://gist.github.com/797663
| warble with nokogiri no such file to load -- nokogiri/nokogiri | https://api.github.com/repos/sparklemotion/nokogiri/issues/403/comments | 6 | 2011-01-26T23:02:32Z | 2013-02-12T13:03:23Z | https://github.com/sparklemotion/nokogiri/issues/403 | 553,768 | 403 |
[
"sparklemotion",
"nokogiri"
] | When gem installing nokogiri 1.4.4.2 for JRuby, the install procedure doesn't seem to check for the existence of the system libraries it needs to run, libxml2-dev and libxslt1-dev packages. (I'm running Ubuntu 10.10.)
When gem installing on C Ruby, you do get an error message.
To test on Ubuntu, you can uninstall th... | Gem Install Doesn't Fail on Absence of libxml2-dev or libxslt1-dev | https://api.github.com/repos/sparklemotion/nokogiri/issues/402/comments | 1 | 2011-01-26T18:18:56Z | 2011-01-26T19:34:11Z | https://github.com/sparklemotion/nokogiri/issues/402 | 552,764 | 402 |
[
"sparklemotion",
"nokogiri"
] | Given I have a very simple SJIS encoded file:
```
$ file --mime source.xml
source.xml: application/xml; charset=unknown-8bit
```
In the following example I am simply reading this file and writing a new one.
```
require "rubygems"
require "nokogiri"
doc = Nokogiri::XML(open("source.xml"),nil,'sjis')
File.open('des... | Pure Java Nokogiri does not honour source file encoding. | https://api.github.com/repos/sparklemotion/nokogiri/issues/401/comments | 7 | 2011-01-25T07:25:11Z | 2011-01-26T05:46:04Z | https://github.com/sparklemotion/nokogiri/issues/401 | 549,018 | 401 |
[
"sparklemotion",
"nokogiri"
] | Steps to reproduce: https://gist.github.com/1f7821d8748aa774df26
Latest libxml + nokogiri versions. Downgrading to old versions (ex: 1.0.7) of nokogiri appears to remove the problem.
| nokogiri process hangs on call to inner_html | https://api.github.com/repos/sparklemotion/nokogiri/issues/400/comments | 7 | 2011-01-24T21:55:13Z | 2020-10-12T13:25:49Z | https://github.com/sparklemotion/nokogiri/issues/400 | 548,212 | 400 |
[
"sparklemotion",
"nokogiri"
] | On Windows 64-bit 1.4.4 fails to load, so tried to upgrade to 1.4.4.1.
- Specifying 1.4.4.1 in Gemfile yields "Could not find nokogiri-1.4.4.1 in any of the sources".
- Specifying 1.4.4.1 pointing to :git => https://github.com/tenderlove/nokogiri.git yields a nokogiri that installs, but cannot load (trying with rspec ... | Upgrading to 1.4.4.1 yields "Could not find nokogiri-1.4.4.1 in any of the sources" | https://api.github.com/repos/sparklemotion/nokogiri/issues/399/comments | 5 | 2011-01-20T14:36:41Z | 2013-11-17T03:50:13Z | https://github.com/sparklemotion/nokogiri/issues/399 | 539,209 | 399 |
[
"sparklemotion",
"nokogiri"
] | I can reproduce a segfault on both REE (1.8.7) and YARV (1.9.2p0 & 1.9.2p136). The sequence seems to be:
- Parse XML into doc
- Remove namespaces from the doc
- Issue any XPath query against the doc
- Call `to_s` on the doc and watch it segfault
As example, given the following XML doc:
<pre>
<?xml version="1.0" e... | Reproducible segfault on to_s | https://api.github.com/repos/sparklemotion/nokogiri/issues/398/comments | 10 | 2011-01-19T04:28:18Z | 2011-01-21T21:04:49Z | https://github.com/sparklemotion/nokogiri/issues/398 | 535,962 | 398 |
[
"sparklemotion",
"nokogiri"
] | Hello,
I use homebrew and noticed there are no docs to get nokogiri installed (including libxml2 and libxslt). I only saw how to install everything using macports. I followed this and was able to get it working/running. I would suggest adding this to the docs so it may help others:
https://gist.github.com/443160
... | update to nokogiri docs/wiki/website | https://api.github.com/repos/sparklemotion/nokogiri/issues/397/comments | 1 | 2011-01-18T16:54:40Z | 2011-01-18T17:15:21Z | https://github.com/sparklemotion/nokogiri/issues/397 | 534,488 | 397 |
[
"sparklemotion",
"nokogiri"
] | example code:
```
#! /usr/bin/env ruby
require "rubygems"
require "nokogiri"
xml = <<-EOXML
<s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/">
<s:Body xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<Supplement xsi:type="PerRoomS... | remove_namespaces! corrupts attributes | https://api.github.com/repos/sparklemotion/nokogiri/issues/396/comments | 2 | 2011-01-13T16:07:17Z | 2011-01-13T21:00:41Z | https://github.com/sparklemotion/nokogiri/issues/396 | 524,854 | 396 |
[
"sparklemotion",
"nokogiri"
] | I reported the following bug on the jruby bug-tracker and it was suggested that this could be a Nokogiri issue rather than a jruby one.
Details (and crash log) : http://jira.codehaus.org/browse/JRUBY-5325
Note: I cannot access the google group suggested (Company restrictions) so posting here.
| Fatal error on jruby on windows. | https://api.github.com/repos/sparklemotion/nokogiri/issues/395/comments | 13 | 2011-01-12T00:18:34Z | 2011-09-01T06:27:56Z | https://github.com/sparklemotion/nokogiri/issues/395 | 520,893 | 395 |
[
"sparklemotion",
"nokogiri"
] | see https://gist.github.com/770885 submitted by Wolfram Arnold via nokogiri-talk for reproduction
| CSS :nth-of-type selector is implemented incorrectly | https://api.github.com/repos/sparklemotion/nokogiri/issues/394/comments | 4 | 2011-01-09T19:01:10Z | 2019-01-05T04:12:22Z | https://github.com/sparklemotion/nokogiri/issues/394 | 515,936 | 394 |
[
"sparklemotion",
"nokogiri"
] | Because warbler evidently defines the constant JRuby::Rack::VERSION the requiring of jar files is skipped and this results in a NoClassDefFoundError while trying to build the war file.
| Trying to build a war with warbler fails with pure java nokogiri | https://api.github.com/repos/sparklemotion/nokogiri/issues/393/comments | 1 | 2011-01-07T22:48:37Z | 2011-01-25T03:20:21Z | https://github.com/sparklemotion/nokogiri/issues/393 | 513,468 | 393 |
[
"sparklemotion",
"nokogiri"
] | I have a situation where I'm using nokogiri to do the following:
1. Extract some nodes from a generated xml file
2. Put extracted nodes into a simple template file
3. Save the template file out as a new file
# My Ruby code
```
require 'nokogiri'
input = "input.wxs"
template = "template.wxs"
output = "output.wxs"
inp... | Nokogiri adds 'default' Namespace to elements | https://api.github.com/repos/sparklemotion/nokogiri/issues/391/comments | 13 | 2010-12-29T20:44:20Z | 2020-10-16T16:26:45Z | https://github.com/sparklemotion/nokogiri/issues/391 | 497,681 | 391 |
[
"sparklemotion",
"nokogiri"
] | This is the test case that is failing for me:
https://github.com/djanowski/nokogiri/blob/inner_html_encoding/test/test_encoding.rb
Ruby 1.9.2.
| inner_html= breaking encoding? | https://api.github.com/repos/sparklemotion/nokogiri/issues/390/comments | 10 | 2010-12-29T13:45:14Z | 2010-12-29T18:39:52Z | https://github.com/sparklemotion/nokogiri/issues/390 | 496,762 | 390 |
[
"sparklemotion",
"nokogiri"
] | I'm trying to validate a document with a custom schema that imports other schemas using a relative path on the schemaLocation. I can get this to work with MRI 1.9.2 by instantiating the Nokogiri::XML::Schema object inside a Dir.chdir block. However, this doesn't work when using JRuby. I've setup a little project that d... | schema validation fails when importing with relative schemaLocation on jruby | https://api.github.com/repos/sparklemotion/nokogiri/issues/389/comments | 3 | 2010-12-22T21:56:59Z | 2013-05-01T20:54:37Z | https://github.com/sparklemotion/nokogiri/issues/389 | 489,122 | 389 |
[
"sparklemotion",
"nokogiri"
] | The following input
```
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html PUBLIC "-//WAPFORUM//DTD XHTML Mobile 1.1//EN" "http://www.openmobilealliance.org/tech/DTD/xhtml-mobile11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
<head>
<title>Hello world</title>
</head>
<body>
... | Reversing order of DTD & ProcessingInstruction | https://api.github.com/repos/sparklemotion/nokogiri/issues/388/comments | 6 | 2010-12-21T06:54:15Z | 2019-01-05T06:30:55Z | https://github.com/sparklemotion/nokogiri/issues/388 | 485,703 | 388 |
[
"sparklemotion",
"nokogiri"
] | It seems like recently, there were different gem versions created for nokogiri based on the platform: 1.4.4 for ruby, 1.4.4.1 for mingw32, 1.4.4.2 for jruby.
This causes inconsistencies and problems when you are developing on one system and deploying to another. Is is possible to get the version numbers bumped up acro... | Gem version consistency (1.4.4, 1.4.4.1, 1.4.4.2) | https://api.github.com/repos/sparklemotion/nokogiri/issues/387/comments | 7 | 2010-12-18T19:25:41Z | 2011-03-31T22:33:11Z | https://github.com/sparklemotion/nokogiri/issues/387 | 481,844 | 387 |
[
"sparklemotion",
"nokogiri"
] | this code:
```
Nokogiri::XML::Builder.new { |xml| xml['foo'].bar }
```
results in this error:
```
/home/miked/.rvm/gems/ruby-1.8.7-p302/gems/nokogiri-1.4.4/lib/nokogiri/xml/builder.rb:315:in `[]': undefined method `namespace_definitions' for #<Nokogiri::XML::Document:0x3f9e4ccf7fe0 name="document"> (NoMethodError)
`... | builder namespaces are broken | https://api.github.com/repos/sparklemotion/nokogiri/issues/384/comments | 3 | 2010-12-09T22:44:12Z | 2015-03-02T14:46:04Z | https://github.com/sparklemotion/nokogiri/issues/384 | 466,188 | 384 |
[
"sparklemotion",
"nokogiri"
] | Configuration: OSX 10.6 (libxml2 2.7.3) with jruby-1.5.6 and nokogiri-1.4.4:
This little test script:
builder = Nokogiri::XML::Builder.new do |xml|
xml.root {
xml.timeout "Second-60"
}
end
puts builder.to_xml
Results in:
undefined method `zero?' for "Second-60":String
| xml.timeout problem | https://api.github.com/repos/sparklemotion/nokogiri/issues/383/comments | 6 | 2010-12-09T17:26:26Z | 2010-12-10T14:15:57Z | https://github.com/sparklemotion/nokogiri/issues/383 | 465,534 | 383 |
[
"sparklemotion",
"nokogiri"
] | The below code breaks ruby 1.9.2 but works in 1.8.7. It also works without the thread so I'm not sure if it is a nokogiri issue or a ruby one.
```
require 'nokogiri'
def content(node)
if node.class==Nokogiri::XML::Text then element_text(node)
else node_content(node, "")
end
end
def node_content(node... | segfault in recursive parsing (1.4.4) in ruby 1.9.2 | https://api.github.com/repos/sparklemotion/nokogiri/issues/382/comments | 4 | 2010-12-07T10:08:45Z | 2010-12-09T09:24:24Z | https://github.com/sparklemotion/nokogiri/issues/382 | 460,265 | 382 |
[
"sparklemotion",
"nokogiri"
] | Hey,
as mentioned in the title, gem install fails to build nokogiri >1.4.4.
```
gem install nokogiri
Building native extensions. This could take a while...
ERROR: Error installing nokogiri:
ERROR: Failed to build gem native extension.
/Users/me/Gentoo/usr/bin/ruby18 extconf.rb
checking for libxml/parser.h... y... | nokogiri 1.4.4 fails to build due to libiconv being in a custom path | https://api.github.com/repos/sparklemotion/nokogiri/issues/381/comments | 29 | 2010-12-02T13:36:36Z | 2017-01-16T09:38:29Z | https://github.com/sparklemotion/nokogiri/issues/381 | 451,859 | 381 |
[
"sparklemotion",
"nokogiri"
] | Hi there,
I have come up against a bug when combining two XML documents using parent.add_child().
The code works perfectly fine both standalone on the command line and inside Webrick/Rails when executed under JRuby 1.5.5 or MRI 1.9.2.
However, when the same code is run under JRuby and inside Tomcat, via the Trinidad ... | JRuby: Add Child / Adopt XmlNode fails inside Tomcat/Trinidad context | https://api.github.com/repos/sparklemotion/nokogiri/issues/380/comments | 5 | 2010-12-01T18:00:12Z | 2011-01-25T10:04:18Z | https://github.com/sparklemotion/nokogiri/issues/380 | 450,106 | 380 |
[
"sparklemotion",
"nokogiri"
] | from the mailing list:
> I'm using JRuby 1.5.5, and the gem install works fine. When I try
> require 'nokogiri' I get the following error:
```
irb(main):003:0> require 'nokogiri'
LoadError: Could not open library 'C:\jruby\jruby-1.5.5\lib\ruby\gems\1.8\gems\nokogiri-1.4.4-java\ext\nokogiri\libxml2.dll' : The operatio... | 1.4.4.1 issue under JRuby on Windows | https://api.github.com/repos/sparklemotion/nokogiri/issues/379/comments | 14 | 2010-11-26T22:59:08Z | 2010-12-08T15:39:31Z | https://github.com/sparklemotion/nokogiri/issues/379 | 441,125 | 379 |
[
"sparklemotion",
"nokogiri"
] | ```
<ul><li>one</li><ul><li>two</li></ul></ul><ol><li>one</li><ol><ol><ul><li>ok<br></li></ul></ol></ol></ol>
```
becomes
<ul><li>one</li><ul><li>two</li></ul></ul><ol><li>one</li><ol><ol></ol></ol></ol><ul><li>ok<br /></li></ul>
This should not be the case since it should be possible to have ul and ol nested in ... | ul inside ol tags bug | https://api.github.com/repos/sparklemotion/nokogiri/issues/378/comments | 3 | 2010-11-26T17:21:25Z | 2010-11-26T22:52:25Z | https://github.com/sparklemotion/nokogiri/issues/378 | 440,750 | 378 |
[
"sparklemotion",
"nokogiri"
] | from the mailing list (http://groups.google.com/group/nokogiri-talk/msg/668495b28c880fba)
```
C:\>ruby -v -e "require 'nokogiri'"
ruby 1.9.2p0 (2010-08-18) [i386-mingw32]
<internal:lib/rubygems/custom_require>:29:in `require': 127: Uvedenß
procedura nebyla nalezena. - Init_nokogiri (LoadError)
C:/Users/vita/.pik/rub... | issue with 1.4.4 on windows mingw32 | https://api.github.com/repos/sparklemotion/nokogiri/issues/375/comments | 9 | 2010-11-17T13:21:12Z | 2010-11-26T23:00:21Z | https://github.com/sparklemotion/nokogiri/issues/375 | 424,027 | 375 |
[
"sparklemotion",
"nokogiri"
] | Seems like I still got the problem reported [here](https://github.com/tenderlove/nokogiri/issuesearch?state=closed&q=require#issue/279) (using Ruby 1.9.2p0 (2010-08-18) [i386-mingw32] and Nokogiri 1.4.4 on Windows 7). Nokogiri 1.4.4 with Ruby 1.8.7 works fine on my MacBook.
<pre>irb(main):001:0> require nokogiri
NameE... | LoadError with nokogiri-1.4.4-x86-mingw32 | https://api.github.com/repos/sparklemotion/nokogiri/issues/374/comments | 4 | 2010-11-17T08:44:54Z | 2010-11-17T14:10:36Z | https://github.com/sparklemotion/nokogiri/issues/374 | 423,680 | 374 |
[
"sparklemotion",
"nokogiri"
] | Hi there,
I've got an XML document that successfully validates against an XSD under MRI 1.9.2, however when the same code is run under the Java version of Nokogiri the code crashes with a document parse error.
To illustrate the issue, I've posted a small script here: https://github.com/scottlowe/nokogiri-java-bug-rep... | Nokogiri 1.5.0.beta2: XSD validation passes in MRI & crashes in Java version | https://api.github.com/repos/sparklemotion/nokogiri/issues/373/comments | 10 | 2010-11-14T00:58:51Z | 2013-11-17T02:53:47Z | https://github.com/sparklemotion/nokogiri/issues/373 | 417,534 | 373 |
[
"sparklemotion",
"nokogiri"
] | This error occurs on require 'nokogiri' using Java 1.5 on OSX 10.5.8, with nokogiri 1.5.0.beta.2 and:
jruby 1.5.3 (ruby 1.8.7 patchlevel 249) (2010-09-28 7ca06d7) (Java HotSpot(TM) Client VM 1.5.0_26) [i386-java]
| undefined method `next_sibling' for class `Nokogiri::XML::Node' | https://api.github.com/repos/sparklemotion/nokogiri/issues/372/comments | 11 | 2010-11-12T02:08:24Z | 2011-01-29T20:27:02Z | https://github.com/sparklemotion/nokogiri/issues/372 | 414,268 | 372 |
[
"sparklemotion",
"nokogiri"
] | Hey,
Are there any plans for a 1.4.4 pre-release? There as fixes in master I need to be able to continue with my project. Also, I'm unable to use the :git option with Bundler as there doesn't appear to be a gemspec anymore? The bundler website even uses nokogiri as an example for the :git feature.
Cheers
| 1.4.4 pre-release? | https://api.github.com/repos/sparklemotion/nokogiri/issues/371/comments | 5 | 2010-11-08T01:10:01Z | 2010-11-09T03:55:57Z | https://github.com/sparklemotion/nokogiri/issues/371 | 405,883 | 371 |
[
"sparklemotion",
"nokogiri"
] | DocumentFragment#search and #xpath should work properly. The current 'test_fragment_search' should be replaced with the following test cases:
```
def test_fragment_css
frag = Nokogiri::XML::Document.new.fragment '<p id="content">hi</p>'
p_tag = frag.css('#content').first
assert_equal 'p', p_tag.name
... | DocumentFragment#search and #xpath | https://api.github.com/repos/sparklemotion/nokogiri/issues/370/comments | 11 | 2010-11-03T17:27:19Z | 2015-01-02T14:29:48Z | https://github.com/sparklemotion/nokogiri/issues/370 | 398,531 | 370 |
[
"sparklemotion",
"nokogiri"
] | I'm aware this is a dup of issue #194, but the constants in XML::Node are not those returned by Reader#node_type; rather they appear to be the enum values of xmlReaderTypes defined in xmlreader.h.
Example:
Nokogiri::XML::Reader('<top> </top>').tap {|rdr|
while rdr.read
p [rdr.name, rdr.depth, rdr.nod... | XML::Reader constants missing | https://api.github.com/repos/sparklemotion/nokogiri/issues/369/comments | 2 | 2010-11-02T20:47:41Z | 2010-11-11T23:49:23Z | https://github.com/sparklemotion/nokogiri/issues/369 | 396,540 | 369 |
[
"sparklemotion",
"nokogiri"
] | # namespace_scopes (and consequently #namespaces, which is based on #namespace_scopes) is inconsistent in it's collection of default xmlns="something" namespaces.
The method WILL include any prefixed namespaces on self or any ancestors. The method will also include a non-prefixed default namespace on self.
However, ... | #namespace_scopes should include ancestor default namespace, if operative | https://api.github.com/repos/sparklemotion/nokogiri/issues/367/comments | 1 | 2010-11-01T16:57:00Z | 2010-11-01T16:58:31Z | https://github.com/sparklemotion/nokogiri/issues/367 | 393,843 | 367 |
[
"sparklemotion",
"nokogiri"
] | # namespace_scopes (and consequently #namespaces, which is based on #namespace_scopes) is inconsistent in it's collection of default xmlns="something" namespaces.
The method WILL include any prefixed namespaces on self or any ancestors. The method will also include a non-prefixed default namespace on self.
However, ... | #namespace_scopes makes inconsistent use of xmlns default namespaces | https://api.github.com/repos/sparklemotion/nokogiri/issues/366/comments | 1 | 2010-11-01T15:57:17Z | 2010-11-01T18:40:16Z | https://github.com/sparklemotion/nokogiri/issues/366 | 393,718 | 366 |
[
"sparklemotion",
"nokogiri"
] | I've written some improved comments for rdoc generation for the xml namespace manipulation/interrogation methods. As requested by Mike Delessio, I've done it as a git fork. Will issue a pull request from: http://github.com/jrochkind/nokogiri
I've attempted to document how the methods work now, full of idiosyncracies ... | Improved rdoc for xml namespace interrogating/manipulating methods | https://api.github.com/repos/sparklemotion/nokogiri/issues/364/comments | 1 | 2010-11-01T15:35:15Z | 2010-11-05T11:39:31Z | https://github.com/sparklemotion/nokogiri/issues/364 | 393,685 | 364 |
[
"sparklemotion",
"nokogiri"
] | If I parse an xml document, retrieve some Nodes then call slop!, the already-retrieved Nodes aren't decorated.
Sample code:
unless Object.instance_methods.map(&:to_s).include?('singleton_class')
class Object
def singleton_class
class << self; self; end
end
end
end
```
%w(... | documentation: slop! only applies to Nodes that haven't been retrieved yet | https://api.github.com/repos/sparklemotion/nokogiri/issues/363/comments | 4 | 2010-10-29T19:42:16Z | 2010-11-05T11:38:26Z | https://github.com/sparklemotion/nokogiri/issues/363 | 389,613 | 363 |
[
"sparklemotion",
"nokogiri"
] | From the mailing list:
```
f = Nokogiri::XML.fragment( "<div class='section'><span class='greeting'></span></div>" )
f.css( 'div' ).each do | node |
node.swap( '<h1>hi</h1>' )
end
```
reproduced with
```
ruby:
engine: mri
version: 1.8.7
platform: x86_64-linux
libxml:
loaded: 2.7.6
binding: extension
... | Node#swap crashing bug | https://api.github.com/repos/sparklemotion/nokogiri/issues/362/comments | 5 | 2010-10-29T14:23:59Z | 2019-01-05T01:22:52Z | https://github.com/sparklemotion/nokogiri/issues/362 | 389,077 | 362 |
[
"sparklemotion",
"nokogiri"
] | http://gist.github.com/24605 is linked on the start page, and it's only showing octocat.
| Gist link on nokogiri.org is broken | https://api.github.com/repos/sparklemotion/nokogiri/issues/361/comments | 0 | 2010-10-29T10:48:14Z | 2013-05-20T21:45:36Z | https://github.com/sparklemotion/nokogiri/issues/361 | 388,735 | 361 |
[
"sparklemotion",
"nokogiri"
] | I installed your gem following the tutorial at http://nokogiri.org/tutorials/installing_nokogiri.html and the gem is installed correctly
<pre>
Computer-di-Fabio:~ fabionapoleoni$ nokogiri -v
---
warnings: []
ruby:
engine: mri
version: 1.8.7
platform: i686-darwin10.4.0
libxml:
loaded: 2.7.7
binding: exte... | WARNING: Nokogiri was built against LibXML version 2.7.7, but has dynamically loaded 2.7.3 on Snow Leopard | https://api.github.com/repos/sparklemotion/nokogiri/issues/360/comments | 2 | 2010-10-28T13:17:10Z | 2010-10-28T22:32:44Z | https://github.com/sparklemotion/nokogiri/issues/360 | 387,053 | 360 |
[
"sparklemotion",
"nokogiri"
] | See http://gist.github.com/650369
I am expecting to see
office:text
<**text**:p>one text:spanspan/text:span</**text**:p>
/office:text
but I am seeing
office:text
<**office**:p>one text:spanspan/text:span</**office**:p>
/office:text
| Node#add_child changes namespace of root child node | https://api.github.com/repos/sparklemotion/nokogiri/issues/359/comments | 3 | 2010-10-28T01:01:01Z | 2011-11-08T08:45:11Z | https://github.com/sparklemotion/nokogiri/issues/359 | 386,255 | 359 |
[
"sparklemotion",
"nokogiri"
] | it was suggested on the mailing list that the docstring for Node#namespace should be:
```
"Returns a Hash of prefix=>value definitions for all namespaces on this node and it's ancestors. A Hash version of #namespace_scopes".
```
| documention: Node#namespaces | https://api.github.com/repos/sparklemotion/nokogiri/issues/358/comments | 1 | 2010-10-27T13:13:26Z | 2010-10-27T22:55:16Z | https://github.com/sparklemotion/nokogiri/issues/358 | 384,836 | 358 |
[
"sparklemotion",
"nokogiri"
] | Report as script, as requested. Ooh, ruby code doesn't paste in to a ticket well, gist instead:
http://gist.github.com/647802
| XML::Document#xpath inconsistent use of assumed namespaces | https://api.github.com/repos/sparklemotion/nokogiri/issues/357/comments | 6 | 2010-10-26T21:03:45Z | 2010-11-12T01:03:51Z | https://github.com/sparklemotion/nokogiri/issues/357 | 383,706 | 357 |
[
"sparklemotion",
"nokogiri"
] | This following script:
```
require 'rubygems'
require 'nokogiri'
$KCODE = 'u'
xml = <<-ENDXML
<?xml version="1.0" encoding="UTF-8"?>
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">
</SOAP-ENV:Envelope>
ENDXML
class SAX... | Problems with the attributes received by start_element using the SAX parser | https://api.github.com/repos/sparklemotion/nokogiri/issues/356/comments | 4 | 2010-10-26T02:25:25Z | 2010-10-27T22:45:17Z | https://github.com/sparklemotion/nokogiri/issues/356 | 381,992 | 356 |
[
"sparklemotion",
"nokogiri"
] | Hi,
we are running several threads using Nokogiri to parse incoming xml documents at the same time.
First we observed an issue with the slop decorator. Sometimes tags couldn't be found when accessing them via the tag name.
Later when a tried to reproduce the issue i figured out that xpath isn't thread safe.
Sometimes ... | xml parsing / xpath not threadsafe under jruby | https://api.github.com/repos/sparklemotion/nokogiri/issues/355/comments | 7 | 2010-10-22T13:51:27Z | 2010-12-21T15:03:24Z | https://github.com/sparklemotion/nokogiri/issues/355 | 376,488 | 355 |
[
"sparklemotion",
"nokogiri"
] | Example in this Gist, http://gist.github.com/639600, I'm trying to select the last DD having a certain class.
The `nth-last-child(1)` selector works, but `last-child` does not. Does nokogiri not implement the `last-foo` selectors?
| last-child, etc, pseudo selectors don't work | https://api.github.com/repos/sparklemotion/nokogiri/issues/354/comments | 4 | 2010-10-21T23:29:38Z | 2010-10-26T03:08:25Z | https://github.com/sparklemotion/nokogiri/issues/354 | 375,715 | 354 |
[
"sparklemotion",
"nokogiri"
] | from nokogiri-talk mailing list:
```
require 'rubygems'
require 'nokogiri'
STDOUT.sync = true
loop do
doc = Nokogiri::HTML('whatever ' * 10000)
doc = doc.at_css("body")
doc = doc.dup
GC.start
putc "."
end
```
results in a memory leak under both ruby1.8 and ruby1.9. thanks to Patrik Rak patrik@raxoft.cz for rep... | memory leak | https://api.github.com/repos/sparklemotion/nokogiri/issues/353/comments | 2 | 2010-10-19T19:08:44Z | 2010-10-19T20:29:35Z | https://github.com/sparklemotion/nokogiri/issues/353 | 370,949 | 353 |
[
"sparklemotion",
"nokogiri"
] | % cat nokogiritest.rb
require 'rubygems'
require 'nokogiri'
doc = File.open("/path/to/xmldoc.xml", "r")
xml = Nokogiri::XML(doc)
% macruby nokogiritest.rb
zsh: segmentation fault macruby nokogiritest.rb
Here is the crash report: (this crash happens in MacRuby 0.6 - 0.8)
Process: macruby [6750]
Path: ... | crash parsing xml document when using macruby | https://api.github.com/repos/sparklemotion/nokogiri/issues/351/comments | 7 | 2010-10-14T21:37:54Z | 2010-11-16T19:08:06Z | https://github.com/sparklemotion/nokogiri/issues/351 | 363,105 | 351 |
[
"sparklemotion",
"nokogiri"
] | From http://api.jquery.com/has-selector/:
> The expression `$('div:has(p)')` matches a `<div>` if a `<p>` exists anywhere among its descendants, not just as a direct child.
So I would expect:
```
Nokogiri::CSS.xpath_for("#outer:has(#inner)") # => ["//*[@id = 'outer' and .//*[@id = 'inner']]"]
```
But, instead:
``... | :has() selector should match against all descendants, not just direct children | https://api.github.com/repos/sparklemotion/nokogiri/issues/350/comments | 6 | 2010-10-13T18:45:54Z | 2019-01-06T04:51:28Z | https://github.com/sparklemotion/nokogiri/issues/350 | 361,075 | 350 |
[
"sparklemotion",
"nokogiri"
] | Running nokogiri -v outputs:
nokogiri -v
---
nokogiri: 1.4.3.1
warnings: []
```
libxml:
compiled: 2.7.7
loaded: 2.7.7
binding: extension
ruby:
platform: i686-darwin9.8.0
engine: mri
version: 1.8.6
```
But I am still getting the
```
WARNING: Nokogiri was built against LibXML version 2.... | Issues with nokogiri on Leopard with Homebrew. | https://api.github.com/repos/sparklemotion/nokogiri/issues/349/comments | 1 | 2010-10-06T03:59:22Z | 2010-10-06T05:06:53Z | https://github.com/sparklemotion/nokogiri/issues/349 | 348,914 | 349 |
[
"sparklemotion",
"nokogiri"
] | This gist has a simple example that reproduces the issue.
https://gist.github.com/1b705a6a28a17e37b6ad
I get the following output:
```
This has replacementreplacement stuff
```
Instead of:
```
This has replacement replacement stuff
```
| text replacement chomps outside whitespace on unrecognized tags | https://api.github.com/repos/sparklemotion/nokogiri/issues/348/comments | 4 | 2010-10-01T21:53:15Z | 2012-02-21T16:14:50Z | https://github.com/sparklemotion/nokogiri/issues/348 | 343,189 | 348 |
[
"sparklemotion",
"nokogiri"
] | ```
ruby-1.9.2-p0 > html = Nokogiri::HTML("<html>\n<head>")
=> #<Nokogiri::HTML::Document:0x80901ae8 name="document" children=[#<Nokogiri::XML::DTD:0x8090114c name="html">, #<Nokogiri::XML::Element:0x80900148 name="html" children=[#<Nokogiri::XML::Element:0x808ff7fc name="head">]>]>
ruby-1.9.2-p0 > html.css("head").f... | line always returns 0 for Nokogiri::HTML elements | https://api.github.com/repos/sparklemotion/nokogiri/issues/347/comments | 4 | 2010-09-27T20:53:18Z | 2011-01-30T01:14:16Z | https://github.com/sparklemotion/nokogiri/issues/347 | 335,663 | 347 |
[
"sparklemotion",
"nokogiri"
] | I get incorrectly encoded output when inserting strings with before or after, it only works if I use DocumentFragment
code:
```
require 'nokogiri'
p Nokogiri::VERSION_INFO
content = '<html><head></head><body><div class="content">hëlló – wörld!</div></body></html>'
preview = '<div class="preview">hëlló – ... | encoding problems when inserting with before/after | https://api.github.com/repos/sparklemotion/nokogiri/issues/346/comments | 3 | 2010-09-15T17:19:54Z | 2010-09-15T18:38:10Z | https://github.com/sparklemotion/nokogiri/issues/346 | 317,755 | 346 |
[
"sparklemotion",
"nokogiri"
] | Hi,
First of all thanks for this wonderful gem! However I'm facing major issues when trying to use my custom XPath function called compare_value(@name, 'text'). Goal is to retrieve all nodes ('object') which contains certain attribute ('text', case insensitive string compare) and its (attributes/attribute/value) actu... | Segmentation Fault when using Custom XPath functions (1.4.1, 1.4.3.1) | https://api.github.com/repos/sparklemotion/nokogiri/issues/345/comments | 6 | 2010-09-14T21:09:57Z | 2010-09-20T09:16:11Z | https://github.com/sparklemotion/nokogiri/issues/345 | 316,277 | 345 |
[
"sparklemotion",
"nokogiri"
] | because maybe people will be more likely to read it / find it via google if we put a prominent link to it.
| documentation: put a link to the 'getting help' tutorial on the nokogiri.org page header | https://api.github.com/repos/sparklemotion/nokogiri/issues/344/comments | 1 | 2010-09-14T16:55:57Z | 2010-09-14T17:39:22Z | https://github.com/sparklemotion/nokogiri/issues/344 | 315,853 | 344 |
[
"sparklemotion",
"nokogiri"
] | I get a full CPU when I try to parse this file:
http://dl.dropbox.com/u/1170645/link/noparse
| Full CPU hang when parsing html | https://api.github.com/repos/sparklemotion/nokogiri/issues/343/comments | 1 | 2010-09-14T16:30:25Z | 2010-09-14T16:47:51Z | https://github.com/sparklemotion/nokogiri/issues/343 | 315,820 | 343 |
[
"sparklemotion",
"nokogiri"
] | just what it says, son.
| document jquery selector :has in Node#css method | https://api.github.com/repos/sparklemotion/nokogiri/issues/342/comments | 0 | 2010-09-09T21:17:02Z | 2014-12-31T07:18:53Z | https://github.com/sparklemotion/nokogiri/issues/342 | 309,783 | 342 |
[
"sparklemotion",
"nokogiri"
] | Here are two strawman test cases:
```
frag = Nokogiri::HTML::DocumentFragment.parse "<hello>oh, hello there.</hello>"
puts frag # => <hello>oh, hello there.</hello>
assert ! frag.errors.grep(/Tag hello invalid/).empty? # errors should be copied to the fragment
doc = Nokogiri::HTML::Document.parse "<html><body><div></... | fragments should make parsing errors accessible | https://api.github.com/repos/sparklemotion/nokogiri/issues/341/comments | 4 | 2010-09-08T13:27:16Z | 2010-11-15T16:01:19Z | https://github.com/sparklemotion/nokogiri/issues/341 | 307,580 | 341 |
[
"sparklemotion",
"nokogiri"
] | When inserting/replacing nodes from invalid markup, we get an uninformative error message:
```
>> html = Nokogiri::HTML("<html><head/><body/></html>")
>> html.at("body").add_child("</br>") # Instead of <br/>
NoMethodError: undefined method `children' for nil:NilClass
from /Library/Ruby/Gems/1.8/gems/nokogiri-1.4.3.1/... | Error message for invalid markup | https://api.github.com/repos/sparklemotion/nokogiri/issues/340/comments | 1 | 2010-09-07T12:12:02Z | 2010-09-07T12:23:19Z | https://github.com/sparklemotion/nokogiri/issues/340 | 305,702 | 340 |
[
"sparklemotion",
"nokogiri"
] | ```
Nokogiri::HTML(Nokogiri::HTML('<html lang="en"/>').to_xhtml).to_xhtml
```
generates lang="en" xml:lang="en" xml:lang="en"
| duplicate xml:lang attribute | https://api.github.com/repos/sparklemotion/nokogiri/issues/339/comments | 3 | 2010-09-04T01:01:35Z | 2019-01-05T01:22:52Z | https://github.com/sparklemotion/nokogiri/issues/339 | 302,140 | 339 |
[
"sparklemotion",
"nokogiri"
] | It would be really awesome if Nokogiri could tell us if a particular Node matches a CSS selector.
For example, given a node for this HTML:
<span class="field percent other bigblueball">...</span>
It would be sweet if we could say:
node.is("span.field.percent")
The method #is() could be #matches? or somethin... | Assert node matches CSS selector | https://api.github.com/repos/sparklemotion/nokogiri/issues/337/comments | 3 | 2010-09-01T19:25:25Z | 2010-09-02T16:00:57Z | https://github.com/sparklemotion/nokogiri/issues/337 | 298,223 | 337 |
[
"sparklemotion",
"nokogiri"
] | I wish Nokogiri allow us to write XPath/XSLT functions in Ruby.
Background: I have XML documents and I like to apply reasonably complicated context-dependent procedure (escaping, transcoding, etc.) to every text node in them, while transforming document tree structure.
Python lxml library has such feature:
- http://... | Wishlist: Support writing XPath/XSLT functions in Ruby | https://api.github.com/repos/sparklemotion/nokogiri/issues/336/comments | 1 | 2010-09-01T08:21:02Z | 2010-09-06T23:56:57Z | https://github.com/sparklemotion/nokogiri/issues/336 | 297,316 | 336 |
[
"sparklemotion",
"nokogiri"
] | Link to speed test is not working - http://gist.github.com/24605 - only thing I got is: That page doesn't exist! I google for it but I did not found anything. Is possible to have it fixed please? I am really interrested in results..
| Link to speed test is not working | https://api.github.com/repos/sparklemotion/nokogiri/issues/335/comments | 1 | 2010-08-30T15:10:12Z | 2010-08-30T15:58:50Z | https://github.com/sparklemotion/nokogiri/issues/335 | 294,910 | 335 |
[
"sparklemotion",
"nokogiri"
] | When a SAX Document handler raises an error, I would expect that error to bubble up
past the parser unless rescued.
Under JRuby, the error is actually swallowed and processing continues as if nothing happened.
Here's code that demonstrates the problem:
class ErrorRaisingDocument < Nokogiri::XML::SAX::Document
... | SAX errors are swallowed under JRuby | https://api.github.com/repos/sparklemotion/nokogiri/issues/334/comments | 2 | 2010-08-25T04:14:33Z | 2012-02-23T14:45:01Z | https://github.com/sparklemotion/nokogiri/issues/334 | 289,240 | 334 |
[
"sparklemotion",
"nokogiri"
] | With Ruby 1.9.1, you could assign attributes using symbols:
```
$ irb -r nokogiri
ruby 1.9.1p378 (2010-01-10 revision 26273) [x86_64-linux]
irb(main):001:0> x = Nokogiri::XML('<hey/>').root
=> #<Nokogiri::XML::Element:0x6bea44 name="hey">
irb(main):002:0> x[:foo] = 'bar'
=> "bar"
irb(main):003:0> Nokogiri::VERSION
=> ... | Element#[]= should coerce symbols to strings (Ruby 1.9.2) | https://api.github.com/repos/sparklemotion/nokogiri/issues/333/comments | 5 | 2010-08-24T23:15:18Z | 2013-05-20T21:47:00Z | https://github.com/sparklemotion/nokogiri/issues/333 | 289,043 | 333 |
[
"sparklemotion",
"nokogiri"
] | Hi
I am using Jruby 1.5.1 with nokogiri-1.4.3.1-java.
When I require nokogiri I get this error:
<pre>
irb(main):001:0> require 'rubygems'
=> true
irb(main):002:0> require 'nokogiri'
FFI::NotFoundError: Function 'xmlSchemaValidateFile' not found in [libexslt.dylib]
from /Users/dev/tools/jruby/lib/ruby/site_ruby/s... | jruby: FFI::NotFoundError: Function 'xmlSchemaValidateFile' not found in [libexslt.dylib] | https://api.github.com/repos/sparklemotion/nokogiri/issues/332/comments | 10 | 2010-08-24T11:06:23Z | 2010-10-01T15:26:50Z | https://github.com/sparklemotion/nokogiri/issues/332 | 288,226 | 332 |
[
"sparklemotion",
"nokogiri"
] | http://nokogiri.org/tutorials/modifying_an_html_xml_document.html
at very bottom:
Wrapping a NodeSet
If you wanted to wrap new HTML around each node in a Nodeset, here’s an example of how to do it:
`nodes = @doc.css "h1,div"`
`wrapper = nodes.wrap("<div class='container'></div>")`
`@doc.to_html`
`# =>`
`# ~... | Error messages in output in tutorial. | https://api.github.com/repos/sparklemotion/nokogiri/issues/331/comments | 2 | 2010-08-21T00:08:21Z | 2010-11-05T11:14:20Z | https://github.com/sparklemotion/nokogiri/issues/331 | 285,041 | 331 |
[
"sparklemotion",
"nokogiri"
] | ```
doc = Nokogiri::Slop("<item><title>foo</title><description>this is the foo thing</description></item>")
p "doc.item.title:", doc.item.title
p "doc.item.description:", doc.item.description
```
Prints:
```
"doc.item.title:"
#<Nokogiri::XML::Element:0x243ba0a name="title" children=[#<Nokogiri::XML::Text:0x243b8ac "... | nodes named "description" are not accessible through Slop | https://api.github.com/repos/sparklemotion/nokogiri/issues/330/comments | 2 | 2010-08-19T19:20:49Z | 2010-10-15T15:55:04Z | https://github.com/sparklemotion/nokogiri/issues/330 | 283,713 | 330 |
[
"sparklemotion",
"nokogiri"
] | Please add support for binding $variables in XPath expressions. This behavior can be used to prevent XPath injection attacks. This is similar to REXML's XPath.first( node, "//*[@id=$href]", nil, {"href"=>"linktohere"}). This is implemented in the libxml API using the xmlXPathRegisterVariable function.
| Safe XPath $variable binding. | https://api.github.com/repos/sparklemotion/nokogiri/issues/329/comments | 5 | 2010-08-18T16:28:10Z | 2010-10-26T04:01:57Z | https://github.com/sparklemotion/nokogiri/issues/329 | 282,176 | 329 |
[
"sparklemotion",
"nokogiri"
] | I am using Nokogiri 1.4.3.1. When I try to use the "nth-last-child":http://www.w3.org/TR/css3-selectors/#nth-last-child-pseudo css selector, I get an exception. The specific selector is this: "tr:nth-last-child(-n+3)". The exception and backtrace are as follows:
Shepherd::Core::Shared::Extractor contains many children... | nth-last-child css selector not working | https://api.github.com/repos/sparklemotion/nokogiri/issues/328/comments | 2 | 2010-08-12T06:26:29Z | 2010-08-13T15:36:34Z | https://github.com/sparklemotion/nokogiri/issues/328 | 276,083 | 328 |
[
"sparklemotion",
"nokogiri"
] | If you have one broken entity in an XML string, Nokogiri's XML parser silently discards all following entities as well:
```
Nokogiri::XML("<foo>A { B & C</foo>").to_xml
=> "<?xml version=\"1.0\"?>\n<foo>A B C</foo>\n"
```
Note the missing ";" after the first entity, that the ampersand has disappeared into... | One broken XML entity silently corrupts all following entities in string | https://api.github.com/repos/sparklemotion/nokogiri/issues/327/comments | 3 | 2010-08-09T02:55:26Z | 2010-08-09T12:56:20Z | https://github.com/sparklemotion/nokogiri/issues/327 | 272,567 | 327 |
[
"sparklemotion",
"nokogiri"
] | Not sure if it is supposed to do this but either way its weird.
Is this an issue with libXML?
doc = Nokogiri::HTML::Document.new
doc.parse('test & test')
# => []
doc.parse('test &; test')
# => []
doc.parse('test &test; test')
# => [#<Nokogiri::XML::Element:0x1d4c384 name="p" children=[#<Noko... | parsing & or &; returns empty array | https://api.github.com/repos/sparklemotion/nokogiri/issues/326/comments | 2 | 2010-08-05T17:09:10Z | 2010-08-05T17:20:12Z | https://github.com/sparklemotion/nokogiri/issues/326 | 269,794 | 326 |
[
"sparklemotion",
"nokogiri"
] | Hi,
take any node somewhere in a document and (for whatever reason) traverse up its parent chain. Inevitably when getting to the Nokogiri::HTML::Document node an error will be raised, because there's no parent method.
This makes traversing the parent cumbersome, because one can't simply rely on the parent method itse... | Give Nokogiri::HTML::Document a parent which always returns nil | https://api.github.com/repos/sparklemotion/nokogiri/issues/325/comments | 5 | 2010-08-04T11:32:09Z | 2016-04-18T09:37:18Z | https://github.com/sparklemotion/nokogiri/issues/325 | 268,540 | 325 |
[
"sparklemotion",
"nokogiri"
] | Hi,
I don't know if its supposed to work or not (I'm rather new to ruby) but when calling .keys on the <html> tag it throws an error:
```
$ ruby -r nokogiri -e 'Nokogiri::HTML("<html></html>").traverse { |n| puts n.node_name ; puts n.keys };'
html
/opt/ruby-1.9.1-p378/lib/ruby/gems/1.9.1/gems/nokogiri-1.4.3.1/lib/nok... | No .keys method on node_name = 'html' | https://api.github.com/repos/sparklemotion/nokogiri/issues/324/comments | 3 | 2010-08-02T16:31:37Z | 2010-08-04T04:39:37Z | https://github.com/sparklemotion/nokogiri/issues/324 | 266,684 | 324 |
[
"sparklemotion",
"nokogiri"
] | It'd be helpful if there were a Node#children= method that accepted a node_or_tags parameter, where the definition of node_or_tags is the same as Node#swap's.
> node_or_tags can be a Nokogiri::XML::Node, a ::DocumentFragment, a ::NodeSet, or a string containing markup.
| Implement Node#children= | https://api.github.com/repos/sparklemotion/nokogiri/issues/323/comments | 4 | 2010-08-01T01:39:22Z | 2010-08-10T03:41:39Z | https://github.com/sparklemotion/nokogiri/issues/323 | 265,534 | 323 |
[
"sparklemotion",
"nokogiri"
] | During compilation it can't find libxml/parser.h
But all require library are installed
This flag -- --with-xml2-include=/usr/include/libxml2 also not resolve problem
| 1.5 version can't install on fedora 13, because van't find libxml/parser.h | https://api.github.com/repos/sparklemotion/nokogiri/issues/322/comments | 1 | 2010-07-31T11:05:39Z | 2010-07-31T12:20:57Z | https://github.com/sparklemotion/nokogiri/issues/322 | 265,216 | 322 |
[
"sparklemotion",
"nokogiri"
] | So I have an <object> tag and I need to add a <param> child with some parameters. Getting the information I need was easy enough, but adding the child wasn't very well documented. Given how easy most of Nokogiri is to use, I was expecting something simple to work, like:
```
object = doc.css("object")[0]
object.add_chi... | Missing documentation on how to use #add_child | https://api.github.com/repos/sparklemotion/nokogiri/issues/321/comments | 1 | 2010-07-29T14:27:07Z | 2010-07-29T14:55:31Z | https://github.com/sparklemotion/nokogiri/issues/321 | 263,428 | 321 |
[
"sparklemotion",
"nokogiri"
] | Hi
I came across the following error when i upgraded nokogiri from 1.4.1 to 1.4.2. It says
####
dyld: NSLinkModule() error
dyld: Symbol not found: _xmlFirstElementChild
Referenced from: /Users/nbkjurl/.gem/ruby/1.8/gems/nokogiri-1.4.2/lib/nokogiri/nokogiri.bundle
Expected in: flat namespace
####
when i unistal... | Error using nokogiri v:1.4.2 | https://api.github.com/repos/sparklemotion/nokogiri/issues/320/comments | 1 | 2010-07-29T14:02:44Z | 2010-07-29T14:53:18Z | https://github.com/sparklemotion/nokogiri/issues/320 | 263,402 | 320 |
[
"sparklemotion",
"nokogiri"
] | Look at this weirdness!
```
require 'nokogiri'
include Nokogiri::XML
document = Document.new
document.root = Node.new('root', document)
foo = Node.new('foo', document)
foo.content = 'foo'
document.root << foo
foo << ' bar' # Notice the leading space
puts document.root
```
And this is the output:
```
<root>
<fo... | Nokogiri does not honor leading whitespace in some cases | https://api.github.com/repos/sparklemotion/nokogiri/issues/319/comments | 4 | 2010-07-28T03:54:43Z | 2010-08-04T05:56:40Z | https://github.com/sparklemotion/nokogiri/issues/319 | 261,551 | 319 |
[
"sparklemotion",
"nokogiri"
] | In nokogiri v 1.4.2 and 1.50.beta1 xpath is not released in "static VALUE evaluate(int argc, VALUE *argv, VALUE self)" function and this is a reason (i believe) for memory leak. It should be free as :
xmlXPathFreeNodeSetList(xpath);
// and then
xmlXPathFreeObject(xpath);
But I am confused. I looked at source for "sta... | Possible Class Nokogiri::XML::XPathContext memory leak | https://api.github.com/repos/sparklemotion/nokogiri/issues/318/comments | 3 | 2010-07-27T19:09:01Z | 2010-07-27T21:28:58Z | https://github.com/sparklemotion/nokogiri/issues/318 | 261,117 | 318 |
[
"sparklemotion",
"nokogiri"
] | Example script:
require 'rubygems'
require 'nokogiri'
require 'open-uri'
doc = Nokogiri::HTML(open("http://meaningless"))
puts doc.inspect
Note the page is truncated, half way down the page, near "Peepshows, The". The next line contains �, which I think might be causing the issue.
If you can suggest some ways to debu... | Page is reliably truncated without error, possibly due to non-ascii character | https://api.github.com/repos/sparklemotion/nokogiri/issues/317/comments | 1 | 2010-07-27T02:16:46Z | 2010-07-28T02:50:50Z | https://github.com/sparklemotion/nokogiri/issues/317 | 260,378 | 317 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.