Loading ...
Sorry, an error occurred while loading the content.

Re: Adding a SVG doc from a String to a SVG document using javascript

Expand Messages
  • Robert Longson
    Use DOMParser. See http://msdn.microsoft.com/en-gb/library/ie/ff975060%28v=vs.85%29.aspx for details. Best regards Robert. ...
    Message 1 of 3 , Feb 8, 2013
    • 0 Attachment
      Use DOMParser. See http://msdn.microsoft.com/en-gb/library/ie/ff975060%28v=vs.85%29.aspx for details.

      Best regards

      Robert.

      --- In svg-developers@yahoogroups.com, "deimos1975" wrote:
      >
      > Sorry newbie.
      > Here is the file with the code: file
      >
      P89zuSWSiRz2XLD-GDOAY55zUbNE-pjXiDVBVjnmkOhYKymIEeQvIF/stringTosvg>
      >
      >
      > --- In svg-developers@yahoogroups.com, "deimos1975" wrote:
      > >
      > > Hi! My Javascript function receives a String as a parameter. This
      > String is a svg tag with several nodes as children. I want to parse it
      > into a SVG and add it as a nodechildren to my SVG file is:
      > >
      > >
      > > "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11-flat-20030114.dtd">
      > >
      > >
      > >
      > >
      > >
      > >
      > >
      > >
      > >
      > > Where strSVG=" Title "
      > >
      > > But this returns a HIERARCHY_REQUEST_ERR (3) On:
      > SVGDocument.getElementById('grafico1').appendChild(newNode);
      > >
      > > I think the proble is to parse String to a valid SVG node....
      > > This is on IE9.
      > > Thank you!
      > >
      >
      >
      >
      > [Non-text portions of this message have been removed]
      >
    Your message has been successfully submitted and would be delivered to recipients shortly.