Author |
Message
|
malammik |
Posted: Mon Apr 18, 2005 9:22 am Post subject: Reading XML Attribute with namespace |
|
|
 Partisan
Joined: 27 Jan 2005 Posts: 397 Location: Philadelphia, PA
|
I have an XML which begins like this
**************************************************
<?xml version="1.0" encoding="UTF-8"?>
<!--Sample XML file generated by XMLSPY v2004 rel. 4 U (http://www.xmlspy.com)-->
<ArchMessage xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="c:\xml\ArchMessage.xsd">
<Id>2</Id>
<PubSubService>
<Subscription xsi:type="XPathPlusSubscription" >
***************************************************
When I try to access the type attribute like this
InputRoot.XML.ArchMessage.PubSubService.Subscription.(XML.Attribute)type
OR
InputRoot.XML.ArchMessage.PubSubService.Subscription.(XML.Attribute)xsi:type
I am not getting the value. I know that this is wrong 100% because of namespaces. How do I access this namespaced attribute correctly?
My input format is XML should it be XMLNS? What changes should I make in ESQL to get the value of the attribute?
Thanks a lot. _________________ Mikhail Malamud
http://www.netflexity.com
http://groups.google.com/group/qflex |
|
Back to top |
|
 |
frankies |
Posted: Mon Apr 18, 2005 11:52 pm Post subject: About the namespace. |
|
|
Newbie
Joined: 07 Mar 2005 Posts: 6
|
Add
'' DECLARE xsi NAMESPACE 'http://schemas.xmlsoap.org/soap/envelope/';
"
before
"
InputRoot.XML.ArchMessage.PubSubService.Subscription.(XML.Attribute)xsi:type
" |
|
Back to top |
|
 |
malammik |
Posted: Sat Apr 23, 2005 8:55 am Post subject: |
|
|
 Partisan
Joined: 27 Jan 2005 Posts: 397 Location: Philadelphia, PA
|
|
Back to top |
|
 |
malammik |
Posted: Sat Apr 23, 2005 9:01 am Post subject: |
|
|
 Partisan
Joined: 27 Jan 2005 Posts: 397 Location: Philadelphia, PA
|
|
Back to top |
|
 |
malammik |
Posted: Sat Apr 23, 2005 4:10 pm Post subject: |
|
|
 Partisan
Joined: 27 Jan 2005 Posts: 397 Location: Philadelphia, PA
|
|
Back to top |
|
 |
dipankar |
Posted: Mon Apr 25, 2005 2:19 am Post subject: hello |
|
|
Disciple
Joined: 03 Feb 2005 Posts: 171
|
you can use FIELDVALUE function to get the attribute value in XML domain.
Please see the following ESQL code-
FIELDVALUE(InputBody.ArchMessage.PubSubService.Subscription ."xsi:type"); |
|
Back to top |
|
 |
malammik |
Posted: Mon Apr 25, 2005 7:01 am Post subject: |
|
|
 Partisan
Joined: 27 Jan 2005 Posts: 397 Location: Philadelphia, PA
|
|
Back to top |
|
 |
|