XML Processing Instructions

Hi,
I have two questions about how the XML class in AS3 works.
First, does the XML class care about the initial processing instruction when created from a string like this?:
<?xml version="1.0" encoding="UTF-8" ?>
<painting>
  <img src="madonna.jpg" alt='Foligno Madonna, by Raphael'/>
  <caption>This is Raphael's "Foligno" Madonna, painted in
    <date>1511</date>–<date>1512</date>.
  </caption>
</painting>
Second, how can I add that procession instruction to an XML object that I am working with so that toXMLString() returns a string that looks like the above XML? (So that it includes the processing instruction.)

Hi!
Normally you won't see processing instructions when working with AS3 and XML but you can change that using the following line of code:
XML.ignoreProcessingInstructions = false;
If you will, you can also see your comments by using the following:
XML.ignoreComments = false;
I think it's usual to use those lines inside your package body, even before your imports but I think you could have it anywhere else (even outside your package body I think).
Hope it helps.
edit: don't forget you can manage those items as a  XMLList too...

Similar Messages

  • XML parsing error: xml processing instruction not at start of external entity (error code 17)

    I created a form and recieve the filled in form by email from participants. It has always worked in the past. Recently when importing data into the master form (from filled in forms in xml files sent by applicants) I am getting this error message..."xml processing instruction not at start of external entity (error code 17), line 2, column 1...." pointing to the file of data (xml) I am trying to input.  If I pull up old data forms (from 2009) they work, but now I am getting this error.  I run Adobe Design Premium CS3 for Windows.  Can anyone tell me what to do to fix?

    I created a form and recieve the filled in form by email from participants. It has always worked in the past. Recently when importing data into the master form (from filled in forms in xml files sent by applicants) I am getting this error message..."xml processing instruction not at start of external entity (error code 17), line 2, column 1...." pointing to the file of data (xml) I am trying to input.  If I pull up old data forms (from 2009) they work, but now I am getting this error.  I run Adobe Design Premium CS3 for Windows.  Can anyone tell me what to do to fix?

  • Seeking for API to deal with XML processing instructions

    Hi all,
    I have a requirement to list all the processing instructions inside a xml document.
    E.g. For the document
    <?xml version="1.0" encoding="utf-8"?>
    <?AAA att1="att 1"?>
    <?BBB?>
    <?CCC?>
    <body>
      <empty>True</empty>
    </body>
    I need to print out PIs AAA, BBB, CCC.
    Two solutions i can find are:
    1. to treat the doc as a string and do a pattern search for <?*?>.
    2. use IF_IXML_DOCUMENT to traverse all the nodes and check their node types against IF_IXML_NODE=>CO_NODE_PI_PARSED and TYPE = IF_IXML_NODE=>CO_NODE_PI_UNPARSED.
    However, I am wondering if there's any xml API to deal with XML PIs.
    During my research on this, i got IF_IXML_DOCUMENT. It provides two creation APIs for XML PI: CREATE_PI_PARSED and CREATE_PI_UNPARSED. However, there is no corresponding getter API found.
    Does anybody know if there is such one?
    Thanks in advance.

    Never do yourself down Richard.
    Leave that to other people.
    It's quite common for smart developers to think they're not as good as they are.
    I coach a fair bit and it's a surprisingly common feeling.
    And to repeat.
    Never use anything ends .. provider.  They're for trivial demo apps.  Transform xml into objects and use them.  Write it back as xml.  Preferably, use a database.
    You want to read a little mvvm theory first.
    http://en.wikipedia.org/wiki/Model_View_ViewModel
    Whatever you do, don't read Josh Smiths explanation.  I used to recommend it but it confuses the heck out newbies. Leave that until later.
    Laurent Bugnion did a great presentation at mix10.  Unfortunately that doesn't seem to be working on the MS site, but I have a copy.  Download and watch:
    http://1drv.ms/1IYxl3z
    I'm writing an article at the moment which is aimed at beginners.
    http://social.technet.microsoft.com/wiki/contents/articles/30564.wpf-uneventful-mvvm.aspx
    The sample is just a collection of techniques really.
    I have a sample which involves no real data but is intended to illustrate some aspects of how viewmodels "do stuff" and how you use datatemplates to generate UI.
    I can't remember if I recommended it previously to you:
    https://gallery.technet.microsoft.com/WPF-Dialler-simulator-d782db17
    And I have working samples which are aimed at illustrating line of business architecture.  This is an incomplete step by step series but I  think more than enough to chew on once you've done the previous stuff.
    http://social.technet.microsoft.com/wiki/contents/articles/28209.wpf-entity-framework-mvvm-walk-through-1.aspx
    The write up for step2 is work in progress.
    https://gallery.technet.microsoft.com/WPF-Entity-Framework-MVVM-78cdc204
    Hope that helps.
    Recent Technet articles: Property List Editing;
    Dynamic XAML

  • OSB Proxy Service - ignore XML processing instructions (PIs)

    Hello,
    I've got a proxy service in OSB that takes any XML, transforms it, and passes it through to a business service. i.e. it just has a simple routing node containing something like:
    Route to [ BusinessServiceDB ] invoking [ merge ]
    Replace [ node contents ] of [  undefined XPath  ] in [ body ] with [ XQuery Resource... ]
    This works fine until the XML contains a processing instruction other than the standard XML version one; <?XML...?>. So if the first line (or first line after the XML version, if present) contains a PI (e.g. <?some-app-specific-instruction?>), then the proxy service passes nothing through to the Business Service.
    Well, I guess it assumes that the <?some-app-specific-instruction?> is the entire node contents, and so effectively passes through nothing that matches in the XQuery code...
    Is there a setting or easy way to make OSB globally ignore PIs? Or will I have to do something with the Replace, e.g. define the XPath or variable bindings differently?
    Cheers...

    Thanks, I will do that...once I've found out what our support ID is.
    The problem is easily repeatable in less than five minutes - all you have to do is create an 'Any XML' JMS proxy service (with all settings as defauts), and just have an empty route node in the message flow.
    Then all you do is try the test console with something like "<blah>test</blah>" as the payload; on the results you will see the correct XML inside the soapenv body when you expand: receiving request > Initial Message Context > $body. Then repeat the test with"<?something?><blah>test</blah>", which will only pass through the soapenv:Body tag with no contents.
    I presume this is not expected behaviour? i.e. OSB isn't meant to try the processing instruction, then pass through the results of that? I can't imagine it would...
    Anyway, as I say, I will raise the support request...but if anyone that is on a version above 10.3.1 has time to quickly run this test and let me know the results, I'd be really grateful.

  • Processing Instructions are not allowed in SOAP documents

    Hi, there. I am trying to integrate WS-Security into our server using the api-sample in JWSDP 1.6 as it is the one that fits into our current architecture in place.
    I have the following code:
    DOMSource domSource = new DOMSource( indoc );
    SOAPPart soapPart = msg.getSOAPPart();
    soapPart.setContent( domSource );
    ProcessingContext context = new ProcessingContext();
    context.setSOAPMessage( msg );
    where indoc is an org.w3c.dom.Document object.
    The last line throws an exception that is ultimately caused by:
    java.lang.UnsupportedOperationException: Processing Instructions are not allowed in SOAP documents
    at com.sun.xml.messaging.saaj.soap.SOAPDocumentImpl.createProcessingInstruction(SOAPDocumentImpl.java:109)
    (Please find the complete (partially edited) stack trace at the end of this message.)
    The exception is thrown even when the following very simple (unsigned) SOAP message is submitted:
    <?xml version="1.0" encoding="utf-8"?><soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema"><soap:Body><requestMessage xmlns="urn:schemas-company-com:transaction-data-1.17"><merchantID>ever03</merchantID><ccAuthService run="true"/></requestMessage></soap:Body></soap:Envelope>
    As you can see, the only processing instruction is the XML processing instruction, which I don't believe is disallowed in SOAP documents, right? So, I'm not sure why it's complaining about processing instructions. I'm guessing during the transformation into whatever form ProcessingContext wants the document to be in, certain processing instructions are erroneously being inserted.
    I would appreciate any inputs. Below is the stack trace, partially edited to show only the relevant lines.
    Thanks,
    Ever
    com.sun.xml.wss.XWSSecurityException: com.sun.xml.messaging.saaj.SOAPExceptionImpl: Unable to create envelope from given source:
    at com.sun.xml.wss.SecurableSoapMessage.getEnvelope(SecurableSoapMessage.java:109)
    at com.sun.xml.wss.SecurableSoapMessage.init(SecurableSoapMessage.java:89)
    at com.sun.xml.wss.SecurableSoapMessage.setSOAPMessage(SecurableSoapMessage.java:400)
    at com.sun.xml.wss.ProcessingContext.setSOAPMessage(ProcessingContext.java:199)
    Caused by: com.sun.xml.messaging.saaj.SOAPExceptionImpl: Unable to create envelope from given source:
    at com.sun.xml.messaging.saaj.soap.EnvelopeFactory.createEnvelope(EnvelopeFactory.java:111)
    at com.sun.xml.messaging.saaj.soap.ver1_1.SOAPPart1_1Impl.createEnvelopeFromSource(SOAPPart1_1Impl.java:39)
    at com.sun.xml.messaging.saaj.soap.SOAPPartImpl.getEnvelope(SOAPPartImpl.java:98)
    at com.sun.xml.wss.SecurableSoapMessage.getEnvelope(SecurableSoapMessage.java:107)
    ... 32 more
    Caused by: javax.xml.transform.TransformerException: java.lang.UnsupportedOperationException: Processing Instructions are not allowed in SOAP documents
    at com.sun.org.apache.xalan.internal.xsltc.trax.TransformerImpl.transform(TransformerImpl.java:647)
    at com.sun.org.apache.xalan.internal.xsltc.trax.TransformerImpl.transform(TransformerImpl.java:279)
    at com.sun.xml.messaging.saaj.soap.EnvelopeFactory.createEnvelope(EnvelopeFactory.java:97)
    ... 35 more
    Caused by: java.lang.UnsupportedOperationException: Processing Instructions are not allowed in SOAP documents
    at com.sun.xml.messaging.saaj.soap.SOAPDocumentImpl.createProcessingInstruction(SOAPDocumentImpl.java:109)
    at com.sun.xml.messaging.saaj.soap.SOAPPartImpl.createProcessingInstruction(SOAPPartImpl.java:368)
    at com.sun.org.apache.xalan.internal.xsltc.trax.SAX2DOM.processingInstruction(SAX2DOM.java:177)
    at com.sun.org.apache.xml.internal.serializer.ToXMLSAXHandler.processingInstruction(ToXMLSAXHandler.java:583)
    at com.sun.org.apache.xalan.internal.xsltc.trax.DOM2TO.parse(DOM2TO.java:224)
    at com.sun.org.apache.xalan.internal.xsltc.trax.DOM2TO.parse(DOM2TO.java:121)
    at com.sun.org.apache.xalan.internal.xsltc.trax.DOM2TO.parse(DOM2TO.java:85)
    at com.sun.org.apache.xalan.internal.xsltc.trax.TransformerImpl.transformIdentity(TransformerImpl.java:592)
    at com.sun.org.apache.xalan.internal.xsltc.trax.TransformerImpl.transform(TransformerImpl.java:638)
    ... 37 more

    Me again... I just realized my second post sounded like I had figured out the problem. No, I still have the problem. I just added the one line that I forgot to include in my original post.
    I would sincerely appreciate any help.
    Ever

  • Extract processing-instruction in workflow

    I am trying to extract an XML Processing Instruction from some input XML in a WLI
    Workflow. Using the XPATH wizard I have constructed the expression, but this just
    returns an empty string when used in the workflow.
    Has anybody successfully extracted the processing instruction? and set a workflow
    variable, or is there a different method of getting at it?
    TIA
    Dave

    Hello Vandy,
    try this:
    var PI = app.selection[0].insertionPoints[0];
    var xmlElementOfPI = PI.associatedXMLElements[0];
    xmlElementOfPI.xmlInstructions.add("target","data", PI);
    Roland

  • Updating a XML document with a processing instruction

    Greetings Guru's
    I have a fully functional XML database solution for our new system. The only thing left is for me to update a xml document in the database with a processing instruction to find the style sheet (JAXB strips it out when the XML must go back into the database).
    I can update complete nodes and node elements in the xml document using updateXML in a regular update statement, but I do not know how to add the following processing instruction to my documents.
    <?xml-stylesheet type="text/xsl" href="/RASWEB/JIT_REPORT.xslt"?>
    [pre]
    Thanks in advance
    Derrick                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               

    SQL> var xmltext varchar2(4000)
    SQL> --
    SQL> begin
      2    :xmlText := '<Hello>World</Hello>';
      3  end;
      4  /
    PL/SQL procedure successfully completed.
    SQL> drop table t
      2  /
    drop table t
    ERROR at line 1:
    ORA-00942: table or view does not exist
    SQL> create table t of xmltype
      2  /
    Table created.
    SQL> set long 10000
    SQL> --
    SQL> insert into t values (xmltype(:xmltext))
      2  /
    1 row created.
    SQL> select *
      2    from t
      3  /
    SYS_NC_ROWINFO$
    <Hello>World</Hello>
    SQL> update t set object_value = updateXML
      2                              (
      3                                object_value,
      4                                '/',
      5                                xmlconcat
      6                                (
      7                                  xmlpi("xml-stylesheet",'type="text/xsl" href="/RASWEB/JIT_REPORT.xslt"'),
      8                                  object_value
      9                                )
    10                              )
    11  /
    1 row updated.
    SQL> select * from t
      2  /
    SYS_NC_ROWINFO$
    <?xml-stylesheet type="text/xsl" href="/RASWEB/JIT_REPORT.xslt"?>
    <Hello>World</Hello>
    SQL>

  • Xml variable removes process-instruction

    I have a project that reads documents through a watch folder. The files that are dropped in are xml and contain a processing instruction with some meta data is needed in my process. I have configured a watch folder endpoint using 3 different type of input variables for document, xml, and string. When I do document I get the document object but no access to the processing instruction. When I do xml, I get the xml in a variable but all processing instructions are removed including the xml declaration. Finally, when I use a string, the variable is set with a binary representation of the file that looks like base 64. I have tested a different process reading the xml from file system as a string and I can use string functions to extract the values I need that way. I'm wondering if anybody knows what I can do to configure my watch folder enpoint so that I can access the processing directive either as xml or as a string.

    Hi,
    The <?xml version='1.0' encoding='utf-8'?>) xml declaration can occur only once and that too at the very top of the xml file before everything else. I think your best bet would be to strip the xml declaration and the doctype declaration before appending. You might want to check the API documentation of the API you are using to serialize the xml to see if it supports suppressing xml and doctype declarations.
    With apache xerces, you can do
    OutputFormat.setOmitXMLDeclaration(true);
    where OutputFormat dictates what underlying serialized is used to serialize the document based on the specified method.
    Hope this helps.
    Cheers,
    vidyut

  • How to add processing instruction to my XML view

    Hi,
    How do I add the processing instruction like &lt;?xml version="1.0" encoding="iso-8859-1"?&gt;.
    in my XML view.

    The only way to do at the moment is as follows... And it's not very pretty. The SQL/XML standard is still finalizing the correct way of doing this...
    set echo on
    connect &1/&2@&3
    create or replace view EMPLOYEES_WORKBOOK_XML of xmltype
    xmlschema "excel.xsd" element "Workbook"
    with object id
    'EMPLOYEES_WORKBOOK_XML'
    as
    select
    xmltype(
    '<?xml version="1.0"?>' ||
    xmlElement
    "Workbook",
    xmlAttributes
    'urn:schemas-microsoft-com:office:spreadsheet' as "xmlns",
    'urn:schemas-microsoft-com:office:office' as "xmlns:o",
    'urn:schemas-microsoft-com:office:excel' as "xmlns:x",
    'urn:schemas-microsoft-com:office:spreadsheet' as "xmlns:ss",
    'http://www.w3.org/TR/REC-html40' as "xmlns:html",
    'http://www.w3.org/2001/XMLSchema-instance' as "xmlns:xsi",
    'excel.xsd' as "xsi:noNamespaceSchemaLocation"
    xmlElement
    "DocumentProperties",
    xmlAttributes('urn:schemas-microsoft-com:office:office' as "xmlns"),
    xmlForest
    USER as "Author",
    USER as "LastAuthor",
    '2002-10-11T15:47:35Z' as "Created",
    'Oracle Corporation' as "Company",
    '10.350' as "Version"
    xmlElement
    "OfficeDocumentSettings",
    xmlAttributes('urn:schemas-microsoft-com:office:office' as "xmlns"),
    xmlElement("DownloadComponents"),
    xmlElement
    "LocationOfComponents",
    xmlAttributes('file://' as "HRef")
    xmlElement
    "ExcelWorkbook",
    xmlAttributes('urn:schemas-microsoft-com:office:excel' as "xmlns"),
    xmlForest
    '8835' as "WindowHeight",
    '14220' as "WindowWidth",
    '480' as "WindowTopX",
    '60' as "WindowTopY",
    'False' as "ProtectStructure",
    'False' as "ProtectWindows"
    xmlElement
    "Styles",
    xmlElement
    "Style",
    xmlAttributes('Default' as "ss:ID",'Normal' as "ss:Name"),
    xmlElement("Alignment",xmlAttributes('Bottom' as "ss:Vertical")),
    xmlElement("Borders"),
    xmlElement("Font"),
    xmlElement("Interior"),
    xmlElement("NumberFormat"),
    xmlElement("Protection")
    xmlElement
    "Style",
    xmlAttributes('s21' as "ss:ID"),
    xmlElement("Font",xmlAttributes('Swiss' as "x:Family",'1' as "ss:Bold"))
    xmlElement
    "Worksheet",
    xmlAttributes('EMP' as "ss:Name"),
    xmlElement
    "Table",
    xmlAttributes('11' as "ss:ExpandedColumnCount",'108' as "ss:ExpandedRowCount",'1' as "x:FullColumns",'1' as "x:FullRows"),
    xmlElement
    "Row",
    xmlAttributes('s21' as "ss:StyleID"),
    xmlElement("Cell", xmlElement("Data", xmlAttributes('String' as "ss:Type"), 'Employee ID')),
    xmlElement("Cell", xmlElement("Data", xmlAttributes('String' as "ss:Type"), 'First Name')),
    xmlElement("Cell", xmlElement("Data", xmlAttributes('String' as "ss:Type"), 'Last Name')),
    xmlElement("Cell", xmlElement("Data", xmlAttributes('String' as "ss:Type"), 'Email Address' )),
    xmlElement("Cell", xmlElement("Data", xmlAttributes('String' as "ss:Type"), 'Phone Number' )),
    xmlElement("Cell", xmlElement("Data", xmlAttributes('String' as "ss:Type"), 'Hire Date')),
    xmlElement("Cell", xmlElement("Data", xmlAttributes('String' as "ss:Type"), 'Job Title')),
    xmlElement("Cell", xmlElement("Data", xmlAttributes('String' as "ss:Type"), 'Salary')),
    xmlElement("Cell", xmlElement("Data", xmlAttributes('String' as "ss:Type"), 'Commission Rate')),
    xmlElement("Cell", xmlElement("Data", xmlAttributes('String' as "ss:Type"), 'Manager')),
    xmlElement("Cell", xmlElement("Data", xmlAttributes('String' as "ss:Type"), 'Department'))
    xmlagg
    xmlElement
    "Row",
    xmlAttributes('Default' as "ss:StyleID"),
    xmlElement("Cell", xmlElement("Data", xmlAttributes('Number' as "ss:Type"), e.EMPLOYEE_ID)),
    xmlElement("Cell", xmlElement("Data", xmlAttributes('String' as "ss:Type"), e.FIRST_NAME )),
    xmlElement("Cell", xmlElement("Data", xmlAttributes('String' as "ss:Type"), e.LAST_NAME )),
    xmlElement("Cell", xmlElement("Data", xmlAttributes('String' as "ss:Type"), e.EMAIL )),
    xmlElement("Cell", xmlElement("Data", xmlAttributes('String' as "ss:Type"), e.PHONE_NUMBER )),
    xmlElement("Cell", xmlElement("Data", xmlAttributes('DateTime' as "ss:Type"), to_char(to_char(e.HIRE_DATE,'YYYY-MM-DD"T00:00:00.000"')))),
    xmlElement("Cell", xmlElement("Data", xmlAttributes('String' as "ss:Type"), JOB_TITLE)),
    xmlElement("Cell", xmlElement("Data", xmlAttributes('Number' as "ss:Type"), e.SALARY )),
    xmlElement("Cell", xmlElement("Data", xmlAttributes('Number' as "ss:Type"), e.COMMISSION_PCT)),
    xmlElement("Cell", xmlElement("Data", xmlAttributes('String' as "ss:Type"), m.FIRST_NAME || ' ' || m.LAST_NAME )),
    xmlElement("Cell", xmlElement("Data", xmlAttributes('String' as "ss:Type"), DEPARTMENT_NAME )) )
    xmlElement
    "WorksheetOptions",
    xmlAttributes('urn:schemas-microsoft-com:office:excel' as "xmlns"),
    xmlElement
    "Print",
    xmlElement("ValidPrintInfo"),
    xmlElement("HorizontalResolution",96),
    xmlElement("VerticalResolution",96),
    xmlElement("NumberOfCopies",0)
    xmlElement("Selected"),
    xmlElement
    "Panes",
    xmlElement
    "Pane",
    xmlElement("Number",3),
    xmlElement("ActiveRow",6),
    xmlElement("ActiveCol",1)
    xmlElement("ProectedObjects",'False'),
    xmlElement("ProectedSecenarios",'False')
    ).getClobVal())
    from HR.EMPLOYEES e, HR.JOBS j, HR.DEPARTMENTS d, HR.EMPLOYEES m
    where e.JOB_ID = j.JOB_ID
    and e.DEPARTMENT_ID = d.DEPARTMENT_ID
    and e.MANAGER_ID = m.EMPLOYEE_ID
    pause
    create or replace trigger IGNORE_IO_OPERATIONS
    instead of INSERT or UPDATE or DELETE on EMPLOYEES_WORKBOOK_XML
    begin
    null;
    end;
    show errors
    pause
    quit

  • XSLT processing instructions ignored, and namespaces excluded

    Hi folks,
    I am developing a BPEL process and created the following XSLT:
    &lt;xsl:stylesheet version="1.0"
    xmlns:xp20="http://www.oracle.com/XSL/Transform/java/oracle.tip.pc.services.functions.Xpath20"
    xmlns:bpws="http://schemas.xmlsoap.org/ws/2003/03/business-process/"
    xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
    xmlns:ora="http://schemas.oracle.com/xpath/extension"
    xmlns:ehdr="http://www.oracle.com/XSL/Transform/java/oracle.tip.esb.server.headers.ESBHeaderFunctions"
    xmlns:orcl="http://www.oracle.com/XSL/Transform/java/oracle.tip.pc.services.functions.ExtFunc"
    xmlns:ids="http://xmlns.oracle.com/bpel/services/IdentityService/xpath"
    xmlns:hwf="http://xmlns.oracle.com/bpel/workflow/xpath"
    <strong> xmlns:agrlib="http://services.agresso.com/schema/ABWSchemaLib/2005/05/13"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    </strong> exclude-result-prefixes="xsl xp20 bpws ora ehdr orcl ids hwf"&gt;
    <strong> &lt;xsl:output omit-xml-declaration="no"/&gt;
    &lt;xsl:output standalone="yes"/&gt;
    </strong> &lt;xsl:template match="*[not(node())]"/&gt;
    &lt;xsl:template match="node()"&gt;
    &lt;xsl:copy&gt;
    &lt;xsl:apply-templates select="node()"/&gt;
    &lt;/xsl:copy&gt;
    &lt;/xsl:template&gt;
    &lt;/xsl:stylesheet&gt;
    The transform activity is:
    &lt;copy&gt;
    &lt;from expression="ora:processXSLT('Transformation_1.xsl',bpws:getVariableData('Variable_1'))"/&gt;
    &lt;to variable="Variable_2"/&gt;
    &lt;/copy&gt;
    This XSLT has been tested in Oxygen and produces the required result with the required namespaces included...i.e.
    <p>
    &lt;?xml version="1.0" encoding="utf-8"?&gt;
    </p>
    <p>
    &lt;ABWSupplierCustomer xmlns="http://services.agresso.com/schema/ABWSupplierCustomer/2005/05/13" xmlns:agrlib="http://services.agresso.com/schema/ABWSchemaLib/2005/05/13" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"&gt;
    </p>
    <p>
    ...rest of file...
    But when the BPEL process executes, it outputs this:
    </p>
    <p>
    &lt;ABWSupplierCustomer xmlns="http://services.agresso.com/schema/ABWSupplierCustomer/2005/05/13"&gt;
    </p>
    Anyone any ideas?

    This is how I create my DOM...
    DocumentBuilder builder = DocumentBuilderFactory.newInstance().newDocumentBuilder();
    org.w3c.dom.Document doc = builder.newDocument();
    Element docElement = doc.createElement("Document");
    docElement.setAttribute("Title", "Home");
    org.w3c.dom.ProcessingInstruction pi = doc.createProcessingInstruction("xml", "type=\"xslt\"");
    doc.appendChild( pi );
    doc.appendChild( docElement );
    And this is the output I get...
    <?xml version="1.0"?>
    <Document Title="Home"/>
    I dont get it, Im using jdk1.4.0, and you get the processing instruction coming through, but I dont...?

  • XSL Processing Instructions

    I have a simple XML to HTML conversion task, using XSL. I would like IE 5.0 to find processing instructions
    (i.e., <?xml-stylesheet type="text/xsl" href="mystyle.xsl"?>) incorporated into all of my XML instances submitted to Oracle via iFS. How do I configure my schema so that I get the PI to follow the "<?xml version="1.0" standalone="yes" ?>" declaration?

    Can you post a complete example 'instance' file, and the corresponding 'Type Definition' file so we can fully understand you requirement and investigate this issue further

  • Processing instruction trouble

    I have this code:
    sout.write("<?xml version=\"1.0\" encoding=\"ISO-8859-1\"?>\n");
                sout.write("<message from=\""+ClientStream.getClientName()+"\" to=\"server\" type=\"new_user\">\n");
                sout.write("<type>new_user</type>\n");
                sout.write("<from>"+ClientStream.getClientName()+"</from>\n");
                sout.write("<to>server</to>\n");
                sout.write("</message>\n");
                sout.flush();
                sout.write("<?xml version=\"1.0\" encoding=\"ISO-8859-1\"?>\n");
                sout.write("<message from=\""+ClientStream.getClientName()+"\" to=\"server\" type=\"new_user\">\n");
                sout.write("</message>\n");
                sout.flush();But second piece of xml after flush() causes error:
    FATAL: line 7: The processing instruction target matching "[xX][mM][lL]" is not allowed.There are no whitespaces before xml tag.

    Is there some problem when parser reads information from socket? Because when I give it something like this:
    <?xml version="1.0" encoding="ISO-8859-1"?>
    <message>
    <type>new_user</type>
    <from>name</from>
    <to>server</to>
    <name></name>
    </message>parser reaches the end of tag message, but doesn't end parsing like there is something else besides actual xml in socket.
    Edited by: prng on Oct 18, 2007 1:51 AM

  • Processing instructions and CDATA in XSLT

    Dear all,
    my BPEL process contains a transform activity. The corresponding XSLT stylesheet supplies an output variable that I want to write to the filesystem as an XML document for use in third party applications.
    This XML document must have a few processing instructions inside. When inserting this processing instructions in the XSLT, they are not inserted into the output XML document, i.e. the processing instructions are ignored. Using CDATA sections results in the same behavior.
    Is there a workaround available for this bug in the BPEL Process Manager (without working with strings and string manipulation)?
    Thanks in advance!
    Lars

    This is how I create my DOM...
    DocumentBuilder builder = DocumentBuilderFactory.newInstance().newDocumentBuilder();
    org.w3c.dom.Document doc = builder.newDocument();
    Element docElement = doc.createElement("Document");
    docElement.setAttribute("Title", "Home");
    org.w3c.dom.ProcessingInstruction pi = doc.createProcessingInstruction("xml", "type=\"xslt\"");
    doc.appendChild( pi );
    doc.appendChild( docElement );
    And this is the output I get...
    <?xml version="1.0"?>
    <Document Title="Home"/>
    I dont get it, Im using jdk1.4.0, and you get the processing instruction coming through, but I dont...?

  • JAXB: How do I add a processing instruction?

    Hi there
    I am using XML with JAXB in a client/server environment. On the response of from the server to the client, I want to include a processing instruction in the XML response to indicate a stylesheet associated for example:
    <?xml-stylesheet type="text/xsl" href="test.xsl"?>
    Does anybody have any ideas on how to include a stylesheet while constructing the jaxb object? Or must this declaration be included in the building schema???
    Please help?
    Thanks
    Glen

    this is how I do it in jwsdp 1.4:
    marshaller.setProperty("com.sun.xml.bind.xmlHeaders", "<?xml-stylesheet type=\"text/xsl\" href=\"checker.xslt\"?>");
    This constant is defined as private in the generated marshal class.
    as of now this looks like an undocumented feature.

  • Firefox xslt processing instruction

    Hi
    It's strange, i don't know...
    When my processing instruction looks like this
    <?xml-stylesheet type="text/xsl" href="xml40_reminder.xsl"?>
    i get the transformated xml in both browsers (IE6.0 and Firefox1.5).
    On the other side, when the href-attribute beginns with a FQDN i only get the transformation with IE6.0 and not with Firefox1.5.
    Example:
    <?xml-stylesheet type="text/xsl" href="http://core.mycompany.ch/xsl/xml40_reminder.xsl"?>
    Any ideas?
    Kind regards
    Michael

    Yes, the core-server is an intranet-server where we hold our schemas and stylesheets in a centralized place. In contrast the XML's are stored on an other machine. So it would be nice if we could use URL's to link the XML's with the stylesheets.
    Kind regards
    Michael

Maybe you are looking for

  • Creation of new JSF has stopped working correctly

    Hi guys, I'm rather new to JDeveloper, but i have successfully completed 7 or so tutorials without a problem. But recently i have found a problem which i can't seem to get rid of. I create a new Application; lets say a WebCenter Application. I right

  • Nano 4 with yellow tint screen at top

    Have iPod nano 4...has a yellow tint to screen toward top..have brightness turned up which makes it a bit better. How do I fix this??

  • Aperture can't write to external drive?  Up with what is that?

    Hi.  I keep getting the following notice: I have re-booted, repaired permission and disk on both the disk and the partition, and repaired permissions and the Aperture Library.  Each time I repair the Library I can process about 90% of the selected fi

  • Premiere Elements 9 Crashes

    I haven't used Premiere Elements for a while now. However, there is now a major problem. When I double click on any one of my projects in windows explorer, it loads to 100%, then instantly crashes. If I click new project through the launcher, I can c

  • How can register, final cut pro X?

    How can register, final cut pro X? Which is the right way to do this. Thanks