Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 12 of 12
  1. #1
    New to the CF scene
    Join Date
    May 2011
    Posts
    7
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Form for XML data

    Hi

    I have to type data in an XML document for a database.
    I think it would be easier to use a form in order to enter my data into the XML document, rather than typing them between the XML tags in an XML editor.
    Can you please tell me how to create such a form? I'm a beginner, I have absolutely no idea how to do...

    Thanks a lot in advance!

  • #2
    Senior Coder
    Join Date
    Jan 2011
    Location
    Missouri
    Posts
    4,205
    Thanks
    23
    Thanked 605 Times in 604 Posts
    First look up forms. Make one for your purposes. Then use PHP to make your xml file.
    Evolution - The non-random survival of random variants.

    "If you leave hydrogen alone, for long enough, it begins to think about itself."

  • #3
    New to the CF scene
    Join Date
    May 2011
    Posts
    7
    Thanks
    0
    Thanked 0 Times in 0 Posts
    First look up forms.
    where? how? with what software?

    Make one for your purposes.
    how?

    Then use PHP to make your xml file.
    I don't know how to use Php.
    I'm a beginner, I just know a little bit of html and xml, I don't know how to make a form in any way...

  • #4
    Senior Coder
    Join Date
    Jan 2011
    Location
    Missouri
    Posts
    4,205
    Thanks
    23
    Thanked 605 Times in 604 Posts
    I have to type data in an XML document for a database.
    Makes no sense. A database is a database, a xml file is a file. Maybe you need a database.
    Post the xml file. Post what you use to read it. What do you use this information for?

    Need that info to see if we can help.
    Evolution - The non-random survival of random variants.

    "If you leave hydrogen alone, for long enough, it begins to think about itself."

  • #5
    Moderator
    Join Date
    May 2002
    Location
    Hayward, CA
    Posts
    1,461
    Thanks
    1
    Thanked 23 Times in 21 Posts
    JeanClaude, I say this with no disrespect intended: you probably need to learn HTML before messing with XML. You need to understand the concepts of HTML, including how web page forms are built, before you can make a form to fill out the XML for you. Right now, based on what you're describing, I think you're in over your head.

    Sunfighter's suggestion of PHP code is also a good one, but it has HTML as a prerequisite as well.

    Fortunately, any good HTML primer book will talk about forms - they are a key aspect of web page development, after all. Try visiting your local library and look for a book like "Teach Yourself HTML in 24 Hours" or 21 days or whatever it is. It'll be from Sams Publishing, most likely.
    "The first step to confirming there is a bug in someone else's work is confirming there are no bugs in your own."
    June 30, 2001
    author, Verbosio prototype XML Editor
    author, JavaScript Developer's Dictionary
    https://alexvincent.us/blog

  • #6
    New to the CF scene
    Join Date
    May 2011
    Posts
    7
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Actually it looks like you've not understood what I was looking for - my mistake! it wasn't clear enough

    I'm not looking for an online form to fill XML documents from the web, I want to fill XML documents from my computer, and the XML document will be on my computer only (offline), and put in a database later by a friend of mine but I don't bother with that: I just want to fill my XML document by filling boxes in a form, rather than writing directly the stuff between the XML tags (which I did so far but using a form would be a bit quicker, since you can jump from a box to the next by pushing Tab, rather than going to the next place with your mouse or with the arrow keys)...

    I hope it's clearer

  • #7
    Moderator
    Join Date
    May 2002
    Location
    Hayward, CA
    Posts
    1,461
    Thanks
    1
    Thanked 23 Times in 21 Posts
    Actually I did understand that from the beginning. The problem is, who (or more specifically, what code) is going to read your form and write the XML?

    • If it's not a web page, then you'll need some custom user-interface code to present the form to you.
    • Some other piece of code has to take your input and generate the XML.
    • Then it has to be saved to the disk somewhere.


    Choose your tools wisely. In theory C++ or Python can do all of that, but in practice you probably don't want that.

    You can also run a local HTTP server so you get Perl, PHP and HTML support. (xampp.apachefriends.org has been where I go for that for years)
    "The first step to confirming there is a bug in someone else's work is confirming there are no bugs in your own."
    June 30, 2001
    author, Verbosio prototype XML Editor
    author, JavaScript Developer's Dictionary
    https://alexvincent.us/blog

  • #8
    New to the CF scene
    Join Date
    May 2011
    Posts
    7
    Thanks
    0
    Thanked 0 Times in 0 Posts
    The problem is, who (or more specifically, what code) is going to read your form and write the XML?

    If it's not a web page, then you'll need some custom user-interface code to present the form to you.
    Some other piece of code has to take your input and generate the XML.
    Then it has to be saved to the disk somewhere.
    actually, the files I'm working on are already in XML and I'm using an XML editor to fill it. But I'd like to continue working on it with a form, rather than writing directly in the XML editor.
    Now, I'm not sure I've understood your question... maybe this forum is intended for people who are much more knowledgeable than me! but I thought what I was asking was simple - I thought someone would answer me "use that software, you can create your forms and start writing your stuff". But looks like it's not that simple

    thanks anyway

  • #9
    Senior Coder
    Join Date
    Jan 2011
    Location
    Missouri
    Posts
    4,205
    Thanks
    23
    Thanked 605 Times in 604 Posts
    You still around Jean Claude?
    Evolution - The non-random survival of random variants.

    "If you leave hydrogen alone, for long enough, it begins to think about itself."

  • #10
    New to the CF scene
    Join Date
    May 2011
    Posts
    7
    Thanks
    0
    Thanked 0 Times in 0 Posts
    I'm here...

  • #11
    Senior Coder
    Join Date
    Jan 2011
    Location
    Missouri
    Posts
    4,205
    Thanks
    23
    Thanked 605 Times in 604 Posts
    Good, I was thinking you might be on a server and use the xml for something on a page. That doesn't need to be true with xml, but if it is there is an alternative; use a database instead.
    You might look at other xml editors. I use XML Notepad 2007 from (shudder) Micro$oft. It allows you to expand everything in two columns, one for the xml, one for the contents.

    If you can transfer to a DB it would be a lot better.

    If no to the above, post the xml file you have to edit and I'll take a stab at a form to edit it. (My be biting off more then I can chew, but shall see.)
    Evolution - The non-random survival of random variants.

    "If you leave hydrogen alone, for long enough, it begins to think about itself."

  • #12
    New to the CF scene
    Join Date
    May 2011
    Posts
    7
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Thanks, I'll have a look at XML Notepad 2007, I'll tell you if it works


  •  

    Tags for this Thread

    Posting Permissions

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