summaryrefslogtreecommitdiff
path: root/src/pkg/xml/xml.go
AgeCommit message (Collapse)AuthorFilesLines
2011-08-03Imported Upstream version 59upstream/59Ondřej Surý1-9/+14
2011-06-30Imported Upstream version 58upstream/58Ondřej Surý1-304/+308
2011-04-28Imported Upstream version 2011.04.27upstream/2011.04.27Ondřej Surý1-11/+62
2011-04-26Imported Upstream version 2011.04.13upstream/2011.04.13Ondřej Surý1-1/+0
2011-04-20Imported Upstream version 2011.03.07.1upstream/2011.03.07.1Ondřej Surý1-2/+21
2011-02-18Imported Upstream version 2011.02.15upstream/2011.02.15Ondřej Surý1-2/+2
2011-01-17Imported Upstream version 2011.01.12upstream/2011.01.12Ondřej Surý1-306/+332
2010-06-03Fix typo in xml comments.Nigel Tao1-3/+1
R=rsc CC=golang-dev http://codereview.appspot.com/1503041
2010-04-28xml: allow text segments to end at EOFRuss Cox1-2/+8
Fixes issue 674. R=adg CC=golang-dev http://codereview.appspot.com/1018042
2010-04-26xml: fix innerxml handling of & escapesRuss Cox1-2/+3
R=r CC=golang-dev http://codereview.appspot.com/1009041
2010-04-21xml: new "innerxml" tag to collect inner XMLRuss Cox1-0/+14
R=r CC=golang-dev http://codereview.appspot.com/971041
2010-03-27xml: use io.ReadByter in place of local readByterRaif S. Naffah1-6/+2
R=cemeyer, rsc CC=golang-dev http://codereview.appspot.com/809041 Committer: Russ Cox <rsc@golang.org>
2010-03-23xml: add line numbers to syntax errors.Kyle Consalus1-23/+32
R=rsc CC=golang-dev http://codereview.appspot.com/699041 Committer: Russ Cox <rsc@golang.org>
2010-03-23xml: add CopyTokenKyle Consalus1-2/+26
R=rsc CC=golang-dev http://codereview.appspot.com/634042 Committer: Russ Cox <rsc@golang.org>
2010-03-02gofmt: experiment: align values in map composites where possibleRobert Griesemer1-257/+257
- gofmt -w src misc - looking for feedback R=rsc, r CC=golang-dev http://codereview.appspot.com/223076
2010-02-25strings: delete Runes, BytesRuss Cox1-6/+6
gofmt -w -r 'strings.Bytes(a) -> []byte(a)' src/cmd src/pkg test/bench gofmt -w -r 'strings.Runes(a) -> []int(a)' src/cmd src/pkg test/bench delete unused imports R=r CC=golang-dev http://codereview.appspot.com/224062
2010-02-18xml: allow unquoted attribute values in non-Strict modeAmrut Joshi1-8/+35
HTML4 standard supports unquoted attibute values in certain cases (http://www.w3.org/TR/REC-html40/intro/sgmltut.html#h-3.2.2). R=rsc CC=golang-dev http://codereview.appspot.com/207095 Committer: Russ Cox <rsc@golang.org>
2010-01-25xml: add Escape, copied from template.HTMLEscape.Stephen Weinberg1-0/+35
R=rsc CC=golang-dev http://codereview.appspot.com/186282 Committer: Russ Cox <rsc@golang.org>
2009-12-151) Change default gofmt default settings forRobert Griesemer1-249/+249
parsing and printing to new syntax. Use -oldparser to parse the old syntax, use -oldprinter to print the old syntax. 2) Change default gofmt formatting settings to use tabs for indentation only and to use spaces for alignment. This will make the code alignment insensitive to an editor's tabwidth. Use -spaces=false to use tabs for alignment. 3) Manually changed src/exp/parser/parser_test.go so that it doesn't try to parse the parser's source files using the old syntax (they have new syntax now). 4) gofmt -w src misc test/bench 5th and last set of files. R=rsc CC=golang-dev http://codereview.appspot.com/180050
2009-12-14xml: handle unexpected EOF while parsing and fix a bug in nameArvindh Rajesh Tamilmani1-27/+41
mustgetc reports unexpected EOF as SyntaxError. using mustgetc seems to be a better approach than letting the caller handle unexpected EOF every time. name: the second if statement should explicitly return ok==false. R=rsc http://codereview.appspot.com/174083 Committer: Russ Cox <rsc@golang.org>
2009-11-23 Fix crash in xml.Unmarshal. Occasionally while running a scrape of some xml ↵Vish Subramanian1-1/+1
with many goroutines I see a crash with the following stack trace: SIGSEGV: segmentation violation Faulting address: 0x44 PC=0x44e510 runtime·mapaccess2+0x18 /home/vish/go/src/pkg/runtime/hashmap.c:790 runtime·mapaccess2(0x0, 0x0) xml·*Parser·text+0x922 /home/vish/go/src/pkg/xml/xml.go:765 xml·*Parser·text(0xe44c9870, 0x7fa3, 0xffffffff, 0x7f00, 0x44b5c4, ...) xml·*Parser·RawToken+0x174 /home/vish/go/src/pkg/xml/xml.go:405 xml·*Parser·RawToken(0xe44c9870, 0x7fa3, 0x0, 0x0) xml·*Parser·Token+0x625 /home/vish/go/src/pkg/xml/xml.go:205 xml·*Parser·Token(0xe44c9870, 0x7fa3, 0x0, 0x0, 0x0, ...) xml·*Parser·Skip+0x27 /home/vish/go/src/pkg/xml/read.go:371 xml·*Parser·Skip(0xe44c9870, 0x7fa3, 0x8, 0x0) xml·*Parser·unmarshal+0xae6 /home/vish/go/src/pkg/xml/read.go:328 xml·*Parser·unmarshal(0xe44c9870, 0x7fa3, 0xe8127120, 0x7fa3, 0xdc94bc40, ...) xml·Unmarshal+0xda /home/vish/go/src/pkg/xml/read.go:121 xml·Unmarshal(0xe65724b0, 0x7fa3, 0xdc94bc00, 0x7fa3, 0x4bcfc0, ...) scraper·DoSearch+0x3d1 /home/vish/my-go-src/google3/experimental/users/vish/go_http/scraper.go:95 scraper·DoSearch(0xe7dc28c0, 0x7fa3, 0x33, 0x3, 0x6d2510, ...) main·scrapeQueries+0x202 /home/vish/my-go-src/google3/experimental/users/vish/go_http/scrape.go:251 main·scrapeQueries(0xe7da2600, 0x7fa3, 0x64, 0x1db0, 0xe7e10000, ...) goexit /home/vish/go/src/pkg/runtime/proc.c:135 goexit() 0x7fa3e7da2600 unknown pc Clearly xml.Parser is accessing an uninitialized map. Add a check for a nil map before accessing it. R=r, rsc http://codereview.appspot.com/159050 Committer: Russ Cox <rsc@golang.org>
2009-11-20gofmt -r 'α[β:len(α)] -> α[β:]' -w src/cmd src/pkgRuss Cox1-3/+3
R=r, gri CC=golang-dev http://codereview.appspot.com/156115
2009-11-18remove bytes.CopyRob Pike1-6/+6
replace all calls with calls to copy use copy in regexp and bytes.Buffer R=rsc CC=golang-dev http://codereview.appspot.com/157073
2009-11-14 xml: Fixed CDATA parsing.Abhinav Gupta1-2/+2
Fixes issue 128. R=r, rsc http://codereview.appspot.com/154126 Committer: Russ Cox <rsc@golang.org>
2009-11-09- replaced gofmt expression formatting algorithm withRobert Griesemer1-6/+6
rsc's algorithm - applied gofmt -w misc src - partial CL (last chunk) R=rsc, r http://go/go-review/1024041
2009-11-09remove semis after statements in one-statement statement listsRobert Griesemer1-58/+58
R=rsc, r http://go/go-review/1025029
2009-11-06- fine-tuning of one-line func heuristic (nodes.go)Robert Griesemer1-12/+4
- enabled for function declarations (not just function literals) - applied gofmt -w $GOROOT/src (look for instance at src/pkg/debug/elf/elf.go) R=r, rsc CC=go-dev http://go/go-review/1026006
2009-11-05gofmt'ed more stragglersRobert Griesemer1-16/+16
R=rsc http://go/go-review/1019004
2009-10-11introduce non-strict mode in xml parser,Russ Cox1-10/+404
good enough to parse some html. in reader, add "comment" tag to collect comment text. do not allocate during Unmarshal unless pointer is nil. R=r DELTA=441 (416 added, 1 deleted, 24 changed) OCL=35586 CL=35594
2009-10-08more lgtm files from gofmtRuss Cox1-37/+38
R=gri OCL=35485 CL=35488
2009-10-05comment tweaks; implement precise nameRuss Cox1-75/+331
character sets. R=r DELTA=339 (257 added, 1 deleted, 81 changed) OCL=35344 CL=35346
2009-10-05XML lexingRuss Cox1-308/+706
The lexer is the bottom level. Most clients will use the Unmarshal method, not yet implemented, which will behave like json.Unmarshal. R=r DELTA=1115 (766 added, 219 deleted, 130 changed) OCL=35316 CL=35339
2009-06-09mv src/lib to src/pkgRob Pike1-0/+426
tests: all.bash passes, gobuild still works, godoc still works. R=rsc OCL=30096 CL=30102