473,434 Members | 3,072 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,434 software developers and data experts.

Facing a Problem when I use the loadXML("<xml String>")

Hi everyone,

This is my first post to this forum, hope I would get a reply quickly :-)

Iam using loadXML(xmlString) and it is always returning "false". My code looks like this :

Expand|Select|Wrap|Line Numbers
  1. if (window.ActiveXObject)
  2.         {
  3.          var responseXml=new ActiveXObject("Microsoft.XMLDOM"); 
  4.         responseXml.async="false";
  5.         var wellFormedMarkup = "<g>"+string+"</g>";
  6.          alert(wellFormedMarkup);
  7.          //alert(responseXml.loadXML(wellFormedMarkup));
  8.             loaded = responseXml.loadXML(wellFormedMarkup);
  9.             alert(loaded);
  10.  
  11. .......
  12.  
  13. }
  14.  
  15.  
when I print the value for the *string*, it displays the response text.
So its not null or empty.
Where did I get deviated???
Thank You in advance.

Regards,
Suman
Jun 11 '08 #1
1 1987
acoder
16,027 Expert Mod 8TB
Welcome to Bytes!

See if this example works for you. Remember that other browsers have a different method of reading/loading XML files/strings.

PS. please remember to use code tags when posting code. Thanks!
Jun 11 '08 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

5
by: Danny Anderson | last post by:
Hola! I am working on a program where I am including a library that came with my numerical methods textbook. The "util.h" simply includes a large number of files. I had to change the util.h...
1
by: Christian Schmidbauer | last post by:
Hello! I prepare my XML document like this way: ------------------------------------------------------- PrintWriter writer; Document domDocument; Element domElement; // Root tag
0
by: Julia | last post by:
Hi,i am trying to DeSerialize the following class from an XML string and i get "<root xmlns=''> was not expected." public class Person { private string m_Name; private string m_Phone; ...
2
by: andrew007 | last post by:
I do xml / xslt transformation using asp.net but I found any value (w/xml format) in xml node html-encoded to &lt and &gt format if it's > or < tag. Since I have sub xml data in a parent xml node...
8
by: active | last post by:
I use quickwatch on (astrThisOne <> "") and it reports: False as it should because astrThisOne reports: "" Yet If (astrThisOne <> "") Then executes the Then clause
4
by: rsa_net_newbie | last post by:
Hi there, I have a Managed C++ object (in a DLL) which has a method that is defined like ... Generic::List<String^>^ buildList(String^ inParm) Now, when I compile it, I get "warning C4172:...
2
by: dazedandconfused | last post by:
Building a site for a client, loaded it up, it works fine in Firefox but presents the below message when loading into ie 6 or ie 5, fine in 7 I think, but the client can not even view it in 7. So...
3
by: jariwaladivyesh | last post by:
Hi frnds, i have simple XML doc <?xml version="1.0" encoding="utf-8"?> <?xml-stylesheet type="text/xsl" href="test.xsl"?> <data> <name> Divyesh Jariala</name> </data>
12
by: ibloom | last post by:
I've been trying for a couple days to build a program using pyObjC on a mac, I'm stuck on this error: <string>: inconsistent use of tabs and spaces in indentation Traceback (most recent call...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
1
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.