Solved

XML Data Binding

Posted on 2001-07-18
8
836 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
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
 
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
Enabling OSINT in Activity Based Intelligence

Activity based intelligence (ABI) requires access to all available sources of data. Recorded Future allows analysts to observe structured data on the open, deep, and dark web.

 
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 50 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

Why You Should Analyze Threat Actor TTPs

After years of analyzing threat actor behavior, it’s become clear that at any given time there are specific tactics, techniques, and procedures (TTPs) that are particularly prevalent. By analyzing and understanding these TTPs, you can dramatically enhance your security program.

Join & Write a Comment

The Client Need Led Us to RSS I recently had an investment company ask me how they might notify their constituents about their newsworthy publications.  Probably you would think "Facebook" or "Twitter" but this is an interesting client.  Their cons…
Introduction In my previous article (http://www.experts-exchange.com/Microsoft/Development/MS-SQL-Server/SSIS/A_9150-Loading-XML-Using-SSIS.html) I showed you how the XML Source component can be used to load XML files into a SQL Server database, us…
Internet Business Fax to Email Made Easy - With eFax Corporate (http://www.enterprise.efax.com), you'll receive a dedicated online fax number, which is used the same way as a typical analog fax number. You'll receive secure faxes in your email, fr…
This demo shows you how to set up the containerized NetScaler CPX with NetScaler Management and Analytics System in a non-routable Mesos/Marathon environment for use with Micro-Services applications.

746 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

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now