Using XML as a database ?

could someone provide some resources about using XML as a database?
I would like to create some solutions that temporarily uses XML as a database until the real solution is implemented where there would be some connector technology feeding xml into my system ?
Has anyone here ever had experience using XML as a database ?
stephen

there are pages and pages of controversial blah-blah about what is the best storage... i would say: if you manipulate documents, use an XML DB, if you manipulate data (values, dates) better to use a RDBMS...
david

Similar Messages

  • [Forum FAQ] How do i use xml stored in database as dataset in SQL Server Reporting Services?

    Introduction
    There is a scenario that users want to create SSRS report, the xml used to retrieve data for the report is stored in table of database. Since the data source is not of XML type, when we create data source for the report, we could not select XML as Data Source
    type. Is there a way that we can create a dataset that is based on data of XML type, and retrieve report data from the dataset?
    Solution
    In this article, I will demonstrate how to use xml stored in database as dataset in SSRS reports.
    Supposing the original xml stored in database is like below:
    <Customers>
    <Customer ID="11">
    <FirstName>Bobby</FirstName>
    <LastName>Moore</LastName>
    </Customer>
    <Customer ID="20">
    <FirstName>Crystal</FirstName>
    <LastName>Hu</LastName>
    </Customer>
    </Customers>
    Now we can create an SSRS report and use the data of xml type as dataset by following steps:
    In database, create a stored procedure to retrieve the data for the report in SQL Server Management Studio (SSMS) with the following query:
    CREATE PROCEDURE xml_report
    AS
    DECLARE @xmlDoc XML;  
    SELECT @xmlDoc = xmlVal FROM xmlTbl WHERE id=1;
    SELECT T.c.value('(@ID)','int') AS ID,     
    T.c.value('(FirstName[1])','varchar(99)') AS firstName,     
    T.c.value('(LastName[1])','varchar(99)') AS lastName
    FROM   
    @xmlDoc.nodes('/Customers/Customer') T(c)
    GO
    P.S. This is an example for a given structured XML, to retrieve node values from different structured XMLs, you can reference here.
    Click Start, point to All Programs, point to Microsoft SQL Server, and then click Business Intelligence Development Studio (BIDS) OR SQL Server Data Tools (SSDT). If this is the first time we have opened SQL Server Data Tools, click Business Intelligence
    Settings for the default environment settings.
    On the File menu, point to New, and then click Project.
    In the Project Types list, click Business Intelligence Projects.
    In the Templates list, click Report Server Project.
    In Name, type project name. 
    Click OK to create the project. 
    In Solution Explorer, right-click Reports, point to Add, and click New Item.
    In the Add New Item dialog box, under Templates, click Report.
    In Name, type report name and then click Add.
    In the Report Data pane, right-click Data Sources and click Add Data Source.
    For an embedded data source, verify that Embedded connection is selected. From the Type drop-down list, select a data source type; for example, Microsoft SQL Server or OLE DB. Type the connection string directly or click Edit to open the Connection Properties
    dialog box and select Server name and database name from the drop down list.
    For a shared data source, verify that Use shared data source reference is selected, then select a data source from the drop down list.
    Right-click DataSets and click Add Dataset, type a name for the dataset or accept the default name, then check Use a dataset embedded in my report. Select the name of an existing Data source from drop down list. Set Query type to StoredProcedure, then select
    xml_report from drop down list.
    In the Toolbox, click Table, and then click on the design surface.
    In the Report Data pane, expand the dataset we created above to display the fields.
    Drag the fields from the dataset to the cells of the table.
    Applies to
    Reporting Services 2008
    Reporting Services 2008 R2
    Reporting Services 2012
    Reporting Services 2014
    Please click to vote if the post helps you. This can be beneficial to other community members reading the thread.

    I have near about 30 matrics. so I need a paging. I did every thing as per this post and it really works for me.
    I have total four columns. On one page it should show three and the remaining one will be moved to next page.
    Problem occurs when in my first row i have 3 columns and in next page if I have one columns then it show proper on first page but on second page also it gives me three columns insted of one. the first column data is exactly what I have but in remaining two
    columns it shows some garbage data.
    I have data like below.
    Metric ColumnNo RowNo
    1 1
    1
    2 2
    1
    3 3
    1
    4 1
    2
    so while grouping i have a row parent group on RowNo and Column group on ColumnNo.
    can anyone please advice on this.

  • Using XML file as Database

    Hi all,
    Can we use an XML file as Database? Currently I'm using Microsoft Sql Server 2000 as the beckend. Now I'm creating a small project which does not require much functionality of Sql Server. I want it to run without help of any others software installation.
    I need only insertion and extraction in a simple manner i.e. no much joins or unions and other implications.
    Thanks

    jwenting wrote:
    sure, just define the format, write the engine, write the drivers, etc. etc.
    Far easier to use some lightweight embedded database engine though (but maybe not as much fun).Thanks for reply.
    Pls post link to the page or resource where I can read about that.
    Also, if you have link to the critical comments on this technique, pls post them also.
    Regards
    Aakash Agarwal

  • Any practical help about XML API for databases

    HI friends,
    I have a problem, i want to connect to my Database using JSP but by using XML api for database. I want to MAP my database tables, rows columns as xml elements to make it more flexible. Anyone who had practicaly worked on it, please help me out.
    I am waiting for a quick response.
    Thanks for any help in advance,
    Yours Truly,
    Khawaja Salman Sarfraz

    Some databases have a feature that allows you to output the result of a query as XML. But that's not standard SQL, and it probably varies from one DB to the next. Look up the documentation for your DB for more information.

  • Render Pages within Apex using XML

    Hi All,
    Just wondering whether it is possible within Apex to render pages using XML by where you have a high level item, such as Cloth Size, which would be the Label attached to an underlying table field, and might have the values XL, L, M and S which might be rendered as a radiogroup.
    I guess what I am trying to establish is whether this is actually possible within Apex.
    I guess it might be similar to rendering items dynamically but using XML within the database.
    Hope this makes sense and someone can assist.
    Thanks.
    Tony.

    Hello,
    You need to put more details into what you want.
    Do you want client side rendering or server side rendering.
    Do you want to use CSS or XSLT?
    Do you need to do the entire page or will just a region in the page suffice?
    Past that the answer is yes for most of those but without more detail it will be tough to help you out.
    You might also want to look at different usages of XML and PL/SQL especially using XMLDB and is Oracles XMLType none of which are APEX specific but can all be used in and APEX page.
    Carl

  • How to connect mysql database using xml

    welcome to all,
    here my doubt is how to connect mysql database using xml file, how to integrate xml file and jsp file and how to access data from dabase using jsp file. can any one help me
    regards

    Short answer: you wouldn't do any of those things. The first two are meaningless and the third is a bad practice. I have no idea what those ideas were supposed to achieve so I have no idea what tutorials I should suggest to you.

  • HOW to use xml to transfer data from database?

    Hi,
    Would you please give me some suggestion on how to use xml connect with a table in oracle/MS_access database?
    Thanks a lot
    Zhao

    Have you already had a look at our online documentation here on OTN, or at a book like Building Oracle XML Applications? There are lots of examples in those.
    If you have a specific question about using the API's that's not working for you, we can help out here.

  • When / why use XML to store data instead of database table ?

    Hi All,
    I still not use XML much in applications and don't know much about its utilization.
    I read here and there about storing data as XML instead of into database tables.
    - could any body please tell me when / why use XML to store data instead of database table ?
    e.g : store inventory per warehouse in XML format. ?
    - What is the other cases or reasons of extracting database records into XML or vice versa ?
    - is there any good pdf on this ?
    Thank you for your help,
    xtanto

    It depends entirely what you want to accomplish with the 'XML in the database'. There are basically 3 independent methods: As CLOB, as XMLType views or as native XMLType 'columns'
    Each method has advantages and disadvantages, especially in the performance vs purpose tradeoff.
    The Oracled Press book "Oracle Database 10g XML & SQL Design, Build, & Manage XML Applications in Java, C, C++, & PL/SQL" is highly recommended for anyone interested in Oracle and XML. http://books.mcgraw-hill.com/getbook.php?isbn=0072229527&template=oraclepress

  • Database retrival using xml

    how can I retrieve data from database using xml?
    or else how can i connect to the database thru XML?

    Thanks for the reply !
    Suppose I have my data in SQL database.... So can I retrive that in xml?Well yes with caveats. OK:
    1.) Some very advanced databases allow you to retrieve XML directly from a database row, e.g. They send you an XML representation of the data.
    2.) A far more common way is to extract the data using any standard data access layer into Javabeans or POJO and then use a XML parser or a XSL stylesheet to convert the raw data into the XML format that you want.
    Or else another case is.....
    I'm storing my data in xml files... and after that if i need that same data in java programming , can I
    utilise that xml file??Yes, you can also in theory store the whole XML string and/or file in hte database (not normally recommended if you want a good relational database structure). Again you can then use XML parsing APIs to get data out of that XML stream and convert it to Java objects.
    Karianna
    PS: It sounds like you're attempting this for the first time, good on you! But I sugeest strongly that you take a tutorial or get sometihng like the OReillly Java and XML book. This is a very large topic......
    >

  • Xml data from database using jdbc

    I should get the xml data from database. Is this scenario possible using jdbc adapter ? If possible, how can I get it ?. Plz help me

    I suppose that probably, xml data are stored in a BlobImage Field.
    You can use a Stored Procedure on Database Side, to select and put out the xml data structured in output fields or structures.
    From JDBC Sender channel, you can call the SP, that raise out a Structure formatted like the XML Data stored in Xml Database field.
    In your opinion, this should be a possible way to achieve this issue?

  • Accessing Oracle 7.3 database using XML-RPC

    Hi All
    I am a beginner to XML. I am looking for a solution to access my database oracle 7.3 using XML-RPC. Has anybody already tried to do this. Please! Could anybody help me by giving a tip?
    Thanks.
    Marcelo R. Braga.
    Sao Jose dos Campos - Brazil.

    You should check in 9iAS XML-RPC support in mid-tier

  • Database updation using XML and stored Procedure?

    Hello,
    I want to perform updation in multiple tables using XML files.Please suggest can I do updation using xml and stored procedure.
    If yes then which is more efficient and takes less time.
    1.Updation using xml files only
    2.Updation using xml files with stored procedure.
    3.Stored procedure alone.
    If direct xml and stored procedure communication is possible.then please write how.
    Thanks in advance for any help.

    Here's a sample. The next code drop of the XSQL Servlet will make the easy-to-do from within XSQL Pages:
    package package1;
    import org.w3c.dom.*;
    import java.sql.*;
    import oracle.jdbc.driver.*;
    import oracle.xml.sql.query.OracleXMLQuery;
    public class Class1 extends Object {
    public static void main( String[] arg ) throws Exception {
    Connection conn = getConnection();
    CallableStatement ocs = conn.prepareCall("begin ? := App.HotItems('PAUL'); end;");
    ocs.registerOutParameter(1,OracleTypes.CURSOR);
    ocs.execute();
    ResultSet rs = ((OracleCallableStatement)ocs).getCursor(1);
    OracleXMLQuery oxq = new OracleXMLQuery(conn,rs);
    System.out.println(oxq.getXMLString());
    oxq.close();
    rs.close();
    ocs.close();
    conn.close();
    public static Connection getConnection() throws Exception {
    String username = "scott";
    String password = "tiger";
    String dburl = "jdbc:oracle:thin:@localhost:1521:xml";
    String driverClass = "oracle.jdbc.driver.OracleDriver";
    Driver d = (Driver)Class.forName(driverClass).newInstance();
    return DriverManager.getConnection(dburl,username,password);
    null

  • How Do You Use XML To Create Image Upload On A WebSite?

    Hello,
    Could some one please help me understand how to create web image gallery and web video gallery using XML? I have found few xml codes that could be used to do this but I am not so sure how to use them. I want my clients to be able upload images and videos with linking thumbnails to Image and or Videos. Do you think the codes I included in this question will help me achive this goal? And do I need to put all in one and in the same directory so it will work? Please help with your idea and tell me how you would use these codes and how you may step-by-step implement the idea your self to your own web site.
    I have also included the instruction I found on the web with the codes.
    Starting with You Tube, API on their video gallery, here are the codes I found,
    Assume you are to use the YouTube, XML code; What will you change here so it will work on your own www.domain.com?
    <% Dim xml, xhr, ns, YouTubeID, TrimmedID, GetJpeg, GetJpeg2, GetJpeg3, thumbnailUrl, xmlList, nodeList, TrimmedThumbnailUrl Set xml = Server.CreateObject("MSXML2.FreeThreadedDOMDocument")
    xml.async = False
    xml.setProperty "ServerHTTPRequest", True
    xml.Load("http://gdata.youtube.com/feeds/api/users/Shuggy23/favorites?orderby=updated") If xml.parseError.errorCode <> 0 Then
        Response.Write xml.parseError.reason End If Set xmlList = xml.getElementsByTagName("entry") Set nodeList = xml.SelectNodes("//media:thumbnail") For Each xmlItem In xmlList
        YouTubeID = xmlItem.getElementsByTagName("id")(0).Text
        TrimmedID = Replace(YouTubeID, "http://gdata.youtube.com/feeds/api/videos/", "")
        For Each xmlItem2 In nodeList
            thumbnailUrl = xmlItem2.getAttribute("url")
            Response.Write thumbnailUrl & "<br />"
        Next     Next    
    %>
    For the image gallery, the following are the codes I found with your experience do I need to use the entire codes or just some of them that I should use?
    CODE #01Converting Database queries to XML
    Using XML as data sources presumes the existence of XML. Often, it is easier to have the server create the XML from a database on the fly. Below are some scripts for common server models that do such a thing.
    These are starting points. They will need to be customized for your particular scenario.
    All these scripts will export the data from a database table with this structure:
    ID: integer, primary key, autoincrement
    AlbumName: text(255)
    ImagePath: text(255)
    ImageDescription: text(2000)
    UploadDate: datetime
    The output of the manual scripts will look like:
    <?xml version="1.0" encoding="utf-8" ?>
      <images>
         <image>
              <ID>1</ID>
              <album><![CDATA[ Family ]]></album>
              <path><![CDATA[ /family/us.jpg ]]></path>
              <description><![CDATA[ here goes the description ]]></description>
              <date><![CDATA[ 2006-11-20 10:20:00 ]]></date>
         </image>
         <image>
              <ID>2</ID>
              <album><![CDATA[ Work ]]></album>
              <path><![CDATA[ /work/coleagues.jpg ]]></path>
              <description><![CDATA[ here goes the description ]]></description>
              <date><![CDATA[ 2006-11-21 12:34:00 ]]></date>
         </image>
      </images>
    These are all wrapped in CDATA because it is will work with all data types. They can be removed if you know you don't want them.
    Note: If using the column auto-generating versions, ensure that all the column types are text. Some databases have data type options like 'binary', that can't be converted to text. This will cause the script to fail.
    CODE #02ASP Manual: This version loops over a query. Edit the Query and XML node names to match your needs.
    <%@LANGUAGE="VBSCRIPT" CODEPAGE="65001"%>
    <%
    Dim MM_conn_STRING
    MM_conn_STRING = "dsn=image_gallery;uid=xxxx;pwd=xxxx"
    %>
    <%
    Dim rsImages
    Dim rsImages_cmd
    Dim rsImages_numRows
    ' Query the database and get all the records from the Images table
    Set rsImages_cmd = Server.CreateObject ("ADODB.Command")
    rsImages_cmd.ActiveConnection = MM_conn_STRING
    rsImages_cmd.CommandText = "SELECT ID, AlbumName, ImagePath, ImageDescription, UploadDate FROM images"
    rsImages_cmd.Prepared = true
    Set rsImages = rsImages_cmd.Execute
    ' Send the headers
    Response.ContentType = "text/xml"
    Response.AddHeader "Pragma", "public"
    Response.AddHeader "Cache-control", "private"
    Response.AddHeader "Expires", "-1"
    %><?xml version="1.0" encoding="utf-8"?>
    <images>
      <% While (NOT rsImages.EOF) %>
         <image>
              <ID><%=(rsImages.Fields.Item("ID").Value)%></ID>
              <album><![CDATA[<%=(rsImages.Fields.Item("AlbumName").Value)%>]]></album>
              <path><![CDATA[<%=(rsImages.Fields.Item("ImagePath").Value)%>]]></path>
              <description><![CDATA[<%=(rsImages.Fields.Item("ImageDescription").Value)%>]]></description>
              <date><![CDATA[<%=(rsImages.Fields.Item("UploadDate").Value)%>]]></date>
         </image>
        <%
           rsImages.MoveNext()
         Wend
    %>
    </images>
    <%
    rsImages.Close()
    Set rsImages = Nothing
    %>
    CODE #03
    Automatic: This version evaluates the query and automatically builds the nodes from the column names.
    <%@LANGUAGE="VBSCRIPT" CODEPAGE="65001"%>
    <%
    Dim MM_conn_STRING
    MM_conn_STRING = "dsn=image_gallery;uid=xxxx;pwd=xxxx"
    %>
    <%
    Dim rsAll
    Dim rsAll_cmd
    Dim rsAll_numRows
    ' Query the database and get all the records from the Images table
    Set rsAll_cmd = Server.CreateObject ("ADODB.Command")
    rsAll_cmd.ActiveConnection = MM_conn_STRING
    rsAll_cmd.CommandText = "SELECT * FROM Images"
    rsAll_cmd.Prepared = true
    Set rsAll = rsAll_cmd.Execute
    ' Send the headers
    Response.ContentType = "text/xml"
    Response.AddHeader "Pragma", "public"
    Response.AddHeader "Cache-control", "private"
    Response.AddHeader "Expires", "-1"
    %><?xml version="1.0" encoding="utf-8"?>
    <root>
      <% While (NOT rsAll.EOF) %>
         <row>
             <%
                 For each field in rsAll.Fields
                 column = field.name
             %>
              <<%=column%>><![CDATA[<%=(rsAll.Fields.Item(column).Value)%>]]></<%=column%>>
              <%
                 Next
              %>
         </row>
        <%
           rsAll.MoveNext()
         Wend
    %>
    </root>
    <%
    rsAll.Close()
    Set rsAll = Nothing
    %>

    OK, I understand - thanks for that.
    I thought the whole process was supposed to be a bit more seemless? Having to upload/download documents and manually keep them in sync will leave a lot of room for errors.
    It's kinda painful the way iOS doesn't have folders. It makes things incompatible with the Mac and means you can't group files from multiple apps into a single project - who organises their digital life by the apps they use?
    I think I'll recommend they use their iPad only.
    Thanks for that.
    Cheers
    Ben

  • Crystal Report generation using XML

    I have some reports that were created using XML and as I recall when I created them using CR v. 9 I used a connections called ADO (Xml) or something like that. On one of my machines I have CR XI and the only option available is XML and when I add a field from this connection it inserts: "{NewDataSet\TableName.FieldName}" however, previously when I used the ADO XML connections it only inserted {TableName.FieldName}. In the version 9 CR i was using the professsional version and in the version 11 CR it is still the professional version but I can't seem to create an XML connector that doesn't prefix the table/field with "NewDataSet". My request is two fold, first, can you please direct me to some articles that I can read to better understand how to generate  CR from XML? My project is to generate the XML and then set the xml during runtime into the report using SetDataSource and then display the report using the CR viewing that I package and redist with my app. Secondly, why does the ADO XML connector not available in CR XI professional version and is there any way to get the CR v. 9 behaviour back?
    Thanks,
    Marcus

    Hi, Markus
    If you are planning to run reports from a .NET application, you need to have the Developer edition, not the professional.
    The ADO.NET Driver is not installed by default. Go into Control Panel - Add / Remove programs, and chose Crystal Reports, and change. You can expand the Database drivers, and you should see the ADO.NET driver there. Note: you need to have the .NET framework installed for this to work.
    Regards,
    Jonathan

  • Report VS Excel output using XML Publisher tool (DBMS_XMLGEN)

    Hi All,
    Currently I am working on report generation in MRP module with Excel output using XML Publisher tool.
    XML tool works based on query.
    I have developed PLSQL block by using DBMS_XMLGEN – database package, to generate XML output of query.
    My question is how we can put generated xml on above PLSQL block into OUT file (APPS).
    Because DBMS_OUTPUT.PUT_LINE( ) has limitation, it allow 255 character string only.
    But I do not know, Is FND_FILE.PUT_LINE (FND_FILE.OUTPUT,’’) allow for large data?
    If it does not allow what will be the other solution in oracle application to resolve above problem.
    Let me know any queries regarding to this problem.
    Thanks and Regards,
    Sai Krishna @cavaya.com

    Hi Prakash,
    Thanks for the reply. We did apply the one-off patch and got rid of the problem of not viewing 'Excel' output using XMLP.
    Now we are looking at a different perspective:
    Basically our client is looking for the following:
    1. Mathematical functions in the resulting XLS (like SUM, AVG etc..) ouput
    2. Use of macros if possible.
    And to do this i am looking out for a sample template that gives me output in excel format I have a TAR with Oracle for this purpose, but the TAR has so far been unsuccessful in providing us with any material in the direction.
    Our client remembers seeing this as a demo at the Oracle Conference this yr at San Fransisco, but does not have a sample to provide us. We are looking for such a sample.
    Thx,
    Nitin

Maybe you are looking for