XML parser ignores processing instructions

Bug #1294645 reported by Martijn Pieters
12
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Beautiful Soup
Fix Released
Undecided
Unassigned

Bug Description

Although BeautifulSoup includes a ProcessingInstruction element, the LXML xml parser ignores these completely:

    def pi(self, target, data):
        pass

This is easy enough to remedy; apart from importing ProcessingInstruction all the method has to do is:

    def pi(self, target, data):
        self.soup.endData()
        self.soup.handle_data(target + ' ' + data)
        self.soup.endData(ProcessingInstruction)

Can this be added?

Tags: xml
tags: added: xml
Changed in beautifulsoup:
status: New → Fix Committed
Changed in beautifulsoup:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.