Author |
Message
|
goldym |
Posted: Tue Jul 05, 2005 9:39 am Post subject: XML DOCTYPE Error |
|
|
Centurion
Joined: 24 Jun 2005 Posts: 116
|
Has anyone seen when the DOCTYPE causes your xml path to fail.
Whenever this is in my xml which I know tells the parser where to go the validate this xml, setting my labelname gets path does not exist?
<!DOCTYPE Trade SYSTEM "http://advantage.nbgfn.com/sysdata/dtd/AdvTrade.dtd">
Does anyone know how to fix this? |
|
Back to top |
|
 |
jefflowrey |
Posted: Tue Jul 05, 2005 9:55 am Post subject: |
|
|
Grand Poobah
Joined: 16 Oct 2002 Posts: 19981
|
Can we see your ESQL? _________________ I am *not* the model of the modern major general. |
|
Back to top |
|
 |
goldym |
Posted: Tue Jul 05, 2005 10:18 am Post subject: |
|
|
Centurion
Joined: 24 Jun 2005 Posts: 116
|
ESQL:
DECLARE labelname CHAR;
SET labelname = InputRoot.XML.Trade.(XML.Attribute)"productName";
IF labelname = 'Fixed Swap' THEN
SET OutputLocalEnvironment.Destination.RouterList.DestinationData[1].labelname = labelname;
ELSE
IF labelname = 'MTM Cross Currency Swap' THEN
SET OutputLocalEnvironment.Destination.RouterList.DestinationData[1].labelname = labelname;
ELSE
IF labelname = 'Swap' THEN
SET OutputLocalEnvironment.Destination.RouterList.DestinationData[1].labelname = labelname;
ELSE
SET OutputLocalEnvironment.Destination.RouterList.DestinationData[1].labelname = 'Undefined';
END IF;
END IF;
END IF;
XML: |
|
Back to top |
|
 |
jefflowrey |
Posted: Tue Jul 05, 2005 10:27 am Post subject: |
|
|
Grand Poobah
Joined: 16 Oct 2002 Posts: 19981
|
|
Back to top |
|
 |
EddieA |
Posted: Tue Jul 05, 2005 10:32 am Post subject: |
|
|
 Jedi
Joined: 28 Jun 2001 Posts: 2453 Location: Los Angeles
|
Try:
Code: |
SET labelname = InputRoot.XML.(XML.Element)Trade.(XML.Attribute)"productName"; |
Cheers,
Eddie _________________ Eddie Atherton
IBM Certified Solution Developer - WebSphere Message Broker V6.1
IBM Certified Solution Developer - WebSphere Message Broker V7.0 |
|
Back to top |
|
 |
goldym |
Posted: Tue Jul 05, 2005 10:41 am Post subject: |
|
|
Centurion
Joined: 24 Jun 2005 Posts: 116
|
SET labelname = InputRoot.XML.(XML.Element)Trade.(XML.Attribute)"productName";
Worked thanks so much. Although i don't think I understand why. |
|
Back to top |
|
 |
EddieA |
Posted: Tue Jul 05, 2005 3:10 pm Post subject: |
|
|
 Jedi
Joined: 28 Jun 2001 Posts: 2453 Location: Los Angeles
|
Quote: |
(XML.Element)Trade |
Is making the ESQL look for an XML Element called trade. Otherwise it looks for the first "element" called Trade, which in your example happens to be the Doctype. So, without the (XML.Element) qualifier, your ESQL was looking for "productName" in the Doctype.
Cheers, _________________ Eddie Atherton
IBM Certified Solution Developer - WebSphere Message Broker V6.1
IBM Certified Solution Developer - WebSphere Message Broker V7.0 |
|
Back to top |
|
 |
|