NetTalk Central

Author Topic: Is there a technique for debuging xfiles xml.load()  (Read 2993 times)

alpatrick

  • Newbie
  • *
  • Posts: 7
    • View Profile
    • Email
Is there a technique for debuging xfiles xml.load()
« on: March 05, 2014, 08:05:33 AM »
I am using xfiles  and once I get my groups or queues set up right It works great. However I have a couple dozen xml files with attributes I need to be able to read.  I know that I have to use queues and groups properly named and nested.  However I has always been a case of trial and error for me to get the clarion data structures just right so that they will load into my variables.  Does anyone have any tips or techniques for making this process less painful?  Like some debug flag I could turn on or bit of code I could put somewhere so that when I try the xml.load() command I can see what is happening?  Below is a real simple example of one of them.

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE NCIPMessage PUBLIC "-//NISO//NCIP DTD Version 1.0//EN" "http://www.niso.org/ncip/v1_0/imp1/dtd/ncip_v1_0.dtd"> <NCIPMessage version="http://www.niso.org/ncip/v1_0/imp1/dtd/ncip_v1_0.dtd">
<ItemRequestCancelled> <InitiationHeader> <FromAgencyId>
<UniqueAgencyId> <Scheme
datatype="string">http://136.181.125.166:6601/IRCIRCD?target=get_scheme _values&amp;scheme=UniqueAgencyId</Scheme>
<Value datatype="string">zv244</Value> </UniqueAgencyId>
</FromAgencyId> <ToAgencyId>
<UniqueAgencyId> <Scheme
datatype="string">http://136.181.125.166:6601/IRCIRCD?target=get_scheme _values&amp;scheme=UniqueAgencyId</Scheme>
<Value datatype="string">zv223</Value> </UniqueAgencyId>
</ToAgencyId> </InitiationHeader> <UniqueUserId>
<UniqueAgencyId> <Scheme
datatype="string">http://136.181.125.166:6601/IRCIRCD?target=get_scheme _values&amp;scheme=UniqueAgencyId</Scheme>
<Value datatype="string">zv244</Value> </UniqueAgencyId>
<UserIdentifierValue
datatype="string">p12704374</UserIdentifierValue> </UniqueUserId>
<UniqueItemId> <UniqueAgencyId>
<Scheme datatype="string">http://136.181.125.166:6601/IRCIRCD?target=get_scheme _values&amp;scheme=UniqueAgencyId</Scheme>
<Value datatype="string">zv223</Value> </UniqueAgencyId>
<ItemIdentifierValue
datatype="string">30295001258854</ItemIdentifierValue> </UniqueItemId>
<RequestType> <Scheme
datatype="string">http://136.181.125.166:6601/IRCIRCD?target=get_scheme _values&amp;scheme=RequestType</Scheme>
<Value datatype="string">hold</Value> </RequestType>
</ItemRequestCancelled> </NCIPMessage>

Thanks

Bruce

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 11244
    • View Profile
Re: Is there a technique for debuging xfiles xml.load()
« Reply #1 on: March 05, 2014, 09:56:49 AM »
xml.loggingOn = true
sends some stuff to debugview, but whether that helps or not, I'm not sure.
I agree that getting the structure right can take a bit of effort to get right. Typically I start slowly, and grown the structure one bit at a time.

cheers
Bruce

alpatrick

  • Newbie
  • *
  • Posts: 7
    • View Profile
    • Email
Re: Is there a technique for debuging xfiles xml.load()
« Reply #2 on: March 07, 2014, 08:07:13 AM »
Thanks Bruce xml.loggingOn = true seems to help.