Nice!
Thanks Kent
Bernard
On 9/30/05, Kent Johnson <[EMAIL PROTECTED]> wrote:
> Oh, what if you try
>
> class MyBeautifulSoup(BeautifulSoup.BeautifulStoneSoup):
> NESTABLE_BLOCK_TAGS = ['sceneobject', 'parameters', 'parameter', 'shader']
> NESTABLE_TAGS = buildTagMap([], NESTABLE_BLOCK
Oh, what if you try
class MyBeautifulSoup(BeautifulSoup.BeautifulStoneSoup):
NESTABLE_BLOCK_TAGS = ['sceneobject', 'parameters', 'parameter', 'shader']
NESTABLE_TAGS = buildTagMap([], NESTABLE_BLOCK_TAGS)
Bernard Lebel wrote:
> I know I should be doing that. But somehow it doesn't work (
I know I should be doing that. But somehow it doesn't work (ie I keep
getting mangled XML tree).
Bernard
On 9/30/05, Kent Johnson <[EMAIL PROTECTED]> wrote:
> Bernard Lebel wrote:
> > Hi Kent,
> >
> > Well I have decided to get this sorted once and for all. Not that I
> > don't like ElementTree
Bernard Lebel wrote:
> Hi Kent,
>
> Well I have decided to get this sorted once and for all. Not that I
> don't like ElementTree, but the fack is that BeautifulSoup uses a near
> identical syntax to the 3D application SDK's object model I'm using it
> with, making interaction between the 3D and th
Hi Kent,
Well I have decided to get this sorted once and for all. Not that I
don't like ElementTree, but the fack is that BeautifulSoup uses a near
identical syntax to the 3D application SDK's object model I'm using it
with, making interaction between the 3D and the XML extremely
transparent. Anyw
(resending to the whole list)
Bernard Lebel wrote:
> Hi Kent,
>
> Thanks a lot for that answer. I have had a look at the BS code, and I
> have to admit I'm a bit at a loss: how would you add several nestable
> tag names in that list?
>
> I tried
> NESTABLE_TAGS = BeautifulSoup.buildTagMap( [], '
Hi Kent,
Thanks a lot for that answer. I have had a look at the BS code, and I
have to admit I'm a bit at a loss: how would you add several nestable
tag names in that list?
I tried
NESTABLE_TAGS = BeautifulSoup.buildTagMap( [], 'parameter', 'parameters' )
for example, but I kept having these nest
Bernard Lebel wrote:
> Hi grouchy,
>
> I seem to have found the problem. Somehow, it seems BeautifulSoup
> doesn't like nested tags of the same name.
This seems to be a feature of BS. It seems a bit of a misfeature when applied
to XML but anyway...you can configure BS with a set of tags which ca
Hi grouchy,
I seem to have found the problem. Somehow, it seems BeautifulSoup
doesn't like nested tags of the same name. For instance, I had this
tree:
Printing the entire tree in the command line shell showed some weird
rear
Hi Bernard,
Not much of an answer, but I printed out your snippet with prettify() to see how it was being parsed, and either the XML is funny, or Beautiful Soup is :)
>>> from BeautifulSoup import BeautifulStoneSoup as BSS >>> soup = BSS(xml)>>> print soup.prettify()
1 3
1.797693
Hello,
I have this set of XML tags:
1
3
1.79769313486e+308
False
-1.79769313486e+308
7.64880829803
False
20
11 matches
Mail list logo