AndrewHoward 0 Posted November 11, 2022 Hello, I would like to get data from a sql db, go through data and generate XML file. The XML needs to be valid when checkeck against XSD schema. If I had a list of users: UserID, Name ------ ---- 01 David 02 Test1 How do I validate user Names against XSD rule: e.g. <xs:element name="Name" minOccurs="1"> <xs:simpleType> <xs:restriction base="xs:string"> <xs:pattern value="[^0-9\r\n|"]{1,50}"/> </xs:restriction> </xs:simpleType> </xs:element> I have about 50 fields & 50 rules. Which is the best way to do this ? Anyone have an example I can look at ? Thank you Share this post Link to post
FPiette 385 Posted November 12, 2022 I have no idea about XSD but for sure you can do the check in Delphi using System.RegularExpressions to do the check. Share this post Link to post