Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 82773
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 10, 20262026-05-10T21:40:10+00:00 2026-05-10T21:40:10+00:00

We have developers with knowledge of these languages – Ruby , Python, .Net or

  • 0

We have developers with knowledge of these languages – Ruby , Python, .Net or Java. We are developing an application which will mainly handle XML documents. Most of the work is to convert predefined XML files into database tables, providing mapping between XML documents through database, creating reports from database etc. Which language will be the easiest and fastest to work with? (It is a web-app)

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. 2026-05-10T21:40:11+00:00Added an answer on May 10, 2026 at 9:40 pm

    A dynamic language rules for this. Why? The mappings are easy to code and change. You don’t have to recompile and rebuild.

    Indeed, with a little cleverness, you can have your ‘XML XPATH to a Tag -> DB table-field’ mappings as disjoint blocks of Python code that your main application imports.

    The block of Python code is your configuration file. It’s not an .ini file or a .properties file that describes a configuration. It is the configuration.

    We use Python, xml.etree and the SQLAlchemy (to separate the SQL out of your programs) for this because we’re up and running with very little effort and a great deal of flexibility.


    source.py

    '''A particular XML parser.  Formats change, so sometimes this changes, too.'''  import xml.etree.ElementTree as xml  class SSXML_Source( object ):     ns0= 'urn:schemas-microsoft-com:office:spreadsheet'     ns1= 'urn:schemas-microsoft-com:office:excel'     def __init__( self, aFileName, *sheets ):         '''Initialize a XML source.         XXX - Create better sheet filtering here, in the constructor.         @param aFileName: the file name.         '''         super( SSXML_Source, self ).__init__( aFileName )         self.log= logging.getLogger( 'source.PCIX_XLS' )         self.dom= etree.parse( aFileName ).getroot()     def sheets( self ):         for wb in self.dom.getiterator('{%s}Workbook' % ( self.ns0, ) ):             for ws in wb.getiterator( '{%s}Worksheet' % ( self.ns0, ) ):                 yield ws     def rows( self ):         for s in self.sheets():             print s.attrib['{%s}Name' % ( self.ns0, ) ]             for t in s.getiterator( '{%s}Table' % ( self.ns0, ) ):                 for r in t.getiterator( '{%s}Row' % ( self.ns0, ) ):                     # The XML may not be really useful.                     # In some cases, you may have to convert to something useful                     yield r 

    model.py

    '''This is your target object.   It's part of the problem domain; it rarely changes. ''' class MyTargetObject( object ):     def __init__( self ):         self.someAttr= ''         self.anotherAttr= ''         self.this= 0         self.that= 3.14159     def aMethod( self ):         '''etc.'''         pass 

    builder_today.py One of many mapping configurations

    '''One of many builders.  This changes all the time to fit specific needs and situations.  The goal is to keep this short and to-the-point so that it has the mapping and nothing but the mapping. '''  import model  class MyTargetBuilder( object ):     def makeFromXML( self, element ):         result= model.MyTargetObject()         result.someAttr= element.findtext( 'Some' )         result.anotherAttr= element.findtext( 'Another' )         result.this= int( element.findtext( 'This' ) )         result.that= float( element.findtext( 'that' ) )         return result 

    loader.py

    '''An application that maps from XML to the domain object using a configurable 'builder'. ''' import model import source import builder_1 import builder_2 import builder_today  # Configure this:  pick a builder is appropriate for the data: b= builder_today.MyTargetBuilder()  s= source.SSXML_Source( sys.argv[1] ) for r in s.rows():     data= b.makeFromXML( r )     # ... persist data with a DB save or file write 

    To make changes, you can correct a builder or create a new builder. You adjust the loader source to identify which builder will be used. You can, without too much trouble, make the selection of builder a command-line parameter. Dynamic imports in dynamic languages seem like overkill to me, but they are handy.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Ask A Question

Stats

  • Questions 57k
  • Answers 57k
  • Best Answers 0
  • User 1
  • Popular
  • Answers
  • Editorial Team

    How to approach applying for a job at a company ...

    • 7 Answers
  • Editorial Team

    How to handle personal stress caused by utterly incompetent and ...

    • 5 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • added an answer I did a similar thing a couple of months back.… May 11, 2026 at 8:19 am
  • added an answer I've been using LLBLGen Pro for a couple years now… May 11, 2026 at 8:19 am
  • added an answer Maybe better way to put User into the HttpContext? In… May 11, 2026 at 8:19 am

Top Members

Trending Tags

analytics british company computer developers django employee employer english facebook french google interview javascript language life php programmer programs salary

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Related Questions

Loading...

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.