Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #60471 > unrolled thread
| Started by | Larry Martell <larry.martell@gmail.com> |
|---|---|
| First post | 2013-11-25 18:25 -0500 |
| Last post | 2013-11-28 05:31 -0800 |
| Articles | 2 — 2 participants |
Back to article view | Back to comp.lang.python
This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by
below is the oldest one visible, not the original post.
Re: parsing nested unbounded XML fields with ElementTree Larry Martell <larry.martell@gmail.com> - 2013-11-25 18:25 -0500
Curing google groups issues (was parsing nested unbounded XML…) rusi <rustompmody@gmail.com> - 2013-11-28 05:31 -0800
| From | Larry Martell <larry.martell@gmail.com> |
|---|---|
| Date | 2013-11-25 18:25 -0500 |
| Subject | Re: parsing nested unbounded XML fields with ElementTree |
| Message-ID | <mailman.3208.1385423842.18130.python-list@python.org> |
[Multipart message — attachments visible in raw view] — view raw
On Mon, Nov 25, 2013 at 6:19 PM, Chris Angelico <rosuav@gmail.com> wrote: > On Tue, Nov 26, 2013 at 9:45 AM, Larry Martell <larry.martell@gmail.com> > wrote: > > On Monday, November 25, 2013 5:30:44 PM UTC-5, Chris Angelico wrote: > > > >> First off, please clarify: Are there five corresponding </Node> tags > >> later on? If not, it's not XML, and nesting will have to be defined > >> some other way. > > > > Yes, there are corresponding </Node> tags. I just didn't show them. > > Good good, I just saw the "unbounded" in your subject line and got > worried :) I'm pretty sure there's a way to parse that will preserve > the current nesting information, but others can describe that better > than I can. > The term 'unbounded' is used in the XML xsd file like this: <xs:sequence maxOccurs="unbounded"> > >> Secondly, please get off Google Groups. Your initial post is > >> malformed, and unless you specifically fight the software, your > >> replies will be even more malformed, to the point of being quite > >> annoying. There are many other ways to read a newsgroup, or you can > >> subscribe to the mailing list python-list@python.org, which carries > >> the same content. > > > > Not sure what you mean by malformed. I don't really care for Google > Groups, > > but I've been using it to post to this any other groups for years (since > rn > > and deja news went away) and no one ever said my posts were malformed. In > > any case, I did not know the group was available as a ML. I've subbed to > > that and will post that way. > > The mailing list works well for me too. Google Groups is deceptively > easy for a lot of people, but if you look through the list's archives, > you'll see that the posts it makes are unwrapped (and thus string out > to the right an arbitrary length), and all quoted text is > double-spaced, among other problems. Its users are generally unaware > of this, and like you are not maliciously inflicting that on us all, > but that doesn't make it any less painful to read :) Thanks for > switching. > > I had noticed the double spacing and I always fixed that when I replied.
[toc] | [next] | [standalone]
| From | rusi <rustompmody@gmail.com> |
|---|---|
| Date | 2013-11-28 05:31 -0800 |
| Subject | Curing google groups issues (was parsing nested unbounded XML…) |
| Message-ID | <ced34ac7-85d2-41de-ba69-cc1678204117@googlegroups.com> |
| In reply to | #60471 |
On Tuesday, November 26, 2013 4:55:55 AM UTC+5:30, Larry....@gmail.com wrote: > > Not sure what you mean by malformed. I don't really care for Google Groups, > > but I've been using it to post to this any other groups for years (since rn > > and deja news went away) and no one ever said my posts were malformed. In > > any case, I did not know the group was available as a ML. I've subbed to > > that and will post that way. > The mailing list works well for me too. Google Groups is deceptively > easy for a lot of people, but if you look through the list's archives, > you'll see that the posts it makes are unwrapped (and thus string out > to the right an arbitrary length), and all quoted text is > double-spaced, among other problems. Its users are generally unaware > of this, and like you are not maliciously inflicting that on us all, > but that doesn't make it any less painful to read :) Thanks for > switching. > I had noticed the double spacing and I always fixed that when I replied. Here's what I do to manage the GG-headaches: 1. Firefox needs to have the "Its all text" addon installed https://addons.mozilla.org/en-US/firefox/addon/its-all-text/ 2. Set the editor in "Its all text" to emacs [You can use anything… including pure python… more on that below] 3. Put the following into your emacs init ----------------- ;; Clean up Google Groups extra newlines containing only "> " (defun clean-gg () (interactive) (replace-regexp "^> *\n> *\n> *$" "-=\=-" nil 0 (point-max)) (flush-lines "> *$" 0 (point-max)) (replace-regexp "-=\=-" "" nil 0 (point-max)) ; (save-buffers-kill-terminal t) ) (global-set-key (kbd "<f9>") 'clean-gg) ;(push 'clean-gg find-file-hook) ---------------- Now firefox will show a small new "edit" edit button in the text window. Clicking that puts you into emacs with the text of the message. Now F9 will cleanup the double-spaces. Now, depending on whether you are comfortable with emacs or not you can do either of: 1. Continue editing in emacs. M-q and/or auto-fill-mode will clean up long-line paras Save-quit will put you back into firefox with cleaned up text 2. Not comfortable with emacs? Just F9 and save-quit will get you back to emacs with cleaned up double-spaced text. The long lines problem remains in this case Dont like emacs? 1. If you know how to write similar code for vi (or whatever) you are set. 2. You can also setup emacs to cleanup and close immediately 3. You can also setup your 'editor' to be a pure python script [Ive not got round to doing it because I'm not sure how to catch-report errors in a proper cross-platform way.] 4. If you are a javascript/greasemonkey expert I guess you can convert the emacs-code to JS/GM code and that would be a zero-click solution. Usually use emacs? You may prefer emacsclient to emacs for the editor
[toc] | [prev] | [standalone]
Back to top | Article view | comp.lang.python
csiph-web