Wrox Programmer Forums
Go Back   Wrox Programmer Forums > XML > XML
| Search | Today's Posts | Mark Forums Read
XML General XML discussions.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the XML section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old November 16th, 2005, 01:09 AM
Registered User
 
Join Date: Nov 2005
Location: San Antonio, Texas, .
Posts: 4
Thanks: 0
Thanked 0 Times in 0 Posts
Default From XML into program variables: seek suggestions

I'm trying to read in and parse an XML file, with the object of being able to select an element by using its ID, and then put the various child element values into appropriate program structure or, in this case, Java object member variables, with the eventual intention of displaying them with Swing. I'm not sure of a good approach for this. I've tried getElementById, but what it returns is just the node identified by the ID attribute, and then it's up to me (the program) to walk the child elements and pick out the text appropriately. This seems a little too inflexible, and I'm wondering if there's a better approach. Parsing using a stylesheet might be good, but
1) is it very efficient? (Maybe I should not worry about this)
2) How do I get the results of the stylesheet into the Java variables? Read them from a Result object? If so, what kind of Result object?
Is there another, better approach? I'm having a hard time knowing which way to go here.
And last: is there another forum to which I should post this question?
Thanks for any help in advance.





Similar Threads
Thread Thread Starter Forum Replies Last Post
Seek Time... ankur_icfai SQL Server 2000 2 August 30th, 2006 11:14 PM
How to: Xlate program in XML to target language? Philibuster XSLT 2 August 24th, 2006 10:25 AM
Sending and Recieving XML from a VB.NET program gmackenz XML 0 October 10th, 2005 09:41 PM
How to program with XML from VB chanti VB How-To 2 October 4th, 2004 03:42 AM
a xml program csc820203 C# 1 May 27th, 2004 05:01 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.