Omit the XML declaration when using the PHP MM_XSLTransform class

Hi
Is there any way to omit the XML declaration when using the
PHP MM_XSLTransform class?
When using the PHP MM_XSLTransform to transform some XML into
HTML, the XML declaration is faithfully delivered, which is
expected. In my case though this ends up in the body of the
document and is not desired. I wish to choose that the XML
declaration is not shown.
I have tried to use the <xsl:output method="xml"
encoding="utf-8" omit-xml-declaration="yes"/> in the XSL
stylesheet but the declaration still appears.
Any help?
all the best
Dave

Jim20005 wrote:
> I'm using XLS transfomation in DW for reading XML files.
Now (I'm just back
> form holiday), my webspace provider has updated to php
5.1.5. I'm getting this
> error:
Comment out line 301 and add two new lines immediately after
it like this:
// $xml = DOMDocument::loadXML($content);
$doc = new DOMDocument();
$err = $doc->loadXML($content);
This is part of a PHP 8.0.2 hotfix that can be obtained
directly from
Adobe support.
David Powers
Adobe Community Expert
Author, "Foundation PHP for Dreamweaver 8" (friends of ED)
http://foundationphp.com/

Similar Messages

  • Remove xml declarations when using xslt

    Hi, i have created an xslt which transforms an xml file and then imports the information into a mysql database. It works and imports the information into the database but it also brings across the xml delcarations and the node names.
    Is there a coldfusion way to remove these declarations, all i want is the information itself brought into the database.
    Thanks
    Chris

    Hi Adam,
    here is the code from the xsl file:
    <?xml version="1.0" encoding="utf-8"?><!-- DWXMLSource="data/itemfeed.xml" --><!DOCTYPE xsl:stylesheet  [
        <!ENTITY nbsp  "&#160;">
        <!ENTITY copy  "&#169;">
        <!ENTITY reg    "&#174;">
        <!ENTITY trade  "&#8482;">
        <!ENTITY mdash  "&#8212;">
        <!ENTITY ldquo  "&#8220;">
        <!ENTITY rdquo  "&#8221;">
        <!ENTITY pound  "&#163;">
        <!ENTITY yen    "&#165;">
        <!ENTITY euro  "&#8364;">
    ]>
    <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
    <xsl:output omit-xml-declaration="yes" encoding="utf-8" doctype-public="-//W3C//DTD XHTML 1.0 Transitional//EN" doctype-system="http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"/>
    <xsl:template match="/">
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
    </head>
    <body>
    <xsl:for-each select="Items/Item[ItemType='Standard']">
    <xsl:value-of select="EANNumber"/>
    </xsl:for-each>
    </body>
    </html>
    </xsl:template>
    </xsl:stylesheet>
    And here is some sample data from the XML file:
    <?xml version="1.0" encoding="UTF-8" ?>
    <Items>
        <Item>
            <ItemType>Standard</ItemType>
            <EANNumber>111222333444</EANNumber>
        </Item>
    </Items>
    Thanks alot, i appreciate the help.
    Chris

  • How to see Design View when using ?php require("header.htm"); ?

    Hello
    I'm new to DW CS4 and have what's probably a simple question, but I can't figure it out.  I have a basic html website in which I'm using php require to call  header.htm and footer.htm files.  In CS4, when I open any page in the Design or Split view, it displays the header.htm file.  The only way I have been able to view the content of the page is to delete the php require code in Code View.  I then edit the page after which I have to paste the require code for the header.htm file back in before saving.
    Is there an easy fix for this?
    Many Thanks!

    Thanks for your response.  All of my pages are php pages in which I use the php require command to display a header and footer.  In CS4, when I open any page from my site in Design or Split view, all I can see is the header.htm file.  I cannot see any of the content from that particular page.  I have to go into code view and delete the <?php require("header.htm"); ?> from the code.  The I can view and edit that page's content after which I have to paste the <?php require("header.htm"); ?> command back in and load the saved file to the server.  A royal pain in the butt.

  • How do i change the path of data ajax false from returning to homepage, when using a PHP mail form in jquery mobile?

    I have a put a php mail form in the quote page of my mobile site. However when i send the form it returns to the route page rather than the quote page, i have used the data ajax false action as i dont want to send via ajax. i have left the thanks page blank as i want it to remain on the same page showing sent or declined message.  Can someone help please? 
    <?php
    // OPTIONS - PLEASE CONFIGURE THESE BEFORE USE!
    $yourEmail = "[email protected]"; // the email address you wish to receive these mails through
    $yourWebsite = "www.firstcalltransport.co.uk"; // the name of your website
    $thanksPage = ''; // URL to 'thanks for sending mail' page; leave empty to keep message on the same page
    $maxPoints = 4; // max points a person can hit before it refuses to submit - recommend 4
    $requiredFields = "name,email,collection,delivery,comments"; // names of the fields you'd like to be required as a minimum, separate each field with a comma
    // DO NOT EDIT BELOW HERE
    $error_msg = array();
    $result = null;
    $requiredFields = explode(",", $requiredFields);
    function clean($data) {
      $data = trim(stripslashes(strip_tags($data)));
      return $data;
    function isBot() {
      $bots = array("Indy", "Blaiz", "Java", "libwww-perl", "Python", "OutfoxBot", "User-Agent", "PycURL", "AlphaServer", "T8Abot", "Syntryx", "WinHttp", "WebBandit", "nicebot", "Teoma", "alexa", "froogle", "inktomi", "looksmart", "URL_Spider_SQL", "Firefly", "NationalDirectory", "Ask Jeeves", "TECNOSEEK", "InfoSeek", "WebFindBot", "girafabot", "crawler", "www.galaxy.com", "Googlebot", "Scooter", "Slurp", "appie", "FAST", "WebBug", "Spade", "ZyBorg", "rabaz");
      foreach ($bots as $bot)
      if (stripos($_SERVER['HTTP_USER_AGENT'], $bot) !== false)
      return true;
      if (empty($_SERVER['HTTP_USER_AGENT']) || $_SERVER['HTTP_USER_AGENT'] == " ")
      return true;
      return false;
    if ($_SERVER['REQUEST_METHOD'] == "POST") {
      if (isBot() !== false)
      $error_msg[] = "No bots please! UA reported as: ".$_SERVER['HTTP_USER_AGENT'];
      // lets check a few things - not enough to trigger an error on their own, but worth assigning a spam score..
      // score quickly adds up therefore allowing genuine users with 'accidental' score through but cutting out real spam
      $points = (int)0;
      foreach ($badwords as $word)
      if (
      strpos(strtolower($_POST['comments']), $word) !== false ||
      strpos(strtolower($_POST['name']), $word) !== false
      $points += 2;
      if (strpos($_POST['comments'], "http://") !== false || strpos($_POST['comments'], "www.") !== false)
      $points += 2;
      if (isset($_POST['nojs']))
      $points += 1;
      if (preg_match("/(<.*>)/i", $_POST['comments']))
      $points += 2;
      if (strlen($_POST['name']) < 3)
      $points += 1;
      if (strlen($_POST['comments']) < 15 || strlen($_POST['comments'] > 1500))
      $points += 2;
      if (preg_match("/[bcdfghjklmnpqrstvwxyz]{7,}/i", $_POST['comments']))
      $points += 1;
      // end score assignments
      foreach($requiredFields as $field) {
      trim($_POST[$field]);
      if (!isset($_POST[$field]) || empty($_POST[$field]) && array_pop($error_msg) != "Please fill in all the required fields and submit again.\r\n")
      $error_msg[] = "Please fill in all the required fields and submit again.";
      if (!empty($_POST['name']) && !preg_match("/^[a-zA-Z-'\s]*$/", stripslashes($_POST['name'])))
      $error_msg[] = "The name field must not contain special characters.\r\n";
      if (!empty($_POST['email']) && !preg_match('/^([a-z0-9])(([-a-z0-9._])*([a-z0-9]))*\@([a-z0-9])(([a-z0-9-])*([a-z0-9]))+ ' . '(\.([a-z0-9])([-a-z0-9_-])?([a-z0-9])+)+$/i', strtolower($_POST['email'])))
      $error_msg[] = "That is not a valid e-mail address.\r\n";
      if (!empty($_POST['url']) && !preg_match('/^(http|https):\/\/(([A-Z0-9][A-Z0-9_-]*)(\.[A-Z0-9][A-Z0-9_-]*)+)(:(\d+))?\ /?/i', $_POST['url']))
      $error_msg[] = "Invalid website url.\r\n";
      if ($error_msg == NULL && $points <= $maxPoints) {
      $subject = "Automatic Form Email";
      $message = "You received this e-mail message through your website: \n\n";
      foreach ($_POST as $key => $val) {
      if (is_array($val)) {
      foreach ($val as $subval) {
      $message .= ucwords($key) . ": " . clean($subval) . "\r\n";
      } else {
      $message .= ucwords($key) . ": " . clean($val) . "\r\n";
      $message .= "\r\n";
      $message .= 'IP: '.$_SERVER['REMOTE_ADDR']."\r\n";
      $message .= 'Browser: '.$_SERVER['HTTP_USER_AGENT']."\r\n";
      $message .= 'Points: '.$points;
      if (strstr($_SERVER['SERVER_SOFTWARE'], "Win")) {
      $headers   = "From: $yourEmail\r\n";
      } else {
      $headers   = "From: $yourWebsite <$yourEmail>\r\n";
      $headers  .= "Reply-To: {$_POST['email']}\r\n";
      if (mail($yourEmail,$subject,$message,$headers)) {
      if (!empty($thanksPage)) {
      header("Location: $thanksPage");
      exit;
      } else {
      $result = 'Your mail was successfully sent.';
      $disable = true;
      } else {
      $error_msg[] = 'Your mail could not be sent this time. ['.$points.']';
      } else {
      if (empty($error_msg))
      $error_msg[] = 'Your mail looks too much like spam, and could not be sent this time. ['.$points.']';
    function get_data($var) {
      if (isset($_POST[$var]))
      echo htmlspecialchars($_POST[$var]);
    ?>
    <!DOCTYPE HTML>
    <html>
    <head>
    <meta charset="utf-8">
    <title>Untitled Document</title>
    <link href="CSS/stylesheetnew.css" rel="stylesheet" type="text/css">
    <link href="../jquery-mobile/jquery.mobile-1.0a3.min.css" rel="stylesheet" type="text/css">
    <script src="../jquery-mobile/jquery-1.5.min.js" type="text/javascript"></script>
    <script src="../jquery-mobile/jquery.mobile-1.0a3.min.js" type="text/javascript"></script>
    <style type="text/css">
      p.error, p.success {
      font-weight: bold;
      padding: 10px;
      border: 1px solid;
      p.error {
      background: #ffc0c0;
      color: #F00;
      p.success {
      background: #b3ff69;
      color: #4fa000;
    </style>
    </head>
    <body>
    <div data-role="page" id="home">
      <div data-role="header" data-position="fixed">
       <h1>FIRSTCALL TRANSPORT</h1>
    </div>
        <div data-role="navbar" data-position="fixed">
                                    <ul>
                                      <li><a href="#about">About</a></li>
                                      <li><a href="#services">Services</a></li>
                                      <li><a href="#contact">Contact</a></li>
                                      <li><a href="#quote">Quote</a></li>
                                    </ul>
      </div>
      <div data-role="content"> </div>
         <div data-role="footer" data-position="fixed" > </div>
    </div>
    </div>
    <div data-role="page" id="quote">
      <div data-role="header" data-position="fixed">
        <h1>GET A QUOTE</h1>
      </div>
      <div data-role="content">
       <?php
    if (!empty($error_msg)) {
      echo '<p class="error">ERROR: '. implode("<br />", $error_msg) . "</p>";
    if ($result != NULL) {
      echo '<p class="success">'. $result . "</p>";
    ?>
    <form action="<?php echo basename(__FILE__); ?>" method="post" data-ajax="false"  >
    <noscript>
      <p><input type="hidden" name="nojs" id="nojs" /></p>
    </noscript>
    <p>
      <label for="name">Name: *</label>
      <input type="text" name="name" id="name" value="<?php get_data("name"); ?>" /><br />
      <label for="email">E-mail: *</label>
      <input type="text" name="email" id="email" value="<?php get_data("email"); ?>" /><br />
            <label for="company">Company:</label>
      <input type="text" name="company" id="company" value="<?php get_data("company"); ?>" /><br />
      <label for="collection">Collection: *</label>
      <input type="text" name="collection" id="collection" value="<?php get_data("collection"); ?>" /><br />
        <label for="delivery">Delivery: *</label>
      <input type="text" name="delivery" id="delivery" value="<?php get_data("delivery"); ?>" /><br />
      <label for="comments">Message: *</label>
      <textarea name="comments" id="comments" rows="5" cols="20"><?php get_data("comments"); ?></textarea><br />
      <input type="submit" name="submit" id="submit" value="Send" <?php if (isset($disable) && $disable === true) echo ' disabled="disabled"'; ?> />
    </p>
    </form>  </div>
         <div data-role="footer" >  </div>
      </div>
      </div>           
    </body>
    </html>

    My wife has left me for four weeks, favouring to be with our son who lives 4,000 km away. I now have to cook for myself and the steaks taste horrible. What am I doing wrong?
    If you do not know what I have (not) done to make the steak taste horrible, my question is as hard to answer as your question above.
    Please give us more info like giving us the code that sends the page to the homepage rather than to the previous page.

  • Is there a way to get the actual XML string when using the JAXP SAX Parser?

    Hi All,
    I am using a JAXP SAX xml parser and am looking for a way to get the actual line of xml that is being parsed from within a content handler.
    Here's my scenario. Consider the following example xml document.
    <formCollection>
       <form name="myForm">
          <text/>
          <selection/>
       </form>
       <form name="anotherForm">
          <text/>
       </form>
    </formCollection>My hope is to validate the entire document and then insert an xml string containing each "form" element (and its sub-elements) into a map for later use. My thought was to create a String as each "form" element is being parsed (begining with the form's startElement event and concatenating until the form's endElement event is reached) and then inserting this string into the map. Is there a way to get the actual line of xml that is being parsed, rather than just the element name and attribute values?

    DrClap wrote:
    YouRang wrote:
    2. The first handler would validate the entire XML document, extract the "type" attribute from each <form> element, and place each <form> element and its sub-elements into the map of Strings, using the "type" attribute as the key. The second handler would take a <form> element and parse it into a Form object for the display. This option was the impetus for my question because it relies on the first handler being able to access the entire <form> element XML String and write it to a map.I don't see why you need the raw data from the XML document here. You should already be abstracting your data into Java classes in the first handler, instead of making the second handler do the parsing all over again.Correct, I am not referring to XForms. In this case, it happens that I am using the XML to generate an SWT ScrolledForm object and, thus, the XML element name happens to be named "form." However, the concept/design problem could apply to any type of object and the XML element could be appropriately renamed.
    My experience with XSLT is limited and I haven't done anything with it for several years. With that said, it seems that it is primarily used for generating web content, which wouldn't apply in this case because this is for a client-server application. I could be off base on this one -- if XSLT applies to much broader translations and would be more appropriate for generating Java objects than my current methodology, I could certainly look into it further.
    I apologize that option two didn't make more sense; it is difficult to explain. Yes, optimally the data should be abstracted into Java classes in the first handler. This is really an elaboration that I failed to specify when explaining option one. The problem is that the user can choose to create any number of "forms" of any type. For instance, let's say that from the File -> New menu there are options for seven different types of forms and each form is used to send completely different data. The user can select form1, select form1 again, select form4, and select form7 (or any other combination) and bring up tabs that display the different forms. The user can then enter data and submit each form separately. When the user selects File -> New -> FormX, a SWT ScrolledForm object that corresponds with FormX must be given to the display. Because SWT ScrolledForm objects do not allow a deep copy, I cannot simply read the XML <form> elements at initialization, parse them into ScrolledForm objects, and pass deep copies of the ScrolledForm objects to the display each time the user clicks File -> New -> FormX. The only simple way I see of getting a new copy of a ScrolledForm object is to reparse the appropriate XML <form> element in order to create one each time the user selects File -> New -> FormX. As such, one handler would need to read the entire XML document and parse the <form> elements into a map (or some other data structure) and another handler would need to parse individual <form> elements into SWT ScrolledForm objects. The first handler would be called at initialization and the second handler would be called each time a user clicked on File -> New -> FormX. Once again, this isn't exactly my favorite implementation... but seems the simplest given that there is no way to do a deep copy of an SWT ScrolledForm object. Hopefully that makes a little more sense. No worries if it doesn't -- I just figured I'd throw this out there and see if anyone had a better idea.

  • When using a php contact form, the form won't work correctly.

    This is the code that I'm using in the html snippet. The form displays correctly, but when you click submit it trys to go to www.my web site.com//Order_Page/send_form_email. Notice the double / above? How do i make it not do two / but only one?
      First Name *
      Last Name *
      Email Address *
      Telephone Number
      Comments *

    The post method needs to reference the formmail.php script you uploaded to the server.
    Here's some examples and instructions for a simple form...
    http://www.iwebformusicians.com/iweb-snippets/form.html

  • Replace xml code when used as a xmltype converted from clob.

    I am still new at all this so I will try to make sense.
    I have the "sys_xmlgen" where it takes my clob_content which is a clob and converts it into the v_xml which is xmltype.
    ****code to show change of clob to xmltype.
    SELECT sys_xmlgen(clob_content) INTO v_xml FROM xmltest2 WHERE item_id = v_item_id;
    update xmltest2 set xml = v_xml where item_id = v_item_id;
    **end of code
    When you use sys_xmlgen it changes the xml into this example:
    <?xml version="1.0"?>
    <CLOB_CONTENT>&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot;?&gt;
    &lt;!DOCTYPE metadata SYSTEM &quot;csdgm2.dtd&quot;&gt;
    &lt;?xml-stylesheet href=&quot;FGDC_V2.xsl&quot; type=&quot;text/xsl&quot;?&gt;
    &lt;metadata&gt;
    &lt;idinfo&gt;
    </CLOB_CONTENT>
    I need to remove the <CLOB_CONTENT> tag and change some things such as the "&lt;" to a "<" and so on. But when I do a replace statement
    select replace(clob_content, '&lt;', '<') into v_xml from xmltest2;
    It says I can not do a clob into number.
    Just to make myself clear, the clob_content is clob and v_xml is xmltype. SOOO I think that is where my problem is. Does anyone know the syntax to replace the code in my xml so that it looks like the original clob xml??
    Any help would be appreciated.

    I am still new at all this so I will try to make sense.
    I have the "sys_xmlgen" where it takes my clob_content which is a clob and converts it into the v_xml which is xmltype.
    ****code to show change of clob to xmltype.
    SELECT sys_xmlgen(clob_content) INTO v_xml FROM xmltest2 WHERE item_id = v_item_id;
    update xmltest2 set xml = v_xml where item_id = v_item_id;
    **end of code
    When you use sys_xmlgen it changes the xml into this example:
    ?xml version="1.0"?>
    <CLOB_CONTENT>&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot;?&gt;
    &lt;!DOCTYPE metadata SYSTEM &quot;csdgm2.dtd&quot;&gt;
    &lt;?xml-stylesheet href=&quot;FGDC_V2.xsl&quot; type=&quot;text/xsl&quot;?&gt;
    &lt;metadata&gt;
    &lt;idinfo&gt;
    &lt;citation&gt;
    &lt;citeinfo&gt;</CLOB_CONTENT>
    I need to remove the <CLOB_CONTENT> tag and change some things such as the "<" to a "<" and so on. But when I do a replace statement
    select replace(clob_content, '<', '<') into v_xml from xmltest2;
    It says I can not do a clob into number.
    Just to make myself clear, the clob_content is clob and v_xml is xmltype. SOOO I think that is where my problem is. Does anyone know the syntax to replace the code in my xml so that it looks like the original clob xml??
    Any help would be appreciated.

  • Avoid tag library declarations when using Tiles

    Hello,
    Im developing a small app using Struts+Tiles, I see that in every "Tile" (header.jsp, navbar.jsp, footer.jsp) if I want to use some struts tags like <bean:write... I have to put the tag library declarations like:
    <%@ taglib uri="http://struts.apache.org/tags-bean" prefix="bean" %>at the begining of every jsp, because the tag library declarations included at the begining of the "mainLayout" that encapsulates the page regions or "tiles", is ignored.
    How to solve this ?

    Refer
    http://www.oracle.com/technology/pub/articles/vohra_tiles.html

  • Missing XML Element when using asset from library

    This is not really a scripting question but I seem to be unable to find any regular ID forum and it has something to do with a scripting workflow I established for a customer.
    A script places an asset from a library onto a document and then (amongst other things) imports some XML file.
    The asset in the library consists of a number of textframes and has the structure e.g.:
    article
    box
    box
    Now the customer needs new templates (that is assets in the library) and we cannot produce them anymore. It seems that as of CS 3 5.0.4 Adobe changed the behavior of the library. Dragging e.g. two box-tagged boxes with an article parent XML into the library leads to an asset without the article element. Can someone confirm this? And more important is there a reason to it? Or is there a way to configure the behavior?
    I guess I could create a parent xml element by script after placing the element but then I would need to redo all existing libraries.
    Thank you,
    Ralf

    while( testIterator.hasNext() ) {
       Element testElement = (Element)testIterator.next();
       String code = testElement.getChildTextTrim("code");
        if( null == code ) {
               continue;
       String analysis= testElement.getChildTextTrim("analysis");
       //same for description
    }

  • Abap error when using Web Dynpro assistance class

    Hello All,
    I created Web Dynpro component with assistance class.
    On the component controller I can see the attribute "WD_ASSIST".
    I also can use Goto  -> text symbols and create net text key.
    But when I tried to read the text:
    wd_assist->get_text( '001' ).
    There is abap error:
    Method get_text is unknown protected or private.
    I can see the method get_text inside my assistance class like this:
    IF_WD_COMPONENT_ASSISTANCE~GET_TEXT visibility - public.
    I think I missed something while creating the assistance class?
    Thanks in advanced for the help.
    Nir

    Your method call should be:
    wd_assist->IF_WD_COMPONENT_ASSISTANCE~get_text( '001' ).
    You have to supply the interface name or go into the class definition and create a public alias for that method.

  • Regular Expression: Different results when using FIND or regex classes

    Hi,
    has anybody an idea why the FIND REGEX statement and the regex class delivers different results when searching for
    ^\*
    in
    I try to find every place with an asterisk as first sign of the line.
    The FIND statement
    DATA gv_string        TYPE        string.
    DATA gv_pattern       TYPE        string.
    DATA gt_match_result  TYPE        match_result_tab.
    gv_string = '****'.
    gv_pattern = '^\*'.
    FIND ALL OCCURRENCES OF REGEX gv_pattern
                               IN gv_string
                          RESULTS gt_match_result.
    returns one hit as expected. But the class cl_abap_regex and cl_abap_matcher returns four hits in this example:
    DATA gv_string        TYPE        string.
    DATA gv_pattern       TYPE        string.
    DATA gt_match_result2 TYPE        match_result_tab.
    DATA gx_regex         TYPE REF TO cl_abap_regex.
    DATA gx_matcher       TYPE REF TO cl_abap_matcher.
    gv_string = '****'.
    gv_pattern = '^\*'.
    TRY.
        CREATE OBJECT gx_regex
          EXPORTING
            pattern = gv_pattern.
      CATCH cx_sy_regex .
        BREAK-POINT.
        EXIT.
    ENDTRY.
    TRY.
        CREATE OBJECT gx_matcher
          EXPORTING
            regex = gx_regex
            text  = gv_string.
      CATCH cx_sy_matcher .
        BREAK-POINT.
        EXIT.
    ENDTRY.
    gt_match_result2 = gx_matcher->find_all( ).
    BREAK-POINT.
    Looks like the class doesn't consider the start of line symbol (^). Is there an error in my implementation?
    Any help is appreciated.
    Matthias

    Hi Jim,
    thank you for your reply. But to negate a value set of single characters you have to use
    [^  ]
    I used just the character
    ^
    This is defined as anchor character for the start of a line (See the documentation link you posted -> chapter 'Special characters for search strings') .
    As I understand it, should the FIND REGEX statement does the same as the CL_ABAP_REGEX and CL_ABAP_MATCHER classes. Therefore, I do not understand, why both implementations deliver another result.
    And I didn't find an answer for that. Does anyone else?
    Matthias

  • Force the xml declaration to show when the xmltype in generated

    Hi.
    I use oracle 9.2i .
    When i generate the XML the xml declaration doesnt show.
    <?xml version="1.0" encoding="UTF-8" standalone="no"?>
    Only if i do a getclobval(), but that returns a string that has spaces and alot of other stuff that i don't want.
    Is there any way to return the xml declaration when i call a xmltype?
    I know i asked a similar question before, but the answer i got was to use getclobval... but must be another way..
    I hope you can help me, cheers.

    Maybe time to patch??
    SQL>  select * from v$version where rownum = 1
    BANNER                                                         
    Oracle9i Enterprise Edition Release 9.2.0.8.0 - 64bit Production
    1 row selected.
    SQL>  select xmltype
                 ('<?xml version="1.0" encoding="UTF-8" standalone="no"?>'
                  || xmlforest ('some_value' as "root_element")
                 ) xml
      from dual
    XML                                                                            
    <?xml version="1.0" encoding="UTF-8" standalone="no"?>
    <root_element>some_value</root_element>                                                                  
    1 row selected.

  • The configuration file did not contain well formed AppV configuration XML - When using Office 2013 ODT package

    All,
    I'm experiencing an issue where when using the Office 2013 package pulled down from ODT, that if I try to change the locations of either InfoPath Filler 2013 or Publisher 2013 from the default of Microsoft Office 2013 then I receive the message "The
    configuration file did not contain well formed AppV configuration XML. Please check the management server event log for more information". If I check Applications and Services\Microsoft\AppV\Server-Management\Admin the error displayed there is "An
    error was encountered parsing dynamic configuration file '0'. However I am able to change the shortcut location for all other applications except the above 2. I've tried redownloading the files using the ODT and also changing the version number (so far I've
    tried both the 15.0.4631.1002 and 15.0.4659.1001 with the same result).
    As all I'm interested in so far is having a package which contains Visio and Project I've tried following the article to exclude all the other Office elements:
    http://technet.microsoft.com/library/jj219426(v=office.15).aspx#BKMK_ExcludeAppElement. However the package looks to be the same and when I load it into the management console all the options and elements to Office 2013 are available like they were before
    when I hadn't set the exclude tags so I'm not sure whether the ExcludeApp parameters actually work correctly.
    This then brings me onto the 3rd issue I've experienced. I have a group for the Visio users and I've set custom security for them to have Visio delivered to them but not Project and then a seperate group for just Project users who will have Project delivered
    to them but not have Visio. When testing this sometimes seems to work but other times it seems to trip out and a user just in the Project or Visio group will get all of the Office 2013 applications and under the default location of Microsoft Office 2013. When
    trying to spot correlation with this it appears random and can happen to any user on any device. We have sequenced a few applications ourselves where different parts are needed for different users and we have successfully managed this using different security
    groups for different applications, just as I'm trying here with Office 2013.
    Has anyone else experienced the issue with the "did not contain well formed XML" as at the start of the post and how were you able to resolve this? Also has anyone any advice on how to troubleshoot the issue with the security seeming to trip out
    and publish all applications within a package to a user regardless of whether they are in the correct group or not?
    The management / publishing servers are 5.0.1224.0 which is SP1 HF4 and the clients are on SP2 HF5.
    Thanks

    Nicke,
    The config files are UTF-8. I did find the same article as yourself, however when searching for the value ‘TakeoverExtensionPointsFrom46=’ within either of the configuration.xml files that text isn’t found.
    No sinister reason not to share the file used, just it’s the same structure as referenced in the article:
    http://technet.microsoft.com/en-us/library/dn745895(v=office.15).aspx. The only difference being that I’m using ProPlusVolume and I’ve set a version number (which is the October
    2014 update). I’ve even looked to follow the above example as closely as possible in just using the ExcludeApp ID of Access and InfoPath, just to try and prove the process. However I still get the usual full package. The version of the Click-to-Run setup.exe
    I’m using is 15.0.4623.1001, so later than the version specified at the end of that article which is 15.0.4619.1000. Where can I expect to see the elements excluded? Will it be when loading the package into the management console or would it just not appear
    on the machine when delivered?
    <Configuration>
      <Add SourcePath="C:\OfficeDeploymentToolV2" Version="15.0.4659.1001" OfficeClientEdition="32">
        <Product ID="ProPlusVolume">
          <Language ID="en-us" />
    <ExcludeApp ID="Access" />
    <ExcludeApp ID="InfoPath" />
        </Product>
      </Add>
    </Configuration>
    3). We’ve not used global publishing in our environment yet so I will try that. I’ve set both GlobalRefreshEnabled and GlobalRefreshOnLogon to True and when using the command Get-AppvPublishingServer on the client I’m testing with I can see this is pulled
    through correctly. I’ve also added the client name to the AD group used to grant access to the package and it is published. However nothing is pulling through onto the Client, so are there any steps I’ve missed or misinterpreted when looking to set this up?
    I guess the global publishing is there to keep in with licensing for Office being per device? On a slight aside, as Windows licensing is being changed to allow per user licensing
    http://www.zdnet.com/microsoft-to-make-per-user-windows-licensing-available-to-enterprise-customers-7000035401/ does anyone know if there are any plans to allow for Office / Project / Visio licenses to go per user as well? We’re a volume license customer
    rather than subscription based so I think a lot of the options to selectively deploy Visio and Project are excluded for us.
    Dan,
    Ok that explains why the security could be tripping out then and leading to this result. As above I’ll try with global publishing and see how I get on.
     From what I’ve read / watched  I think only one Office 2013 package can be published to a machine, so we would be unable to have a separate package for Visio and a separate package for Project and then attempt to deliver
    them both together. If a user wanted both Project and Visio then I guess we’d need to have a combined Project and Visio package to cover than scenario, but then 2 more separate Project and Visio packages for those who would only want either Project and Visio
    (I think).
    The scenario we’re looking at is to see whether we are able to deliver Project and / or Visio to different users through an AppV package and this will then cover users on XenApp or on fat clients. Only a small proportion of our
    users will need access to Project and / or Visio so therefore we’d only have a small amount of Project and Visio licenses.
    However from what I’ve tested up to this point and from what I’ve picked up from Forum posts / watched on TechEd sessions is that as publishing is Global and is unable to use different security groups for different elements of the
    suite, then using Office through AppV is only suitable if you will be delivering the whole suite (including Project and Visio) to all of your users. So in a scenario where you’d only want certain elements to be delivered to a handful of users then you’d need
    to keep with traditional ESD methods to have this installed onto fat clients and steer clear of XenApp. If wanting to install to XenApp then a lockdown tool like AppSense or AppLocker would also need to be brought into the equation.
    Is my understanding above correct or have I missed some options / methods?
    If the full Office package is always delivered but a company only has Office licenses and no Project and Visio licenses for all its users, how do they stop Project and Visio being delivered and being available? Or again if you have
    this use case is the AppV method one which will be unsuitable?
    Thanks

  • I'm trying to read some XML data from temperature logger over my network. I'm using LabView version 2009 sp1. I'm using the URL Get Document Vi. It works fine when using Internet sites like google or foxnews etc...

    I'm trying to read some XML data from temperature logger over my network.  I'm using LabView version 2009 sp1.  I'm using the URL Get Document Vi.  It works fine when using Internet sites like google or foxnews etc...
    When I use it with my temperature logger most of the time I get an Error 66...but some times it does work and actually retrieves the document. 
    I can use the same address "http://172.22.21.68/XMLfeed.rb" (Internet Explorer or Google Chrome) in my browser and get a response every time.  When accessing from my browser the server in the temperature logger does take around 6 seconds to respond, but it does respond every time. 
    Is the URL Get Document Vi exceeding a timeout?  If so, where can I set it to wait longer?
    Attachments:
    Error 66.jpg ‏183 KB

    It looks like the TCP Buffered Read has a 2.5 sec timeout, I believe that is where I had trouble as well.  Try creating your own URL Get HTTP Doc vi in which you call URL Get Document in normal mode, with an appropriate number of characters to fetch (enough characters so that you capture all the important data in the XML file).
    Attachments:
    ex1.PNG ‏33 KB

  • How to remove the ?xml declaration.

    Hi,
    We are processing a large ASCII input file and converting it into XML. When we do it on a single go, the JVM crashes due to out of memory error.
    We tried to write the XML output for a group of input lines into the file and start processing the next set. We get the <?xml> declarative tag every time we write to the file. How can we remove this?
    Thanks in advance.

    This is how I managed to do it. The latest xerces.xml.serializer package claims to do it as well for various sgml (html/xml etc) but the help is incomplete and I can find nothing on the internet to do this. Historically (ie a year ago) I've seen code such as XMLSerializer s = new XMLSerializer(Properties properties); s.serialize()... But this has been deprecated.
    It seems a great shame to me that Microsoft is running away with decent usable implementations of the DOMDocument standards.
       * Serializes the given document to the writer, optionally omitting the xml declaration
       * @param source
       * @param output
       * @throws XMLException
      public static void transform(Document source, Result output, boolean omitXmlDeclaration)
          throws XMLException
        try {
          if (output == null) {
            throw new IllegalArgumentException("Output result stream cannot be null");
          if (source == null) {
            throw new IllegalArgumentException("Source document cannot be null");
          Transformer transformer = TransformerFactory.newInstance().newTransformer();
          transformer.setOutputProperty("omit-xml-declaration", omitXmlDeclaration ? "yes" : "no");
          transformer.transform(new DOMSource(source), output);
        catch (Exception e) {
          Log.error("Error in transform", e);
          throw new XMLException(e);
      }

Maybe you are looking for