Jump to content

upload xml and auto edit


fentontech

Recommended Posts

I have no idea how to search for this function to find a solution but I am hoping you gurus can help me out.

 

This is most likel a simple script that I cant tie together myself and it would most likely take me days where it would take you guys minutes so here it goes....

 

was hoping for an ajax page where you have a form where you submit a file(xml) and a text value(example: MI0601503), all that would happen is that the script would edit the xml file by replacing anything after <COL82_BUILDING_ID> and before </COL82_BUILDING_ID> with the text value supplied in the form submited. I would also like to see a link to allow download of the new file....

 

Any help or suggestions would be greatly appreaciated.

 

Thank you

 

Example

 

Before edit:

<?xml version="1.0"?>

  <COL82_DETAIL>

    <COL82_PROJECT_ID>3238</COL82_PROJECT_ID>

    <COL82_BUILDING_ID>MI-06-015</COL82_BUILDING_ID>

    <COL82_UNIT_ID>2348</COL82_UNIT_ID>

    <COL82_REPORT_START_DT>20120101</COL82_REPORT_START_DT>

    <COL82_REPORT_END_DT>20120331</COL82_REPORT_END_DT>

    <COL82_BEDROOM_SIZE>2</COL82_BEDROOM_SIZE>

    <COL82_UNIT_SQFT>01000</COL82_UNIT_SQFT>

    <COL82_UNIT_TYPE>0099</COL82_UNIT_TYPE>

  </COL82_DETAIL>

</COL82_FILE>

 

After edit:

<?xml version="1.0"?>

  <COL82_DETAIL>

    <COL82_PROJECT_ID>3238</COL82_PROJECT_ID>

    <COL82_BUILDING_ID>MI0601503</COL82_BUILDING_ID>

    <COL82_UNIT_ID>2348</COL82_UNIT_ID>

    <COL82_REPORT_START_DT>20120101</COL82_REPORT_START_DT>

    <COL82_REPORT_END_DT>20120331</COL82_REPORT_END_DT>

    <COL82_BEDROOM_SIZE>2</COL82_BEDROOM_SIZE>

    <COL82_UNIT_SQFT>01000</COL82_UNIT_SQFT>

    <COL82_UNIT_TYPE>0099</COL82_UNIT_TYPE>

  </COL82_DETAIL>

</COL82_FILE>

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.