Jaxp fails to unmarshall xml document if it contaions the "&" character

Hi,
     We are using JAXB in our applications and have recently experienced a problem
with parsing of xml document ( when calling unmarshall method of jaxb ). The problem occurs
when the xml element contains the character & in it f.eks. "Hennes & Maiurets" then it fails to parse
the xml document. We would be very greatful if you could suggest us any workaround.
Thanks in advance
Sazzadul

That's because it's not an XML document. A well-formed XML document cannot contain the & character by itself in a text node, it must be escaped as &. XML parsers will do this automatically, but if you are producing your own XML via ordinary string output, you have to handle this escaping yourself. And the same goes for the other four markup characters.

Similar Messages

  • Failed to open XML document. Failed to retrieve Public ID

    I have a client posting to Weblogic 6.1 server with the help of Apache
    SOAP 2.2. The posting works fine if the contents of the SOAP message
    is small. But when the contents of SOAP reached more than 11KB, the
    following error occurs:
    Error: Failed to open XML document. Failed to retrieve PUBLIC id or
    SYSTEM id from the document. Decrease the number of char between the
    beginning of the document and its root element.
    The SOAP document looks like:
    <SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/">
    <SOAP-ENV:Body>
    <mn:sMethodName xmlns:mn="sMethodURI">
    <batch appid="1">
    <employee>
    <name>...</name>
    <address>...</address>
    </employee>
    <employee>
    <name>...</name>
    <address>...</address>
    </employee>
    </batch>
    </mn:sMethodName>
    </SOAP-ENV:Body>
    </SOAP-ENV:Envelope>
    The Max Post Size in Weblogic is set to (-1).
    The program is able to handle less than 50 items of
    <employee>.....</employee>. The error occurs when more than 50 items
    are used. The problem is that our application should be able to handle
    more than 1000 items of <employee>....</employee>.
    My questions are:
    1. How should I configure weblogic to solve the problem?
    2. How should I configure the deployment of Apache SOAP to solve the
    problem?
    Pls advise. Thanks.

    One can deduce from the error message that the parser is looking for the
    <?XML...?> portion of the document because that is where the SYSTEM and
    PUBLIC ids are found in the document.
    Peace,
    Cameron Purdy
    Tangosol Inc.
    Tangosol Coherence: Clustered Coherent Cache for J2EE
    Information at http://www.tangosol.com/
    "Grace" <[email protected]> wrote in message
    news:[email protected]...
    >
    Sorry, but I didn't get what you mean. I thought that was handled by theApache
    SOAP API already? And if it couldn't see the XML document header, then whydoes
    this only happens when the document size is large? It doesn't haveproblems whenever
    the document size is small.
    "Cameron Purdy" <[email protected]> wrote:
    It's looking for the XML document header "<?XML" ....
    Peace,
    Cameron Purdy
    Tangosol Inc.
    Tangosol Coherence: Clustered Coherent Cache for J2EE
    Information at http://www.tangosol.com/
    "Grace" <[email protected]> wrote in message
    news:[email protected]...
    I have a client posting to Weblogic 6.1 server with the help of Apache
    SOAP 2.2. The posting works fine if the contents of the SOAP message
    is small. But when the contents of SOAP reached more than 11KB, the
    following error occurs:
    Error: Failed to open XML document. Failed to retrieve PUBLIC id or
    SYSTEM id from the document. Decrease the number of char between the
    beginning of the document and its root element.
    The SOAP document looks like:
    <SOAP-ENV:Envelope
    xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/">
    <SOAP-ENV:Body>
    <mn:sMethodName xmlns:mn="sMethodURI">
    <batch appid="1">
    <employee>
    <name>...</name>
    <address>...</address>
    </employee>
    <employee>
    <name>...</name>
    <address>...</address>
    </employee>
    </batch>
    </mn:sMethodName>
    </SOAP-ENV:Body>
    </SOAP-ENV:Envelope>
    The Max Post Size in Weblogic is set to (-1).
    The program is able to handle less than 50 items of
    <employee>.....</employee>. The error occurs when more than 50 items
    are used. The problem is that our application should be able to handle
    more than 1000 items of <employee>....</employee>.
    My questions are:
    1. How should I configure weblogic to solve the problem?
    2. How should I configure the deployment of Apache SOAP to solve the
    problem?
    Pls advise. Thanks.

  • XPath query on multiple namespace XML document

    Hi,
    I am trying to locate an element in a WordML XML document using XPath.
    The structure looks like:
    <w:body>
         <wx:sect>
              <aml:annotation aml:id="0" w:type="Word.Bookmark.Start" w:name="DOC0000966"/>
    ...So I use the following expression "/wordDocument//body/sect" wich gives me a list with the <w:sect> nodes.
    Then I search for "annotation[@type='Word.Bookmark.Start']" starting from each <w:sect> node. This yields the <aml:annotation> elem.
    So far so good.
    Now I have to handle a second case as well.
    <w:body>
         <wx:sect>
         <w:p>
              <aml:annotation aml:id="0" w:type="Word.Bookmark.Start" w:name="DOC0000966"/>
    ...As you can see the <aml:annotation> is nested inside a <w:p> elem.
    My intention was to use the expression "//annotation[@type='Word.Bookmark.Start']"to handle both cases, but this expression does not match neither.
    I have tried several different alternatives with expressions and NamingContext implementations, none working.
    What am I missing?
    Thanks in advance,
    Mariano.

    Hello,
    I decided to remove all namespaces and prefixes from the XML document and now the expression works.
    I have chaned the following:
    DocumentBuilderFactory is now namespace aware (it isn't by default).
              DocumentBuilderFactory builderFactory = DocumentBuilderFactory.newInstance();
              builderFactory.setNamespaceAware(true);I picked this NamespaceContext implementation from JAXP 1.4 samples and mapped all prefixes and namespaces coming inside the XML.
              NamespaceContextImpl ns = new NamespaceContextImpl();
              ns.bindPrefixToNamespaceURI("aml", "http://schemas.microsoft.com/aml/2001/core");
              ns.bindPrefixToNamespaceURI("dt", "uuid:C2F41010-65B3-11d1-A29F-00AA00C1488");
              ns.bindPrefixToNamespaceURI("o", "urn:schemas-microsoft-com:office:office");
              ns.bindPrefixToNamespaceURI("sl", "http://schemas.microsoft.com/schemaLibrary/2003/core");
              ns.bindPrefixToNamespaceURI("v", "urn:schemas-microsoft-com:vml");
              ns.bindPrefixToNamespaceURI("w", "http://schemas.microsoft.com/office/word/2003/wordml");
              ns.bindPrefixToNamespaceURI("w10", "urn:schemas-microsoft-com:office:word");
              ns.bindPrefixToNamespaceURI("wx", "http://schemas.microsoft.com/office/word/2003/auxHint");
              XPathFactory xpathFactory = XPathFactory.newInstance();
              XPath xpath = xpathFactory.newXPath();
              xpath.setNamespaceContext(ns);Finally, I prefixed all elements in xpath expressions.
    "//aml:annotation[@w:type='Word.Bookmark.Start']"Happier now,
    Mariano.

  • Generating an XML Document from an internal table in ABAP

    Good day to all of you;
    With ABAP, in the R/3 system, I'm trying to figure out a way to accomplish the following:
    1) SELECT a set of Purchase Order data into an internal table.
    2) Generate an XML document, containing the above data, using a specific schema.
    I've been playing around with function module SAP_CONVERT_TO_XML_FORMAT which has the following interface:
    CALL FUNCTION 'SAP_CONVERT_TO_XML_FORMAT'
          EXPORTING
          I_FIELD_SEPERATOR    = ''
          I_LINE_HEADER        = ''
            I_FILENAME           = v_fname
          I_APPL_KEEP          = ''
          I_XML_DOC_NAME      = v_docname
          IMPORTING
            PE_BIN_FILESIZE      = v_byte
          TABLES
            I_TAB_SAP_DATA       = i_SapData
          CHANGING
            I_TAB_CONVERTED_DATA = i_XMLData
          EXCEPTIONS
            CONVERSION_FAILED    = 1
            OTHERS               = 2.
    I'm uncertain as to whether or not the Export parameter, I_XML_DOC_NAME refers to some schema or definition and therefore have been excluding it.  In doing so, the generated XML document seems to use the field name/type information from my itab for the tags.
    If this function module requires an XML Document Name, how do I create one and where do I store it in R/3?  If this is not the recommended solution, is anyone familiar with a way to load an XML schema, retrieve some data then have SAP generate an XML document using the schema?
    Many thanks for any help available.
    T

    Hai Phillips
    Try with the following Code
    This program exports an internal table to an XML file.
    Report ZPRUEBA_MML_13 *
    Export an internal table to XML document *
    NO BORRAR ESTE CODIGO *
    REPORT ZPRUEBA_MML_13.
    PANTALLA SELECCION *
        PARAMETERS: GK_RUTA TYPE RLGRAP-FILENAME.
    PANTALLA SELECCION *
    TYPE TURNOS *
    TYPES: BEGIN OF TURNOS,
        LU LIKE T552A-TPR01,
        MA LIKE T552A-TPR01,
        MI LIKE T552A-TPR01,
        JU LIKE T552A-TPR01,
        VI LIKE T552A-TPR01,
        SA LIKE T552A-TPR01,
        DO LIKE T552A-TPR01,
    END OF TURNOS.
    TYPE TURNOS *
    TYPE SOCIO *
    TYPES: BEGIN OF SOCIO,
        NUMERO LIKE PERNR-PERNR,
        REPOSICION LIKE PA0050-ZAUVE,
        NOMBRE LIKE PA0002-VORNA,
        TURNOS TYPE TURNOS,
    END OF SOCIO.
    TYPE SOCIO *
    ESTRUCTURA ACCESOS *
    DATA: BEGIN OF ACCESOS OCCURS 0,
        SOCIO TYPE SOCIO,
    END OF ACCESOS.
    ESTRUCTURA ACCESOS *
    START OF SELECTION *
    START-OF-SELECTION.
        PERFORM LLENA_ACCESOS.
        PERFORM DESCARGA_XML.
    END-OF-SELECTION.
    END OF SELECTION *
    FORM LLENA_ACCESOS *
    FORM LLENA_ACCESOS.
    REFRESH ACCESOS.
    CLEAR ACCESOS.
    MOVE: '45050' TO ACCESOS-SOCIO-NUMERO,
                  'MOISES MORENO' TO ACCESOS-SOCIO-NOMBRE,
                  '0' TO ACCESOS-SOCIO-REPOSICION,
                  'T1' TO ACCESOS-SOCIO-TURNOS-LU,
                  'T2' TO ACCESOS-SOCIO-TURNOS-MA,
                  'T3' TO ACCESOS-SOCIO-TURNOS-MI,
                  'T4' TO ACCESOS-SOCIO-TURNOS-JU,
                  'T5' TO ACCESOS-SOCIO-TURNOS-VI,
                  'T6' TO ACCESOS-SOCIO-TURNOS-SA,
                  'T7' TO ACCESOS-SOCIO-TURNOS-DO.
    APPEND ACCESOS.
    CLEAR ACCESOS.
    MOVE: '45051' TO ACCESOS-SOCIO-NUMERO,
                  'RUTH PEÑA' TO ACCESOS-SOCIO-NOMBRE,
                  '0' TO ACCESOS-SOCIO-REPOSICION,
                  'T1' TO ACCESOS-SOCIO-TURNOS-LU,
                  'T2' TO ACCESOS-SOCIO-TURNOS-MA,
                  'T3' TO ACCESOS-SOCIO-TURNOS-MI,
                  'T4' TO ACCESOS-SOCIO-TURNOS-JU,
                  'T5' TO ACCESOS-SOCIO-TURNOS-VI,
                  'T6' TO ACCESOS-SOCIO-TURNOS-SA,
                  'T7' TO ACCESOS-SOCIO-TURNOS-DO.
    APPEND ACCESOS.
    ENDFORM.
    FORM LLENA_ACCESOS *
    FORM DESCARGA_XML *
    FORM DESCARGA_XML.
    DATA: L_DOM TYPE REF TO IF_IXML_ELEMENT,
                  M_DOCUMENT TYPE REF TO IF_IXML_DOCUMENT,
                  G_IXML TYPE REF TO IF_IXML,
                  W_STRING TYPE XSTRING,
                  W_SIZE TYPE I,
                  W_RESULT TYPE I,
                  W_LINE TYPE STRING,
                  IT_XML TYPE DCXMLLINES,
                  S_XML LIKE LINE OF IT_XML,
                  W_RC LIKE SY-SUBRC.
    DATA: XML TYPE DCXMLLINES.
    DATA: RC TYPE SY-SUBRC,
    BEGIN OF XML_TAB OCCURS 0,
                  D LIKE LINE OF XML,
    END OF XML_TAB.
    CLASS CL_IXML DEFINITION LOAD.
    G_IXML = CL_IXML=>CREATE( ).
    CHECK NOT G_IXML IS INITIAL.
    M_DOCUMENT = G_IXML->CREATE_DOCUMENT( ).
    CHECK NOT M_DOCUMENT IS INITIAL.
    WRITE: / 'Converting DATA TO DOM 1:'.
    CALL FUNCTION 'SDIXML_DATA_TO_DOM'
    EXPORTING
                  NAME = 'ACCESOS'
                  DATAOBJECT = ACCESOS[]
    IMPORTING
                  DATA_AS_DOM = L_DOM
    CHANGING
                  DOCUMENT = M_DOCUMENT
    EXCEPTIONS
                  ILLEGAL_NAME = 1
                  OTHERS = 2.
    IF SY-SUBRC = 0.
                  WRITE 'Ok'.
    ELSE.
                  WRITE: 'Err =',
                  SY-SUBRC.
    ENDIF.
    CHECK NOT L_DOM IS INITIAL.
    W_RC = M_DOCUMENT->APPEND_CHILD( NEW_CHILD = L_DOM ).
    IF W_RC IS INITIAL.
                  WRITE 'Ok'.
    ELSE.
                  WRITE: 'Err =',
                  W_RC.
    ENDIF.
    CALL FUNCTION 'SDIXML_DOM_TO_XML'
    EXPORTING
                  DOCUMENT = M_DOCUMENT
    IMPORTING
                  XML_AS_STRING = W_STRING
                  SIZE = W_SIZE
    TABLES
                  XML_AS_TABLE = IT_XML
    EXCEPTIONS
                  NO_DOCUMENT = 1
                  OTHERS = 2.
    IF SY-SUBRC = 0.
                  WRITE 'Ok'.
    ELSE.
                  WRITE: 'Err =',
                  SY-SUBRC.
    ENDIF.
    LOOP AT IT_XML INTO XML_TAB-D.
                  APPEND XML_TAB.
    ENDLOOP.
    CALL FUNCTION 'WS_DOWNLOAD'
    EXPORTING
                  BIN_FILESIZE = W_SIZE
                  FILENAME = GK_RUTA
                  FILETYPE = 'BIN'
    TABLES
                  DATA_TAB = XML_TAB
    EXCEPTIONS
                  OTHERS = 10.
    IF SY-SUBRC <> 0.
                  MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
                  WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    ENDIF.
    ENDFORM.
    FORM DESCARGA_XML *
    Thanks & regards
    Sreenivasulu P

  • How to delete a node in an XML document

    Hi,
    My flex plugin loads an XML document that is passed in from
    the ExternalInterace. I have a List control that displays data from
    this XML document.
    The XML looks like:
    <document>
    <response>
    <objectlist>
    <list type="typeValue">
    <object type="typeValue" name="Name Value" id="GUID
    Value1">
    <params>
    <params>
    </object>
    <!-- more objects in this list -->
    </list>
    </objectlist>
    </response>
    </document>
    I set the list dataProvider to
    xmlDoc.response.objectlist.list.object
    Thing is, I want to remove one of the object nodes before I
    display the data (that is, i dont want one of the nodes in the XML
    document to appear in the list).
    How do I do this? I could not find any way to delete an
    existing node in the XML api.
    -Gaurav

    You can either use the "delete" operator:
    delete xmlDoc.response.objectlist.list.object[5]
    where the object to be deleted might be the fifth down
    (you'll have to play with your xml in debug to get the actual
    values down) or convert to xmlListCollection. The xmlListCollection
    provides easy methods to remove the offending nodes or you may
    provide a filterFunction for the collection which will "hide" the
    node.

  • Creating an xml document from filenames of selected files

    Hey guys, I am totally new to automator and applescript so please be kind!
    I have an xml/flash image portfolio website which has image galleries. Each gallery has an xml document which specifies a thumbnail and full size photo to be displayed in the gallery. If I want to make a new gallery I have to make a new xml document and enter all the filenames of the images I want to display in the gallery. ( I guess you can see where this is going).
    This is fine if I have 10 images in the gallery but if I want to make a gallery with 350 images in then it could get pretty tedious.
    What I would love to be able to do is select a group of images and then have a script or automator action that can copy the files names and create a new gallery xml document containing the relevant code with all the files names. Ideally then saving the gallery with a sequential filename.
    Tying this into the new contextual services menu in snow leopard would really make the task incredibly easy.
    Is this possible? I'm not scared of learning how to do this therefore some pointers in the right direction would be great.
    Thanks,
    Chris

    Thanks Camalot,
    I was just thinking of selecting images from the finder but if this could be integrated into Aperture's export dialog that would be even better.
    this is the xml:
    <?xml version="1.0" encoding="utf-8"?>
    <gallery thumbwidth="220" thumbheight="138" columns="3" gap="4">
    <item>
    <ID>1</ID>
    <title><![CDATA[Title 1]]></title>
    <desc><![CDATA[This is description 1. <font color="#0099CC">This is a colourful text. </font> This is a <a href="http://www.flashden.net/user/iceonflames">link</a>. <i>This is italic text.</i> <b>This is bold text.</b> <b><i>This is bold italic text.</i></b> This text is styled by a CSS document.<br/><br/>]]></desc>
    <thumb>images/thumbs/7.jpg</thumb>
    <image>images/big/7.jpg</image>
    </item>
    <item>
    <ID>2</ID>
    <thumb>images/thumbs/8.jpg</thumb>
    <image>images/big/8.jpg</image>
    </item>
    <item>
    <ID>3</ID>
    <title><![CDATA[Title 3]]></title>
    <desc><![CDATA[This is description 3. <font color="#0099CC">This is a colourful text. </font> This is a <a href="http://www.flashden.net/user/iceonflames">link</a>. <i>This is italic text.</i> <b>This is bold text.</b> <b><i>This is bold italic text.</i></b> This text is styled by a CSS document.<br/><br/>]]></desc>
    <thumb>images/thumbs/9.jpg</thumb>
    <image>images/big/9.jpg</image>
    </item>
    </gallery>

  • UCCX 8 - Dramatic change in the Create File Document step that is used by the Create XML Document step in order to read an XML file

    /* Style Definitions */
    table.MsoNormalTable
    {mso-style-name:"Table Normal";
    mso-tstyle-rowband-size:0;
    mso-tstyle-colband-size:0;
    mso-style-noshow:yes;
    mso-style-priority:99;
    mso-style-qformat:yes;
    mso-style-parent:"";
    mso-padding-alt:0in 5.4pt 0in 5.4pt;
    mso-para-margin:0in;
    mso-para-margin-bottom:.0001pt;
    mso-pagination:widow-orphan;
    font-size:11.0pt;
    font-family:"Calibri","sans-serif";
    mso-ascii-font-family:Calibri;
    mso-ascii-theme-font:minor-latin;
    mso-fareast-font-family:"Times New Roman";
    mso-fareast-theme-font:minor-fareast;
    mso-hansi-font-family:Calibri;
    mso-hansi-theme-font:minor-latin;
    mso-bidi-font-family:"Times New Roman";
    mso-bidi-theme-font:minor-bidi;}
    For the last 5 years (and in IPCC3.x/4.x,UCCX/5.x/7.x) I've used the same basic subflow to read a XML document that contains holiday dates where the queue should be closed.  I've re-used this script on 20+ client installs and it's always worked.  The structure of the script allows you to pass the path and filename of the XML document as parameters to the subflow. (The document is in the repository)
    I loaded this script in UCCX 8.0.2 recently and it crashed with a Java.IO error.  It looked like it was trying to read the file system directly and not the repository. (In the Linux appliance model this kind of makes sense but why is the step trying to read the file system directly?)
    So I open a TAC case (SR# 615243125) and TAC tells me that the method of using the Create File Document step is not supported anymore and that I should specify the filename directly in the Create XML Document step
    The problem that I see (aside from having to edit all my scripts that use XML files) is that the Create XML Document step is looking for the input to be a type DOCUMENT and not a type STRING.  This seems to imply that I have to hardcode the document in each script that I deploy for a customer.  When it was a string it was easy to construct the full file path from parameters and pass to the subflow.
    Questions to the group
    #1 Am I missing something here?
    #2  Do you assume that you'll be able to load a script that worked fine in UCCX 7 into UCCX 8 and that it should completely function when you're doing everything according to the step reference documentation.
    #3 Cisco didn’t document this in any way that I can find.
    #4 How can you use the Create XML Document step in a fashion that would let you construct the path of the file and the filename previously in the script so you could pass it to a subflow ?  It would seem this functionality has been killed in UCCX 8
    /* Style Definitions */
    table.MsoNormalTable
    {mso-style-name:"Table Normal";
    mso-tstyle-rowband-size:0;
    mso-tstyle-colband-size:0;
    mso-style-noshow:yes;
    mso-style-priority:99;
    mso-style-qformat:yes;
    mso-style-parent:"";
    mso-padding-alt:0in 5.4pt 0in 5.4pt;
    mso-para-margin:0in;
    mso-para-margin-bottom:.0001pt;
    mso-pagination:widow-orphan;
    font-size:11.0pt;
    font-family:"Calibri","sans-serif";
    mso-ascii-font-family:Calibri;
    mso-ascii-theme-font:minor-latin;
    mso-fareast-font-family:"Times New Roman";
    mso-fareast-theme-font:minor-fareast;
    mso-hansi-font-family:Calibri;
    mso-hansi-theme-font:minor-latin;
    mso-bidi-font-family:"Times New Roman";
    mso-bidi-theme-font:minor-bidi;}
    (Background)
    Create File Document Step
    The input filename is a STRING, could be an explicit path and filename in the repository or a variable that represents that path and string
    The output of this step is a DOCUMENT to be used in the Create XML Document step
    The string FILE_FullPathHolidayFiles references  en_us\folderName\documentName.xml
    The document was properly uploaded into the repository only, NOT trying to directly read c:\foo\blah…
    /* Style Definitions */
    table.MsoNormalTable
    {mso-style-name:"Table Normal";
    mso-tstyle-rowband-size:0;
    mso-tstyle-colband-size:0;
    mso-style-noshow:yes;
    mso-style-priority:99;
    mso-style-qformat:yes;
    mso-style-parent:"";
    mso-padding-alt:0in 5.4pt 0in 5.4pt;
    mso-para-margin:0in;
    mso-para-margin-bottom:.0001pt;
    mso-pagination:widow-orphan;
    font-size:11.0pt;
    font-family:"Calibri","sans-serif";
    mso-ascii-font-family:Calibri;
    mso-ascii-theme-font:minor-latin;
    mso-fareast-font-family:"Times New Roman";
    mso-fareast-theme-font:minor-fareast;
    mso-hansi-font-family:Calibri;
    mso-hansi-theme-font:minor-latin;
    mso-bidi-font-family:"Times New Roman";
    mso-bidi-theme-font:minor-bidi;}
    The create XML document input can only be a type DOCUMENT

    #1 Am I missing something here?
    You are mixing two different issues together here.
    The Create File Document step is indeed not needed or supported for creating an XML document. That is why there is a unique step; to trigger XML parsing within the MIVR subsystem.
    Accessing the file system is restricted to a single folder within the VOS model (i.e. 8.0+). This folder is not backed up, replicated, or cleaned up automatically. It was intended to give developers some FS access as a temporary swap location only.
    #2  Do you assume that you'll be able to load a script that
    worked fine in UCCX 7 into UCCX 8 and that it should completely
    function when you're doing everything according to the step reference
    documentation.
    Assume nothing; read the documentation and attend one of the dozens of partner training sessions that CCBU put on advising of the upcoming changes.
    #3 Cisco didn’t document this in any way that I can find.
    You're right, I guess, on the Create File vs. XML Document step. AFAIK Cisco never wrote a notice into the Step Reference Guide explicitly stating that you cannot use the Create File Document although the documentation seemed pretty clear to me without it. File system restrictions are documented in the 8.0 release notes.
    Scripting and Development Series: Volume 2, Editor Step ReferenceUse the Create XML Document step to create a logical document that maps a document to another document variable (where the document has already been pre-parsed as an XML document and is ready to be accessed by the Get XML Document Data step).Use this step before the Get XML Document Data step to obtain data from a document formatted using the Extensible Markup Language (XML).
    #4 How can you use the Create XML Document step in a fashion that would
    let you construct the path of the file and the filename previously in
    the script so you could pass it to a subflow ?  It would seem this functionality has been killed in UCCX 8
    No it hasn't; just concatinate a string to build the Source Document parameter the step needs. Example:  "DOC[" + myFilePath + "]"

  • Append XML elements with same name in an XML document

    Hi,
    I am using Oracle9i XMLDB utilities to modify an XML document stored in the database. I have a sample XML document like this in the database:
    <Person>
    <Address ID="1"> </Address>
    </Person>
    My task is to include a second <Address> element with a different attribute so that my XML document will become
    <Person>
    <Address ID="1"> </Address>
    <Address ID="2"> </Address>
    </Person>
    After creating the second element, I am using the function xmldom.appendChild() or xmldom.insertBefore() but they remove the first <Address> element and replace it with the second one. This is not what I want since I want both <Address> elements to be present.
    Could anyone please advise.
    Thanks.
    A. Dennis

    Please post your question [url http://forums.oracle.com/forums/forum.jsp?forum=154]here for quick response.
    thank you.
    Regards,
    Anupama
    [url http://otn.oracle.com/sample_code/]OTN Sample Code

  • XML-Schema IN XML-Document OUT

    I have to develop a application that have a XML-Schema as INPUT an a XML-Document as OUTPUT. The Application must select the data from 4 SQL Tables, the selects should be dynamicly created at run time (depending at the struckters in the XML-Schema).
    I don't have any know how in XML-DB. Can you help me please.

    Covered in the standard demo
    See the use of the SQL/XML functions to create an XML view over relational data.
    Please also note the following useful examples
    XML DB basic Demo at
    http://otn.oracle.com/tech/xml/xmldb/demonstrations/xdbBasicDemo.zip
    and the instructions at

  • Binary data in xml document

    Hi,
    I have some tables and I store binary data in varchar2 column. I want to create xml document from one of the table using xsql. What will happen to binary data? Can xml document takes care of binary data? I will appreciate, if I get the answer/solution for this.
    Thanks
    Prasanta De

    Hi,
    I have some tables and I store binary data in varchar2 column. I want to create xml document from one of the table using xsql. What will happen to binary data? Can xml document takes care of binary data? I will appreciate, if I get the answer/solution for this.
    Thanks
    Prasanta De

  • Only one top level element is allowed in an XML document. Line 2, Position 2

    I get this error when I try to run an xsql query with a where clause:
    Only one top level element is allowed in an XML document. Line 2, Position 2
    <font size='-1' face='monospace'>XSQL-005: XSQL page is not well-formed.</font><BR>
    -^
    Here is the xsql query I tried to use.
    <?xml version="1.0"?>
    <xsql:query connection="xmlbook" xmlns:xsql="urn:oracle-xsql">
    select * from companytable where companynumber < 1000;
    </xsql:query>
    null

    You need to escape certain characters in order to make XML documents well formed. The problem in this case is the less than sign between companynumber and 1000. You should replace it with <
    I recommend reading a good XML book - "Building Oracle XML Applications" by Steve Muench, for instance.
    Brian

  • How to create and instance of Java Object from an XML Document.

    Hi,
    How can we use a XML Document to create an instance of Java Object and do vice versa ie from the Java Object creating the XML Document.
    XML Document is available in the form of a String Object.
    Are there helper class available to achieve this.
    I need to do this in a Servlet.
    Regards
    Pramod.

    JAXB is part of JavaSE while Xmlbeans claims full schema support and full infoset fidelity.
    If the standard APIs do all that you need well then use them.

  • Using external XML document to update / change text fields inside of published captivate output.

    Hello
    I currently have a project where the client has requested to have the ability to update the text fields inside the project at a later date.
    This is due to the nature of the content changing rather rapidly, i would like to set this up so the client can manage this them selfs.
    What would the best way to do this be?
    I'm thinking XML, an external XML sheet were by Captivate imports the text from this XML sheet and then displays it within the specific text fields contained within the captivate output.
    This way the client would just update the external XML document(cut and paste the text in) and then the text would be dynamically updated in the published Captivate document.
    any help would be amazing !
    Thanks in advance
    Nick

    Hi Lieve
    But isn't this thread more about an end user having an ability to change text after the Captivate has been published and delivered? I could see where that might be useful if making changes then publishing to create a new output. But I'm interpreting that the situation here is that a Captivate project has been published and delivered, and some mechanism is desired that allows the recipient to modify an external XML file to influence changes in the already compiled Captivate output.
    Cheers... Rick

  • XML Document Header

    I have created an XML document from scratch using the XmlBeans libraries and sent
    it to a file. This Xml file has the root node and all of its containing elements.
    But what is missing is the XML document header and my namespace definitions.
    Since I don't have the namespace definitions in the document header, the name
    spaces are redefined with the xmlns:xxx attrbute for each element in the XML file.
    This provides a lot of extra text in the document that is not required.
    What do I use in order to create the XML document header? Also how can I add
    the namespace definitions to the root element instead of them being defined for
    each element in the file? Looking at the documentation, it looked like I might
    need to sue the XmlDocumentProperties class but I'm not sure if this is it or
    if I need to use other classes too?
    Jerald

    This worked great. Thanks!
    One thing I found through trial and error is that I had to wait until my document
    was created, then I created a XmlCursor from my root node. After that I had to
    advance my XmlCursor to the first child element (rootCursor.toFirstChildElement())
    before actually adding my namespace definitions. Otherwise the namespace definitions
    were being added as an additional tag before my root element. But this was documented
    in the insertNamespace() member function (inserts into element before cursor).
    Thanks again.
    Jerald
    "Eric Vasilik" <[email protected]> wrote:
    >
    If you get an InputStream from am XMlBean, it will include the xml decl.
    Obtaining
    any character based stream will not. Basically, the xml declaration
    is generated
    when the XmlBean converts to bytes, but not when converted to chars.
    You can control the use of namespaces by inserting namespaces on the
    root element.
    I'm not sure what the current bits are on the website, but there should/will
    be a method on the XmlCursor called insertNamespace which you can use
    to insert
    a prefix/namespace (xmlns:prefix="namespace") as an attribute. The saver
    will
    use these attributes when persisting the store.
    "Jerald Pratt" <[email protected]> wrote:
    I have created an XML document from scratch using the XmlBeans libraries
    and sent
    it to a file. This Xml file has the root node and all of its containing
    elements.
    But what is missing is the XML document header and my namespace definitions.
    Since I don't have the namespace definitions in the document header,
    the name
    spaces are redefined with the xmlns:xxx attrbute for each element in
    the XML file.
    This provides a lot of extra text in the document that is not required.
    What do I use in order to create the XML document header? Also howcan
    I add
    the namespace definitions to the root element instead of them beingdefined
    for
    each element in the file? Looking at the documentation, it looked like
    I might
    need to sue the XmlDocumentProperties class but I'm not sure if this
    is it or
    if I need to use other classes too?
    Jerald

  • RegisterSchema or XML document problem

    Hi,
    I would like to import some XML documents from internet. The root element in document looks like that:
    <Report xmlns:p1="http://www.w3.org/2001/XMLSchema-instance" xmlns="spds.ifr.009.PL" p1:schemaLocation="spds.ifr.009.PL http://inetsqlcg:82/ReportServer?%2fReportPublisher%2fspds.ifr.009.PL&amp;rs%3aFormat=XML&amp;rc%3aSchema=True" Name="spds.ifr.009.PL" REPORTNAME1="blablabla">
    And root element in schema looks like that:
    <xs:schema xmlns="spds.ifr.009.PL" xmlns:xs="http://www.w3.org/2001/XMLSchema" targetNamespace="spds.ifr.009.PL" xmlns:xdb="http://xmlns.oracle.com/xdb">
    So, I have to register schema with URL from document:
    http://inetsqlcg:82/ReportServer?%2fReportPublisher%2fspds.ifr.009.PL&amp;rs%3aFormat=XML&amp;rc%3aSchema=True
    but when I'm trying to register with UTL_URL.ESCAPE I have ORA-31000 error.
    I can register with UTL_URL.UNESCAPE then the SCHEMA_URL in USER_XML_SCHEMAS is:
    http://inetsqlcg:82/ReportServer?/ReportPublisher/spds.ifr.009.PL&amp;rs:Format=XML&amp;rc:Schema=True
    but when I'm loading document into XMLTable correlated with schema there is an error: ORA-19007
    Any suggestion, please.
    And thanks in advance.

    This question is best asked in the {forum:id=34} forum. Make sure to look over the FAQ first. When posting, include the dbms_xmlschema.registerschema commands you used and show any errors. Also include your Oracle version (4 digits). Also include enough of the schema to show the root node for the corresponding XML.

Maybe you are looking for

  • Can I restore Yosemite Public beta from Time Machine with Mavericks bootable recovery drive

    I had Yosemite beta running on an SSD in my Mac Book Pro. This drive has failed and is no longer recognized. I do have a Time Machine backup of this drive. When I restored it to a new SSD it would not boot.(formatted to MAC OS Extended (Journaled) wi

  • Blue screen when powering off

    I recently purcahsed a one year old Lenovo 3000, it had Windows XP installed and I upgraded this to Windows Vista with no problems. I then renamed the laptop and deleted the previous owners user files and that's when I had a problem. When I power dow

  • Why is Photoshop Elements 10 trial not installing?

    I went to the older software page, installed File 1 (Photoshop Elements 10), but I can't install File 2. An error message shows up, something along the lines of "all files must be stored in the same folder", etc. I am not a computer genius. I am gett

  • Emailing Wiki Update Notifications

    I have been searching for what I thought would be a common topic on this forum, but have had no luck finding anything. I have set up a Snow Leopard server Wiki for some users who are used to Microsoft's Sharepoint. They like the simplicity of Apple's

  • Should i preform a Time Machine Backup Now?

    I have really screwed up my osx install and would like to reinstall osx from recovery partition problem is that i haven't done a Time Machine Backup.  I have finally managed to boot into safe mode and the boot back into regular mode and everything se