Ich muss validieren XML und XSD nicht sehr akzeptabel (Standard verwendet zu viele xsd: Sequenz und Trick mit xsd: Wahl macht Validierung zu akzeptabel (nicht sicher, das ist das richtige Wort))Befreien Sie sich von Textinhalt in XML
Also, gibt es eine gute Möglichkeit, diese
<?xml version="1.0" encoding="UTF-8"?>
<bookstore>
<book category="cooking">
<title lang="en">Everyday Italian</title>
<author>Giada De Laurentiis</author>
<year>2005</year>
<price>30.00</price>
</book>
<book category="children">
<title lang="en">Harry Potter</title>
<author>J K. Rowling</author>
<year>2005</year>
<price>29.99</price>
</book>
<book category="web">
<title lang="en">Learning XML</title>
<author>Erik T. Ray</author>
<year>2003</year>
<price>39.95</price>
</book>
</bookstore>
In diese
<?xml version="1.0" encoding="UTF-8"?>
<bookstore>
<book category="cooking">
<title lang="en"></title>
<author></author>
<year></year>
<price></price>
</book>
<book category="children">
<title lang="en"></title>
<author></author>
<year></year>
<price></price>
</book>
<book category="web">
<title lang="en"></title>
<author></author>
<year></year>
<price></price>
</book>
</bookstore>
auf Fenster mit python/java zu drehen/go? Es ist kein einmaliger Job, ich muss es automatisch tun
Sie können einen Weg finden, um Ihr Problem mit Regex zu lösen, überprüfen Sie [dieses Thema] (https://stackoverflow.com/questions/7167279/regex-select-all-text-between-tags) –