Skip to Content
For Enterprise
For Government
For Higher Ed
For Individuals
For Marketing
For Enterprise
For Government
For Higher Ed
For Individuals
For Marketing
Explore Skills
Cloud Computing
Microsoft Azure
Amazon Web Services (AWS)
Google Cloud
Cloud Migration
Cloud Deployment
Cloud Platforms
Data Engineering
Data Warehouse
SQL
Apache Spark
Microsoft SQL Server
MySQL
Kafka
Data Lake
Streaming & Messaging
NoSQL Databases
Relational Databases
Data Science
Pandas
R
MATLAB
SAS
D3
Power BI
Tableau
Statistics
Exploratory Data Analysis
Data Visualization
AI & ML
Generative AI
Machine Learning
Artificial Intelligence (AI)
Deep Learning
Reinforcement Learning
Natural Language Processing
TensorFlow
Scikit-Learn
Hyperparameter Tuning
MLOps
Programming Languages
Java
JavaScript
Spring
Python
Go
C#
C++
C
Swift
Rust
Functional Programming
Software Architecture
Object-Oriented
Distributed Systems
Domain-Driven Design
Architectural Patterns
IT/Ops
Kubernetes
Docker
GitHub
Terraform
Continuous Delivery
Continuous Integration
Database Administration
Computer Networking
Operating Systems
IT Certifications
Security
Network Security
Application Security
Incident Response
Zero Trust Model
Disaster Recovery
Penetration Testing / Ethical Hacking
Governance
Malware
Security Architecture
Security Engineering
Security Certifications
Design
Web Design
Graphic Design
Interaction Design
Film & Video
User Experience (UX)
Design Process
Design Tools
Business
Agile
Project Management
Product Management
Marketing
Human Resources
Finance
Team Management
Business Strategy
Digital Transformation
Organizational Leadership
Soft Skills
Professional Communication
Emotional Intelligence
Presentation Skills
Innovation
Critical Thinking
Public Speaking
Collaboration
Personal Productivity
Confidence / Motivation
Features
All features
Verifiable skills
AI Academy
Courses
Certifications
Interactive learning
Live events
Superstreams
Answers
Insights reporting
Radar Blog
Buy Courses
Plans
Sign In
Try Now
O'Reilly Platform
book
可编程网络自动化
by
Jason Edelman
,
Scott S. Lowe
,
Matt Oswalt
January 2023
Intermediate to advanced
458 pages
14h 16m
Chinese
Posts & Telecom Press
Content preview from
可编程网络自动化
126
|
第
5
章
个
<device>
元素),嵌套在一个覆盖范围更广的
<devices>
标签内。
另外,我们还注意到每个子元素都包含数据。根元素包含
XML
子元素
,子元素包含文本
数据。回想一下数据类型部分,这些可以使用
Python
程序中的字符串值来描述。
XML
元素也具有属性。
<device
type="datacenter-switch"
/>
部分信息可能会有一些与之关联的元数据,使用子元素未必合适,这时就可以使用属性。
XML
规范也实现了名称空间系统
,该系统能避免出现元素命名冲突。在创建
XML
文档
时,开发人员可以任意选用名称。当软件使用
XML
时
,可能会为两个
XML
元素指定同
样的名称,但元素的内容和用途各不相同。
例如,
XML
文档可以实现下列元素。
<device>
Palm Pilot
</device>
这个例子中使用了元素名称
<device>
,但其用途显然不是为了描述网络设备,其意义与之
前例子中的交换机定义完全不同。
通过
xmlns
命名在
XML
文档中定义并利用前缀,名称空间可以帮助解决这一问题。
<root>
<e:device
xmlns:c="http://exampleurl/enduserdevices"
>
Palm Pilot
</e:device>
<n:device
xmlns:m="http://exampleurl/networkdevices"
>
<n:vendor>
Cisco
</n:vendor>
<n:model>
Nexus 7700
</n:model>
<n:osver> ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial
You might also like
Python和NLTK实现自然语言处理
Posts & Telecom Press, Nitin Hardeniya
Go程序设计语言
艾伦A. A.多诺万, 布莱恩W. 柯尼汉
弱监督学习实用指南
Wee Hyong Tok, Amit Bahree, Senja Filipi
Python实用技能学习指南
Posts & Telecom Press, Robert Smallshire, Austin Bingham
Publisher Resources
ISBN: 9787115606181