mirror of
				https://github.com/retspen/webvirtcloud
				synced 2025-07-31 12:41:08 +00:00 
			
		
		
		
	Cleaning libxml2 artifact.convert to lxml
This commit is contained in:
		
							parent
							
								
									41b80bc719
								
							
						
					
					
						commit
						8b347c1024
					
				
					 1 changed files with 0 additions and 8 deletions
				
			
		|  | @ -86,12 +86,9 @@ def get_xml_path(xml, path=None, func=None): | |||
|     of a passed function (receives xpathContext as its only arg) | ||||
|     """ | ||||
|     doc = None | ||||
|     #ctx = None | ||||
|     result = None | ||||
| 
 | ||||
|     #try: | ||||
|     doc = etree.fromstring(xml) | ||||
|     #ctx = doc.xpathNewContext() | ||||
|     if path: | ||||
|         result = get_xpath(doc, path) | ||||
| 
 | ||||
|  | @ -100,11 +97,6 @@ def get_xml_path(xml, path=None, func=None): | |||
| 
 | ||||
|     else: | ||||
|         raise ValueError("'path' or 'func' is required.") | ||||
|     #finally: | ||||
|         #if doc: | ||||
|         #    doc.freeDoc() | ||||
|         #if ctx: | ||||
|         #    ctx.xpathFreeContext() | ||||
|     return result | ||||
| 
 | ||||
| 
 | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue