How to change the table of a XML file automatic without losing te content.

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • JosM
    New Member
    • Feb 2008
    • 3

    How to change the table of a XML file automatic without losing te content.

    Can somebody please help me.
    I'm complete novice in XML.
    The only program i understand is DbaseIV language.
    The data comes in XML file.
    I want to change the table automatic (?java) without losing the content

    Example:

    <orders>
    <order_id>1</order_id>
    <user_id>64</user_id>
    <vendor_id>41 2</vendor_id>

    I want to change this automaticly in:

    <orders>
    <order>1</order>
    <user>64</user>
    <vendor>412</vendor>

    So order_id must be changed in order, vendor_id must be changed in vendor etc.

    After that i can read it in another program with another protocol of data

    Can it by Java or ...
    Thanks for your help.Jos email info@jmoeskops. nl
  • jkmyoung
    Recognized Expert Top Contributor
    • Mar 2006
    • 2057

    #2
    A cheap effective way would be to load in the file and delete all the instances of the string "_id"

    You can definitely do this with java.
    If you want to go the xml way (more overhead), you could use XSLT, or another DOM manipulation tool.

    Comment

    Working...