sugestion of php code to the xml files?

Hello..

I have dreamweaver cs5 and I use .htaccess to be able to use php in .xml to make the RSS and site map...

Everthing works fine but the php code that I put in any xml doc comes gray sugestion and php does not work...

any ideas how I can get this working?

Thank you

I have dreamweaver cs5 and I use .htaccess to be able to use php in .xml to make the RSS and site map...

Everthing works fine but the php code that I put in any xml doc comes gray sugestion and php does not work...

any ideas how I can get this working?

This technical note explains how to add and modify the exntensions recognized by DW:

http://kb2.Adobe.com/CPS/164/tn_16410.html

Tip: remove the documenttype (winfileextension and macfileextension) XML "xml", and then add it to the documenttype PHP_MySQL.

HTH,

Randy

Tags: Dreamweaver

Similar Questions

  • RSS feeds save in the xml file in the device memory

    Hello

    I'm in the analysis of an RSS feed with SAX parser. Now, I want to record the first RSS an xml file in the memory of the device or on the SD card. Can someone guide me through this process

    To write in an XML rss content, start by creating the file with the extension ".xml" with the help of the FileConnection API, then write content (rss data) in the XML file.

    You can use code below to write the content in the file. We must give the path as a string & content in byte format.

    public boolean writeFile(String path, byte[] data)
        {
            javax.microedition.io.Connection c = null;
            java.io.OutputStream os = null;
            try {
                c = javax.microedition.io.Connector.open("file:///" + path, javax.microedition.io.Connector.READ_WRITE);
                javax.microedition.io.file.FileConnection fc =
                        (javax.microedition.io.file.FileConnection) c;
                if (!fc.exists())
                    fc.create();
                else
                    fc.truncate(0);
                os = fc.openOutputStream();
                os.write(data);
                os.flush();
                return true;
            } catch (Exception e) {
                return false;
            } finally {
                try {
                    if (os != null)
                        os.close();
                    if (c != null)
                        c.close();
                } catch (Exception ex) {
                    ex.printStackTrace();
                }
            }
        }
    
  • Analysis of the XML file

    Hello

    I try to access a web service. I am currently using NetBeans 6.5. I am able to acess webservice by creating the stub.

    This draft is back this xml content in a string format

    so, when I try o use

    SAXParserFactory saxfact = SAXParserFactory.newInstance ();

    SAXParser sp = saxfact.newSAXParser ();

    Sax InputSource = new InputSource (temp); Temp is the string that's been out since the heel in a string format

    TPI Parse (Sax, this);    on this step, the code is throwing an exception

    / * org.xml.sax.SAXParseException:
    org.xml.sax.helpers.DefaultHandler.fatalError (+ 1)
    com.sun.ukit.jaxp.Parser.panic (+ 18)
    com.sun.ukit.jaxp.Parser.setinp (+ 203)
    com.sun.ukit.jaxp.Parser.parse (+ 42)
    analysis. (parsing.java:54)
    to call_to_webservice.run(call_to_webservice.java:54) * /.

    I'm stuck here

    I was trying to access xml directly, but the statement sp.parse () takes InputSource or InputStream

    need help very urgent

    Thanks in advance

    Hi Panknaik,

    Try this code,

    try {}
    SAXParserFactory plant = SAXParserFactory.newInstance ();
    SAXParser saxParser = factory.newSAXParser ();
    org.xml.sax.helpers.DefaultHandler Manager = new xmlReader (startTag, endTag); start and endtag you want to analyze.              InputStream in = new ByteArrayInputStream (response.getBytes("UTF-8"));
    InputSource source = new InputSource (in);
    saxParser.parse (source, handler);
    } catch (Exception e) {}

    ---------------------------------------------------------------------------

    Then extends DefaultHandle,

    /**
    * A class containing a generic logic to read an XML file.
    */
    class xmlReader extends DefaultHandler {}
    private String startTag; /**< start="" tag="" to="" be="" looked="" for.="">
    private String endTag. /**< end="" tag="" to="" be="" looked="" for.="">
    Private boolean currentTag;
    Private boolean Errortag.
    String tagValue;
           
    /**
    * Sets the start and end tag to be read in the XML file.
    startTag @param tag beginning.
    endTag @param tag end.
    */
    {} public xmlReader (startTag, endTag String String)
    this.startTag = startTag;
    this.endTag = endTag;
    }
           
    /**
    * Startup item implementation of the DefaultHandler.
    */
    ' public void startElement (String namespaceURI, String localName,
    String qualifiedName, attributes atts) throws SAXException {}
    If (localName.equals ("error"))
    Errortag = true;
    ElseIf (localName.equals (startTag))
    currentTag = true;
    }
           
    /**
    * Implementation of the DefaultHandler element ends.
    */
    ' public void endElement (String namespaceURI, String localName,
    String QualifiedName) throws SAXException {}
    If (localName.equals ("error"))
    Errortag = false;
    ElseIf (localName.equals (endTag))
    currentTag = false;
    Else if (currentTag == true) {}
    attribValue.addElement (tagValue); Add it to vector
    tagValue = "";
    }
    }
           
    /**
    * The treatment on the tag to read.
    ch @param String containing the tag.
    @param start starting location of the tag.
    @param tag length.
    */
    characters public Sub (ch of char [], int start, int length)
    throws SAXException {}
               
    Dim str As String = new String (ch);
    String tempTagValue = str.substring (start, start + length);
               
    If (Errortag is true)
    errorNo = Integer.parseInt (tempTagValue);
    Else if (currentTag == true)
    tagValue = tempTagValue;
    }
    }

    I think that it solve your problem.

    Kind regards

    -Jitu.

  • Using the XML file error

    Hello

    I use an XML file as the source in a map. This worked well until I changed the context during the execution of the mapping.

    Initially, during the execution of the development, it worked without any problem. But when I changed the context to run the Test, he gave me the following error:-

    ODI-1227: task load data-LKM SQL for Oracle-don't work not to connect to the source P6_ACTIVITIES - TEST.

    Caused by: java.sql.SQLException: the object name already exists: P6ACTI_READACTIVITIESRESPONSE in the statement [create table P6ACTI_READACTIVITIESRESPONSE (READACTIVITIESRESPONSEPK NUMERIC (10) NOT NULL, SNPSFILENAME varchar (255) NULL, SNPSFILEPATH varchar (255) NULL, SNPSLOADDATE varchar (255) NULL)]

    This object name, P6ACTI_READACTIVITIESRESPONSE created by ODI is a combination of scheme name defined in the JDBC URL properties (or the first five characters of the XML file) and the element root. Therefore, I don't have any control over the name, unless I have change the schema name property.

    Restart the agent will solve the problem temporarily, but the error will appear again when the context is changed. My question is, how do I create/drop / let agent do this each time that the XML file is accessed ODI. I use ODI 12.1.3.

    Thanks in advance,

    Xmen

    Only, you should be able to query code KM to understand if these tables are created, but generally it will be in the scheme of work specified on your server of intermediate technology.

    We are not allowed to change the KMs, because it would create problems of alimony.


    Who with Oracle or internally? A large part of ODI power lies in an open framework around KMs and as long as you develop and test carefully any customizations KM I really can't see why the support would be a problem. You can run the table to fall outside the knowledge module, would be - this also be a support issue, the main difference is that a KM custom allows to reuse easier?

  • How to check if a node exists in the XML file?

    I was asked to program a method to import data from xml files in our Coldfusion 8 Web site, I am new to the use of XML.

    My method worked however I encountered the following error:

    Element NETWORKORDER. SECONDARYADDRESS. CONTACTNAME is undefined in MYDOC.

    Investigation on the node in the XML file was not present.

    Is there a method I can use to resolve this error by checking if a node exists in the xml file, which works with my current code below?

    <!--> reading XML file
    < cffile action = "read" file = "D:\website\XML\#FileName#" variable = "myxml" >
    < cfset mydoc = XmlParse (myxml) >

    <!--> to extract data from the XML of NDS file
    < cfset aPrimaryContactName =(#mydoc.NetworkOrder.PrimaryAddress.ContactName#) >
    < cfset aPrimaryContactNumber =(#mydoc.NetworkOrder.PrimaryAddress.ContactNumber#) >
    < cfset aPrimaryContactNumber = tostring(#mydoc.NetworkOrder.PrimaryAddress.ContactNumber#) >
    < cfset aPrimaryContactAddressLine1 =(#mydoc.NetworkOrder.PrimaryAddress.line1#) >
    < cfset aPrimaryContactAddressLine2 =(#mydoc.NetworkOrder.PrimaryAddress.line2#) >
    < cfset aPrimaryContactAddressLine3 =(#mydoc.NetworkOrder.PrimaryAddress.line3#) >
    < cfset aPrimaryContactAddressLine4 =(#mydoc.NetworkOrder.PrimaryAddress.line4#) >
    < cfset aPrimaryContactAddressLine5 =(#mydoc.NetworkOrder.PrimaryAddress.line5#) >
    < cfset aPrimaryContactCity =(#mydoc.NetworkOrder.PrimaryAddress.City#) >
    < cfset aPrimaryContactPostcode =(#mydoc.NetworkOrder.PrimaryAddress.PostalCode#) >
    < cfset aPrimaryContactCounty =(#mydoc.NetworkOrder.PrimaryAddress.CountrySubdivision#) >
    < cfset aPrimaryContactCountryCode =(#mydoc.NetworkOrder.PrimaryAddress.CountryCode#) >
    < cfset aPrimaryContactCountry =(#mydoc.NetworkOrder.SecondaryAddress.Country#) >
    < cfset aSecondaryContactName =(#mydoc.NetworkOrder.SecondaryAddress.ContactName#) >
    < cfset aSecondaryAttentionOfName =(#mydoc.NetworkOrder.SecondaryAddress.AttentionOfName#) >
    < cfset aSecondaryContactNumber =(#mydoc.NetworkOrder.SecondaryAddress.ContactNumber#) >
    < cfset aSecondaryContactAddressLine1 =(#mydoc.NetworkOrder.SecondaryAddress.line1#) >
    < cfset aSecondaryContactAddressLine2 =(#mydoc.NetworkOrder.SecondaryAddress.line2#) >
    < cfset aSecondaryContactAddressLine3 =(#mydoc.NetworkOrder.SecondaryAddress.line3#) >
    < cfset aSecondaryContactAddressLine4 =(#mydoc.NetworkOrder.SecondaryAddress.line4#) >
    < cfset aSecondaryContactAddressLine5 =(#mydoc.NetworkOrder.SecondaryAddress.line5#) >
    < cfset aSecondaryContactCity =(#mydoc.NetworkOrder.SecondaryAddress.City#) >
    < cfset aSecondaryContactPostcode =(#mydoc.NetworkOrder.SecondaryAddress.PostalCode#) >
    < cfset aSecondaryContactCounty =(#mydoc.NetworkOrder.SecondaryAddress.CountrySubdivision#) >
    < cfset aSecondaryContactCountryCode =(#mydoc.NetworkOrder.SecondaryAddress.CountryCode#) >
    < cfset aSecondaryContactCountry =(#mydoc.NetworkOrder.SecondaryAddress.Country#) >

    Since you already have the XML parsed in a document, the easiest is to use xmlSearch(). Take a look at the doc, it is pretty easy to use. Something as simple as:

    To the most complex as:

    And in both cases:

    Read the doc and google is your friend "coldfusion xmlsearch.

  • PHP code takes the first record in the database regardless of the selected one

    I struggled for hours with this trying to see why no matter what file is selected, the record displayed is always the first. It must be a stupid mistake on my part, but I can't see it.

    I use DW CC 2015 with WebAssist server for server code additions. I looked at the database itself, and it's OK.

    Test data

    Capture.JPG

    Copy the following code enumerates the various documents in the database. (I removed my HTML that works well for brevity).

    <? php require_once('.. /.. /.. / Connections/Terrier.php');? >

    <? php require_once('.. /.. /.. / webassist/mysqli/rsobj.php');? >

    <? PHP

    $rsDocuments = new WA_MySQLi_RS ("rsDocuments", $Terrier, 1);

    $rsDocuments-> setQuery ("" SELECT * FROM documents ' ");

    $rsDocuments-> execute();

    ? >

    <! doctype html > < html >

    "' Snip...

    < p align = "left" > < a href = "add_terrier_document.php" > add new record of Documents < /a > < /p >

    < table width = "100%" border = "1" cellspacing = "2" cellpadding = "2" >

    < tbody >

    < b >

    < td width = "26%" align = "left" > < strong title > < / strong > < table >

    < td width = "52%" align = "left" > < strong text > < / strong > < table >

    < td width = "6%" align = "center" > < table >

    < td width = "6%" align = "center" > < table >

    < td width = "6%" align = "center" > < table >

    < /tr >

    <? PHP

    {While (! $rsDocuments-> {atEnd())}

    ? >

    < b >

    < td > <? PHP echo ($rsDocuments-> getColumnVal ("dc_title"));? > < table >

    < td > <? PHP echo ($rsDocuments-> getColumnVal ("dc_text"));? > < table >

    < td width = "6%" align = "center" > < a href = "view_terrier_document.php? dc_index = <?" PHP echo ($rsDocuments-> getColumnVal ("dc_index"));? > "> view < /a > < table >"

    < td width = "6%" align = "center" > < a href = "edit_terrier_document.php? dc_index = <?" PHP echo ($rsDocuments-> getColumnVal ("dc_index"));? > "> edit < /a > < table >"

    < td width = "6%" align = "center" > < a href = "confirm_terrier_document_delete.php? dc_index = <?" PHP echo ($rsDocuments-> getColumnVal ("dc_index"));? > "> delete < /a > < table >"

    < /tr >

    <? PHP

    $rsDocuments-> moveNext();

    }

    $rsDocuments-> moveFirst(); return the RS to the first record

    ? >

    < / tbody >

    < /table >

    < a href = "<?" PHP echo $rsDocuments-> getFirstPageLink();? > "> first < /a > - < a href =" <? PHP echo $rsDocuments-> getNextPageLink();? > "> Next < /a > - < a href =" <? PHP echo $rsDocuments-> getPrevPageLink();? > "> previous < /a > - < a href =" <? PHP echo $rsDocuments-> getLastPageLink();? > "> last < /a >"

    < p >

    .... SNIP

    The table shows the different records in the database. I can go through the files back and forth and pick any one to edit - say one-third.

    The PHP code creates the URL of http:// localhost/priory_database_2/gateway/Terrier/documentation/edit_terrier_document.php?dc_in dex = 3

    However, the record that is displayed is always record 1, regardless of the currently selected folder.

    The edition code (less HTML) is.

    <? php require_once('.. /.. /.. / Connections/Terrier.php');? >

    <? php require_once('.. /.. /.. / webassist/mysqli/rsobj.php');? >

    <? php require_once('.. /.. /.. / webassist/mysqli/queryobj.php');? >

    <? PHP

    $rsDocuments = new WA_MySQLi_RS ("rsDocuments", $Terrier, 1);

    $rsDocuments-> setQuery ("SELECT * FROM documents ORDER BY dc_index ASC");

    $rsDocuments-> execute();

    ? >

    <? PHP

    If (isset($_POST["submit"]): isset($_POST["submit_x"])) {}

    $UpdateQuery = new WA_MySQLi_Query ($Terrier);

    $UpdateQuery-> action = 'put up-to-date. "

    $UpdateQuery-> table = 'documents '.

    $UpdateQuery-> bindColumn ("dc_index", "s", "".) "((isset($_POST["dc_index"])))? $_POST ["dc_index"]:" ")". "" (', 'WA_DEFAULT');

    $UpdateQuery-> bindColumn ("dc_title", "s", "".) "((isset($_POST["dc_title"])))? $_POST ["dc_title"]:" ")". "" (', 'WA_DEFAULT');

    $UpdateQuery-> bindColumn ("dc_text", "s", "".) "((isset($_POST["dc_text"])))? $_POST ["dc_text"]:" ")". "" (', 'WA_DEFAULT');

    $UpdateQuery-> bindColumn ('date_recorded', "s", "".) "((isset($_POST["date_recorded"])))? $_POST ["date_recorded"]:" ")". "" (', 'WA_DEFAULT');

    $UpdateQuery-> bindColumn ("date_update", "s", "".) "((isset($_POST["date_update"])))? $_POST ["date_update"]:" ")". "" (', 'WA_DEFAULT');

    $UpdateQuery-> addFilter ('dc_index', '=', 'i', ' ".) () $_GET ['dc_index']). » ») ;

    $UpdateQuery-> execute();

    $UpdateGoTo = 'index.php ';

    "If (function_exists("rel2abs")) $UpdateGoTo = $UpdateGoTo? rel2abs ($UpdateGoTo, dirname (__FILE__)):" ";" "

    $UpdateQuery-> redirect ($UpdateGoTo);

    }

    ? >

    ..... Snip


    < /table >

    < h3 align = "center" > change the document details < / h3 >

    < form id = "AddDocumentRecord" name = "AddDocumentRecord" method = "post" >

    < label for = "dc_title" > title

    < name textarea = "dc_title" cols = "150" lines = "3" maxlength = "300" id = "title" > <? PHP echo ($rsDocuments-> getColumnVal ("dc_title"));? > < / textarea >

    < / label >

    < label for = "dc_text" > Description

    < name textarea = "dc_text" cols = "150" lines = "20" maxlength = "60000" id = "text" > <? PHP echo ($rsDocuments-> getColumnVal ("dc_text"));? > < / textarea >

    < label for 'date_recorded' = > registration Date:

    < name textarea = 'date_recorded' cols = "50" rows = "1" maxlength = "20" id = 'date' > <? PHP echo ($rsDocuments-> getColumnVal ("date_recorded"));? > < / textarea >

    < / label >

    < label for = "date_update" > Date of last update:

    < name textarea = "date_update" cols = "50" rows = "1" maxlength = "20" id = "Refresh" > <? PHP echo ($rsDocuments-> getColumnVal ("date_update"));? > < / textarea >

    < / label >

    < input type = "submit" name = "submit" id = "submit" value = "Submit" >

    < input name = "dc_index" type = "hidden" id = "dc_index" value = "<?" PHP echo ((isset($_POST["dc_index"]))? $_POST ["dc_index"] ":" "")? > ">"

    < / make >

    ... Snip

    The query for the edit page should look like

    $rsDocuments = new WA_MySQLi_RS ("rsDocuments", $Terrier, 1);

    $rsDocuments-> setQuery ("SELECT * FROM documents WHERE dc_index =?");

    $rsDocuments-> bindParam ('i', ' ".) "(isset($_GET['dc_index']))? $_GET ['dc_index']:" ")". "" », «-1 ») ;

    $rsDocuments-> execute();

    What this did that select a recording with a value of dc_index.

  • Create an image slider using the XML file photo gallery

    Hello!

    I have created a photo gallery and generated an xml file.  I want to implement a cursor image on the home page that performs a simple fade from one image to the other.

    I'm not an expert on jQuery. The BC help section says to add code that retrieves in the XML file and THEN add another code query j who would style images and transitions.

    I don't know how to do this.  Here is my code and it does not work.

    If you have a simple solution, it would be great.

    There is a script called JSSOR

    "< script type =" text/javascript"src ="... / js/jquery-1.9.1.min.js "> < / script >"

    <!-use jssor.slider.mini.js (40 KB) instead for immediate release->

    <!-jssor.slider.mini.js = (jssor.js + jssor.slider.js)->

    < script type = "text/javascript" src = "javascripts/jssor.js" > < / script >

    "< script type =" text/javascript"src="javascripts/jssor.slider.js "> < / script >

    This is the beginning of the code BC gives to pull from the xml file into a div called "Gallery".

    < div id = 'Gallery' > < / div >

    < script type = "text/javascript" >

    {$(function()}

    $.ajax({)

    type: 'GET ',.

          url: " http://www.performanceaire.com/Fahrenheit-images/BannerGallery/Photogallery.XML ", / / replace with an absolute URL of the XML of your gallery of .

    data type: "xml."

    success: {function (xml)}

    {$(xml).find('img').each (function ()}

    location var = ' http://www.performanceaire.com/Fahrenheit-Images/BannerGallery/'; / / Replace with the absolute path to the directory that contains your images

    var url = $(this) .attr ('src');

    var alt = $(this) .attr ('alt');

    $('<li></li>').html (' < a href = "' + place +" + url + ' "> < img src ="' + place + "+ url + '" alt = "' + alt + '" / > < / a > ').appendTo('#gallery');

    });

    }

    });

    });

    This is the code taken from JSSOR to transitions occur, and it does not work... any ideas?

    jQuery (document) .ready (function ($) {}

    var options = {}

    $AutoPlay: true, / / [optional] If auto play, to activate the slide show, this option must be set to true, the default value is false

    $DragOrientation: 1 / / orientation [optional] to drag the slide, 0. drag, 1 horizental, 2 3 vertical or, default value is 1 (note that the $DragOrientation must be the same as $PlayOrientation when $DisplayPieces is more than 1, or in the parking position is not 0)

    };

    var jssor_slider1 = new $JssorSlider$ ("Gallery", options);

    });

    < /script >

    www.performanceaire.com/index-FS.html

    It is perhaps a bit much if you do not top:

    Developers

    http://www.BusinessCatalyst.com/BC-blog/BC-next-liquid-rendering-JSON-new-editing-capabili links-increased-performance

  • How to insert data in the XML file?

    Hi guys,.

    How to insert information into an XML file. I tell you, I have a CFM file with some questions to the user

    When users submit this form within the form information is send in an XML file.

    How can insert this information in the XML file?

    When I don't have a DB?

    Thank you

    Kind regards

    Fabiano Magno Pechibella

    You must

    1. Read in the XML file
    2. Analyze the document in an XML (just one big struct) object
    3. Insert your XML code of the object where you need
    4. rewrite the XML file with your data now included

    You can Google 'ColdFusion working with XML' and find hundreds of items to help you. Here's a beginning tutorial to help you get started:

    Intermediate ColdFusion Tutorials - working with XML

  • The location of the XML file?

    Hi - Maybe it's a weird question, but I hope someone can help me.  I'm supposed to copy and paste the XML of my client on the server whenever it is updated through DW when connected to FTP.  So far, I have not been able to access the server, so I have no way of knowing exactly where the XML file.  This is the page which takes XML:

    http://www.gulfspillrestoration.NOAA.gov/oil-spill/Gulf-spill-data/

    I assumed that there is a kind of folder on the server that holds the file called "matrix".  For the life of me, after looking at the link above, code I can't well it say anything on a matrix file.

    In DW, I made a small test page and put in place a Spry data set and took a picture of the code [see below]:

    photo1.jpg

    Spry shows clearly where the file is located in the photo above, but I can't find it on the link.  In addition, scientists are telling me that all I have to do is to download the XML through WordPress (the above site using WP CMS) but when I did it - downloaded the XML through WP - it is not too much to write the previous version but rather re - name (such as matrix1.xml).

    So I think the only way to download and replace a DW FTP access and copy and paste the new code XML on the server.

    Is my analogy this correct?  You can see the path I might be dominant in the page above that points to the matrix file?  I want to just make sure that the XML file is located on the link server in a directory above.

    Thank you.

    Sorry - I was referring to your second question on downloading the file with FTP. If you want to download it with WP, and then delete the existing since the first Panel to SUPPORT XML file.

  • How can I parse the XML file using the Oracle's Sql query.

    Hi all
    I have an XML file that must analyze and display the result according to the following example
    Can you please recommend me an approach to get the result.

    For example, here is my XML:

    <? XML version = "1.0" encoding = "UTF-8"? >
    < xmlns:pi = "urn:com.workday / picof pi: Extract_Employees" >
    < IP: employee >
    < Additional_Information: pi > < pi: pi function: PriorValue = "" > Intern - masteri¿½s < / pi: function >
    < / pi: Additional_Information >
    < / pi: employee >
    < / pi: Extract_Employees >

    Databases:

    Oracle Database 10 g Enterprise Edition release 10.2.0.3.0 - production

    SQL > SELECT * FROM NLS_DATABASE_PARAMETERS;

    NLS_LANGUAGE AMERICAN
    NLS_TERRITORY AMERICA
    NLS_CURRENCY $
    NLS_ISO_CURRENCY AMERICA
    NLS_NUMERIC_CHARACTERS.,.
    WE8ISO8859P1 NLS_CHARACTERSET
    NLS_CALENDAR GREGORIAN
    NLS_DATE_FORMAT DD-MON-RR
    NLS_DATE_LANGUAGE AMERICAN
    NLS_SORT BINARY
    NLS_TIME_FORMAT HH.MI. SSXFF AM
    NLS_TIMESTAMP_FORMAT-DD-MON-RR HH.MI. SSXFF AM
    NLS_TIME_TZ_FORMAT HH.MI. SSXFF AM TZR
    NLS_TIMESTAMP_TZ_FORMAT DD-MON-RR HH.MI. SSXFF AM TZR
    NLS_DUAL_CURRENCY $
    BINARY NLS_COMP
    NLS_LENGTH_SEMANTICS BYTES
    NLS_NCHAR_CONV_EXCP FAKE
    NLS_NCHAR_CHARACTERSET AL16UTF16
    NLS_RDBMS_VERSION 10.2.0.3.0



    The Xml file above with UTF-8 character sets which is multi bytes.

    But in my character database is WE8ISO8859P1 for example ISO-8859-1 (single-byte character set)

    SQL > SELECT extractValue (Value (x) ', ' / pi:Employee/pi:Additional_Information/pi:Job_Title','xmlns:pi="urn:com.workday/picof ' ')
    TABLE (XMLSequence (extract (XMLType (bfilename('XMLDIR','XML_Issue_227176.xml'), nls_charset_id ('AL32UTF8')),'/ pi: Employee ',' xmlns:pi="urn:com.workday/picof"'))) x;)))


    which gives the following error:

    Error:
    ORA-31011: XML parsing failed
    ORA-19202: an error has occurred in the processing of XML
    LPX-00200: could not convert from UTF-8 encoding to ISO-8859-1
    Error on line 1
    ORA-06512: at "SYS." XMLTYPE", line 295
    ORA-06512: at line 1

    Also I tried with this
    SQL > SELECT convert (extractValue (Value (x), ' / pi:Employee/pi:Additional_Information/pi:Job_Title','xmlns:pi="urn:com.workday/picof"'),'WE8ISO8859P1 ', 'UTF8'))
    TABLE (XMLSequence (extract (XMLType (bfilename('XMLDIR','XML_Issue_227176.xml'), nls_charset_id ('AL32UTF8')),'/ pi: Employee ',' xmlns:pi="urn:com.workday/picof"'))) x;)))

    The same error is according to the above error message.

    Please help in this regard.

    Thank you and best regards,
    Sandrine

    You know the code of real character behind "" or you receive the file like that?

    For the record, "" is the wildcard of UTF-8 (0xEFBFBD), so that the original character of the means has already been replaced and that very probably the file was not coded properly in the first place.

    With respect to the resolution of the problem, try another method to read the file:

    SQL> select value from nls_database_parameters where parameter = 'NLS_CHARACTERSET';
    
    VALUE
    ----------------------------------------
    WE8ISO8859P15
    
    SQL> SELECT x.*
      2  FROM XMLTable(
      3         XMLNamespaces(default 'urn:com.workday/picof')
      4       , '/Extract_Employees/Employee'
      5         passing xmltype(
      6                   dbms_xslprocessor.read2clob(
      7                     'COP_DIR'
      8                   , 'XML_Issue_227176.xml'
      9                   , nls_charset_id('AL32UTF8')
     10                   )
     11                 )
     12         columns job_title varchar2(30) path 'Additional_Information/Job_Title'
     13       ) x
     14  ;
    
    JOB_TITLE
    ------------------------------
    Intern -  Master¿s
     
    
  • load the XML file field Companion without cross-domain policy file

    Hello.

    Assuming that there are two areas companions on the same server: /public_html/domain1.com and /public_html/domain2.com

    I'm trying to load the XML from domain2.com in domain1.com without using a cross-domain policy file (since it does not work with xml files in my case).

    So the idea is to use a php file to load XML and read it back to Flash.

    I found an interesting scripts that seems to do the job, but unfortunately I can't make it work. In my opinion, there is somewhere with AS3 part problem. Please take a look.

    Here's the AS3/PHP scripts:

    AS3 (.swf in www.domain1.com):

    location of the xml file you want to load, full http address

    var xmlLoc:String = " " http://www.Domain2.com/MyFile.XML ";

    location of the php xml grabber, regarding the .swf

    var phpLoc:String = "loadXML.php";

    var xml;

    var loader: URLLoader = new URLLoader();

    var request: URLRequest = new URLRequest (phpLoc + "? location =" + escape (xmlLoc));

    loader.addEventListener (Event.COMPLETE, onXMLLoaded);

    loader.addEventListener (IOErrorEvent.IO_ERROR, onIOErrorHandler);

    Loader.Load (request);

    function onIOErrorHandler(e:IOErrorEvent):void {}

    trace ("there was an error with the xml file" + e);

    }

    function onXMLLoaded(e:Event):void {}

    trace ("RSS feed has been loaded");

    XML = new XML (loader.data);

    / / string value, because it is passed from php as object

    XML = XML (xml.toString ());

    xml_txt.text = xml;

    }

    PHP (loadXML.php to www.domain1.com):

    <? PHP

    Header ("Content-type: text/xml");

    $location = "";

    {if (isset($_GET["location"]))}

    $location = $_GET ['location'];

    $location = urldecode ($location);

    }

    $xml_string = getData ($location);

    return the url encoded Flash vars

    echo $xml_string;

    Loops of a URL and returns

    function getData ($query) {}

    / / create resource curl

    $ch = function curl_init();

    / / cURL url

    curl_setopt ($ch, CURLOPT_URL, $query);

    Set some required params for the use of CURL

    curl_setopt ($ch, CURLOPT_SSL_VERIFYPEER, false);

    curl_setopt ($ch, CURLOPT_RETURNTRANSFER, 1);

    Execute the loop works and decode the returned JSON data

    $result = curl_exec;

    return $result;

    / / Close the curl resource to free up system resources

    curl_close ($ch);

    }

    ? >

    I think you might be right about / permissions on the server for php settings. Unfortunately I'm not allowed to adjust.

    So I wrote my own script - this time I used the path instead of the http address of the XML file.  It works fine in my case.

    Here it is:

    XML file on domain2.com:

    SWF on domain1.com:

    var imagesXML:XML;

    var variables: URLVariables = new URLVariables();

    var varURL:URLRequest = new URLRequest ("MyPHPfile.php");

    varURL.method = URLRequestMethod.POST;

    variable = varURL.data;

    var MyLoader:URLLoader = new URLLoader;

    MyLoader.dataFormat = pouvez;

    MyLoader.addEventListener (Event.COMPLETE, XMLDone);

    MyLoader.load (varURL);

    function XMLDone(event:Event):void {}

    var imported_XML:Object = event.target.data.imported_XML;

    imagesXML = new XML (imported_XML);

    MyTextfield_1.text = imagesXML;

    MyTextfield_2.text = imagesXML.image [0] .attribute ("thumbPath");  reference sample to assign "thumbPath' of the first item

    }

    php on domain1.comfile:

    <>

    $xml_file = simplexml_load_file('.. /.. / /galleries/gallery_1/MyXMLfile.xmldomain2.com');  Directory of XML file on the same server

    $imported_XML = $xml_file-> asXML();

    Print "imported_XML =". $imported_XML;

    ?>

    Concerning

    PS: for those who have read the foregoing: the first and the second script works but you need to test which one is best for your situation. The first script will work also between two domains located on different servers. No. cross necessary domain policy file.

  • How to add URL links in the XML file?

    Hello

    I have a problem with adding the URL links to the power of lightning. I use the XML file to call images, then the corrsponding links. Images are called correctly but when I try to add a link I do not receive the links, but rather to get the anchor HTML text tags. I use escape XML characters to escape HTML tags, but the results are not what I need.

    I use the following code:

    < preview = "miniature large.jpg" thumb = "thumb.jpg" > "
    < title > <! [CDATA [Financial Services]] > < / title >
    < discription > <! [CDATA [& lt; a href = & quot; ]] http://www.google.ca "> Google < / a > " [[ ]] > < / discription >
    < / thumbnails >

    ---------------------------

    Output:

    Images are displayed correctly, but instead get the links, I get following message:

    " < a href =" http://www.Google.ca "> < /a > Google .

    I need to know what I'm doing wrong. I use the proper way to add links or not?

    Thanks for your time.

    Use tags html directly inside CDATA - after all, what CDATA is for.

  • Automation of several Flash file by using the XML file 'mailing list '.

    I created a Flash interactive multi-fichiers 'demo' for a client. It is very well as a Web site (although he doesn't use it as a Web site) in the way it is stated that there is an index page which can then direct you to product categories, which you can click to see. Each 'page' contains the product (or product category) information, photos, diagrams, etc. There is nothing of Flash animation.

    My client also wants to be able to put in place so that the demo runs automatically in a configurable XML file. My ActionScript skills are fairly limited, but I was able to by using ActionScript 3 to load and read XML file. A loop using 'for', I am able to read the XML file and returns the path of each Flash file and the time that each file must be displayed (my client asked that he able to configure the duration of each page as well).

    I created a charger for each video clip and a timer for the duration. Unfortunately, the thing that throws me off is that when I try to load the clip (as the last element in the loop for), it reads the entire XML file, returns all the clips and the durations (I use trace to see this) before loading the clip. Thus, the single loaded clip is the last reading of the XML file.

    As I said, I'm not very good at ActionScript, so everything I managed to combine was internet tutorials.

    This is my code:

    var xmlLoader:URLLoader = new URLLoader();

    xmlLoader.addEventListener (Event.COMPLETE, xmlLoaded);

    var mcLoader:Loader = new Loader();
    mcLoader.contentLoaderInfo.addEventListener (Event.INIT, playClip);

    var mcCurrent:MovieClip = new MovieClip();
    stage.addChild (mcCurrent);

    var xml;

    function playClip(e:Event):void
    {
    trace("Function:playClip");
    stage.removeChild (mcCurrent);
    mcCurrent = MovieClip (mcLoader.content);
    mcLoader.unload ();
    stage.addChild (mcCurrent);
    }

    function xmlLoaded(e:Event):void
    {
    trace ("function: xmlLoaded");
    XML = new XML (e.target.data);

    var cl:XMLList = xml.clip;
    for (var i: uint = 0; i < cl.length (); i ++)
    {
    trace ("Begin"for"loop");
    trace ("variable" i "is" + i);

    clipPath var = cl[i].@path;
    var delay = cl[i].@duration;

    trace ("Clip path is" + clipPath);
    trace ("Display for" + delay);

    mcLoader.load (new URLRequest (clipPath));
    }
    }

    xmlLoader.load (new URLRequest ("filerunlist.xml"));


    I removed the timer event because, like all the rest was repeated until whatever it is obtained, so I wanted to figure out out to get the charger clip (mcLoader) to load the clip for each file, before I realized where put in the time to make sure each element is displayed for the appropriate duration. I suspect that the timer event must occur in the function "playClip", but that it would take advice on that as well.

    Thanks to anyone who can help me understand this.

    You need to do in the service of parsing xml is just to store all data in a table.  You will use while an array element after another through some timer control you set up, access each file in the order that they are stored in the table.  You do not load in this function, all data storage, and when finished, the last line of this function outside the loop, fires at any function you have who begins to treat the first element of the array.

    For example, to store the data objects in the array...

    var clipData:Array = new Array();   store your data xml here

    var clipToShow:uint = 0;                   use later in the function showClip

    function xmlLoaded(e:Event):void
    {
    trace ("function: xmlLoaded");
    XML = new XML (e.target.data);
       
    var cl:XMLList = xml.clip;
    for (var i: uint = 0; i
    {
    clipArray.push ({clipPath: cl[i].@path, delay: cl[i].@duration});

    }

    showClip();
    }

    function showClip() {}

    Regardless of the process of loading .clipPath clipArray [clipToShow]

    and using clipArray [clipToShow] .delay to start some timer is involved

    the timer handler function calls this function when it is run

    clipToShow += 1;   increment the counter for the next clip online

    }

    If you are not comfortable/familiar with the approach of the object, then you could also store the clip and delay data in two separate tables.

  • create table from the XML file at several levels

    Hello

    I'm working on the provision of an app to display xml data, which are currently using data from the settings file where the data was stored in a table.

    CONT =]
    [{txt: 'Perfume'} //main menu]

    [[{txt: 'Top Note', framework: 'topNote'}, {txt: 'Heart notes', frame: "heartNote"}, {txt: frame, 'Note of Base': 'gaps'}] / / submenu]

    ,[
    {txt: 'Packaging', field: 'packaging'} / / main menu

    ]

    ]

    I created an xml file and am able to recover data and impossible to find the same.

    Here's the xml file

    < Products >
    < produces txt = setting "Perfume" = "" > "".
    < = frame 'Top Note' = "topNote" txt file name > < / name of the file >
    < = txt file name ' heart notes"frame ="heartNote"> < / name of the file >
    < file name txt = "Core score" frame = 'gaps' > < / name of the file >
    < / product >
    < produces txt = framework of 'Packaging' = 'packaging' > < / product >
    < produces txt = framework "3D Animation" = "tvAd" video = "true" flvName = "video.flv" w = "547" h = "309" > < / product >
    < product txt framework "advertising Lla' = 'the package' = >
    < name of the txt-file = "Print Ad Creative Pack" frame = "printCp" > < / name of the file >
    < / product >
    < / product >

    AS A CODE

    ---------------------------------------

    (GlobalVarContainer.myXML is the place where is stored the xml file)

    var node:XMLNode = GlobalVarContainer.myXML.firstChild;
    var navItm:int = int (node.childNodes.length);
    for (i = 0; i < wheel; i ++) {}

    var temp_array:Array = new Array();
    var subnavCount:int = int (node.childNodes [i].childNodes.length);     subnav
    var obj:Object = new Object();
    obj.txt = node.childNodes [i] .attributes ['txt ""]
    obj. Frame = node.childNodes [i] .attributes ["frame" "]
    trace (node.childNodes [i]. Attributes ['txt'])

    for (var j: int = 0; j < subnavCount; j ++)
    {
    trace (node.childNodes [i] Sublst.ChildNodes(1).ChildNodes(0) [j]. Attributes ['txt'])
    obj.subtxt = node.childNodes [i] Sublst.ChildNodes(1).ChildNodes(0) [j]. Attributes ['txt'];
    obj. Subframe = node.childNodes [i] Sublst.ChildNodes(1).ChildNodes(0) [j]. Attributes ['frame'];
    temp_array.push (obj);
    }
    GlobalVarContainer.my_array.push (temp_array);

    }

    If I add - trace (GlobalVarContainer.my_array); -to code the outout is

    [object Object], [object Object], [object Object]
    [object Object], [object Object], [object Object],.
    [object Object], [object Object], [object Object],.
    [object Object], [object Object], [object Object], [object Object]

    but trace (.txt [i] GlobalVarContainer.my_array + "array"); or trace (GlobalVarContainer.my_array [i] [0] .txt + "array"); no results.

    need advice to move forward from here.

    Thank you

    AYUSH

    What I meant is that if you load the XML e4x, you have to analyze in a table to use it. You can retrieve the syntax of e4x XMLList and use it directly in your code. You can treat the XMLList almost as you treat any array using a for each loop for example.

    Take the code below as an example and adapt it to your needs:

    var mainMenu:XMLList = this.testXML.menu;

    for each {var menu: XML (in mainMenu)}

    trace ("Menu:" + menu.@txt);

    You can use your logic to create menu main point here

    var mynavItem:Navitem = new Navitem (0, spatie * i, GlobalVarContainer.my_array [i] [0], [i, 0], false, true);

    this.holder.addChild (mynavItem); ABLE TO VIEW THE MAIN MENU

    var items: XMLList = menu.children ();

    If (items.length () > 0) {}

    for each {var point: XML (in the points)}

    trace ("point:" + item.@txt);

    Logic of creation of subitem here

    var mySubnavItem:Navitem = new Navitem (dash, spatie * (i + 1 + j), GlobalVarContainer.my_array [i] [2], [i, j], true);

    this.holder.addChild (mySubnavItem);        DISPLAYS ONLY THE LAST ENTRY IN THE SUBMENU

    }

    }

    }

  • Need help with loading the XML file

    Hello

    I spent reviewing the web/forums for an example on how to do this for a few days now.  I managed to get this working in Flash Pro easily enough, but I think I'm missing something when I want to do the same thing in Flex.

    Basically, I want to load an XML file and then set the values of the text of labels 5, equal to the data in the XML file.

    So I have a button created in MXML and have put the following click event:

    Click = "dsSetup (Event)" "

    I also stated the following:

    public var myRequest:URLRequest = new URLRequest ("assets/myFile.xml");   folder located under the CBC in project

    public var myLoader:URLLoader = new URLLoader();

    public var myXML:XML;

    My function that loads is as follows:

    public function dsSetup(event:MouseEvent):void

    {

         trace ("dsSetup");

    myXML = new XML (myLoader.data);

    H3. Text = myXML.source.itemA;

    H4.text = myXML.source.itemB;

    H5.text = myXML.source.itemC;

    H7.text = myXML.source.itemD;

    H8.text = myXML.source.itemE;

    currentState = "MainMenu";

    }

    myLoader.addEventListener (Event.COMPLETE, dsSetup);   I think that this line is no longer as I put it in the MXML

    myLoader.load (myRequest);

    It's the way I did in Flash and it worked fine, but I must be missing something when it comes to Flex.

    Can you explain or point me to a good tutorial that shows how to load XML in Flex code?

    Those I've found seems to have about 50 lines of code just to load a file and add through a complex for a beginner.

    Thank you very much

    I suggest you save the data loaded in a variable that can be linked, then bind the properties of the text - who:

    [Bindable]

    var myXML:XML;

    public void dsSetup(event:MouseEvent):void

    {

    myXML = new XML (myLoader.data);

    currentState = "MainMenu";

    }

    ...

Maybe you are looking for