Xml from a path file

Hi,
I try to create a XML OBJECT from a stream, but i can't make .
Someone know a way to create a object XML from a path file (xml) ?
PS: I try to create a TABLE with the information in a XML File.
Please,
I really need some help!

Hi
You need to read that file from disk into a stream.
std::string inStr = "C:\yourPath.xml"
InterfacePtr<IPMStream> m_stream(StreamUtil::CreatePointerStreamRead(const_cast<char*>(inStr.c_str()), inStr.size()));
Then you need to pase that stream
I'm using DOM parser
InterfacePtr<IK2ServiceRegistry> serviceRegistry(gSession, UseDefaultIID());
InterfacePtr<IK2ServiceProvider> xmlDOMProvider(serviceRegistry->QueryServiceProviderByClassID(kDOMParserService, kDOMParserServiceBoss));
InterfacePtr<IDOMServices> domServices(xmlDOMProvider, UseDefaultIID());
IIDXMLDOMDocument* m_root = domServices->Parse(m_stream);
m_stream->Close();
And then for each node create a table cell.
Maybe there's a easier way to do that. Maybe by using some import filter.
Regards
Bartek

Similar Messages

  • Generating Deeply nested XML from a flat file

    Hi All,
    I am working on a MQ to IDOC scenario.
    I am getting a flat file as input. I need to convert it into XML( so that XI can understand it).
    But conversion is into a "Deeply Nested XML from a Flat File" at sender side (JMS Adapter).
    Any inputs on this.
    Regards,
    Vikas

    You can only convert flat file into xml structure with 3 levels.
    If you need to convert flat file into deep nested xml structure, you have to do java mapping or xslt or abap mapping. There is a tool, I think it's called conversion agent by itemfield (bought by SAP), which can do pretty everything with conversion. Never used it though.
    Jayson

  • Failed to load XML from the package file "" due to error 0xC00CE556 "Invalid at the top level of the document.Line.

    Using Installation wizard to deploy SSIS packages from DEV server to QA server package store cause this error;
    Failed to load XML from the package file "" due to error 0xC00CE556 "Invalid at the top level of the document. Line 773, Column 93". This happens when loading a package and the file cannot be opened or loaded correctly into XML document.  This can be the
    result of either providing an incorrect file name to the LoadPackage method or the XML file specified having an incorrect format.  Please who have the idea of how this issue can be resolved?BI Developer

    Hi ,
       for this Error one and only one solution 
    go to view Code, line number and Column number shown in error message,
    and Remove code from there till last and save it,  it happens when we are moving Package from one server to another server. and VS adds some lines of code at the bottom of package
    something like this 
    andles="1" allownudging="1" isannotation="0" dontautolayout="0" groupcollapsed="0" tabstop="1" visible="1" snaptogrid="0"&gt;
        &lt;control&gt;
          &lt;ddsxmlobjectstreaminitwrapper binary="00080000921400008c040000" /&gt;
        &lt;/control&gt;
        &lt;layoutobject&gt;
          &lt;ddsxmlobj&gt;
            &lt;property name="LogicalObject" value="{BBFB0E
    Remove this code and save package it will work.  
    hope this will help to Developers who are searching for same ......... :) 

  • Can I copy XML from one RDL file to another

    Hi
    I have created one report, worked on it as a prototype for a project - added datasets , params etc
    I now want to start again - from a template that we have just created - with professional layout, images etc - but want to copy the datasets, parameters from the original prototype to a new report (created from the template).
    Can I just copy sections of the XML from the original RDL file to the new one ?- like the Datasets and parameters sections 
    Regards
    Greg

    Hi,
    Yes, you can.
    If you copy less or more then need you'll see an error.

  • Error saving xml from model to file

    Hello.
    I am trying to create an xml file based on example GEO_DIM.dtd
    I have a dataserver
    jdbc:snps:xml?d=/oracle/product/odi_1/oracledi/demo/xml/GEO_DIM.dtd&s=MY_GEO_SCHEMA&lf=/logs/demo_geo_dim.log&ll=31
    xml model works fine. I can do Insert into and populate the whole model with data.
    When I try to save it on the disk using (on target)
    create xmlfile ' /tmp/test_demo_geo.xml' from schema MY_GEO_SCHEMA
    I get an error
    ODI-1272: The Logical Schema has not been set on source for populate_demo_geo.
    Caused By: java.lang.NullPointerException
    at com.sunopsis.jdbc.driver.xml.SnpsXmlPreparedStatementRedirector.executeUpdate(SnpsXmlPreparedStatementRedirector.java:625)
    What this driver wants from me?
    I just want to write the xml I’ve created to the disk.
    I’ve tried to do this CREATE XMLFILE command on source, but, it doesn’t help either. I just receive
    java.lang.NullPointerException
    at com.sunopsis.jdbc.driver.xml.SnpsXmlPreparedStatementRedirector.executeUpdate(SnpsXmlPreparedStatementRedirector.java:625)
    at com.sunopsis.jdbc.driver.xml.SnpsXmlPreparedStatement.executeUpdate(SnpsXmlPreparedStatement.java:113)
    Please, It just makes me mad, sorry…

    Hi Lembit,
    Thanks for posting current syntax to write the xml file.
    Even i am triying the same to write out an xml file from my xml schema.
    I executed my interface which inserted 3 records into target XML schema and inserted data i can in the XML model data store.
    I wrote a procedure to write XML schema data including newly inserted 3 records, i went through,but all record of XML model is written into file.
    my create xml command looks like create xml file "D:\temp\XML\gan_out.xml" from schema DEPT_TRG_SCH.
    Now i have around 10 records in the XML datastore in target XML model. I want to write an XML file each record from XML data store.
    Please help,
    Thanks,

  • Writing xml from an .exe file

    Hi,
    So, is it possible to post to php in an .exe file instead of a .swf displayed inside a browser?
    If so, how? I figured if you just created the .exe on the server with the .php file in the same folder
    it would read it and work fine.
    This doesn't seem to be the case... any ideas? Does it always have to go through a browser page?
    thanks

    It is possible to call a PHP file from an EXE. Make sure that you have th PHP file in the webroot of your webserver (IIS or Apache). Also, make sure that you use the server path..for example: http://localhost/myapp/myphpfile.php. It should work!

  • Xml from a php file does not load

    hi
    i have a php file that output an xml ,in order to use it in
    flash.
    when i test the php file in the browser i get the xml i need
    but in flash i get this error message:
    TypeError: Error #1088: The markup in the document following
    the root element must be well-formed.
    at taakexml_fla::MainTimeline/seexml()
    at flash.events::EventDispatcher/dispatchEventFunction()
    at flash.events::EventDispatcher/dispatchEvent()
    at flash.net::URLLoader/onComplete()
    i took the xml i get and made it a separate file (an xml one)
    and i can load it.
    what am i doing wrong?
    best regards
    ron

    Try this php file:
    $xml_output .= "<posts>";
    while($row=mysql_fetch_array($Result)){
    $xml_output .= "<post>";
    $xml_output .=
    "<title>".$row['title']."</title>";
    $xml_output .= "<date>".$row['date']."</date>";
    $xml_output .=
    "<shortdesc>".$row['short_desc']."</shortdesc>";
    $xml_output .=
    "<thepost>".$row['thepost']."</thepost>";
    $xml_output .= "</post>";
    $xml_output .= "</posts>";
    echo $xml_output;
    Flash should do the rest.

  • Hide XML from LOG File

    Hi All,
    When we run the payment process request, XML is generated and putted in the LOG File, our requirement is to hide XML from the log file. Please let me know how we can do that:
    <?XML version = > <outboundpaymentinstruction><paymentinstructioninfo>
    Please let me know.
    Thanks

    There are two XML formats. The one returned by GetXML is used for XML reports, not sequence files. The XML sequence file format is obtained by changing the FileWritingFormat of the file to XML (seqfile.AsPropertyObjectFile().FileWritingFormat) if it isn't already set to that, and then saving the file to disk. You can serialize the data for the sequence file in a similar XML format using Engine.SerializeObjects() using the serialization option SerializationOption_UseXml, but it will not be a sequence file. You will have to deserialize using Engine.UnserializeObjects to read it back into a sequence file.
    If you explain in more detail what you are trying to do, I could perhaps suggest what might be the best approach.
    -Doug

  • (fileSystem::extract Blob From Local Path) after installing B.O. XI 3.1

    Hello,
    I've installed B.O. XI 3.1 client tool on a laptop, but when I try to run Designer, or Deski the following error occurs (REPOSITORY ERROR (fileSystem::extract Blob From Local Path) file not found) and the application quits.
    Anyone has an idea?

    Hi
    What operating system are you using on your laptop?
    I have a colleague having a similar problem using Windows Vista, whereas I am fine (using XP).
    Did you manage to resolve this issue? (And if so, how)
    regards, Lara

  • Reading an xml file from a jar file

    Short question:
    Is it possible to read an xml file from a jar file when the dtd is
    placed inside the jar file? I am using jdom (SAXBuilder) and the default
    sax parser which comes with it.
    Long Question:
    I am trying to create an enterprise archive file on Weblogic 6.1. We
    have a framework that is similar to the struts framework which uses it's
    own configuration files
    I could place the dtd files outside the jar ear file and specify the
    absolute path in an environment variable in web.xml which is
    configurable through the admin console.
    But I want to avoid this step and specify a relative path within the jar
    file.
    I have tried to use a class which implements the entityresolver as well
    as try to extend the saxparser and set the entity resolver within this
    class explicitly, but I always seem to sun into problems like:
    The setEntityresolver method does not get called or there is a
    classloader problem. i.e. JDOM complains that it cannot load My custom
    parser which is part of the application
    Vijay

    Please contact the main BEA Support team [email protected]
    They will need to check with product support to determine
    the interoperatablity of Weblogic Server with these other
    products.

  • Unable to find XML document from class path resource

    Hi,
    I am trying to learn spring and wrote my first class today. I added all the jar files to the lib folder and created all the classes. When I try to run the client program I get
    [INFO] XmlBeanDefinitionReader - Loading XML bean definitions from class path resource [MorningGreeting.xml]
    org.springframework.beans.factory.BeanDefinitionStoreException: IOException parsing XML document from class path resource [MorningGreeting.xml]; nested exception is java.io.FileNotFoundException: class path resource [MorningGreeting.xml] cannot be opened because it does not exist
         at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions(XmlBeanDefinitionReader.java:180)
         at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions(XmlBeanDefinitionReader.java:148)
         at org.springframework.beans.factory.xml.XmlBeanFactory.<init>(XmlBeanFactory.java:73)
         at org.springframework.beans.factory.xml.XmlBeanFactory.<init>(XmlBeanFactory.java:61)
         at com.training.spring.greetCustomers.EnterTraining.main(EnterTraining.java:22)
    Exception in thread "main"
    I have my client, interface, XML file all in the same package com.training.spring.greetCustomers. I could not understand what I am doing wrong?? Can you please help me.

    congratulations on deciding to learn spring. that's a smart thing to do.
    stop assuming that you did it correctly. the xml file is not in the classpath. when you get it there correctly, spring will find it.
    you have the source files and xml in that directory, but where do the .class files end up when you run them? does the xml config end up there, too?
    remember, the xml config should be in the directory where the root of the package hierarchy begins, not down where the .class files are.
    %

  • Extract XML from an XML File

    Hi All,
    I have an xml file from which data has to be extracted and inserted into table. XML file looks like this..
    <?xml version="1.0" encoding="UTF-8" standalone="no"?>
    <!DOCTYPE labels SYSTEM "label.dtd">
    <labels FORMAT="Harvest Label for Lot Project" QUANTITY="1" PRINTERNAME="PFP3400E006" JOBNAME="JA272017">
    <label>
    <variable name= "ITEM">PM191_JTEST</variable>
    <variable name= "ITEM_DESC">6 Pack Blue Assembled 2004 JTEST</variable>
    <variable name= " LOT ">ja28-10</variable>
    <variable name= "QUANTITY">1</variable>
    </label>
    </labels>
    In the above xml, if i remove <!DOCTYPE labels SYSTEM "label.dtd"> and use the below query, I am able to get the details.
    SELECT EXTRACTVALUE(VALUE(x), 'labels/@_FORMAT') format
    ,EXTRACTVALUE(VALUE(x), 'labels/@_QUANTITY') QUANTITY
    ,EXTRACTVALUE(VALUE(x), 'labels/@_PRINTERNAME') PRINTERNAME
    ,EXTRACTVALUE(VALUE(x), 'labels/@_JOBNAME') JOBNAME
    FROM (SELECT XMLTYPE
    ('<?xml version="1.0" encoding="UTF-8" standalone="no"?> <labels FORMAT="Harvest Label for Lot Project" QUANTITY="1" PRINTERNAME="PFP3400E006" JOBNAME="JA272017"> <label> <variable name= "ITEM">PM191_JTEST</variable> <variable name= "ITEM_DESC">6 Pack Blue Assembled 2004 JTEST</variable> <variable name= " LOT ">ja28-10</variable> <variable name= "QUANTITY">1</variable> </label> </labels>' ) xml
    FROM DUAL),
    TABLE(XMLSEQUENCE(EXTRACT(xml, 'labels'))) x
    But <!DOCTYPE labels SYSTEM "label.dtd"> tag is there means then i am getting error as
    Invalid resource handle or path name "/label.dtd"
    Please let me know how we can parse the xml and insert into table. OR how can i remove <!DOCTYPE labels SYSTEM "label.dtd"> tag and process it further.
    Thanks and Regards,
    Mahesh
    Edited by: magu on Sep 2, 2009 3:15 PM
    Edited by: magu on Sep 2, 2009 3:16 PM

    I don't understand why the DOCTYPE is in the XML, but it appears that Oracle is trying to resolve label.dtd to a registered resource. As you discovered, it may be easier to remove the DOCTYPE from the XML then try to register the label.dtd resource within Oracle. To do this, some options are
    - Use the REPLACE command
    - treat the data as a CLOB and instr/substr to build a new clob without the DOCTYPE tag in it.
    - Use the REGEXP_REPLACE command
    Also, if your DB version supports XMLTable, here is the way to do it with that.
    SELECT *
      FROM XMLTABLE('/labels'
                    PASSING XMLTYPE('<?xml version="1.0" encoding="UTF-8" standalone="no"?>
    <labels _FORMAT="Harvest Label for Lot Project" _QUANTITY="1" _PRINTERNAME="PFP3400E006" _JOBNAME="JA272017">
         <label>
              <variable name="ITEM">PM191_JTEST</variable>
              <variable name="ITEM_DESC">6 Pack Blue Assembled 2004 JTEST</variable>
              <variable name=" LOT ">ja28-10</variable>
              <variable name="QUANTITY">1</variable>
         </label>
    </labels>
                    COLUMNS
                    format    VARCHAR2(15) PATH '@_FORMAT',
                    quantity  VARCHAR2(15) PATH '@_QUANTITY',
                    printername  VARCHAR2(15) PATH '@_PRINTERNAME',
                    jobname  VARCHAR2(15) PATH '@_JOBNAME');

  • [svn:bz-trunk] 21260: Update the qa-frameworks. zip to remove all comments from the base xml when merging config files.

    Revision: 21260
    Revision: 21260
    Author:   [email protected]
    Date:     2011-05-16 07:46:54 -0700 (Mon, 16 May 2011)
    Log Message:
    Update the qa-frameworks.zip to remove all comments from the base xml when merging config files.
    Modified Paths:
        blazeds/trunk/qa/resources/frameworks/qa-frameworks.zip

    Try options=('!makeflags') in PKGBUILD.

  • Open a pdf file from a path with GetFileFromPathAsync

    Hi, I'm trying open docxs and pdfs files from her path on Windows Phone 8.1. I could achieve this with images with the next line:
    await StorageFile.GetFileFromPathAsync(path);
    The problem is that when I try bring other type of files as the docxs or pdfs I have a exception E_ACCESSDENIED. The capabilities of de app are well configured to acces a the files of phone but I don't know because
    El problema es que cuando intento traer otro tipo de archivos como los docx o pdf tengo un problema de E_ACCESSDENIED . Las capacidades de la aplicacion estan bien configuradas para acceder a los archivos pero no entiendo porque no puedo get this others
    files.

    I have addressed a similar issue in this
    forum post. You need to add the File Type Associations for the file types your app needs to access. This is required when accessing files from DocumentsLibrary and RemovableDevices.
    Abdulwahab Suleiman

  • Is there a way to keep Deployment Utility from modifying sequence file paths?

    While the Deployment Utility appears to be a great tool, it does some things that I'd rather it didn't. One is that it modifies all paths in sequence that it is including from Absolute to Relative. While this is a nice feature for many reasons, it is a show-stopper for our uses. This is because as part of our distribution process, we also use a checksum routine to verify that the sequence files being run by the operators on the Test Stations we deploy to are running the correct (unmodified) version of the test software. By using Absolute paths, we can detect and prevent accidental editing/changing of the sequences or paths that we have deployed, but if we have to use relative paths that is something that we could work with also.
    So my questions are: 1. Can this path update 'feature' be disabled? and 2. If not, then will pre-setting all paths in a sequence cause the deployment utility to only copy the file and not update it (thus changing it's checksum)?
    I'm going to test the latter when I have time, and if there are any other suggestions that might be useful, I'm love to hear them.
    Thanks,
    -Jack 

    Rick,
    In my experimentation to see if using relative paths, I was able to prove that a sequence that uses them will not be updated - with one caveat; if the path that is referenced by the sequence is not itself in a sub-directory, i.e.; it's in a different branch of the relative directory structure with respect to the Target (such as the TestStand directory), then the sequence file is always updated and re-saved. An example is that we have a sequence in the Tools directory that calls a DLL in the FrontEnd directory of the Components\User path. This re-saving causes a checksum change and screws up our verification mechanism. 
    It is unfortunate that I cannot prevent the deployment utility from modifying sequence files - Since we control the entire Test environment, including the location that software gets installed to - Test Station custodians can't go installing the software in a different location, or worse, multiple locations, so we don't have the issue to worry about.
    Because of this 'better' method, we now have to re-evaluate how to control the installed version of the software, or use a different installer, such as CVI, which while it has been working for us, has it 's own issues that we're trying to get away from. I'm glad that I am finding out about this now before I've locked down the sequences so that I can probably move the features in the Tools to the Frontend Callback sequence. 
    It's almost always the case thought that one persons forced enhancement is another's 'feature' or worse 'bug'.
    Thanks for confirming the behavior on the Deployment utility for me.
    -Jack

Maybe you are looking for