Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

XML Data Binding

Posted on 2001-07-18
8
Medium Priority
?
853 Views
Last Modified: 2008-03-04
Friends,

I am using a multi level XML, & using IE5 or above browser, please tell me how to bind text boxes (input boxes) with them, for example

my XML is :-
<XML id=objXML>
  <first>
    <second>
      <third1>value1</third1>
      <third2>value1</third2>
      <third3>value1</third3>
    </second>
  </first>
</XML>

my HTML is :-
<input type=text datasrc=#objXML datafld= ?????? >

please help me, my email id is vijayneema@hotmail.com

Thanks
Vijay
0
Comment
Question by:vijayneema
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
8 Comments
 
LVL 10

Expert Comment

by:Yury_Delendik
ID: 6297462
<input type=text datasrc=#objXML datafld=third1 >

0
 
LVL 1

Author Comment

by:vijayneema
ID: 6297470
Yury Delendik

It will not work if the xml is like this, as i said earlier
my xml is multi level


<XML id=objXML>
<root>
 <first>
   <second>
     <third1>value1</third1>
     <third2>value1</third2>
     <third3>value1</third3>
   </second>
 </first>
</root>
</XML>

0
 
LVL 1

Expert Comment

by:hariweb
ID: 6297945
Hi,

I think Yury is right.  Just save everything as a HTML file like given below.


<html>
<body>
<form>
<XML id=objXML>
 <first>
   <second>
     <third1>value1</third1>
     <third2>value2</third2>
     <third3>value3</third3>
   </second>
 </first>
</XML>


<input type=text datasrc=#objXML datafld= third1 >
</form>
</body>
</html>



Alternatively..u can do this.....give this alone in say xyz.xml

<first>
   <second>
     <third1>value1</third1>
     <third2>value2</third2>
     <third3>value3</third3>
   </second>
 </first>


then create a html file with the following code....
<html>
<body>
<form>
<xml id="objXML" src="xyz.xml"></xml>
<input type=text datasrc=#objXML datafld= third1 >
</form>
</body>
</html>

try it..-:)
Hari


0
Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

 
LVL 1

Author Comment

by:vijayneema
ID: 6298007
Dear Hari,

Problem is that my XML is multi level
<XML id="objXML">
<first>
    <second>
        <third>
             <fourth>
                 <fifth1>v1<fifth1>
                 <fifth2>v2<fifth2>
                 <fifth3>v3<fifth3>
             </fourth>
        </third>
    </second>
</first>
</XML>

<input type=text datasrc=#objXML datafld=fifth1 >

now my input box does not binds.

Please if you want in detail contact me as
vijayneema@hotmail.com

bye
Vijay
0
 
LVL 1

Expert Comment

by:sethu_m
ID: 6303069
Hello,

U can have a solution like this - If ur XML is of somewhat like this structure

<XML id="objXML">
<first>
   <second>
       <third>
            <fourth>
                <fifth1>sethu madhavan</fifth1>
            </fourth>
            <fourth>
                <fifth1>mahesh pudale</fifth1>
            </fourth>

       </third>
   </second>
</first>
</XML>

then put ur html like this

<table datasrc=#objXML datafld="third">
 <tr>
   <td>
     <table datasrc=#objXML datafld="fourth">
     <tr>
       <td>
          <input datafld="fifth1">    
       </td>
     </tr>
     </table>
   </td>
  </tr>
</table>

U will have to put all ur top elements in a table with datasrc same and datafld changing with each level of depth.

U can arrive at any depth with this kind of approach.

I hope this will work for u.

0
 
LVL 1

Author Comment

by:vijayneema
ID: 6307631
Thanks sethu_m

but it is working with Table only
not with Input box, if give me solution
for Input, Select Boxes

Vijay
0
 
LVL 1

Accepted Solution

by:
sethu_m earned 150 total points
ID: 6308581
Hello Vijay,

You can not populate the select boxes/list boxes, but ofcourse u can populate the input boxes.

But again for that u will have to create a hirearchy of some container like Tables or Div. - As I have mentioned earlier.

try div - if u don't want tables
0
 
LVL 1

Author Comment

by:vijayneema
ID: 6311206
Thanks sethu madhavan

It is working. thanks a lot once again
Please be in touch with me, if you have
any more ideas. my email id is
vijayneema@hotmail.com

Vijay
0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

The Problem How to write an Xquery that works like a SQL outer join, providing placeholders for absent data on the outer side?  I give a bit more background at the end. The situation expressed as relational data Let’s work through this.  I’ve …
The Confluence of Individual Knowledge and the Collective Intelligence At this writing (summer 2013) the term API (http://dictionary.reference.com/browse/API?s=t) has made its way into the popular lexicon of the English language.  A few years ago, …
Have you created a query with information for a calendar? ... and then, abra-cadabra, the calendar is done?! I am going to show you how to make that happen. Visualize your data!  ... really see it To use the code to create a calendar from a q…
In response to a need for security and privacy, and to continue fostering an environment members can turn to for support, solutions, and education, Experts Exchange has created anonymous question capabilities. This new feature is available to our Pr…
Suggested Courses

618 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question