How to add the same attribute multiple times to an Element Tag in XML

后端 未结 1 623
轻奢々
轻奢々 2020-12-19 01:45

In an XML Schema (XSD) I am writing, I need to define an attribute which can occur multiple times inside its parent element.

Just to clear it with an example : the p

1条回答
  •  生来不讨喜
    2020-12-19 02:12

    You can't. Attribute names are unique per element.

    If you need to have multiple bits of data under the same name, then the usual solutions are either a space separated list or child elements.

    
    

    or

    
        foo
        bar
        baz
    
    

    0 讨论(0)
提交回复
热议问题