scheam中的<anyAttribute>元素

<?xml version="1.0" encoding="UTF-8"?>
<xsi:schema xmlns:xsi="http://www.w3.org/2001/XMLSchema" targetNamespace="http://www.w3.org/"
	xmlns:tns="http://www.w3.org/" elementFormDefault="qualified">
	<xsi:element name="persons">
	
	</xsi:element>
</xsi:schema>

<?xml version="1.0" encoding="UTF-8"?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
	targetNamespace="http://www.example.org/family" xmlns:tns="http://www.example.org/family"
	elementFormDefault="qualified">
	<xs:element name="person">
		<xs:complexType>
			<xs:sequence>
				<xs:element name="firstname" type="xs:string"></xs:element>
				<xs:element name="lastname" type="xs:string"></xs:element>
			</xs:sequence>
			<xs:anyAttribute/><!-- <anyAttribute> 元素使我们有能力通过未被 schema 规定的属性来扩展XML文档! -->
		</xs:complexType>
	</xs:element>
</xs:schema>

<?xml version="1.0" encoding="UTF-8"?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
	targetNamespace="http://www.example.org/children" xmlns:tns="http://www.example.org/children"
	elementFormDefault="qualified">
	<xs:attribute name="sex"><!-- 创建属性名称为sex的属性 -->
		<xs:simpleType>
			<xs:restriction base="xs:string"><!-- 创建的约束条件 -->
				<xs:enumeration value="男"></xs:enumeration><!-- 规定属性值得范围 -->
				<xs:enumeration value="女"></xs:enumeration>
			</xs:restriction>
		</xs:simpleType>
	</xs:attribute>
</xs:schema>

<?xml version="1.0" encoding="UTF-8"?>
<persons xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
	xmlns="http://www.w3.org" xmlns:fm="http://www.example.org/family"
	xmlns:ch="http://www.example.org/children"
	xsi:schemaLocation="http://www.w3.org per.xsd http://www.example.org/family family.xsd http://www.example.org/children children.xsd">
	<fm:person ch:sex="男">
		<fm:firstname></fm:firstname>
		<fm:lastname></fm:lastname>
	</fm:person>
	<fm:person ch:sex="女">
		<fm:firstname></fm:firstname>
		<fm:lastname></fm:lastname>
	</fm:person>
</persons>


  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
用python帮我把下面标签的有效数据提取出来<annotation> <folder>converted/CMS/2D目标检测/filter</folder> <filename>converted/CMS/2D目标检测/filter_empty_target_img_after_hash2/0/20230401180910649_61.jpg</filename> <source> <database>Unknown</database> <annotation>Unknown</annotation> <image>Unknown</image> </source> <size> <width>1920</width> <height>1536</height> <depth></depth> </size> <segmented>0</segmented> <object> <name>二轮车</name> <truncated>0</truncated> <occluded>0</occluded> <difficult>0</difficult> <bndbox> <xmin>626.38</xmin> <ymin>808.12</ymin> <xmax>650.03</xmax> <ymax>852.04</ymax> </bndbox> <attributes> <attribute> <name>rotation</name> <value>0.0</value> </attribute> <attribute> <name>track_id</name> <value>6</value> </attribute> <attribute> <name>keyframe</name> <value>True</value> </attribute> </attributes> </object> <object> <name>行人</name> <truncated>0</truncated> <occluded>0</occluded> <difficult>0</difficult> <bndbox> <xmin>1612.74</xmin> <ymin>831.51</ymin> <xmax>1627.34</xmax> <ymax>873.8</ymax> </bndbox> <attributes> <attribute> <name>rotation</name> <value>0.0</value> </attribute> <attribute> <name>track_id</name> <value>8</value> </attribute> <attribute> <name>keyframe</name> <value>True</value> </attribute> </attributes> </object> <object> <name>行人</name> <truncated>0</truncated> <occluded>0</occluded> <difficult>0</difficult> <bndbox> <xmin>1469.0</xmin> <ymin>832.96</ymin> <xmax>1489.43</xmax> <ymax>865.8</ymax> </bndbox> <attributes> <attribute> <name>rotation</name> <value>0.0</value> </attribute> <attribute> <name>track_id</name> <value>9</value> </attribute> <attribute> <name>keyframe</name> <value>True</value> </attribute> </attributes> </object> </annotation>
最新发布
07-20
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值