XSD modules?
Mark Overmeer
mark at overmeer.net
Thu Jun 14 18:10:33 BST 2007
* Matt Wilson (codebrewery at gmail.com) [070614 15:41]:
> >The weird thing in your question is that you usually already know the
> >schema (it is static), and you usually want to process the elements
> >and attributes in the messages produced with the schema.
>
> OK, perhaps I should explain exactly what I'm trying to do, because I
> suspect the lack of context is causing confusion.
>
> I'm in the process of adding element (e.g. hr, acronym, body) and
> attribute (e.g. id, href, style) intellisense-style autocompletion to
> an XML editor, which means I need to be able to load an XSD file and
> query it for a list of elements within a namespace, or a list of
> attributes for a particular element.
Ok.
One thing you can do is use (my) XML::Compile. You can use the schema
of schema's to decode the XSD. XML::Compile::WSDL and XML::Compile::SOAP
show how extremely simple that is (with three lines of code). The result
is a nested HASH in which you can seach the perl way.
--
Regards,
MarkOv
------------------------------------------------------------------------
Mark Overmeer MSc MARKOV Solutions
Mark at Overmeer.net solutions at overmeer.net
http://Mark.Overmeer.net http://solutions.overmeer.net
More information about the london.pm
mailing list