473,396 Members | 2,113 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

XML-XSD Processing/Creation.

Hi All,

So i'm working with the WITSML standard, which is a pretty
massive standard defined in XML for the transfer of oilfield data.
There are a ton of XSD files for defining and checking all data in the
WITSML format. I'd like to be able to easily create XML based on the
types defined by the WITSML XSD files. Is there any way to create a
basic XML object based on an XSD file and then populate it with data.
Can i create python classes based off the XSD files? What else can I
do with the XSD files? I'm looking for a really simplistic way to work
with WITSML in python.

Regards,
Kenneth Miller

Thanks a ton!
Jan 2 '08 #1
4 4040
-On [20080102 18:21], xkenneth (xk******@gmail.com) wrote:
So i'm working with the WITSML standard, which is a pretty
massive standard defined in XML for the transfer of oilfield data.
I cannot answer (yet) the question of generating XML data from an XSD. But for
writing out XML files I like to use either ElementTree or lxml. Very easy and
straightforward use of XML from Python in my opinion.

--
Jeroen Ruigrok van der Werven <asmodai(-at-)in-nomine.org/ asmodai
イェルーン ラウフãƒ*ック ヴァン デル ウェルヴェン
http://www.in-nomine.org/ | http://www.rangaku.org/
Once sent from the Golden Hall...
Jan 2 '08 #2
xkenneth schrieb:
Hi All,

So i'm working with the WITSML standard, which is a pretty
massive standard defined in XML for the transfer of oilfield data.
There are a ton of XSD files for defining and checking all data in the
WITSML format. I'd like to be able to easily create XML based on the
types defined by the WITSML XSD files. Is there any way to create a
basic XML object based on an XSD file and then populate it with data.
Can i create python classes based off the XSD files? What else can I
do with the XSD files?
This might be worth looking at: http://www.rexx.com/~dkuhlman/#generateDS

cheers
Paul

Jan 2 '08 #3
paul wrote:
>Can i create python classes based off the XSD files? What else can I
do with the XSD files?
This might be worth looking at: http://www.rexx.com/~dkuhlman/#generateDS
If it's really such a complex XML language, the tool above might or might not
be of any help, as it doesn't support the whole XSD standard (and XML Schema
is very complex). It's worth a try, but don't expect too much.

The lxml way of dealing with XML languages is namespace implementation:

http://codespeak.net/lxml/dev/element_classes.html#id1

However, there isn't currently a way to automatically bootstrap an
implementation, especially not in XSD, so it depends on the language how much
work it will be to get this to a usable state.

Stefan
Jan 3 '08 #4
On Jan 3, 1:55 am, Stefan Behnel <stefan.behnel-n05...@web.dewrote:
paul wrote:
Can i create python classes based off the XSD files? What else can I
do with the XSD files?
This might be worth looking at:http://www.rexx.com/~dkuhlman/#generateDS

If it's really such a complex XML language, the tool above might or might not
be of any help, as it doesn't support the whole XSD standard (and XML Schema
is very complex). It's worth a try, but don't expect too much.

The lxml way of dealing with XML languages is namespace implementation:

http://codespeak.net/lxml/dev/element_classes.html#id1

However, there isn't currently a way to automatically bootstrap an
implementation, especially not in XSD, so it depends on the language how much
work it will be to get this to a usable state.

Stefan
Just a bump in an attempt to get some more help.
Jan 3 '08 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: Phil Powell | last post by:
// PROCESS XML CONTENT INTO DYNAMICALLY-NAMED ARRAYS foreach (array('mime', 'state', 'country') as $val) { $parser = xml_parser_create(); xml_parser_set_option($parser, XML_OPTION_SKIP_WHITE, 1);...
8
by: Robert J Egan | last post by:
Hi i'm trying to search a remote website page. The form returns xml information, though the page extension is missing. I retrieve the information and write it to the screen. So far so good -...
1
by: felipe_azv | last post by:
a got this code in asp to construct a xml , to export it to a url this is de asp code: <% SQL = "Select * from User where CodeUser in ("& request.form("C1" &")" set rs =...
0
by: Stylus Studio | last post by:
World's Most Advanced XML Schema Editor Adds Support for IBM AlphaWorks XML Schema Quality Checker to Improve XML Schema Style and Quality BEDFORD, MA -- 09/13/2005 -- Stylus Studio...
5
by: Kurt Bauer | last post by:
I have an ASP group calendar application which pulls calendar data from Exchange via webdav into an XML string. I then loop the XML nodes to populate a collection of appointments. Finally I use...
5
by: laks | last post by:
Hi I have the following xsl stmt. <xsl:for-each select="JOB_POSTINGS/JOB_POSTING \"> <xsl:sort select="JOB_TITLE" order="ascending"/> This works fine when I use it. But when using multiple...
0
by: UncleRic | last post by:
Environment: Mac OS X (10.4.10) on MacBook Pro I'm a Perl Neophyte. I've downloaded the XML::Parser module and am attempting to install it in my working directory (referenced via PERL5LIB env): ...
9
by: Lie | last post by:
Why this generates AttributeError, then not? Python 2.5.2 (r252:60911, Apr 21 2008, 11:17:30) on linux2 Type "help", "copyright", "credits" or "license" for more information. Traceback (most...
10
by: =?Utf-8?B?YzY3NjIyOA==?= | last post by:
Hi all, I had a program and it always works fine and suddenly it gives me the following message when a pass a xml file to our server program: error code: -1072896680 reason: XML document must...
0
by: Jacker | last post by:
Xpress Author for MS Word XML Documents In.vision Research empowers knowledge workers to create complex XML documents in Microsoft Word (2000-2003) with a normal Word experience. Deploy XML...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.