all groups > dotnet xml > august 2003 >
You're in the

dotnet xml

group:

xlinks and SVG


xlinks and SVG James Westgate
8/25/2003 4:39:45 PM
dotnet xml:
Hi All,

We are creating xml SVG documents on the fly in VB.NET, an XMLDocument
obejct and need to create a <use/> element e.g.

<use xlink:href="#id" x="100" y="100"/>

To create this element, we use the CreateElement method and then the
SetAttribute method on the new element. eg

objnew.SetAttribute("xlink:href","#" & strDefId)

However, the resultign xml drops the xlink: portion of the attribute and the
svg does not display eg

<use href="#id" x="100" y="100"/>

If we try a similar approach using the XMLDocumentFragment class, we get a
system error.

Can anyone help ?

Many thanks
James


Re: xlinks and SVG Martin Honnen
8/25/2003 5:54:51 PM


[quoted text, click to view]

Try
xmlElement.SetAttribute("xlink:href", "http://www.w3.org/1999/xlink",
"#" & strDefId)

--

Martin Honnen
http://JavaScript.FAQTs.com/
AddThis Social Bookmark Button