Updating XML file via form

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • paragguptaiiita
    New Member
    • Feb 2008
    • 21

    Updating XML file via form

    I want to update the XML file....
    i have a XML file, for that XML file i made a XSL file,this XSL file showing the data of XML file in a HTML form, data shown in text boxes, so that we can edit the data and a submit button is also present. Now when we click submit button,there is an action field that points to the ASP file,now i want to update the data of XML file.



    I am using ASP till now, but the problem is if the value of the 'id' attribute is same for all field than problem comes. and other problem is-lets assume value of 'id' attribute is unique then if we want to update the value of both field_value as well as taborder, then how can we do this....
  • pronerd
    Recognized Expert Contributor
    • Nov 2006
    • 392

    #2
    It sounds like the problem is with the data modeling not with XML. If the XML elements do not have a unique attribute to identify them then they can not be updated. This is exactly why HTML element ID attributes are all required to be unique, why most database tables need primary keys, and why collection objects keys have to be unique.

    Comment

    • paragguptaiiita
      New Member
      • Feb 2008
      • 21

      #3
      is there any other method for updating that file...

      Comment

      • jkmyoung
        Recognized Expert Top Contributor
        • Mar 2006
        • 2057

        #4
        Make one of the elements the central element, identified by it's id.
        The other elements should have a way to link back to the main element, say by parentid attribute or something like that.

        You can find the main element by id, and the secondary element by the parentid.

        Comment

        Working...