Commit Graph

21 Commits

Author SHA1 Message Date
Felix Geisendörfer b3124cf4a7 Implement text nodes / content escaping
This removes the support for re-indenting XML, but allows to faithfully
parse / stringify a document. Beautification could be added again later
on if desired.
2013-09-11 12:17:56 +02:00
Chris Grindstaff f41a2d1569 CDATA is overwritten, append instead
See testcase in https://github.com/jteeuwen/go-pkg-rss/blob/master/feed_test.go of an example of where CDATA is overwritten.
2013-03-28 17:05:49 -03:00
Anschel Schaffer-Cohen ab85624fd0 Allow fetching with arbitrary *http.Client. 2013-03-19 09:49:00 -04:00
jimt c085b35fb9 Adds optional indented output for the Node.String() and Node.Bytes()
methods. Set the global `IndentPrefix` var to a tab or spaces to
enable indented output. The existing API has not been changed.

This addresses issue #7.
2012-11-25 23:46:56 +01:00
Rodrigo Damazio 0459b7b32e Making the recursive SelectNodes a separate function and adding tests 2012-07-29 16:28:03 -03:00
jim teeuwen 032fe9d27c Run gofmt and fix the Unmarshal test. 2012-02-29 11:42:39 +01:00
jim teeuwen 6da9091d5a Add a descriptive comment to the CharsetFunc type. 2012-02-29 11:27:52 +01:00
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. 2012-02-29 11:21:35 +01:00
jim teeuwen ebbd6b3656 Remove deprecated Verbose field from Document type. 2012-02-29 11:10:05 +01:00
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. 2012-02-29 11:08:37 +01:00
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. 2012-02-09 17:30:21 +01:00
jim teeuwen 6e76dc96aa gofix for weekly.2012-01-27 2012-01-27 11:51:02 +01:00
jim teeuwen 8a9dae755c gofix go1rename 2011-11-09 14:56:55 +01:00
jim teeuwen 4b31ea924d gofix error 2011-11-02 16:50:45 +01:00
jim teeuwen 29e84b1aeb Fix for weekly.2011-05-22 2011-05-23 15:18:45 +02:00
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. 2011-05-11 17:44:09 +02:00
jim teeuwen 882ba8d0bb Switch to more liberay CC0 public domain license 2011-03-19 14:50:46 +01:00
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. 2011-02-01 15:29:35 +01:00
jim teeuwen c07619da34 Fixed potential case issue in correctEncoding(). As per issue#2. 2011-01-30 23:19:52 +01:00
jim teeuwen c271c20e08 Fix bug in document.correctEncoding() which failed to properly parse xml doctypes. 2011-01-27 22:10:38 +01:00
jim teeuwen 9b53d04d9d Making package easily usable with goinstall. Including the reference to go-iconv. 2011-01-20 22:48:03 +01:00
Renamed from xmlx/document.go (Browse further)