?
Solved

XML Data Binding

Posted on 2001-07-18
8
Medium Priority
?
847 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
Automating Terraform w Jenkins & AWS CodeCommit

How to configure Jenkins and CodeCommit to allow users to easily create and destroy infrastructure using Terraform code.

 
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

New benefit for Premium Members - Upgrade now!

Ready to get started with anonymous questions today? It's easy! Learn more.

Question has a verified solution.

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

Browsing the questions asked to the Experts of this forum, you will be amazed to see how many times people are headaching about monster regular expressions (regex) to select that specific part of some HTML or XML file they want to extract. The examp…
I was working on a PowerPoint add-in the other day and a client asked me "can you implement a feature which processes a chart when it's pasted into a slide from another deck?". It got me wondering how to hook into built-in ribbon events in Office.
Michael from AdRem Software outlines event notifications and Automatic Corrective Actions in network monitoring. Automatic Corrective Actions are scripts, which can automatically run upon discovery of a certain undesirable condition in your network.…
Michael from AdRem Software explains how to view the most utilized and worst performing nodes in your network, by accessing the Top Charts view in NetCrunch network monitor (https://www.adremsoft.com/). Top Charts is a view in which you can set seve…
Suggested Courses

777 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