SitePoint Sponsor

User Tag List

Results 1 to 4 of 4

Thread: Convert Xml

  1. #1
    SitePoint Zealot
    Join Date
    Jan 2010
    Posts
    132
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Convert Xml

    I've exported the database to XML

    Is it possible to convert structured XML to become suitable for other database

    For exampl
    I want to convert this xml structure

    Code:
    <datafield tag="400" ind1=" " ind2=" ">
        <subfield code="a">6</subfield>
      </datafield>
      <datafield tag="245" ind1=" " ind2=" ">
        <subfield code="a">introduction</subfield>
      </datafield>
      <datafield tag="260" ind1=" " ind2=" ">
        <subfield code="a">Mohamed , Samy</subfield>
        <subfield code="c">2010</subfield>
      </datafield>
    to this structure
    Code:
    <article_settings>
            <article_id>6</article_id>
            <locale>en_US</locale>
            <setting_name>title</setting_name>
            <setting_value>introduction</setting_value>
            <setting_type>string</setting_type>
        </article_settings>
        <article_settings>
            <article_id>6</article_id>
            <locale>en_US</locale>
            <setting_name>cleanTitle</setting_name>
            <setting_value>introduction</setting_value>
            <setting_type>string</setting_type>
        </article_settings>
        <article_settings>
            <article_id>1</article_id>
            <locale>en_US</locale>
            <setting_name>abstract</setting_name>
            <setting_value>intro to </setting_value>
            <setting_type>string</setting_type>
        </article_settings>
        <article_settings>
            <article_id>1</article_id>
            <locale>en_US</locale>
            <setting_name>sponsor</setting_name>
            <setting_value></setting_value>
            <setting_type>string</setting_type>
        </article_settings>

  2. #2
    From Italy with love silver trophybronze trophy
    guido2004's Avatar
    Join Date
    Sep 2004
    Posts
    9,509
    Mentioned
    163 Post(s)
    Tagged
    4 Thread(s)
    I have no idea, I don't see any connection between the two files ?

  3. #3
    SitePoint Zealot
    Join Date
    Jan 2010
    Posts
    132
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I have php website using mysql database and i want to using an open source program(using php+mysql)

    so i want to insert my data to this open source

    can help???

  4. #4
    From Italy with love silver trophybronze trophy
    guido2004's Avatar
    Join Date
    Sep 2004
    Posts
    9,509
    Mentioned
    163 Post(s)
    Tagged
    4 Thread(s)
    What is the relationship between the two structures. How does the first one convert to the second one?
    Not in code, but in logical terms?


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •