LibXml2 schema validation

BlitzMax Forums/Brucey's Modules/LibXml2 schema validation

col(Posted 2012) [#1]
Hiya,

Awesome module! I nearly built this myself until I saw your version brucey.

Looking through the docs it talks about and shows how to validate xml with a dtd, but I want to validate an xml against an xsd as the user is typing the xml file. I've been looking for the xmlSchemaParse and validate functions ( and family ). Are these included and maybe under a different guise? I can't see anything obvious.

Cheers :P


Brucey(Posted 2012) [#2]
It's quite possible I've missed some of the API… it's a big API.


col(Posted 2012) [#3]
No probs. I didn't know if I was missing something. I can't see the c calls so I assume it's not in there. No worries, I'm sure I can get something working. I almost starting writing wrappers just for what I need and I'd have been rewriting what you've already done - what a waste of time that would have been!

it's a big API.

I know... it's HUGE !!

Thanks for making this already :)


col(Posted 2012) [#4]
Oh wait...

Just for the record, there is the TxmlTextReader.schemaValidate method. It will validate a complete xml file against the schema. It will come in handy, but I want to validate partial xml against the xsd.


Brucey(Posted 2012) [#5]
Yep. I'll have a look at implementing the schema validation.


col(Posted 2012) [#6]
Wow, cool!

I have a simple workaround working. I'm not making a complete xml editor as such so I can easily scan the xsd and hard code what I need, in fact the schema is really straight forward so I might not bother with it at all, and build my own 'mini validator'

No rush though, it's christmas :D