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 7764511
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 1, 20262026-06-01T14:55:51+00:00 2026-06-01T14:55:51+00:00

I have some XML that I want to parse using the lxml method in

  • 0

I have some XML that I want to parse using the lxml method in python. Having parsed the elements I want to be able to compare some structured objects (looking for delta).

There is about 50 XML files I need to parse, and the data in the XML is in an ‘uneven’ form (I’m not sure what the correct name is).

Simplified Example XML:

<ID 1>
 <parameter A>
 <parameter B>
</ID 1>
<ID 2>
 <parameter A>
 <parameter B>
 <parameter C> 
</ID 2>
<ID 3>
 <parameter A>
</ID 3>

How would I go about creating a suitable db (mySQL?) structure that I can use to isolate each object via ID, and compare each of the parameter elements.

I’m not sure if this makes sense – I’m not hugely au fait with the correct terminology.

The actual source xml is all the files listed here: http://www.nationalarchives.gov.uk/aboutapps/pronom/droid-signature-files.htm

These files are versions of the same structure that have been updated over past few years. I don’t need all the XML elements in the DB, just a subset, starting with a version number, release date and then the individual ID’s and byte patterns found in the two primary sections.

Pushing it into mysql may not be the best way forward, but I figured if I did that I would then use a python/html front end to put together a search/comparison tool.

  • 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. Editorial Team
    Editorial Team
    2026-06-01T14:55:52+00:00Added an answer on June 1, 2026 at 2:55 pm

    The key phrase for me in your question is: ‘I don’t need all the XML elements in the DB, just a subset’

    Given that you can know upfront all the elements of the subset that you want to compare I suggest a single table with a column for each data element. This should make it easier to handle your later reporting requirement on the data.

    The other alternative of storing the elements row-wise is generally considered an anti-pattern and will make the reporting and comparison significantly harder. If you don’t know beforehand the type (or number) of elements to compare this sort of a strategy mught be required.

    EDIT: To be more explicit I was thinking the table would have columns:
    ID,Paramater1,Parameter2,Parameter3,Parameter4
    where parameterx is one of the ‘comparable parameters’ you were looking at – for many of these the column might be left null because no such parameter exists.

    Then there would be only one table over all and one row in that table for each ID.

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

Sidebar

Related Questions

I want to parse some large XML file using linq to XML but I
I am using SAX to parse some large XML files and I want to
I have some XML data that I want to transmit to a web server
I have a char* buffer of data that I want to parse as XML
I have some XML code that looks like this <SEARCHRESULTS> <FUNCTION name=BarGraph> <PARAMETER name=numList></PARAMETER>
I have some xml files that contain text, which are displayed on my website.
I have a function that loads in some XML that looks like this: private
I am parsing some XML that will have a link such as the following
I have some data in an XML element that looks like this: <?xml version=1.0
I have some code that uses Open XML to open up a .docx file,

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

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.