I went with XML::Twig and got a little further (thanks!) unfortunately it's still upset that the XML isn't quite "well-formed" XML example:
--boundary
Content-Type: application/xml; charset="UTF-8"
Content-Length: 478
<EventNotificationAlert version="1.0" xmlns="http://www.hikvision.com/
+ver10/XMLSchema">
<ipAddress>10.1.10.23</ipAddress>
<portNo>80</portNo>
<protocol>HTTP</protocol>
<macAddress>c4:2f:90:00:00:00</macAddress>
<channelID>1</channelID>
<dateTime>2015-06-24T19:37:22--8:00</dateTime>
<activePostCount>0</activePostCount>
<eventType>videoloss</eventType>
<eventState>inactive</eventState>
<eventDescription>videoloss alarm</eventDescription>
</EventNotificationAlert>
--boundary
Content-Type: application/xml; charset="UTF-8"
Content-Length: 514
<EventNotificationAlert version="1.0" xmlns="http://www.hikvision.com/
+ver10/XMLSchema">
<ipAddress>10.1.10.23</ipAddress>
<portNo>80</portNo>
<protocol>HTTP</protocol>
<macAddress>c4:2f:90:00:00:00</macAddress>
<channelID>1</channelID>
<dateTime>2015-06-24T19:37:22--8:00</dateTime>
<activePostCount>1</activePostCount>
<eventType>VMD</eventType>
<eventState>active</eventState>
<eventDescription>Motion alarm</eventDescription>
<DetectionRegionList>
</DetectionRegionList>
</EventNotificationAlert>
-
Are you posting in the right place? Check out Where do I post X? to know for sure.
-
Posts may use any of the Perl Monks Approved HTML tags. Currently these include the following:
<code> <a> <b> <big>
<blockquote> <br /> <dd>
<dl> <dt> <em> <font>
<h1> <h2> <h3> <h4>
<h5> <h6> <hr /> <i>
<li> <nbsp> <ol> <p>
<small> <strike> <strong>
<sub> <sup> <table>
<td> <th> <tr> <tt>
<u> <ul>
-
Snippets of code should be wrapped in
<code> tags not
<pre> tags. In fact, <pre>
tags should generally be avoided. If they must
be used, extreme care should be
taken to ensure that their contents do not
have long lines (<70 chars), in order to prevent
horizontal scrolling (and possible janitor
intervention).
-
Want more info? How to link
or How to display code and escape characters
are good places to start.
|