|
-
Dec 10th, 2008, 03:35 PM
#1
Thread Starter
Fanatic Member
[2008] Drag drop parse xml file
I need to drag and drop my simple xml file onto my form.
The xml file contains simple data like:
<fname>Xan Choly</fname>
On drop I need to parse the values and display them on the form.
Can someone please show me how to :
- check if drag dropped file is xml
- parse the values
Thanks for any help.
-
Dec 10th, 2008, 06:44 PM
#2
Re: [2008] Drag drop parse xml file
A few questions :
a) when you say the file is dropped what do you mean - are you receiving a filename or the actual content of the file?
b) what do you mean by check if it is XML? Can you not just for an XML definition element such as "<?xml version="1.0"?>" at the top of the document, or do you mean you want to validate it against an XSD?
c) what do you mean by "parse the values"?
-
Dec 10th, 2008, 08:13 PM
#3
Re: [2008] Drag drop parse xml file
There is no parsing required. Create an XmlDocument and call its Load method. If the load fails then there's a problem with the file. If the load succeeds then the file is valid and you can get the data using the members of the XmlDocument class, which does the parsing for you.
-
Dec 10th, 2008, 09:11 PM
#4
Thread Starter
Fanatic Member
Re: [2008] Drag drop parse xml file
Nice - will research this class.Thanks.
-
Dec 11th, 2008, 03:25 PM
#5
Thread Starter
Fanatic Member
Re: [2008] Drag drop parse xml file
Is it possible to drag drop a pdf fillable form and extract the xml ?
-
Dec 16th, 2008, 10:57 AM
#6
Thread Starter
Fanatic Member
Re: [2008] Drag drop parse xml file
Last edited by Xancholy; Dec 16th, 2008 at 11:02 AM.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|