Symbol Factory 3

I am trying to use Symbol Factory Version 3. Trying to copy and paste as .svg, I get this error:

com.inductiveautomation.ignition.common.xmlserialization.SerializationException: Unexpected parsing error during XML deserialization.
	at com.inductiveautomation.ignition.common.xmlserialization.deserialization.XMLDeserializer.deserializeXML(XMLDeserializer.java:398)
	at com.inductiveautomation.ignition.common.xmlserialization.deserialization.XMLDeserializer.readRootAttributes(XMLDeserializer.java:286)
	at com.inductiveautomation.ignition.common.xmlserialization.deserialization.XMLDeserializer.readRootAttributes(XMLDeserializer.java:282)
	at com.inductiveautomation.factorypmi.designer.workspace.CopyPasteHandler.startPaste(CopyPasteHandler.java:168)
	at com.inductiveautomation.factorypmi.designer.workspace.CopyPasteHandler.doPasteImpl(CopyPasteHandler.java:932)
	at com.inductiveautomation.factorypmi.designer.workspace.CopyPasteHandler.doPaste(CopyPasteHandler.java:923)
	at com.inductiveautomation.ignition.designer.IgnitionDesigner$Handler.handlePaste(IgnitionDesigner.java:2779)
	at com.inductiveautomation.ignition.designer.IgnitionDesigner$Handler$15.actionPerformed(IgnitionDesigner.java:2337)
	at java.desktop/javax.swing.AbstractButton.fireActionPerformed(Unknown Source)
	at java.desktop/javax.swing.AbstractButton$Handler.actionPerformed(Unknown Source)
	at java.desktop/javax.swing.DefaultButtonModel.fireActionPerformed(Unknown Source)
	at java.desktop/javax.swing.DefaultButtonModel.setPressed(Unknown Source)
	at java.desktop/javax.swing.AbstractButton.doClick(Unknown Source)
	at java.desktop/javax.swing.plaf.basic.BasicMenuItemUI.doClick(Unknown Source)
	at java.desktop/javax.swing.plaf.basic.BasicMenuItemUI$Handler.mouseReleased(Unknown Source)
	at java.desktop/java.awt.Component.processMouseEvent(Unknown Source)
	at java.desktop/javax.swing.JComponent.processMouseEvent(Unknown Source)
	at java.desktop/java.awt.Component.processEvent(Unknown Source)
	at java.desktop/java.awt.Container.processEvent(Unknown Source)
	at java.desktop/java.awt.Component.dispatchEventImpl(Unknown Source)
	at java.desktop/java.awt.Container.dispatchEventImpl(Unknown Source)
	at java.desktop/java.awt.Component.dispatchEvent(Unknown Source)
	at java.desktop/java.awt.LightweightDispatcher.retargetMouseEvent(Unknown Source)
	at java.desktop/java.awt.LightweightDispatcher.processMouseEvent(Unknown Source)
	at java.desktop/java.awt.LightweightDispatcher.dispatchEvent(Unknown Source)
	at java.desktop/java.awt.Container.dispatchEventImpl(Unknown Source)
	at java.desktop/java.awt.Window.dispatchEventImpl(Unknown Source)
	at java.desktop/java.awt.Component.dispatchEvent(Unknown Source)
	at java.desktop/java.awt.EventQueue.dispatchEventImpl(Unknown Source)
	at java.desktop/java.awt.EventQueue$4.run(Unknown Source)
	at java.desktop/java.awt.EventQueue$4.run(Unknown Source)
	at java.base/java.security.AccessController.doPrivileged(Native Method)
	at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(Unknown Source)
	at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(Unknown Source)
	at java.desktop/java.awt.EventQueue$5.run(Unknown Source)
	at java.desktop/java.awt.EventQueue$5.run(Unknown Source)
	at java.base/java.security.AccessController.doPrivileged(Native Method)
	at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(Unknown Source)
	at java.desktop/java.awt.EventQueue.dispatchEvent(Unknown Source)
	at java.desktop/java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source)
	at java.desktop/java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source)
	at java.desktop/java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
	at java.desktop/java.awt.EventDispatchThread.pumpEvents(Unknown Source)
	at java.desktop/java.awt.EventDispatchThread.pumpEvents(Unknown Source)
	at java.desktop/java.awt.EventDispatchThread.run(Unknown Source)
Caused by: org.xml.sax.SAXParseException; lineNumber: 1; columnNumber: 10; DOCTYPE is disallowed when the feature "http://apache.org/xml/features/disallow-doctype-decl" set to true.
	at java.xml/com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(Unknown Source)
	at java.xml/com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl$JAXPSAXParser.parse(Unknown Source)
	at com.inductiveautomation.ignition.common.xmlserialization.deserialization.XMLDeserializer.deserializeXML(XMLDeserializer.java:384)
	... 44 more

Ignition v8.0.12 (b2020042115)
Java: Azul Systems, Inc. 11.0.6

Fixable, or no? FWIW, this latest revision has some nice advantages over the older version that a lot of graphics packages have been using.

Can you upload one of the SVGs you’re trying to use? It looks like the XML contains a declaration that is disallowed by default for security reasons.

valve

hmmm, that autoconverted to an image, I hope you can edit the code…

Try opening the image in a text editor and removing this line:

<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">

That doesn’t work removing just that portion of the first line.

Did you remove the entire line and save the file?

It imports into the designer without issue for me after that.

NumberFormatException: For input string: “Group_Port”

Ignition v8.0.13 (b2020060815)
Java: Azul Systems, Inc. 11.0.6

Throws out this error, and won’t upload into this forum as before as the valve image. Maybe upload your version here and I’ll try copying into my system.

d465eb019f0f174f09531f59340f2b26b84030b4

Yeah, that pastes, but you’ve done more to that than just remove part of that first line, it’s now xml instead of svg.I think that code I originally uploaded a few lines up must have converted when it changed to an image from text. I can’t seem to replicate what you did comparing the two files, but I’m not going to waste anymore time on it. This was the first line I am using:


> <!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"[]><svg version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="64px" height="64px" viewBox="0 0 112.5 81.84" enable-background="new 0 0 112.5 81.84" xml:space="preserve">

SVG is just XML.

All I did was remove the entire DOCTYPE line.

If I remove line 1 entirely, then copy and paste the remainder of the code back into Ignition, it throws errors.

In your editor the lines seem to have run together. There is a newline after the end of the DOCTYPE element.

Just remove the DOCTYPE element:

<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">