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

  • Home
  • SEARCH
  • 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 719485
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 14, 20262026-05-14T05:38:50+00:00 2026-05-14T05:38:50+00:00

I would like to better understand the basic steps needed to a take an

  • 0

I would like to better understand the basic steps needed to a take an XML document like this Breakfast Menu…

<?xml version="1.0" encoding="ISO-8859-1"?>
<breakfast_menu>
    <food>
        <name>Belgian Waffles</name>
        <price>$5.95</price>
        <description>two of our famous Belgian Waffles with plenty of real maple syrup</description>
        <calories>650</calories>
    </food>
    <food>
        <name>Strawberry Belgian Waffles</name>
        <price>$7.95</price>
        <description>light Belgian waffles covered with strawberries and whipped cream</description>
        <calories>900</calories>
    </food>
    <food>
        <name>Berry-Berry Belgian Waffles</name>
        <price>$8.95</price>
        <description>light Belgian waffles covered with an assortment of fresh berries and whipped cream</description>
        <calories>900</calories>
    </food>
    <food>
        <name>French Toast</name>
        <price>$4.50</price>
        <description>thick slices made from our homemade sourdough bread</description>
        <calories>600</calories>
    </food>
    <food>
        <name>Homestyle Breakfast</name>
        <price>$6.95</price>
        <description>two eggs, bacon or sausage, toast, and our ever-popular hash browns</description>
        <calories>950</calories>
    </food>
</breakfast_menu>

And “export” it to say, an Access or MySQL database using XSLT, creating two joined tables:

  • Table: breakfast_menu
    • Field: menu_item_id
    • Field: food_id
  • Table: food
    • Field: food_id
    • Field: name
    • Field: price
    • Field: description
    • Field: calories

If there are online tutorials on this that you know of, I’d be interesting in learning more, as well.

Thanks.

  • 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-05-14T05:38:51+00:00Added an answer on May 14, 2026 at 5:38 am

    XSLT transforms a document tree to another document tree. As I know there are no direct connectors to MySQL that could insert transformed data into MYSQL.

    Another option might be to generate an XML that could be imported by MySQL.

    mysqldump utility accepts –xml option that allows to dump data in XML format (so you can transform your data to the format). Unfortunatelly, loading the data from the file back is a trick that is available only from MySQL 5.1. In MySQL 6.0.3 though there appears a new LOAD XML statement that can be used for the purpose.

    I believe that the task can easily be solved by reading the XML with an XML-reader and inserting the data row by row using standard database connectors in any modern programming language.

    UPD:

    An xsl might look as following:

    <?xml version="1.0" encoding="UTF-8"?>
    <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
        <xsl:output method="text"/>
    
        <xsl:template match="breakfast_menu">
            <xsl:apply-templates mode="insert-to-food" select="food" />
            <xsl:apply-templates mode="insert-to-breakfast_menu" select="food" />
        </xsl:template>
    
        <xsl:template mode="insert-to-food" match="food">
            <xsl:text>INSERT INTO food(</xsl:text>
            <xsl:number />
            <xsl:text>, '</xsl:text>
            <xsl:value-of select="name" />
            <xsl:text>', '</xsl:text>
            <xsl:value-of select="price" />
            <xsl:text>', '</xsl:text>
            <xsl:value-of select="description" />
            <xsl:text>', </xsl:text>
            <xsl:value-of select="calories" />
            <xsl:text>);&#xA;</xsl:text>
        </xsl:template>
    
        <xsl:template mode="insert-to-breakfast_menu" match="food">
            <xsl:text>INSERT INTO breakfast_menu(1, </xsl:text>
            <xsl:number />
            <xsl:text>);&#xA;</xsl:text>
        </xsl:template>
    </xsl:stylesheet>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Ask A Question

Stats

  • Questions 430k
  • Answers 431k
  • Best Answers 0
  • User 1
  • Popular
  • Answers
  • Editorial Team

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

    • 7 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • Editorial Team

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

    • 5 Answers
  • Editorial Team
    Editorial Team added an answer I'm just finishing up a mobile site project and ran… May 15, 2026 at 2:06 pm
  • Editorial Team
    Editorial Team added an answer Here's an example update trigger: create table Employees (id int… May 15, 2026 at 2:06 pm
  • Editorial Team
    Editorial Team added an answer If you're using cURL, take a look at curl_setopt options… May 15, 2026 at 2:06 pm

Trending Tags

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

Top Members

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.