Closed olafklinke closed 2 years ago
I don't see anything wrong with this behaviour as far as XML goes, but I'm not familiar with the OPC spec. Can you point to the section of the spec that explains this?
The OPC spec has nothing to do with this. Attached is part of a BrowseResponse from an OPC server which is not parsed by opc-xml-da-client because a Value element with type annotation xsd:string (thus a general xml string type) and no content is not parsed.
<Properties
xsi:type="ns1:ItemProperty"
Description="Item value"
ItemName="Alias"
Name="ns1:value"
ItemPath="Loc/Wec/Plant1/">
<Value
xsi:type="xsd:string">
</Value>
</Properties>
This is linked to an issue in xml-parser which when resolved can help implement a fix.
I'll address it in xml-parser
It's been addressed in xml-parser-0.1.1.
The issue seems to be fixed in xml-parser-0.1.1. Please update the cabal file to use xml-parser >= 0.1.1, then test my above code. If that does not throw an error, please increase this package's version number and close the issue.
@blamario Can you do this?
Yes, just not right now.
Who's the client, where do I Harvest this?
The client is Westfalen Wind.
The presented code is already tested here: https://github.com/nikita-volkov/xml-parser/commit/fffb206d2d59bdf3340e609e8f5db0efaa2f8e5c. So it seems like all we need is a version bump. And I'm pushing it now.
Please also bump the version of opc-xml-da-client so that downstream packages can make sure that this fixed xml-parser is used.
@olafklinke I'm lacking rights to upload to Hackage. Can you add me? My username is NikitaVolkov there
The following should return the empty text but fails.
The reason is that for xsd:string the definition of
value
is essentially this:but
emptyString
has no children. Insert any text in the Value tag and the parser succeeds.