Topic: Get the html code inside an xml tag (Page 1 of 1) Pages that link to <a href="http://ozoneasylum.com/backlink?for=30389" title="Pages that link to Topic: Get the html code inside an xml tag (Page 1 of 1)" rel="nofollow" >Topic: Get the html code inside an xml tag <span class="small">(Page 1 of 1)</span>\

 
jainanki
Nervous Wreck (II) Inmate

From: Philadelphia, PA.
Insane since: Dec 2007

IP logged posted posted 07-03-2008 23:24 Edit Quote

Hi there!

I am using an xml file to store my html code (inside a 'code' tag) and then spitting it out to the browser. At the client side I need to get to this 'code' node and copy over all the data inside that tag into the innerHTML of a page element. I can't do the copy. innerText, textContent all fail. Can anybody help? I am pasting the xml on the server side and the cml that I get as the result of the ajax call.

server side xml:

<items>
<item>
<id>worldcat</id>
<title>WorldCat</title>
<dropdowntitle>WorldCat</dropdowntitle>
<code>
<div class="interpsearchq" style="margin: 0 0 0 .92em; padding: 0 0 4px 0;">Enter your query:</div>
<div>
<form method="get" action="" style="margin-left: .92em;">
<table cellpadding="0" cellspacing="0" border="0">
<tr>
<td><input type="text" name="q" id="q" value="" style="margin: 0 0 0 0;" class="textinterpsearch" /></td>
<td><input type="image" name="__submit" onClick="window.open('https://proxy.library.upenn.edu/login?url=http://newfirstsearch.oclc.org/dbname=WorldCat;screen=advanced;done=referer;logo=http://www.library.upenn.edu/images/penn-banner-oclc.gif;fsip;javascript=true;query='+ document.getElementById('q').value, '_blank');return false;" src="images/common/gowhite.gif" alt="Go" class="gointerpsearch" style="margin: 0 0 0 0;" /></td>
</tr>
</table>
</form>
</div>
</code>
</item>
<items>

now the xml that I get at the client side is everything inside the <item> tag.

Any help will be deeply appreciated.

ankit

Suho1004
Maniac (V) Mad Librarian

From: Seoul, Korea
Insane since: Apr 2002

IP logged posted posted 07-04-2008 02:04 Edit Quote

This question is in the process of being answered in the DHTML forum. Please don't cross-post in the future. If you're not sure which forum a thread belongs in, take your best guess. We can always move it later if need be.

Thanks.


___________________________
Suho: www.liminality.org | Cell 270 | Sig Rotator | the Fellowship of Sup



Post Reply
 
Your User Name:
Your Password:
Login Options: Remember Me On This Computer
 
Your Text:
Loading...
Options: Show Signature
Enable Slimies
Enable Linkwords

« BackwardsOnwards »

Show Forum Drop Down Menu