REST and content wrapped inside !CDATA in xml feeds

I would like some assistance in extracting jpg images for a gallery inside !CDATA in REST feeds like
http://saturn.jpl.nasa.gov/news/latest-cassini-huygens.xml - source looks like:
<item>
<title><![CDATA[NASA Cassini Images May Reveal Birth of a Saturn Moon]]></title>
<description><![CDATA[<table border="0" cellpadding="5"><tr><td><img src="http://saturn.jpl.nasa.gov/multimedia/images/rings/images/IMG005008-th100-75.jpg" alt="Commotion at Ring's Edge May Be Effect of Small Icy Object" width="100" height="75" border="0" align="left"></td><td valign="top">Cassini has been documenting a process that may be replaying, in miniature, the birth process of about two dozen moons of Saturn.</td></tr></table>]]></description>
<link>http://saturn.jpl.nasa.gov/news/newsreleases/newsrelease20140414/</link>
</item>
-- Barb Bowman

Barb,
Try this:
1) Create a custom gallery
2) Set the custom gallery data source to latest_cassini_huygens_xml!channel!item
3) Add a image visual into the gallery
4) Set the image visual data source to Mid(ThisItem!description!'$text',Find("http",ThisItem!description!'$text'),Find("jpg",ThisItem!description!'$text')+3-Find("http",ThisItem!description!'$text'))
Note: The Mid function extracts out the img src url from the description text.
 Yes! Thank you! Is there more documentation on this functionality (other than what is on blob)? So the +3 does in relation to extracting the image in combination with the word 'jpg' following the word "http' pulls the whole string and since
it is an image field, it works (?). I sure didn't get that from the docs on blob...
2.34 
Mid
Usage: Mid(text, start_position, num_chars)
Mid(textColumn, start_positions, num_chars)
Returns the characters from the middle of a string, given the starting position and the number of characters to extract.
Examples:
Mid(“ABCDEFG”, 3, 3) returns “CDE”.
Mid( [“ABCDEFG”, “Sienna”], [2, 3], [3, 3]) returns [“BCD”, “enn”].
I'd like to also extract the text without HTML markup (which happens when I use the description value (obviously) but I don't think the Mid function helps here. Is there something else that might work to extract the text I want?
<description><![CDATA[<table border="0" cellpadding="5"><tr><td><img src="http://saturn.jpl.nasa.gov/multimedia/images/rings/images/IMG005008-th100-75.jpg"
alt="Commotion at Ring's Edge May Be Effect of Small Icy Object" width="100" height="75" border="0" align="left"></td><td valign="top">Cassini has been
documenting a process that may be replaying, in miniature, the birth process of about two dozen moons of Saturn.</td></tr></table>]]></description>
-- Barb Bowman

Similar Messages

  • EntityEncodeStrings and Internet Explorer w/ CDATA in XML

    Hello.
    I'm makin a sort of content management system which fetches
    data from an XML file:
    (pages.xml)
    <pages>
    <page id="1">
    <title>Home</title>
    <link>#1</link>
    <content><![CDATA[<h3>Welcome"</h3><p>We're
    experimenting a lot with different stuff on this page, please bare
    with us.</p>]]></content>
    </page>
    <page id="2">
    <title>About</title>
    <link>#2</link>
    <content><![CDATA[<h3>about</h3>Woah,
    hold it there, punk.]]></content>
    </page>
    [etc...]
    </pages>
    My XHTML-file has this in the header:
    var nav = new Spry.Data.XMLDataSet("/pages.xml",
    "pages/page");
    nav.setColumnType("@id", "number");
    nav.setColumnType("content", "html"); // skips entity
    encoding \o/
    I want to display everything in the <content />-xml
    tree as (X)HTML
    With the code I have everything works perfectly in Firefox,
    but in Internet Explorer (7) I'm getting no data at all because of
    entityEncodeStrings not functioning correctly (or so it seems). If
    I remove this it displays in both Firefox and Internet Explorer
    (though with the entities encoded).
    It doesn't matter which way I do it, using the option
    entityEncodeStrings: false or -1 I get the same (non-)results.
    I'm very thankful for any help!

    http://labs.adobe.com/technologies/spry/samples/data_region/XMLDataSetStringHandlingSample .html

  • How do I check if section and subdivision exist inside object's xml?

    My function is working but not as I expect it to. The problem is that when Section and Subvision are not found in the object aobjXmlGetStatuteRequestNode xml, I get an error NullReference Exception was unhandled by user code. Object reference not set
    to an instance of an object. 
    For that reason, because the two elements are optional, I would like to check if they exist before adding their value into the xml inside the object objXmlRequestMessageDoc.
    The if statement I used in my function did not work. When it found Section element, it did not check for Subdivision. 
    How do I check for both and add them if they exist. If they do not exist, I do not need to do anything and should not throw an error since they are optional.
     Object aobjXmlGetStatuteRequestNode has this xml
    <ns:GetStatutesRequest xmlns:ns="http://www.courts.state.mn.us/StatuteService/1.0">
    <ns:Statute>
    <ns:Chapter>169</ns:Chapter>
    <!--Optional:-->
    <ns:Section>191</ns:Section>
    <!--Optional:-->
    <ns:Subdivision>a</ns:Subdivision>
    </ns:Statute>
    The following output in the objXmlRequestMessageDoc object is correct but this does not work when Section and or Subdivision are not found in the object aobjXmlGetStatuteRequestNode.
    <ns:BasicSearchQueryRequest xmlns:ns="http://crimnet.state.mn.us/mnjustice/statute/service/4.0">
    <ns1:BasicSearchCriteria xmlns:ns1="http://crimnet.state.mn.us/mnjustice/statute/messages/4.0">
    <ns2:Chapter xmlns:ns2="http://crimnet.state.mn.us/mnjustice/statute/4.0"/169</ns2:Chapter>>
    <ns2:Section xmlns:ns2="http://crimnet.state.mn.us/mnjustice/statute/4.0"/>191</ns2:Chapter>
    <ns2:Subdivision xmlns:ns2="http://crimnet.state.mn.us/mnjustice/statute/4.0"/>a</ns2:Chapter>
    </ns1:BasicSearchCriteria>
    </ns:BasicSearchQueryRequest>
    My Function
    Function GetStatutesByChapter(ByVal aobjXmlGetStatuteRequestNode As XmlNode, ByVal aobjXMLNameSpaceManager As XmlNamespaceManager, ByVal aobjBroker As ServiceCatalog.Library.v4.Broker) As XmlDocument
    Dim objXmlRequestMessageDoc As XmlDocument
    Dim objXmlResponseMessageDoc As XmlDocument
    Dim intCount As Integer
    aobjBroker.PostMessageWarehouseInformationalMessage("Chapter found.", 1)
    objXmlResponseMessageDoc = New XmlDocument
    'Add the first element into the document GetStatuteByChapter with its namespace
    objXmlResponseMessageDoc.AppendChild(objXmlResponseMessageDoc.CreateElement("BasicSearchQueryResponse", "http://crimnet.state.mn.us/mnjustice/statute/service/4.0"))
    'Create the BCA request message
    objXmlRequestMessageDoc = New XmlDocument
    objXmlRequestMessageDoc.AppendChild(objXmlRequestMessageDoc.CreateElement("ns:BasicSearchQueryRequest", aobjXMLNameSpaceManager.LookupNamespace("ns")))
    objXmlRequestMessageDoc.SelectSingleNode("ns:BasicSearchQueryRequest", aobjXMLNameSpaceManager).AppendChild(objXmlRequestMessageDoc.CreateElement("ns1:BasicSearchCriteria", aobjXMLNameSpaceManager.LookupNamespace("ns1")))
    objXmlRequestMessageDoc.SelectSingleNode("ns:BasicSearchQueryRequest/ns1:BasicSearchCriteria", aobjXMLNameSpaceManager).AppendChild(objXmlRequestMessageDoc.CreateElement("ns2:Chapter", aobjXMLNameSpaceManager.LookupNamespace("st")))
    objXmlRequestMessageDoc.SelectSingleNode("ns:BasicSearchQueryRequest/ns1:BasicSearchCriteria", aobjXMLNameSpaceManager).AppendChild(objXmlRequestMessageDoc.CreateElement("ns2:Section", aobjXMLNameSpaceManager.LookupNamespace("st")))
    objXmlRequestMessageDoc.SelectSingleNode("ns:BasicSearchQueryRequest/ns1:BasicSearchCriteria", aobjXMLNameSpaceManager).AppendChild(objXmlRequestMessageDoc.CreateElement("ns2:Subdivision", aobjXMLNameSpaceManager.LookupNamespace("st")))
    objXmlRequestMessageDoc.DocumentElement.SelectSingleNode("ns1:BasicSearchCriteria/st:Chapter", aobjXMLNameSpaceManager).InnerText = aobjXmlGetStatuteRequestNode.SelectSingleNode("ss:Statute/ss:Chapter", aobjXMLNameSpaceManager).InnerText
    objXmlRequestMessageDoc.DocumentElement.SelectSingleNode("ns1:BasicSearchCriteria/st:Section", aobjXMLNameSpaceManager).InnerText = aobjXmlGetStatuteRequestNode.SelectSingleNode("ss:Statute/ss:Section", aobjXMLNameSpaceManager).InnerText
    objXmlRequestMessageDoc.DocumentElement.SelectSingleNode("ns1:BasicSearchCriteria/st:Subdivision", aobjXMLNameSpaceManager).InnerText = aobjXmlGetStatuteRequestNode.SelectSingleNode("ss:Statute/ss:Subdivision", aobjXMLNameSpaceManager).InnerText
    'check if there is a section and or subdivision if it is there then set the value
    'If Not (aobjXmlGetStatuteRequestNode.SelectSingleNode("ss:Statute/ss:Section", aobjXMLNameSpaceManager).InnerText) Is Nothing Then
    ' objXmlRequestMessageDoc.DocumentElement.SelectSingleNode("ns1:BasicSearchCriteria/st:Section", aobjXMLNameSpaceManager).InnerText = aobjXmlGetStatuteRequestNode.SelectSingleNode("ss:Statute/ss:Section", aobjXMLNameSpaceManager).InnerText
    'End If
    'check if there is a section and or subdivision if it is there then set the value
    aobjBroker.PostMessageWarehouseSnapshot(objXmlRequestMessageDoc.OuterXml, "Request Message", 1)
    'Call the BCA service
    intCount = 0
    'Count how many Statute node found
    CType(objXmlResponseMessageDoc.SelectSingleNode("ss:GetStatutesResponse/ss:StatutesXml/ss:Statutes", aobjXMLNameSpaceManager), System.Xml.XmlElement).SetAttribute("totalCount", CStr(intCount))
    Return objXmlResponseMessageDoc
    End Function

    I have resolved this issue by using two if statements as follows
    'check if there is a section and or subdivision if it is there then set the value
    If Not (aobjXmlGetStatuteRequestNode.SelectSingleNode("ss:Statute/ss:Section", aobjXMLNameSpaceManager) Is Nothing) Then
    objXmlRequestMessageDoc.DocumentElement.SelectSingleNode("ns1:BasicSearchCriteria/st:Section", aobjXMLNameSpaceManager).InnerText = aobjXmlGetStatuteRequestNode.SelectSingleNode("ss:Statute/ss:Section", aobjXMLNameSpaceManager).InnerText
    End If
    If Not (aobjXmlGetStatuteRequestNode.SelectSingleNode("ss:Statute/ss:Subdivision", aobjXMLNameSpaceManager) Is Nothing) Then
    objXmlRequestMessageDoc.DocumentElement.SelectSingleNode("ns1:BasicSearchCriteria/st:Subdivision", aobjXMLNameSpaceManager).InnerText = aobjXmlGetStatuteRequestNode.SelectSingleNode("ss:Statute/ss:Subdivision", aobjXMLNameSpaceManager).InnerText
    End If

  • Read Only TextAreas with Carriage Return, Line Breaks and Word Wrapping

    Hi all,
    I know there are a few posts around this subject but I cannot find the answer to the exact problem I have.
    I have a page that has a 'TextArea with Character Counter' (4000 Chars) that is conditionally read only based on the users credentials (using the 'Read Only' attributes of the TextArea item).
    When the field is editable (not Read Only) everything works fine but when I make the field Read Only I start to have problems:
    The first problem is that the Carriage Return and Line Breaks are ignored and the text becomes one continuos block. I have managed to fix this by adding pre and post element text of pre and /pre tags. This has made the Carriage Return and Line Breaks word nicely and dispaly correctly.
    However, it has introduced a second problem. Long lines, with no Carriage Returns or Line Breaks, now extend to the far right of the page with no word wrapping, making my page potentially 4000+ characters wide.
    How can I get the field to be display only, with recognised Carriage Returns and Line Breaks, and Word Wrapping inside a fixed width of, say, 150 characters?
    Many thanks,
    Martin

    Hi,
    Just a cut and paste of yours with the field name changed:
    htp.p('<script>');
    htp.p('$x("P3_COMMENTS").readonly=true;');
    htp.p('</script>');I also have the following in the page HTML Header, could they be conflicting?
    <script type="text/javascript" language="JavaScript">
    function setReleaseToProd(wpTypeCode){
       //setReleaseToProd($v(this))
      var get = new htmldb_Get(null,$v('pFlowId'),'APPLICATION_PROCESS=set_release_to_prod',0);
      get.addParam('x01',wpTypeCode);
      gReturn = get.get();
      if(gReturn) {
         $s('P3_RELEASE_TO_PROD',gReturn);
      get = null;
    </script>I am a long way from knowing much about Javascript (this page code was written by someone else) so all help is much appreciated.
    Martin

  • Parsing HTML inside CDATA in OSB

    hi,
    how to parse the HTML content wrapped by CDATA in OSB?
    for example..
    below is the request...
    <soapenv:Body      xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
         &lt;html>&lt;body>"hi"&lt;/br>h r u&lt;/body>&lt;/html>
    </soapenv:Body>
    i need to parse the html content alone...
    can anybody please provide a solution to this..
    :(

    If above is the request then $body/* will give you the HTML content. You may apply XPath to traverse through child nodes. Post OSB related queries in SOA suite forum -
    SOA Suite
    Regards,
    Anuj

  • Dreamweaver CS4: XML Feeds not working for USGS Water Data Web Service

    Hi,
    Can anyone look at my code and help me understand why one xml
    feed works and the other doesn't?
    I'm using Creative Suite 4 Dreamweaver to produce the code.
    Here is the code that works and the code that doesn't,

    Hi,
    For this situation, here is an article discuss about the error message and the solution which you could refer to:
    http://www.getshifting.com/wiki/setupn
    http://stackoverflow.com/questions/9975521/error-connecting-to-wcf-service-with-windows-security
    Regards

  • How to insert a new line character inside CDATA tag in the source xml data file?

    values for form fields in the xml data file is contained inside CDATA tags which is an Unparsed Format.
    Eg: [CDATA[IBM-01 ~ DSHFSJDSJ ~ FGFGFJ, ~ VA 665665]] delimited by "~" char
    Actual o/p:-
    IBM-01 ~ DSHFSJDSJ ~ FGFGFJ, ~ VA 665665
    Expected o/p is like :-
    IBM-01
    DSHFSJDSJ
    FGFGFJ,
    VA 665665
    live cycle product does not interpret ~ as a newline character. Please suggest which character should be used instead inside CDATA section or if there is any other way to fix this?

    I do not have any problem while using IE's XML parser
    for XML+XSLT merging.That is because IE's parser does not implement XML correctly.
    But when I use JAXP's Transformer object, it does not
    preserve the new lines inside attribute values and
    converts those into white spaces.That is exactly what the XML specifications say should happen.
    >
    ----If you have text that contains newlines, you
    should put it in an element, not in
    ----an attribute.
    That would be my last solution. But I'd really hate
    to change my logic just 'coz JAXP is not capable of
    handling new lines inside attribute values. I may be
    wrong... but If IE can keep those then there has to
    be a way to do the same from server side merging....Sure. Write your own parser with the same bug in it. But you don't have any right to demand that other people supply you with parsers that work incorrectly.

  • Using ADL when Application.xml and Content.swf are not in the BIN directory

    Hello, I am trying to use the air debug launcher (ADL) to
    launch a simple air app. My issue is I am trying to have ADL launch
    this app from outside of the bin directory of the SDK. Whenever I
    try to pass adl the full path to the Applicaiton.xml file it says
    "application descriptor not found" Does anyone know how to get
    around this? How can I run an AIR app that is outside of the bin?
    My situation C:\AIR has the Applicaiton.xml and Content.swf
    files, then a directory way below C:\Program Files\....\..... has
    the bin directory. I can run adl using its full path C:\Program
    Files\....\bin\adl, but when I pass it the full path for
    Application.xml it fails.
    By the way when I put everything in the bin, or below the bin
    it works just fine.

    If you're receiving this error message then the full path
    you're specifying for application.xml must be incorrect.

  • I am new in indesign scripting, please tell me how to write a script to get  content of a element in xml and then sort all the content

    I am new in indesign scripting, please tell me how to write a script to get  content of a element in xml and then sort all the content

    Hi,
    May the below code is useful for you, but I dont know how to sort.
    Edit the tag as per your job request.
    alert(app.activeDocument.xmlElements[0].contents)
    //Second alert
    var xe = app.activeDocument.xmlElements[0].evaluateXPathExpression("//marginalnote");
    alert(xe.length)
    for(i=0; i<xe.length; i++)
        alert(xe[i].texts[0].contents)
    Regards
    Siraj

  • How to extract a folder (and its contents) from inside a zip file?

    There is a zip file which contains a folder inside it. The folder itself contains a few files. I would need to know how to extract the folder (with its contents) from inside a zip file.
    I have found a few unzipping code samples which show how to handle a folder inside a zip file. An example is shown below:
    public static void extract(String workingDirectory, byte[] zipFile)
    throws Exception {
    ByteArrayInputStream byteStream = new ByteArrayInputStream(zipFile);
    ByteArrayOutputStream out = new ByteArrayOutputStream();
    ZipInputStream zipStream = new ZipInputStream(byteStream);
    ZipEntry zipEntry = null;
    String nameZipEntry = null;
    byte[] contentZiphttp://forum.java.sun.com/post!default.jspa?forumID=31#
    Click for code tagsEntry = null;
    boolean isDirectory = false;
    int indexFileSeparator = -1;
    String directory = null;
    String fileName =  null;
    while ( (zipEntry = zipStream.getNextEntry()) != null )
                nameZipEntry = workingDirectory + File.separator + zipEntry.getName();
                isDirectory = zipEntry.isDirectory();
                if (isDirectory) {
    File file = new File(nameZipEntry);
    file.mkdirs();
                else
                    // read zipEntry
                    byte[] buf = new byte[1024];
                    int c = 0;
                    while ( (c = zipStream.read(buf)) != -1)
                        out.write(buf, 0, c);
                    indexFileSeparator = nameZipEntry.lastIndexOf(File.separator);
                    directory = nameZipEntry.substring(0, indexFileSeparator);
                    fileName =  nameZipEntry.substring(indexFileSeparator+1,nameZipEntry.length());
                    FileSystemTools.createFile(directory, fileName, out);
                    out.reset();
                    zipStream.closeEntry();
            zipStream.close();
            byteStream.close();
    }The code sample which deals with the part where the zipEntry is a directory creates a directory with the same path and name. (highlighted in bold)
    Another similar variation is:
    File file = new File(dirDestiny.getAbsolutePath() + File.separator + zipEntry.getName() );
    if(zipEntry.isDirectory())
          file.mkdirs();When the code creates a directory for the folder, does it unzip the contents inside the folder as well?
    If not, how do I extract the files inside the folder?

    Have you already tried to see if the sample code you downloaded works or not? Maybe if you try out the code yourself you can see if it extracts files from a directory within a zip file?
    I like to use pkzip. It is a command line compression/uncompression tool that can be used from a batch file. If you assignment involves unzipping large amount of zip files on a regular basis, I recommend taking a look at pkzip.

  • Please enable REST support in WEB-INF/conf/axis2.xml and WEB-INF/web.xml

    Hi  All,
    we are not able to connect to Live office to our server . URL is  not authenticated in Excel and  if we place same url in browser ,we are getting below error message.
    "Please enable REST support in WEB-INF/conf/axis2.xml and WEB-INF/web.xml"
    we couldn't able to rest the same after changing settings in axis2 file also.
    Any solution where we can configure in CMC or any files
    Regards
    Mahesh

    Hi Mahesh,
    As mentioned by Abhilasha, this is the expected behavior.
    In order to validate you could place the following URL in the browser.
    http://servername:portno/dswsbobje. you would see Tomcats home page which will display the list of Services.
    As far as the Live office in Excel is concerned , If you are getting a yellow  exclamation mark stating (Web service not correct) next to Session URL, try changing the servername to IPaddress of the server.
    Eg: http://ipaddress:portno/dswsbobje/services/Session
    While inserting the Session URL in the Live Office settings confirm the URL as per above.
    If the issue still persists, you could configure the host file entry in you client machine.
    Let me know if the information is helpful.
    Regards,
    Noopur

  • Adapter Engine handling for CDATA in XML

    Gurus:
    I had a question on the Dapter Engines behavious, specifically the SOAP Sender.
    The Source is sending something like:
               <Data><![CDATA[<?xml version="1.0" encoding="ISO-8859-1" ?><response><forms><form ObjectId="4070" Form_Name="P40 Action"><EMP_NAME>Howard Roark</EMP_NAME><PERNR>P1111111</PERNR><WORKAUTH></WORKAUTH><HR_NAME>Scott Manager</HR_NAME><HR_PNUM>P1234567</HR_PNUM><ESIG>Scott Manager</ESIG><ELECTRONIC_SIGNATURE>Scott Manager (electronically signed)</ELECTRONIC_SIGNATURE><ESIG_VERIFICATION>Scott.Manager [Tue Jun 2 12:03:56 EDT 2009]</ESIG_VERIFICATION><ESIG_DATE>06/02/2009</ESIG_DATE></form></forms></response>]]></Data>
             </GetFormXMLResult>
    What the Integration Engine sees is the Data elelment with the CDATA section trimmed, i.e., it sees:
    <Data> <?xml version="1.0" encoding="ISO-8859-1" ?><response><forms><form ObjectId="4070" Form_Name="P40 Action"><EMP_NAME>Howard Roark</EMP_NAME><PERNR>P1111111</PERNR><WORKAUTH></WORKAUTH><HR_NAME>Scott Manager</HR_NAME><HR_PNUM>P1234567</HR_PNUM><ESIG>Scott Manager</ESIG><ELECTRONIC_SIGNATURE>Scott Manager (electronically signed)</ELECTRONIC_SIGNATURE><ESIG_VERIFICATION>Scott.Manager [Tue Jun 2 12:03:56 EDT 2009]</ESIG_VERIFICATION><ESIG_DATE>06/02/2009</ESIG_DATE></form></forms></response> </Data>
    Is this an issue with the Aapter Engine, or has anyone come accross this before? This is on PI7.0 SPS 13.
    Thanks
    Feroz

    Hi,
    the CDATA section should not be a problem. It's mostly used to include information / XML in one tag and to include special characters that should not be changed or ignored by the system. All informaiton within a CDATA element is ignored by PI and handled as "blackbox" string. PI just receives it and passes it out without really looking what's inside the tag.
    If you want to extract what's inside the CDATA element, you need to use an XSLT in your mapping (see: Handling CDATA in PI)
    Regards,
    Kai

  • How to transform with xquery from CDATA to XML

    Hi everyone
    I want to transform from CDATA to XML and I don´t know how to do.
    anyone can help me please?
    I'm using OSB OEPE PS3, I have artifacts: person.PROXY, person.BIZ, BIZ-Person.WSDL, PROXY-Person.WSDL, Person-response.xq and Person.xsd.
    I Use Message Flow Within Route, Routing (Request and Response Actions)
    To Request Xquery transformation is ok, for Response Action I need help. I receive a String and inside with CDATA:
    +<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">+
    +<soapenv:Body>+
    +<executeResponse soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">+
    +<executeReturn xsi:type="xsd:string">+
    +*<![CDATA[<example-data rows="1"><person><id>123</id><name>JHON</name><surname>MAGNESS</surname>+*
    *+<code>123456789V</code></person></example-data>]]>+*
    +</executeReturn>+
    +</executeResponse>+
    +</soapenv:Body>+
    +</soapenv:Envelope>+
    I want to map from CDATA to XML like this (Person.xsd):
    <xs:schema xmlns="http://www.domain.com/XSD/Persons" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:ns1="http://www.domain.com/XSD/ABCD" targetNamespace="http://www.domain.com/XSD/Persons" elementFormDefault="qualified" attributeFormDefault="unqualified">
    <xs:import namespace="http://www.domain.com/XSD/ABCD"
    <xs:complexType name="Persons">
              <xs:sequence>++
                   <xs:element name="id" type="xs:string"/>
                   <xs:element name="surname1" type="xs:string" minOccurs="0"/>
                   <xs:element name="surname2" type="xs:string" minOccurs="0"/>
                   <xs:element name="name" type="xs:string" minOccurs="0"/>
                   <xs:element name="code" type="xs:string"/>
              </xs:sequence>
         </xs:complexType>
    Edited by: user10070593 on Aug 29, 2012 10:58 PM
    Edited by: user10070593 on Aug 29, 2012 10:58 PM
    Edited by: user10070593 on Aug 29, 2012 11:00 PM

    Hey Patrick / Vlad thank you very much for your help :)
    I have solved it like this:
    Within my proxy in Message Flow (*using Routing -- Route -- Response Action*)
    I'm using the elements Assing and Replace
    In Assing element (expression: Person-response.xq, variable: varBStoPS)
    In Replace element (xpath : executeResponse/executeReturn/text() , in Variable: body, expression:
    *$varBStoPS*)
    Now, within Person-Response.xq , I am using the parameter: *$anyType1*, but this is a string, I don´t know to use a FOR loop in Xquery, as I can apply it to the XML mapping (Person.xsd)?, Knowing I get the list:
    *+<example-data rows="1"><person><id>123</id><name>JHON</name><surname>MAGNESS</surname>+*
    *+<code>123456789V</code></person></example-data>+*
    Person.xsd:
    <xs:element name="processResponse">
              <xs:complexType>
                   <xs:sequence>
                        <xs:element ref="ns1:HeaderMsgABCD"/>
                        <xs:element name="bodyResponse">
                             <xs:complexType>
                                  <xs:sequence>
                                       <xs:element name="PersonsCollection">
                                            <xs:complexType>
                                                 <xs:sequence>
              <xs:element name="Persons" type="Persons" minOccurs="0" maxOccurs="unbounded"/>
                                                 </xs:sequence>
                                            </xs:complexType>
                                       </xs:element>
                                  </xs:sequence>
                             </xs:complexType>
                        </xs:element>
                        <xs:element ref="ns1:ErrorMsgABCD"/>
                   </xs:sequence>
              </xs:complexType>
         </xs:element>
    Person-response.xq:
    xquery version "1.0" encoding "Cp1252";
    (:: pragma parameter="$anyType1" type="xs:anyType" ::)
    (:: pragma bea:global-element-return element="ns0:processResponse" location="../XSD/ Person-response.xq" ::)
    declare namespace xf = "http://tempuri.org/oracle/xquery/Person-response/";
    declare namespace ns1 = "http://www.domain.com/XSD/ABCD";
    declare namespace ns0 = " http://www.domain.com/XSD/Persons";
    declare function xf:XQ_SEARCH_PERSONS_RESPONSE($anyType1 as element(*))
    as element(ns0:processResponse) {
    <ns0:processResponse>
    <ns0:bodyResponse>
         <ns0:PersonsCollection>
    <ns0:Persons>
    <ns0:id>{ data(0) }</ns0:id>
    <ns0:surname1>{ data(0) }</ns0:surname1>
    <ns0:surname2>{ data(0) }</ns0:surname2>
    <ns0:name>{ data(0) }</ns0:name>
    <ns0:code>{ data(0) }</ns0:code>
              </ns0:Persons>
         </ns0:PersonsCollection>
    </ns0:bodyResponse>
    </ns0:processResponse>
    declare variable $anyType1 as element(*) external;
    xf:XQ_SEARCH_PERSONS_RESPONSE ($anyType1)
    Edited by: chromosoma on Aug 30, 2012 12:47 PM
    Edited by: chromosoma on Aug 30, 2012 12:50 PM
    Edited by: chromosoma on Aug 30, 2012 1:00 PM

  • Get string out of CDATA in xml

    I have xml file with another xml file embedded in it inside CDATA. Will someone help me with the code to get that xml as string.I am using xml beans
    The xml i have looks like this.
    <SPFormatOrderXml><![CDATA[<?xml version="1.0" encoding="UTF-8"?>
    <!--Sample XML file generated by XMLSPY v5 rel. 4 U (http://www.xmlspy.com)-->
    <DataCommunication xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="C:\Documents and Settings\rghanta.SISCO\Desktop\NextAceProductDelivery.xsd">
         <Header>
              <Portal>
                   <ClientID>100</ClientID>
                   <UserID>121</UserID>
                   <OrderID>100</OrderID>
                   <EventID>43</EventID>
                   <EventName>ServiceProviderDispatch Error</EventName>
                   <DateTime>2001-12-17T09:30:47-05:00</DateTime>
                   <customerEmail>[email protected]</customerEmail>
                   <customerName>Client 100</customerName>
              </Portal>
              <Partner>
                   <PartnerOrderID>NextAceOrderID100</PartnerOrderID>
                   <PartnerName>NextAce</PartnerName>
                   <PartnerID>1</PartnerID>
                   <EventID>43</EventID>
                   <EventName>ServiceProviderDispatch Error</EventName>
                   <DateTime>2001-12-17T09:30:47-05:00</DateTime>
              </Partner>
         </Header>
         <Transaction>
              <Error>
                   <ErrorCode/>
                   <ErrorMessage/>
                   <ErrorContact/>
              </Error>
              <Comment>
                   <Private>An Internal Error has been thrown</Private>
                   <Public>Order has failed</Public>
                   <Information/>
              </Comment>
         </Transaction>
    </DataCommunication>
    ]]></SPFormatOrderXml>

    here is a good start -> [http://www.oracle.com/technology/oramag/oracle/03-may/o33xml.html|http://www.oracle.com/technology/oramag/oracle/03-may/o33xml.html]

  • Setting the content type inside the ABAP mapping.

    Hello All,
    Can any one help me by telling me how to set the content-type inside ABAP mapping. I have searched a large no of blogs and help.sap.com for the same.
    My requirement is I want to change the MIME type of the Main Document in side SXMB_MONI so that can change the content type of Main document which is application\xml by default.
    I would appreciate an early response regarding the same.
    Abinash

    Hello Raj,
    The output of my ABAP mapping is a flat file. So when I try to open the file with content type application/xml in the message monitor it shows the file has some error which is natural. The way to get around this problem is change the content type to application\txt from application\xml.
    I am not finding an option to set the content type inside the ABAP mapping for the same.
    Abinash

Maybe you are looking for

  • Root cause of error " Access denied. You do not have permission to perform this action or access this resource" - workflow - SharePoint 2013

    Good evening, technet community I hope you are doing well. When configuring my SharePoint workflow, I encounter the problem below: Problem Description: Let's say my domain is: test.com, my group user is: test\group , my user is: test\user1 Except an

  • 20gig Ipod Photo no longer syncs to computer

    Hello! I'm running into some problems with my 20gig Ipod photo. Recently it hasn't been syncing with my songs on my itunes, and every time I've attempted to it has said "Ipod is stuck in restore mode...etc" I've attempted to restore it numerous times

  • Printers can't be found

    I've had trouble printing on my office network. My IT dept. just keeps reinstalling printer drivers hoping that will help and it doesn't. I sometimes can and sometimes can't find my printers listed on the network zones. They are supposed to be in the

  • ITunes 9 grid view background color?

    It seems iTunes 9 has changed the background color of grid view from black to white. How can I change it back? I can't find anything in preferences or the iTunes help manual. Thank you for the help

  • J2EE Shared Libraries - Multiple Versions

    WLP 10.2, Studio 1.1 Below is the list of shared libraries in the wl console. There are multiple versions of some libraries. Does the performance improve if we remove them? beehive-controls-1.0(1.0,1.0) Active Library 1 beehive-controls-1.0-war(1.0,1