logo       

Sponsor
FREE Network Mapping Tool for Microsoft® Office Visio® Professional 2007
Don't map your network by hand - let LANsurveyor Exx press for Microsoft Visio Professional 2007 automatically create network diagrams for you!

ParsedXML questions: msg#00006

web.zope.xml

Subject: ParsedXML questions

Hi all,

I have already successfully developped part of a project using ParsedXML.

However I'm now stuck by the following problem :

A python script receives (from a form) a number of xhtml contents.
I need to store them as a ParsedXML object.
I'm creating a ParsedXML with :

container.manage_addProduct['ParsedXML'].manage_addParsedXML('article_saved','')

Then I'm filling the DOM with the content pieces as follows :

article=container['article_saved']
artroot=article.documentElement
for x in REQUEST.form:
node = artroot.createElement(x)
node.appendChild(artroot.createTextNode(REQUEST.form[x]))
artroot.appendChild(node)

This works great except of course that the xhtml itself doesn't get parsed...

1. I don't see how I could have it parsed directly from within the script.

2. I also explored the (not so clean) idea of writing everything to a temporary file, and have it then parsed with the "parseFile" function mentionned in the help. The problem is that I don't know how to call this function.. it's neither a method of a ParsedXML object, or from a file object...

I have turned the net upside-down to find an answer, some examples or a good doc without success.





Only community members can participate in forum threads. You must Register or log in to contribute.

<Prev in Thread] Current Thread [Next in Thread>
Sponsor
FREE Network Mapping Tool for Microsoft® OfficeVisio Professional 2007
Don't map your network by hand - let LANsurveyor Express for Microsoft Visio Professional 2007
automatically create network diagrams for you!
Google Custom Search

Free Magazines

Cisco News
Receive a free quarterly e-newsletter with exclusive articles on how Cisco IT uses its own products and solutions to enable the business.
subscribe

Systems Management News, the newspaper for IT systems administration and data center managers! Each issue of Systems Management News is chock-full of news and analysis to help you understand what's happening in your field.
subscribe

The Enterprise Newsweekly eWeek is the essential technology information source for builders of e-business.
subscribe

Oracle Magazine Oracle Magazine contains technology strategy articles, sample code, tips, Oracle and partner news, how to articles for developers and DBAs, and more. Oracle (NASDAQ: ORCL) is the world's largest enterprise software company.
subscribe

Total Telecom Total Telecom is "The Economist of the communications industry".
subscribe

Navigation

Home | sitemap | advertise | OSDir is an inevitable website. super tiny logo