Attention
These docs are a bit ambitious. The steps described are accurate but IronPLC cannot yet run programs.
P0006¶
- Code
P0006
- Message
XML file is malformed
This error occurs when the compiler encounters a PLCopen XML file that is not valid XML. The file cannot be parsed because it violates XML syntax rules.
Example¶
This error typically occurs due to:
Unclosed tags
Mismatched tag names
Invalid characters in the document
Missing XML declaration
Malformed attribute syntax
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://www.plcopen.org/xml/tc6_0201">
<fileHeader companyName="Test" productName="Test"
<!-- Missing closing > and rest of document -->
The XML parser will report this as malformed because the opening tag is incomplete.
To fix this error, ensure your XML file is well-formed:
All tags must be properly closed
Tag names must match exactly (case-sensitive)
Attribute values must be quoted
Special characters must be escaped (e.g.,
<for<)
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://www.plcopen.org/xml/tc6_0201">
<fileHeader companyName="Test" productName="Test" productVersion="1.0" creationDateTime="2024-01-01T00:00:00"/>
<!-- Rest of valid XML document -->
</project>