Hi guys
I have this xml:
<navigation>
<equipment>
<slot>
<type>SU_SLOT</type>
<articlecode>TBD</articlecode>
<description>SupervisoryUnit</description>
<images>
<hwrevision>R1A00</hwrevision>
<giffile>su.bmp</giffile>
<trueimage>su.gif</trueimage>
<width>45</width>
<height>17</height>
<fullsize>FALSE</fullsize>
<tooltip>FALSE</tooltip>
</images>
</slot>.....................
and i want to map these nodes into svg file through
scripting over dom...
I am a bit new to scripting...
would you tell me what is wrong with this script...
var svgdoc,context,xmldoc,ver;
svgdoc=document.documentElement;
ver=getSVGViewerVersion();
// Version des SVG Viewers ausgeben
svgdoc.getElementById("version").firstChild.nodeValue+=getSVGViewerVersion();
function LadeXML(evt)
{
if(ver.indexOf("Adobe")!=-1)
{
context=evt.target.ownerDocument;
getURL("navigation.xml",callback);
}
}
function callback(urlRequestStatus)
{ /*
Rueckgabewerte des Objektes urlRequestStatus:
- urlRequestStatus.success;
- urlRequestStatus.contentType;
- urlRequestStatus.content;
*/
if(urlRequestStatus.success)
{
if(ver.indexOf("Adobe")!=-1)
{
if(ver.indexOf("6.0")!=-1)xmldoc=parseXML(urlRequestStatus.content);
else
xmldoc=parseXML(urlRequestStatus.content,context);
// eingelesene XML-Daten ausgeben:
// alert(printNode(xmldoc));
}
textvalue_1=xmldoc.childNodes.item(2).childNodes.item(7).firstChildNode();
test1=context.createElement("text");
test1.setAttribute("x",100);
test1.setAttribute("y", 370);
test1.setNodeValue(textvalue_1);
svgdoc.getElementById("ftest").appendChild(test1);
}
}
thnx alot
ame
__________________________________
Do you Yahoo!?
Yahoo! Mail - Easier than ever with enhanced search. Learn more.
http://info.mail.yahoo.com/mail_250
-----
To unsubscribe send a message to: [EMAIL PROTECTED]
-or-
visit http://groups.yahoo.com/group/svg-developers and click "edit my
membership"
----
Yahoo! Groups Links
<*> To visit your group on the web, go to:
http://groups.yahoo.com/group/svg-developers/
<*> To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]
<*> Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/