Parsing an XML file for a particular element, reading the children, and getting database values

  • Thread starter Luis Esteban Valencia
  • Start date
L

Luis Esteban Valencia

Hi experts

What I'd like it is something like this...

I have an xml file and when going to the page, I want the page to look at
the paramater passed in with the URL and gets the XML "element" (is that the
term, it is in JDOM...)

<whatever thefieldtomatchURL="12345" dbtable="table1">
<db field="field1"/>
<db field="field9"/>
<db field="field3"/>
</whatever>
<whatever thefieldtomatchURL="91535" dbtable="table2">
<db field="field2"/>
<db field="field7"/>
<db field="field8"/>
</whatever>

thefieldtomatchURL is passed as a paramater


I need to
1. get the parameter pass it with the url (and how do I pass in a parameter
with the url?)
2. parse the xml till I get the element thefieldtomatchURL=parameter passed
in

then
go through all the children, get the value of "field" and then with that
read a value in a database from the table set in "dbtable"


the fields are used to do some calculations and result displayed on page

I'll try and explain things more on request.

I'm trying to do things well out of my scope so that's why I'm asking the
Experts! Please don't make any assumations that I know much, I'm new to
asp.net and more a Java man :)

thanks
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,744
Messages
2,569,484
Members
44,903
Latest member
orderPeak8CBDGummies

Latest Threads

Top