Highlighted
NBayko Absent Member.
Absent Member.
514 views

XML Parser Problems

I'm working on my first XML flex connector and I was hoping someone could take a look at what I have so far. When I run the connector I'm getting these syntax errors and I'm not sure what they mean.

Error on line 1 column 43
  XPST0003: XQuery syntax error in #...root external;
    Unexpected token name "host" beyond end of query
FATAL EXCEPTION:
Could not compile xquery for hop node[0]
FATAL EXCEPTION:
; Line#: 1; Column#: 43
net.sf.saxon.trans.StaticError: XQuery syntax error i
ity host/#:
    Unexpected token name "host" beyond end of query

Here is an example of an event I'm trying to parse and the contents of the config file are below.

<?xml version="1.0"?>
-<ndActivityLog endDate="2012-02-01" startDate="2012-01-01" repositoryName="Company Name" repositoryId="CA-8KA4RFK3"> -

<activity host="174.X.X.X" name="save" date="2012-01-09T04:46:12">

   <user name="Application Admin" memberType="I" id="VAULT-NDcompanyname"/> -

   <storageObject name="2012 Budget plans" fileExtension="pdf" size="209948" docId="4842-0630-0000">

          <cabinet name="Human Resources">NG-GMSK8CZM</cabinet>

          <Employee>Team Member</Employee>

          <HRDocType>Application</HRDocType>

   </storageObject>

</activity>

#namespace.count=1
#namespace[0].prefix=ndActivityLog
#namespace[0].uri=

hop.node.count=7
hop.node[0].name=name
hop.node[0].expression=/activity host/name
hop.node[1].name=date
hop.node[1].expression=/activity host/name/date
hop.node[2].name=memberType
hop.node[2].expression=/user name/memberType
hop.node[3].name=id
hop.node[3].expression=/user name/memberType/id
hop.node[4].name=fileExtension
hop.node[4].expression=/StorageObject name/fileExtension
hop.node[5].name=size
hop.node[5].expression=/StorageObject name/fileExtension/size
hop.node[6].name=docId
hop.node[6].expression=/StorageObject name/fileExtension/size/docId

trigger.node.expression=$activity host

token.count=13

token[0].name=TargetIPAddress
token[0].type=IPAddress
token[0].expression=activity host
token[0].node=root

token[1].name=Action
token[1].type=String
token[1].expression=activityhost/name
token[1].node=hop

token[2].name=Date
token[2].type=TimeStamp
token[2].format=yyyy-MM-dd'T'HH:mm:ss
token[2].expression=activity host/name/date
token[2].node=hop

token[3].name=AttackerUserName
token[3].type=String
token[3].expression=user name
token[3].node=root

token[4].name=MemberType
token[4].type=String
token[4].expression=user name/memberType
token[4].node=hop

token[5].name=AttackerUserID
token[5].type=String
token[5].expression=user name/memberType/id
token[5].node=hop

token[6].name=FileName
token[6].type=String
token[6].expression=StorageObject name
token[6].node=root

token[7].name=FileExtension
token[7].type=String
token[7].expression=StorageObject name/fileExtension
token[7].node=hop

token[8].name=FileSize
token[8].type=String
token[8].expression=StorageObject name/fileExtension/size
token[8].node=hop

token[9].name=FileID
token[9].type=String
token[9].expression=StorageObject name/fileExtension/size/docId
token[9].node=hop

token[10].name=GroupName
token[10].type=String
token[10].expression=cabinet name
token[10].node=root

token[11].name=TargetUserName
token[11].type=String
token[11].expression=Employee
token[11].node=root

token[12].name=FileType
token[12].type=String
token[12].expression=HRDocType
token[12].node=root

event.name=_stringConstant (NetDocuments Event)
event.deviceCustomString1=Action
event.endTime=Date
event.sourceUserName=AttackerUserName
event.deviceCustomString2=MemberType
event.sourceUserId=AttackerUserID
event.fileName=FileName
event.filePath=FileExtension
event.fileSize=FileSize
event.fileId=FileID
event.deviceCustomString3=GroupName
event.destinationUserName=TargetUserName
event.fileType=FileType

0 Likes
Reply
1 Reply
NBayko Absent Member.
Absent Member.

Re: XML Parser Problems

This was resolved by professional services.

0 Likes
Reply
The opinions expressed above are the personal opinions of the authors, not of Micro Focus. By using this site, you accept the Terms of Use and Rules of Participation. Certain versions of content ("Material") accessible here may contain branding from Hewlett-Packard Company (now HP Inc.) and Hewlett Packard Enterprise Company. As of September 1, 2017, the Material is now offered by Micro Focus, a separately owned and operated company. Any reference to the HP and Hewlett Packard Enterprise/HPE marks is historical in nature, and the HP and Hewlett Packard Enterprise/HPE marks are the property of their respective owners.