25 Commits (master)

Author SHA1 Message Date
A. Svensson b5ae4aeda6 Ops, some leftover crap. 7 years ago
A. Svensson 6abeb2c101 Do not atempt to set nil user agents. 7 years ago
A. Svensson fb6cebc8dc Allow setting custom user agent string. 7 years ago
Kevin Darlington 1145e04eb0 added SelectNodesDirect function 8 years ago
Felix Geisendörfer b3124cf4a7 Implement text nodes / content escaping 9 years ago
Chris Grindstaff f41a2d1569 CDATA is overwritten, append instead 10 years ago
Anschel Schaffer-Cohen ab85624fd0 Allow fetching with arbitrary *http.Client. 10 years ago
jimt c085b35fb9 Adds optional indented output for the Node.String() and Node.Bytes() 10 years ago
Rodrigo Damazio 0459b7b32e Making the recursive SelectNodes a separate function and adding tests 10 years ago
jim teeuwen 032fe9d27c Run gofmt and fix the Unmarshal test. 11 years ago
jim teeuwen 6da9091d5a Add a descriptive comment to the CharsetFunc type. 11 years ago
jim teeuwen 817a15ca8b Remove CharsetFunc as field for Document type and instead supply it as a parameter for all Document.LoadXXX methods. There should be no need to store the function pointer in the Document struct. 11 years ago
jim teeuwen ebbd6b3656 Remove deprecated Verbose field from Document type. 11 years ago
jim teeuwen fcfc98fd64 Add CharsetReader function pointer to Document struct as a public field. This allows the caller to specify their own charset conversion handler when loading xml content. 11 years ago
jim teeuwen b14dd79d8d No more Makefiles. Use go command to build and install. Temporarily removed dependency of external go-charset package. It is incompatible with new Go versions and is not updated by the author. We should find a replacement for it. This may cause problems with xml files supplied in non-utf8 encodings. 11 years ago
jim teeuwen 6e76dc96aa gofix for weekly.2012-01-27 11 years ago
jim teeuwen 8a9dae755c gofix go1rename 11 years ago
jim teeuwen 4b31ea924d gofix error 11 years ago
jim teeuwen 29e84b1aeb Fix for weekly.2011-05-22 11 years ago
jim teeuwen ea7fc45209 Got rid of depracated Node api functions. Removed dependency on go-iconv in favor of go-charset (See README). go-charset is a native Go package and thus requires no CGO functionality. Meaning go-pkg-xmlx and go-pkg-rss can now be used in Google AppEngine. Some speed and memory efficiency improvements added. Should now do a lot less []byte -> string conversions. 11 years ago
jim teeuwen 882ba8d0bb Switch to more liberay CC0 public domain license 12 years ago
jim teeuwen 5fff1fb51a Allow SelectNode() calls with a wildcard as the namespace name ("*"). This allows us to find nodes if we do not strictly care about what namespace it carries. Same deal for attributes. node.SelectNode("*", foo") finds any node named "foo", regardless of what namespace it has. 12 years ago
jim teeuwen c07619da34 Fixed potential case issue in correctEncoding(). As per issue#2. 12 years ago
jim teeuwen c271c20e08 Fix bug in document.correctEncoding() which failed to properly parse xml doctypes. 12 years ago
jim teeuwen 9b53d04d9d Making package easily usable with goinstall. Including the reference to go-iconv. 12 years ago
jim teeuwen 02d19ed0bd Fix issue 1: Added dependency to go-iconv. this lib is needed to ensure we pass valud UTF-8 encoded data to the XML tokenizer. 12 years ago
jim teeuwen d0d1c2f9f5 Fixed bug in Document.LoadStream() function. 12 years ago
jim teeuwen 15ec07ab1a Some minor error handling fixes. 12 years ago
jim teeuwen 8c492695c1 Changed slice code to use append() 12 years ago
jim teeuwen 18011ea2f0 Fixed 2 incorrect function signatures 12 years ago
jim teeuwen db4230b809 Reworked README and xmlx/entitymap.go. Now includes conversion of named xml entities instead of just numeric ones. Eg: π and π to a unicode character and vice-versa. It also came to my attention that lack of a proper opensource license might put people off of using this package. I therefor added a 1-clause BSD license under which this code now falls. 12 years ago
jim teeuwen 6d8b8289d8 Refactored some code to be faster and a little more elegant. 12 years ago
jim teeuwen 79794996d0 Updated code to use more recent go idioms. Yielding more compact xml processing. Hopefully better performant. 12 years ago
jim teeuwen 6a776b0cda fixed some slice copy routines 12 years ago
jim teeuwen ccb91f470e Added *document.LoadUri() method to load documents from the web (over http) 13 years ago
jim teeuwen 5bbe4dbe10 added HtmlToUTF8() and UTF8ToHTML() functions for converting non-standard html entities. 13 years ago
jim teeuwen 4246be06b8 Added document.Verbose field which prints errors to Stderr while reading xml data. Set to false by default. 13 years ago
jim teeuwen b95492ab55 cleaned up the LoadString() loop a bit. 13 years ago
jim teeuwen 4857865daf modified: src/Makefile 13 years ago
jim teeuwen e0fdc48cf7 modified: src/document.go 13 years ago
jim teeuwen 0a655c2756 new file: README 13 years ago