I'm trying to match lines with the xs:element tag that only contain minOccurs. As seen below some of them contain both search criteria on one line, some of them span multiple lines. Is there a way of selecting them using grep and regular expressions.
<xs:element name="shipto">
<xs:complexType>
<xs:sequence>
<xs:element name="name" type="xs:string"/>
<xs:element name="address" type="xs:string"/>
<xs:element name="city" minOccurs="1" type="xs:string"/>
<xs:element name="country"
minOccurs="1" type="xs:string"/>
</xs:sequence>
</xs:complexType>
</xs:element>
The correct output should be as follows:
<xs:element name="city" minOccurs="1" type="xs:string"/>
<xs:element name="country"
minOccurs="1" type="xs:string"/>