XML rule based file

By ejayb9 ·
Hopefully I can explain this well enough-
I want to build rules into an XML file, fileA, that will be used to verify data in another XML file, fileB. XSD and DTD will not work. The rules will be applied to attribute values as well as element values.

For example,
(person firstname="john" lastname="doe")

(firstname="[a-z][A-Z]") <!-- first char is uppercase -->

Then using VB to read in the rules file (fileA) and mark/flag the data file (fileB).

Can this be done?
Thanks, any help is appreciated.

This conversation is currently closed to new comments.

2 total posts (Page 1 of 1)  
| Thread display: Collapse - | Expand +

All Answers

Collapse -

Well actually you can do that in an xsd

by Tony Hopkinson In reply to XML rule based file

look up xsd:restriction. the sub element xsd:pattern takes a regular expression.

Here's an example.

Why are you using attributes, to store first and last name. You are going to struggle with more than this trying to use the content, you are fighting a basic xml concept.

Back to Software Forum
2 total posts (Page 1 of 1)  

Related Discussions

Related Forums