Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Python > XML Validation in Python using XSV

Reply
Thread Tools

XML Validation in Python using XSV

 
 
bmichel@gmail.com
Guest
Posts: n/a
 
      11-22-2006
I'd like to use XSV for validating an XML file in Python.
I am working on Linux Debian platform.
I'm not sure how to install XSV and how to configure it. My goal is to
be able to import the XSV library in Python and be able to use it's
functions.

XSV v2.10 for Debian available here:
ftp://ftp.cogsci.ed.ac.uk/pub/XSV/XSV_2.10-1_all.deb

How do i do that?

 
Reply With Quote
 
 
 
 
Stefan Behnel
Guest
Posts: n/a
 
      11-22-2006
http://www.velocityreviews.com/forums/(E-Mail Removed) wrote:
> I'd like to use XSV for validating an XML file in Python.
> I am working on Linux Debian platform.
> I'm not sure how to install XSV and how to configure it. My goal is to
> be able to import the XSV library in Python and be able to use it's
> functions.


You can use "dpkg" to install the .deb. Read "man dpkg".

BTW: any reason you need to use XSV? There are some other libraries out there
that can validate XML based on XML Schema and RelaxNG, e.g. lxml. They are
much more powerful than XSV.

Stefan
 
Reply With Quote
 
 
 
 
bmichel@gmail.com
Guest
Posts: n/a
 
      11-22-2006
No particular reason for XSV
I just want to validate XML files against an XML schema through Python.
If you can suggest any other package for debian, I'll be glad to try
it.

Michel

Stefan Behnel wrote:
> (E-Mail Removed) wrote:
> > I'd like to use XSV for validating an XML file in Python.
> > I am working on Linux Debian platform.
> > I'm not sure how to install XSV and how to configure it. My goal is to
> > be able to import the XSV library in Python and be able to use it's
> > functions.

>
> You can use "dpkg" to install the .deb. Read "man dpkg".
>
> BTW: any reason you need to use XSV? There are some other libraries out there
> that can validate XML based on XML Schema and RelaxNG, e.g. lxml. They are
> much more powerful than XSV.
>
> Stefan


 
Reply With Quote
 
Stefan Behnel
Guest
Posts: n/a
 
      11-22-2006
> (E-Mail Removed) wrote:
> Stefan Behnel wrote:
>> BTW: any reason you need to use XSV? There are some other libraries out there
>> that can validate XML based on XML Schema and RelaxNG, e.g. lxml. They are
>> much more powerful than XSV.

>
> No particular reason for XSV
> I just want to validate XML files against an XML schema through Python.
> If you can suggest any other package for debian, I'll be glad to try
> it.


Well, as I said:

http://packages.debian.org/unstable/python/python-lxml
http://codespeak.net/lxml/

Just try "apg-get install python-lxml".

Stefan
 
Reply With Quote
 
bmichel@gmail.com
Guest
Posts: n/a
 
      11-22-2006
I've read a bit about lxml, didn't found anything related to validating
XML schema...

Maybe you can give more details on how to install lxml and use it in
Python to validate XML files against an XML Schema
I'm going to ask the server administrator to install lxml, so I can't
play around a lot with the system trying stuff.

It would be nice if you can tell me:
- What files to download, where to download them from
- How to install it and configure it
- How to import the functions in Python

Thanks again
Michel

Stefan Behnel wrote:
> > (E-Mail Removed) wrote:
> > Stefan Behnel wrote:
> >> BTW: any reason you need to use XSV? There are some other libraries out there
> >> that can validate XML based on XML Schema and RelaxNG, e.g. lxml. They are
> >> much more powerful than XSV.

> >
> > No particular reason for XSV
> > I just want to validate XML files against an XML schema through Python.
> > If you can suggest any other package for debian, I'll be glad to try
> > it.

>
> Well, as I said:
>
> http://packages.debian.org/unstable/python/python-lxml
> http://codespeak.net/lxml/
>
> Just try "apg-get install python-lxml".
>
> Stefan


 
Reply With Quote
 
Stefan Behnel
Guest
Posts: n/a
 
      11-22-2006
(E-Mail Removed) wrote:
> Stefan Behnel wrote:
>>> (E-Mail Removed) wrote:
>>> Stefan Behnel wrote:
>>>> BTW: any reason you need to use XSV? There are some other libraries out there
>>>> that can validate XML based on XML Schema and RelaxNG, e.g. lxml. They are
>>>> much more powerful than XSV.
>>> No particular reason for XSV
>>> I just want to validate XML files against an XML schema through Python.
>>> If you can suggest any other package for debian, I'll be glad to try
>>> it.

>> Well, as I said:
>>
>> http://packages.debian.org/unstable/python/python-lxml
>> http://codespeak.net/lxml/
>>
>> Just try "apg-get install python-lxml".

>
> I've read a bit about lxml, didn't found anything related to validating
> XML schema...
>
> Maybe you can give more details on how to install lxml and use it in
> Python to validate XML files against an XML Schema
> I'm going to ask the server administrator to install lxml, so I can't
> play around a lot with the system trying stuff.
>
> It would be nice if you can tell me:
> - What files to download, where to download them from
> - How to install it and configure it
> - How to import the functions in Python


Being able to read can simplify a lot of things these days.

See above to find out how to install lxml on Debian. See the page mentioned
above to find out how to use lxml. I mean this page:

http://codespeak.net/lxml/

in particular this section:

http://codespeak.net/lxml/#documentation

or simply search that page for things like "XML Schema" or "API documentation".

Hope that gets you on the right track,
Stefan
 
Reply With Quote
 
bmichel@gmail.com
Guest
Posts: n/a
 
      11-22-2006
This works for me.
You were very helpful, thank you!

Michel

Stefan Behnel wrote:
> (E-Mail Removed) wrote:
> > Stefan Behnel wrote:
> >>> (E-Mail Removed) wrote:
> >>> Stefan Behnel wrote:
> >>>> BTW: any reason you need to use XSV? There are some other libraries out there
> >>>> that can validate XML based on XML Schema and RelaxNG, e.g. lxml. They are
> >>>> much more powerful than XSV.
> >>> No particular reason for XSV
> >>> I just want to validate XML files against an XML schema through Python.
> >>> If you can suggest any other package for debian, I'll be glad to try
> >>> it.
> >> Well, as I said:
> >>
> >> http://packages.debian.org/unstable/python/python-lxml
> >> http://codespeak.net/lxml/
> >>
> >> Just try "apg-get install python-lxml".

> >
> > I've read a bit about lxml, didn't found anything related to validating
> > XML schema...
> >
> > Maybe you can give more details on how to install lxml and use it in
> > Python to validate XML files against an XML Schema
> > I'm going to ask the server administrator to install lxml, so I can't
> > play around a lot with the system trying stuff.
> >
> > It would be nice if you can tell me:
> > - What files to download, where to download them from
> > - How to install it and configure it
> > - How to import the functions in Python

>
> Being able to read can simplify a lot of things these days.
>
> See above to find out how to install lxml on Debian. See the page mentioned
> above to find out how to use lxml. I mean this page:
>
> http://codespeak.net/lxml/
>
> in particular this section:
>
> http://codespeak.net/lxml/#documentation
>
> or simply search that page for things like "XML Schema" or "API documentation".
>
> Hope that gets you on the right track,
> Stefan


 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Validation with XSD using XML::LibXML::Schema, and XML::Validator::Schema huntingseasonson@gmail.com Perl Misc 5 11-29-2006 12:37 PM
XSV error ajcoon@gmail.com XML 2 10-25-2006 10:48 PM
How to use XSV ? Razvan XML 2 02-20-2005 12:18 PM
XML schema validation of one xml block based on values from another xml block Andy XML 0 11-18-2004 11:04 PM
New release (2.8) of XSV Henry S. Thompson XML 0 10-08-2004 08:39 AM



Advertisments