Extracting XML information

Is there a way I can extract information from an XML file and create a list or a tab-delimited file?

Here's Java's API for XML:
http://java.sun.com/xml/index.html
All you'd need to do is use their parser on the XML document, then write it out in whatever format you want.

Similar Messages

  • Extracting XML Data to a flat file

    I have an application which is puting an XML string into a field in the database... now my problem is that I have to extract that information and put it in either 1. a flat file, or 2. a seperate table containing a column for each XML attribute... Does anyone know of the best way to approach either solution?
    cheers.

    And your Oracle version is?
    There are many different ways to put something into a file. How about UTL_FILE?http://www.psoug.org/reference/utl_file.html
    How to get it out of the table in the first place?
    I usually try a SELECT statement. They seem to work.
    PS: Databases don't have fields ... table's don't either. Check your verbiage.
    Try looking of the word "FIELD" in the Oracle docs. Then try "COLUMN."

  • Re-Using XML file from decode barcode + extract xml process

    I was hoping someone could put me in the right direction here. I am decodeing the information stored in a 2D Bar code and sending this information to an XML file, then I am trying to combine that xml file with a blank PDF template but the process is failing beacuse there are some additional tag fields the XML data from the  Decode->Extract XML process.
    The XML file from the decode process gives the structure below..notice therer some extra tags (lines 2- 4)
    <?xml version="1.0" encoding="UTF-8"?>
    <xdp:xdp xmlns:xdp="http://ns.adobe.com/xdp/" xmlns:xfa="http://www.xfa.org/schema/xfa-data/1.0/">
    <xfa:datasets>
    <xfa:data>
    <form1>
    The XML structure that is expected by the PDF template is as follows
    <?xml version="1.0" encoding="UTF-8"?>
    <form1>
    So the xml output of the Decode barcode + Extract XML process has three extra lines of tag. Is there a way I could use a process within liveCycle to clean out those three lines in real-time before sending the xml to be recombined with the PDF template.
    Thanks

    Hi,
    What you may do is to use the SetValue and its xpath builder functions to "serialize" the xml into string, "substring" to remove the extra tags, and "concat" to add the extra tags and then "deserialize" it again to an xml to be merged with your form.
    Greetings,
    Yasser

  • Extracting XML for PDF

    Hi,
    I was wondering if anyone could possibly help me, I need to be able to extract specific information from PDFs in the XML markup language. I was wondering how I would go about doing such a thing, I was thinking of constructing an algorithm which would automatically identify and output the specific information in XML. So what I am saying is, is there an easier way to achieve my goal without needing to code or is an algorithm the right way to go? So if using an algorithm is the best way then could someone please explain how I would start it off and I would take over once I've grasped the concept.
    Thanks in advance for any advice given and sorry if I haven't described myself properly and would like to apologize in advance if I have posted this in the wrong forum section.
    Frazer.

    This is, less basic, and more conceptually impossible.
    All that exists in the PDF is a collection of characters (letters) with positions on the page. It is possible to arrange these into words and lines.
    To get more meaning requires detailed analysis of the words. Unless all your invoices are from the same organisation with exactly the same layout, this seems a manual process. You can start with extracting the text.

  • Sales order does not extract plant information from material master data

    Hi experts,
    I have created a sales order. However, the plant in the shipping tab can only be manually entered.
    I have made the check:
    the customer material master data does not have the plant info.
    the customer master data does not have it either.
    It is defined in the material master data: sales:general/plant
    But the sales order did not extract this information. Why does this happen?
    Thank you in advance.
    Best regards,
    Fan

    Hello Friend,
    As right stated by you,
    The Plant will be copied from the master data to the sales order, if not it should be manually entered
    The Sequence System will search for the Plant is as follow..
    1. Customer material infor record, If it was not maintained then it will search in
    2. Customer master, if the entre was not maintained in the SHIPPING TAB
    3. Finally it will search in the Material master in the Sales organisation data 1 in the field DELVERING PLANT field.
    So please search whether the entry was maintained in that field at the sales:sales organisation data 1.
    This might be the issue.
    Please revert if you want further details
    regards,
    santosh

  • 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');

  • Delete xml information / reference without losing structure

    Hello,
    I'm currently working on a project that builds catalogs.
    The catalogs consist of several different, linked INDD-files.
    Now, those INDD-files are filled up with XML data and saved.
    When we import them, we always get errors that there is a link missing to the xml. Now, once the indd is filled up, we do not need the xml reference anymore.
    I've checked the links-page in indesign, to see if there is a reference to the xml but there is none...
    How can I delete all the xml information from a indesign file without loosing the references to a text box or it's structure..
    Thanks
    Regards
    Mario

    If you cannot remember the passcode for the Screen Lock, you will need to Restore the device...
    1)  Connect to iTunes on the computer you usually Sync with and Restore...
    http://support.apple.com/kb/HT1414
    2)  If necessary Place the Device into Recovery mode...
    http://support.apple.com/kb/HT1808

  • Extracting pointer information and displaying it as an image

    Hey,
    I am using Intel's OpenCV image processing library in LabVIEW.
    There's a pointer to a struct IplImage that is passed around in order to run image processing functions.
    The struct IplImage is defined as: 
    typedef struct _IplImage
    int nSize; /* sizeof(IplImage) */
    int ID; /* version (=0)*/
    int nChannels; /* Most of OpenCV functions support 1,2,3 or 4 channels */
    int alphaChannel; /* ignored by OpenCV */
    int depth; /* pixel depth in bits: IPL_DEPTH_8U, IPL_DEPTH_8S, IPL_DEPTH_16U,
    IPL_DEPTH_16S, IPL_DEPTH_32S, IPL_DEPTH_32F and IPL_DEPTH_64F are supported */
    char colorModel[4]; /* ignored by OpenCV */
    char channelSeq[4]; /* ditto */
    int dataOrder; /* 0 - interleaved color channels, 1 - separate color channels.
    cvCreateImage can only create interleaved images */
    int origin; /* 0 - top-left origin,
    1 - bottom-left origin (Windows bitmaps style) */
    int align; /* Alignment of image rows (4 or 8).
    OpenCV ignores it and uses widthStep instead */
    int width; /* image width in pixels */
    int height; /* image height in pixels */
    struct _IplROI *roi;/* image ROI. when it is not NULL, this specifies image region to process */
    struct _IplImage *maskROI; /* must be NULL in OpenCV */
    void *imageId; /* ditto */
    struct _IplTileInfo *tileInfo; /* ditto */
    int imageSize; /* image data size in bytes
    (=image->height*image->widthStep
    in case of interleaved data)*/
    char *imageData; /* pointer to aligned image data */
    int widthStep; /* size of aligned image row in bytes */
    int BorderMode[4]; /* border completion mode, ignored by OpenCV */
    int BorderConst[4]; /* ditto */
    char *imageDataOrigin; /* pointer to a very origin of image data
    (not necessarily aligned) -
    it is needed for correct image deallocation */
    IplImage;
    I am having problems with closing OpenCV's GUI window when called from LabVIEW in Linux. A solution to this may be to not use OpenCV's GUI window in LabVIEW for Linux, but rather pass back the pointer to the processed image in LabVIEW. From that pointer, we can send it to a C wrapper to extract some information that we want from the struct in order and pass back those values to LabVIEW. Then LabVIEW will process those values and display the image. What will I need to extract from the pointer (via a C wrapper) in order to display the image onto LabVIEW?
    I attached a LabVIEW example that I found. This example loads and displays an image. I am thinking of doing something similar to that. Instead of loading an image from the file dialog, I will pass all of the necessary information to Draw Flattened Pixmap.
    Attachments:
    Picture4.vi ‏56 KB

    My description of my problems with interfacing OpenCV with LabVIEW is contained in this discussion
    Basically, the code works in C in Linux, C in Windows, LabVIEW for Windows, but not in LabVIEW for Linux.
    We finally were able to get OpenCV to interface with LabVIEW for Linux by doing some complex edition to make install. However, LabVIEW was still having trouble with the function to close all HighGUI windows. Even though it went through the function, it will not close the HighGUI window. Also the HighGUI window freezes and when it eventually closes, it crashes LabVIEW.
    When I test it by writing C programs, the function does what it is supposed to do.

  • How to use NI CAN feature for extracting DBC information without a CAN Interface?

    Hi,
    I'm looking for some tricks in order to extract DBC Information using the NI CAN without a CAN interface...
    Basically I have some DBC files and I would to analyze them to get hierarchy Messages and Channels (and their related information, offset, scale, etc.).
    http://www.ni.com/white-paper/4294/en/
    The function CAN Get Names is usefull and allow me depending on the mode to get a list of the Channels and Messages described in the DBC file. However, I'm encountering one major issue and none of the least, I cannot use the function the CAN Get Property... As it required a connector based on Task that I cannot provide since I dont have any real and physical CAN interface, for now. Therefore I cannot have any information about the channels neither about the messages...
    Does anybody can give me a hand to fix that matter?
    Solved!
    Go to Solution.

    Nelval wrote:
    It seems that no matter the virtual port I am using, it does not work. Could you have a look at my sample.vi, I know it's poorly wired, especially since I'm more in .NET things than NI from my occupation ^^'. I also provided a dummy DBC file to simulate a very basic input.
    And by the way is there any way then to get the Byte Array / Bit Array corresponding to a certain message (and how to set the signal values required to get the message)?
    Your code isn't that bad, relativly easy to follow.  In any case the problem had nothing to do with the CAN port being used.  If you would probe the error wires around you would see that coming out of the CAN Init Start stated that the channel name didn't exist.  Looking at how you had it wired you took the messages (or frames) and put them into the channels terminal, when I assume you wanted the channels.  Then looking at your tree you were again trying to get the ID of a channel, but giving it the message name.  I also added reading the Start Bit, Number of Bits, and Byte Order for all the channels read.
    If you were to do this with XNET there would be completelly different functions, but the same operations can be done.
    Unofficial Forum Rules and Guidelines - Hooovahh - LabVIEW Overlord
    If 10 out of 10 experts in any field say something is bad, you should probably take their opinion seriously.
    Attachments:
    DBC Extraction Hooovahh Edit.vi ‏29 KB

  • Extracting package information from SSIS

    Hi all,
    I am supposed to maintain a bunch of excels documenting all the mappings I'm doing in SSIS.  The excels have the following format:
    Target Field | Target Type | Source Table | Source Field | Source Type | Transformation Rule
    Apart from being incredibly tedious, it is hard to keep every excel current, as there are other people adding and taking information from the database model.
    I plan to extract this information from SSIS and create the excels dinamically, but, apart from parsing the .dtsx for each package, I see no other way of getting what I need.
    Any suggestions on how I should do this? Is there an easier way?
    Cheers,
    David Leal

    The SSIS object model provides access to all aspects of the package, you can use it from both managed and unmanaged code. Also, take a look as SQL BI Metadata Samples that has similar goal of documenting the package, you may find some of its code useful for your project.

  • Need help for extract XML fron PDF

    I am a newbee for javascript developer and i don know about Acrobat my requirement is Extract XML from PDF document there is any possiblities to do this from acrobat professional if is it possible please guide me to do this thank you

    i have a separate DTD for my own XML i want to extract my PDF files to that
    XML is it possible may i know how the acrobat export as xml feature works

  • Extracting xml content in a XMLTYPE VIEW

    Experts:
    I need to create an xmltype view based on the following xml content.
    <?xml version="1.0" encoding="UTF-8" standalone="no" ?>
    <EMPLOYEES CREATED="2013-02-06T12:33:00" xsi:noNamespaceSchemaLocation="http://supporthtml.oracle.com/TEST_SCHEMA.xsd" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
    <EMPLOYEE_TRANS MODE="A" emp_id="1">
      <emp_nm>SCOTT</emp_nm>
      <emp_dept>FN</emp_dept>
      <mgr>DON</mgr>
      <sal>4000</sal>
      <updt_ts>2013-02-06T12:28:00</updt_ts>
      </EMPLOYEE_TRANS>
    <EMPLOYEE_TRANS MODE="A" emp_id="2">
      <emp_nm>KEVIN</emp_nm>
      <emp_dept>HR</emp_dept>
      <mgr>MIKE</mgr>
      <sal>3000</sal>
      <updt_ts>2013-02-06T12:29:00</updt_ts>
      </EMPLOYEE_TRANS>
    </EMPLOYEES>I want to run a select statement againt this view which can give me column data in this format.
    This xml is already stored in an Oracle XMLTYPE Object Relation table which conforms to a registered xsd schema document.
    select CREATED, MODE, EMP_ID, emp_nm, emp_dept, mgr, sal, updt_ts from employees_view.
    Result:
    2013-02-06T12:33:00 A 1 SCOTT FN DON  4000 2013-02-06T12:28:00
    2013-02-06T12:33:00 A 2 KEVIN HR MIKE 3000 2013-02-06T12:29:00How can I achieve this? I tried by getting various errors. I would appreciate if someone can send me a sample
    11.2.0.3
    Linux
    XMLDBThanks
    Kevin
    Edited by: Kevin_K on Feb 6, 2013 9:54 AM
    Edited by: Kevin_K on Feb 6, 2013 9:55 AM

    I guess the above makes a regular relational view? correct?Yes.
    How can I extract the of CREATED attribute from the top most employees element and attributes "MODE" and "emp_id" from EMPLOYEE_TRANS element ? You have to use a two-level approach :
    SQL> select x1.created, x2.*
      2  from EMPLOYEES_OR_TABLE t
      3     , xmltable('/EMPLOYEES'
      4         passing t.object_value
      5         columns created timestamp path '@CREATED'
      6               , emps    xmltype   path 'EMPLOYEE_TRANS'
      7       ) x1
      8     , xmltable('/EMPLOYEE_TRANS'
      9         passing x1.emps
    10         columns emp_mode varchar2(1)  path '@MODE'
    11               , emp_id   number       path '@emp_id'
    12               , emp_nm   varchar2(30) path 'emp_nm'
    13               , updt_ts  timestamp    path 'updt_ts'
    14       ) x2 ;
    CREATED                     EMP_MODE     EMP_ID EMP_NM                         UPDT_TS
    06/02/13 12:33:00,000000    A                 1 SCOTT                          06/02/13 12:28:00,000000
    06/02/13 12:33:00,000000    A                 2 KEVIN                          06/02/13 12:29:00,000000
    The first XMLTable x1 extracts top-level information, then passes the collection of EMPLOYEE_TRANS elements to a second XMLTable that breaks each item in separate rows and columns.
    It's also possible to use a single XMLTable, but with a little more complex XQuery expression.

  • How can I extract structure information from registered XSDs ?

    Hello,
    I am trying to extract hierarchy and type information from registered XML schemas which include other XML Schemas, in a single SQL query.
    In essence I would love to be able to write a query of the form
    SELECT *
      FROM XMLTABLE('//xs:element'
                    PASSING <the root schema object goes here>
                    COLUMNS   ELEM_NAME       VARCHAR2(63) PATH '@name'
                            , ELEM_REF        VARCHAR2(62) PATH '@ref'
                            , ELEM_TYPE       VARCHAR2(63) PATH '@type'
                            , MIN_OCCUR       VARCHAR2(15) PATH '@minOccurs'
                            , MAX_OCCUR       VARCHAR2(15) PATH '@maxOccurs'
                            , ANNOTATIONS     SYS.XMLTYPE  PATH 'xs:annotation'
                            , FXD_LENGTH      VARCHAR2(10) PATH '/xs:length/@value'
                            , MAX_LENGTH      VARCHAR2(10) PATH '/xs:maxLength/@value'
                            , MIN_INCLUSIVE   VARCHAR2(10) PATH '/xs:minInclusive/@value'
                            , MAX_INCLUSIVE   VARCHAR2(10) PATH '/xs:maxInclusive/@value'
                            , MIN_EXCLUSIVE   VARCHAR2(10) PATH '/xs:minExclusive/@value'
                            , MAX_EXCLUSIVE   VARCHAR2(10) PATH '/xs:minExclusive/@value'
                            , TOTAL_DIGITS    VARCHAR2(10) PATH '/xs:totalDigits/@value'
                            , FRACTION_DIGITS VARCHAR2(10) PATH '/xs:fractionDigits/@value'
                   )together with an indicator if each element is a leaf or not as well as its level and position information, by suitably expanding the appropriate type information from the (possibly) included XML Schemas (via schemaLocation).
    Does anybody know if there is a way to do this ?
    I will provide my sample XSD files if needs be ...
    Best Regards
    Filippos

    Have a look at the xdbutilities.zip packages... Probably all the info needed can be found in the code used there:
    http://www.oracle.com/technology/tech/xml/xmldb/Current/xdbutilities.zip

  • How to extract xml tag name contains dashes

     
    Hi, How to parse XML file to extract root tag contains dashes in Flex,for example
    XML Input is: <regular-body>Text of my post...</regular-body>
    expected output is : regular-body
    I appreciate any of your suggestions or inputs

    Do you want to get the name of the XML ELEMENT regular-body, or the value in the XML file "Text of my post...".
    If its the latter, then you could use the bracket/quote notation for extracting the value, like in the following example:
    image = xmlWeather[0]..parameters["conditions-icon"]["icon-link"][idx]
    I use this when parsing weather information from a 3rd party in which their XML is loaded with dashes.
    If you are looking to get the actual element name, not sure how to do that.  I would think that if you are using an XML file, you would have at least the high level element known.

  • Extracting Certificate Information

    I'm running a servlet that is only accesible via SSL using Client Certificates. The servlet needs to extract the user information from the certificate and use it to identify the user and pass it to the backend system. Has anyone done this before and can you provide some info on how to do it

    Here's Java's API for XML:
    http://java.sun.com/xml/index.html
    All you'd need to do is use their parser on the XML document, then write it out in whatever format you want.

Maybe you are looking for

  • ABAP Stack : Subroutines

    Hi Everyone, I was wondering how can you access the local variable of a subroutine using ABAP Stack. E.g. REPORT A. PERFORM B. FORM B data : var2 CALL FUNCTION C ENDFORM FUNCTION C. <access var2 here> ENDFUNCTION. I only know that you can usually acc

  • NetBeans and J2sdk1.4.2 installation problem

    Hello, I downloaded the "j2sdk-1_4_2_07-nb-4_0-bin-win.exe" and did installation. The installation got completed with a message saying that the installation was over with errors. Then when i execute the Netbeans, it gives an error message "Cannot fin

  • Msg No FS201 Taxcode for Country IN has been deleted or incorrectly changed

    Hello Friends, When I'm trying to clear the customer line items from billing, system is giving message as "Msg No FS201 Taxcode for Country IN has been deleted or incorrectly changed". Please advise to solve this. Regards Rajesh A

  • Complex views can be updatable?

    I am having one complex view i need to update at run time for that view dipendent table. how can It possible

  • Authorisation on 0ORGUNIT Hierarchy

    Hi Everyone, I have a requirement wherein I need to assign authorisation to each employee as per his/her ORGUNIT. We have a hierarchy on ORGUNIT and the authorisation should be such that the employee should be able to see the data from his ORGUNIT an