使用lxm访问XML声明

2024-09-28 05:20:10 发布

您现在位置:Python中文网/ 问答频道 /正文

我有一个具有以下xml结构的文件:

<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<ODX MODEL-VERSION="2.2.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="odx.xsd">
  <?Some_XML_Declarations 1?>
  <?DocumentSaveNo 0?>
  <other-elements/>
</ODX>

目前我正在使用lxml和objectify,有没有访问这些XML声明的方法(例如DocumentSaveNo

我搜索了lxmlapi页面,但什么也没找到


Tags: 文件nomodelversionxml结构utfencoding

热门问题