|
-
April 4th, 2009, 08:50 AM
#1
converting a file in XML
hi..I have a file like this
Video //Video1
Start
Name =
Director =
Actor
Start
Name =
Rating =
End
Actor
Start
Name =
Rating =
End
END //End of Video
Video //Video2
Start
//..as above. number of actors may vary
End
and I have to convert above file into a XML in following format..
<Videos> //Root
<Video> // Video1
<Property>
<NAME Name = X>
<DIRECTOR Name = abc >
</Property>
<Details>
<Actor>
<Property>
<NAME Name = N1>
<RATING rating = >
</Property>
</Actor>
<Actor>
<Property>
<NAME Name = N2>
<RATING rating = >
</Property>
</Actor>
</Details>
</Video> //End of Video1
<Video> //Video2
..same as above
<Video>
</Videos>
Can you please suggest me what is the best way to do this. My solution is working when the
text file has only one Video..for multiple Video its not working properly..it will be better
if you provide code..(a file may have multiple Video and number of Actor in a Video may vary)
Thanks..
-
April 4th, 2009, 06:03 PM
#2
Re: converting a file in XML
 Originally Posted by sky123
Can you please suggest me what is the best way to do this. My solution is working when the
text file has only one Video..for multiple Video its not working properly..it will be better
if you provide code..(a file may have multiple Video and number of Actor in a Video may vary)
Thanks..
Why don't you provide the solution you've got? Then anybody would be able to show how you can improve it to do what you want it to do.
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
|