L
lidija
Hi everybody,
My problem is following: in the HTML source I have an <XML> tag,
containing an XML document. I am trying to read this XML and save it, but
I have problem saving it in the same form as it is in the HTML source.
For example, let's say that the XML tag in my HTML source looks like this:
<XML id="xmltest">
<TAG1>some text here for example</TAG1>
<TAG2>some other text here</TAG2>
<TAG3>
<TAG3a>some third text</TAG3a>
</TAG3>
</XML>
I read the XML and display it:
xmlDom = xmltest.XMLDocument;
if (xmlDom == null) alert("xmlDom == null");
alert(xmlDom.xml);
The alert contains aligned XML, instead of the XML as it was in the
source:
<XML id="xmltest">
<TAG1>some text here for example</TAG1>
<TAG2>some other text here</TAG2>
<TAG3>
<TAG3a>some third text</TAG3a>
</TAG3>
</XML>
When I save (or alert) the XML, it is aligned, instead of the way it was
in the HTML source, what I need.
Since the XML must be saved just the way it is in the HTML source (no
aligning), this isn't good. Did anyone experience this problem already? Is
there any solution? Is there any other way to read XML with javascript
that doesn't do any aligning?
If someone can provide me some help, I would really appreciate it.
TIA, Lidija
My problem is following: in the HTML source I have an <XML> tag,
containing an XML document. I am trying to read this XML and save it, but
I have problem saving it in the same form as it is in the HTML source.
For example, let's say that the XML tag in my HTML source looks like this:
<XML id="xmltest">
<TAG1>some text here for example</TAG1>
<TAG2>some other text here</TAG2>
<TAG3>
<TAG3a>some third text</TAG3a>
</TAG3>
</XML>
I read the XML and display it:
xmlDom = xmltest.XMLDocument;
if (xmlDom == null) alert("xmlDom == null");
alert(xmlDom.xml);
The alert contains aligned XML, instead of the XML as it was in the
source:
<XML id="xmltest">
<TAG1>some text here for example</TAG1>
<TAG2>some other text here</TAG2>
<TAG3>
<TAG3a>some third text</TAG3a>
</TAG3>
</XML>
When I save (or alert) the XML, it is aligned, instead of the way it was
in the HTML source, what I need.
Since the XML must be saved just the way it is in the HTML source (no
aligning), this isn't good. Did anyone experience this problem already? Is
there any solution? Is there any other way to read XML with javascript
that doesn't do any aligning?
If someone can provide me some help, I would really appreciate it.
TIA, Lidija