Standardizing XML

Z

ZeeGeek

Is there a module for python to standardize XML? Since MSN Live Space
doesn't use standard XML in the posts, I want to standardize them so
that I can use them elsewhere.
 
S

Stefan Behnel

ZeeGeek said:
Is there a module for python to standardize XML? Since MSN Live Space
doesn't use standard XML in the posts, I want to standardize them so
that I can use them elsewhere.

Could you give a hint what you mean with "standardize"? What's non
standardized XML for you?

Stefan
 
J

Jan Danielsson

ZeeGeek said:
Is there a module for python to standardize XML? Since MSN Live Space
doesn't use standard XML in the posts, I want to standardize them so
that I can use them elsewhere.

Hmm... XML _is_ standardized. If it doesn't follow the specs, then
it's not XML. If you want to make XML out of something which isn't XML,
you'll probably have to be a little more specific about how this other
format works.
 
Z

ZeeGeek

Hmm... XML _is_ standardized. If it doesn't follow the specs, then
it's not XML. If you want to make XML out of something which isn't XML,
you'll probably have to be a little more specific about how this other
format works.

Thanks for correcting me. I worded it inproperly. For example, in
the code returned by Live Space, they use <br> instead of <br /> so
that Blogger will complain that this tag is not valid because it
doesn't have a closing tag. Another example is that the contents of a
lot of the tag attributes like "color" and "size" are not surrounded
by quotes.
 
J

Jonathan Ballet

Le 15 Apr 2007 11:02:20 -0700,
ZeeGeek said:
Thanks for correcting me. I worded it inproperly. For example, in
the code returned by Live Space, they use <br> instead of <br /> so
that Blogger will complain that this tag is not valid because it
doesn't have a closing tag. Another example is that the contents of a
lot of the tag attributes like "color" and "size" are not surrounded
by quotes.

Maybe you can try BeautifulSoup module which aims to handle things like
that : http://www.crummy.com/software/BeautifulSoup/

- Jonathan
 
Z

ZeD

ZeeGeek said:
in the code returned by Live Space, they use <br> instead of <br /> so
that Blogger will complain that this tag is not valid because it
doesn't have a closing tag. Another example is that the contents of a
lot of the tag attributes like "color" and "size" are not surrounded
by quotes.

Are you sure it's xml? It sounds to me like "old" HTML
 
Z

ZeeGeek

Are you sure it's xml? It sounds to me like "old" HTML

Yeah, I realized this after I read the first reply to my post. That
was a big mistake to word it XML.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,764
Messages
2,569,567
Members
45,041
Latest member
RomeoFarnh

Latest Threads

Top