Creating rules using XML
I don't know whether the question I'm posting is relevant in this forum
My question is
1.has anybody dealt with RUles Engine, I looked up at on goole few XML rules engine didn't get a good enough idea .
2. If yes, what does it mean ? what are the applications it can be used for.
3. How to create a simple rule and then write a simple XQuery to serve as an implementation for the rule.
thanks
Dear nu2gui,
There is a great rules engine as part of the ABRC Suite product that uses XML Business Rules. Run their demo all the way thru including clicking the "Rule Detail" button. Study the approximately 30 pages of detail to reveal the structure of their XML rules.
The link is: http://www.abrcsuite.com
Fill out the Contact Us form and get all your questions answered.
Similar Messages
-
File is corrupted error while creating excel using xml
Hi have created one excel file using XML code and sent it to mail as attachement. But when i open it, it displays error message - file is corrupted and cannot be opened.
below is my code - please review and tell what is wrong in it ASAP :
* Creating a ixml Factory
l_ixml = cl_ixml=>create( ).
* Creating the DOM Object Model
l_document = l_ixml->create_document( ).
* Create Root Node 'Workbook'
l_element_root = l_document->create_simple_element( name = 'Workbook' parent = l_document ).
l_element_root->set_attribute( name = 'xmlns' value = 'urn:schemas-microsoft-com:office:spreadsheet' ).
ns_attribute = l_document->create_namespace_decl( name = 'ss' prefix = 'xmlns' uri = 'urn:schemas-microsoft-com:office:spreadsheet' ).
l_element_root->set_attribute_node( ns_attribute ).
ns_attribute = l_document->create_namespace_decl( name = 'x' prefix = 'xmlns' uri = 'urn:schemas-microsoft-com:office:excel' ).
l_element_root->set_attribute_node( ns_attribute ).
* Create node for document properties.
r_element_properties = l_document->create_simple_element( name = 'TEST_REPORT' parent = l_element_root ).
l_value = sy-uname.
l_document->create_simple_element( name = 'Author' value = l_value parent = r_element_properties ).
* Styles
r_styles = l_document->create_simple_element( name = 'Styles' parent = l_element_root ).
* Style for Header
r_style = l_document->create_simple_element( name = 'Style' parent = r_styles ).
r_style->set_attribute_ns( name = 'ID' prefix = 'ss' value = 'Header' ).
r_format = l_document->create_simple_element( name = 'Font' parent = r_style ).
r_format->set_attribute_ns( name = 'Bold' prefix = 'ss' value = '1' ).
r_format = l_document->create_simple_element( name = 'Interior' parent = r_style ).
r_format->set_attribute_ns( name = 'Color' prefix = 'ss' value = '#92D050' ).
r_format->set_attribute_ns( name = 'Pattern' prefix = 'ss' value = 'Solid' ).
r_format = l_document->create_simple_element( name = 'Alignment' parent = r_style ).
r_format->set_attribute_ns( name = 'Vertical' prefix = 'ss' value = 'Center' ).
r_format->set_attribute_ns( name = 'WrapText' prefix = 'ss' value = '1' ).
r_border = l_document->create_simple_element( name = 'Borders' parent = r_style ).
r_format = l_document->create_simple_element( name = 'Border' parent = r_border ).
r_format->set_attribute_ns( name = 'Position' prefix = 'ss' value = 'Bottom' ).
r_format->set_attribute_ns( name = 'LineStyle' prefix = 'ss' value = 'Continuous' ).
r_format->set_attribute_ns( name = 'Weight' prefix = 'ss' value = '1' ).
r_format = l_document->create_simple_element( name = 'Border' parent = r_border ).
r_format->set_attribute_ns( name = 'Position' prefix = 'ss' value = 'Left' ).
r_format->set_attribute_ns( name = 'LineStyle' prefix = 'ss' value = 'Continuous' ).
r_format->set_attribute_ns( name = 'Weight' prefix = 'ss' value = '1' ).
r_format = l_document->create_simple_element( name = 'Border' parent = r_border ).
r_format->set_attribute_ns( name = 'Position' prefix = 'ss' value = 'Top' ).
r_format->set_attribute_ns( name = 'LineStyle' prefix = 'ss' value = 'Continuous' ).
r_format->set_attribute_ns( name = 'Weight' prefix = 'ss' value = '1' ).
r_format = l_document->create_simple_element( name = 'Border' parent = r_border ).
r_format->set_attribute_ns( name = 'Position' prefix = 'ss' value = 'Right' ).
r_format->set_attribute_ns( name = 'LineStyle' prefix = 'ss' value = 'Continuous' ).
r_format->set_attribute_ns( name = 'Weight' prefix = 'ss' value = '1' ).
* Style for Data
r_style1 = l_document->create_simple_element( name = 'Style' parent = r_styles ).
r_style1->set_attribute_ns( name = 'ID' prefix = 'ss' value = 'Data' ).
r_border = l_document->create_simple_element( name = 'Borders' parent = r_style1 ).
r_format = l_document->create_simple_element( name = 'Border' parent = r_border ).
r_format->set_attribute_ns( name = 'Position' prefix = 'ss' value = 'Bottom' ).
r_format->set_attribute_ns( name = 'LineStyle' prefix = 'ss' value = 'Continuous' ).
r_format->set_attribute_ns( name = 'Weight' prefix = 'ss' value = '1' ).
r_format = l_document->create_simple_element( name = 'Border' parent = r_border ).
r_format->set_attribute_ns( name = 'Position' prefix = 'ss' value = 'Left' ).
r_format->set_attribute_ns( name = 'LineStyle' prefix = 'ss' value = 'Continuous' ).
r_format->set_attribute_ns( name = 'Weight' prefix = 'ss' value = '1' ).
r_format = l_document->create_simple_element( name = 'Border' parent = r_border ).
r_format->set_attribute_ns( name = 'Position' prefix = 'ss' value = 'Top' ).
r_format->set_attribute_ns( name = 'LineStyle' prefix = 'ss' value = 'Continuous' ).
r_format->set_attribute_ns( name = 'Weight' prefix = 'ss' value = '1' ).
r_format = l_document->create_simple_element( name = 'Border' parent = r_border ).
r_format->set_attribute_ns( name = 'Position' prefix = 'ss' value = 'Right' ).
r_format->set_attribute_ns( name = 'LineStyle' prefix = 'ss' value = 'Continuous' ).
r_format->set_attribute_ns( name = 'Weight' prefix = 'ss' value = '1' ).
* Worksheet
r_worksheet = l_document->create_simple_element( name = 'Worksheet' parent = l_element_root ).
r_worksheet->set_attribute_ns( name = 'Name' prefix = 'ss' value = 'Sheet1' ).
* r_worksheet->set_attribute_ns( name = 'Protected' prefix = 'ss' value = '1' ). " WORKING
* Table
r_table = l_document->create_simple_element( name = 'Table' parent = r_worksheet ).
r_table->set_attribute_ns( name = 'FullColumns' prefix = 'x' value = '1' ).
r_table->set_attribute_ns( name = 'FullRows' prefix = 'x' value = '1' ).
* Column Formatting
r_column = l_document->create_simple_element( name = 'Column' parent = r_table ).
r_column->set_attribute_ns( name = 'Width' prefix = 'ss' value = '40' ).
r_column = l_document->create_simple_element( name = 'Column' parent = r_table ).
r_column->set_attribute_ns( name = 'Width' prefix = 'ss' value = '90' ).
r_column = l_document->create_simple_element( name = 'Column' parent = r_table ).
r_column->set_attribute_ns( name = 'Width' prefix = 'ss' value = '140' ).
r_column = l_document->create_simple_element( name = 'Column' parent = r_table ).
r_column->set_attribute_ns( name = 'Width' prefix = 'ss' value = '150' ).
r_column = l_document->create_simple_element( name = 'Column' parent = r_table ).
r_column->set_attribute_ns( name = 'Width' prefix = 'ss' value = '90' ).
r_column = l_document->create_simple_element( name = 'Column' parent = r_table ).
r_column->set_attribute_ns( name = 'Width' prefix = 'ss' value = '90' ).
r_column = l_document->create_simple_element( name = 'Column' parent = r_table ).
r_column->set_attribute_ns( name = 'Width' prefix = 'ss' value = '90' ).
r_column = l_document->create_simple_element( name = 'Column' parent = r_table ).
r_column->set_attribute_ns( name = 'Width' prefix = 'ss' value = '90' ).
r_column = l_document->create_simple_element( name = 'Column' parent = r_table ).
r_column->set_attribute_ns( name = 'Width' prefix = 'ss' value = '90' ).
* Blank Row
r_row = l_document->create_simple_element( name = 'Row' parent = r_table ).
* Column Headers Row
r_row = l_document->create_simple_element( name = 'Row' parent = r_table ).
r_row->set_attribute_ns( name = 'AutoFitHeight' prefix = 'ss' value = '1' ).
* RFQ No.
r_cell = l_document->create_simple_element( name = 'Cell' parent = r_row ).
r_cell->set_attribute_ns( name = 'StyleID' prefix = 'ss' value = 'Header' ).
r_data = l_document->create_simple_element( name = 'Data' value = 'RFQ No.' parent = r_cell ).
r_data->set_attribute_ns( name = 'Type' prefix = 'ss' value = 'String' ).
* RFQ Line Item No
r_cell = l_document->create_simple_element( name = 'Cell' parent = r_row ).
r_cell->set_attribute_ns( name = 'StyleID' prefix = 'ss' value = 'Header' ).
r_data = l_document->create_simple_element( name = 'Data' value = 'RFQ Line Item No.' parent = r_cell ).
r_data->set_attribute_ns( name = 'Type' prefix = 'ss' value = 'String' ).
* Material
r_cell = l_document->create_simple_element( name = 'Cell' parent = r_row ).
r_cell->set_attribute_ns( name = 'StyleID' prefix = 'ss' value = 'Header' ).
r_data = l_document->create_simple_element( name = 'Data' value = 'Material' parent = r_cell ).
r_data->set_attribute_ns( name = 'Type' prefix = 'ss' value = 'String' ).
* Quantity
r_cell = l_document->create_simple_element( name = 'Cell' parent = r_row ).
r_cell->set_attribute_ns( name = 'StyleID' prefix = 'ss' value = 'Header' ).
r_data = l_document->create_simple_element( name = 'Data' value = 'Quantity' parent = r_cell ).
r_data->set_attribute_ns( name = 'Type' prefix = 'ss' value = 'String' ).
* Order UNIT
r_cell = l_document->create_simple_element( name = 'Cell' parent = r_row ).
r_cell->set_attribute_ns( name = 'StyleID' prefix = 'ss' value = 'Header' ).
r_data = l_document->create_simple_element( name = 'Data' value = 'Order Unit' parent = r_cell ).
r_data->set_attribute_ns( name = 'Type' prefix = 'ss' value = 'String' ).
* Delivery Date
r_cell = l_document->create_simple_element( name = 'Cell' parent = r_row ).
r_cell->set_attribute_ns( name = 'StyleID' prefix = 'ss' value = 'Header' ).
r_data = l_document->create_simple_element( name = 'Data' value = 'Delivery Date' parent = r_cell ).
r_data->set_attribute_ns( name = 'Type' prefix = 'ss' value = 'String' ).
* RFQ Creation Date
r_cell = l_document->create_simple_element( name = 'Cell' parent = r_row ).
r_cell->set_attribute_ns( name = 'StyleID' prefix = 'ss' value = 'Header' ).
r_data = l_document->create_simple_element( name = 'Data' value = 'RFQ Creation Date' parent = r_cell ).
r_data->set_attribute_ns( name = 'Type' prefix = 'ss' value = 'String' ).
* RFQ Deadline Date
r_cell = l_document->create_simple_element( name = 'Cell' parent = r_row ).
r_cell->set_attribute_ns( name = 'StyleID' prefix = 'ss' value = 'Header' ).
r_data = l_document->create_simple_element( name = 'Data' value = 'RFQ Deadline Date' parent = r_cell ).
r_data->set_attribute_ns( name = 'Type' prefix = 'ss' value = 'String' ).
* Price
r_cell = l_document->create_simple_element( name = 'Cell' parent = r_row ).
r_cell->set_attribute_ns( name = 'StyleID' prefix = 'ss' value = 'Header' ).
r_data = l_document->create_simple_element( name = 'Data' value = 'Net Price' parent = r_cell ).
r_data->set_attribute_ns( name = 'Type' prefix = 'ss' value = 'String' ).
** Login
* r_cell = l_document->create_simple_element( name = 'Cell' parent = r_row ).
* r_cell->set_attribute_ns( name = 'StyleID' prefix = 'ss' value = 'Header' ).
* CONCATENATE 'Login - ' lv_date+6(2) '/' lv_date+4(2) '/' lv_date+0(4) INTO l_value.
* r_data = l_document->create_simple_element( name = 'Data' value = l_value parent = r_cell ).
* r_data->set_attribute_ns( name = 'Type' prefix = 'ss' value = 'String' ).
* Blank Row after Column Headers
r_row = l_document->create_simple_element( name = 'Row' parent = r_table ).
r_cell = l_document->create_simple_element( name = 'Cell' parent = r_row ).
r_cell->set_attribute_ns( name = 'StyleID' prefix = 'ss' value = 'Data' ).
r_cell = l_document->create_simple_element( name = 'Cell' parent = r_row ).
r_cell->set_attribute_ns( name = 'StyleID' prefix = 'ss' value = 'Data' ).
r_cell = l_document->create_simple_element( name = 'Cell' parent = r_row ).
r_cell->set_attribute_ns( name = 'StyleID' prefix = 'ss' value = 'Data' ).
r_cell = l_document->create_simple_element( name = 'Cell' parent = r_row ).
r_cell->set_attribute_ns( name = 'StyleID' prefix = 'ss' value = 'Data' ).
r_cell = l_document->create_simple_element( name = 'Cell' parent = r_row ).
r_cell->set_attribute_ns( name = 'StyleID' prefix = 'ss' value = 'Data' ).
r_cell = l_document->create_simple_element( name = 'Cell' parent = r_row ).
r_cell->set_attribute_ns( name = 'StyleID' prefix = 'ss' value = 'Data' ).
r_cell = l_document->create_simple_element( name = 'Cell' parent = r_row ).
r_cell->set_attribute_ns( name = 'StyleID' prefix = 'ss' value = 'Data' ).
r_cell = l_document->create_simple_element( name = 'Cell' parent = r_row ).
r_cell->set_attribute_ns( name = 'StyleID' prefix = 'ss' value = 'Data' ).
r_cell = l_document->create_simple_element( name = 'Cell' parent = r_row ).
r_cell->set_attribute_ns( name = 'StyleID' prefix = 'ss' value = 'Data' ).
* Data Table
LOOP AT it_final1 INTO wa_final1.
CLEAR l_value.
r_row = l_document->create_simple_element( name = 'Row' parent = r_table ).
* RFQ No.
r_cell = l_document->create_simple_element( name = 'Cell' parent = r_row ).
r_cell->set_attribute_ns( name = 'StyleID' prefix = 'ss' value = 'Data' ).
CLEAR l_value.
l_value = wa_final1-ebeln .
* CONDENSE l_value NO-GAPS.
r_data = l_document->create_simple_element( name = 'Data' value = l_value parent = r_cell ). " Data
r_data->set_attribute_ns( name = 'Type' prefix = 'ss' value = 'String' ). " Cell format
* Line Item No
CLEAR l_value.
r_cell = l_document->create_simple_element( name = 'Cell' parent = r_row ).
r_cell->set_attribute_ns( name = 'StyleID' prefix = 'ss' value = 'Data' ).
l_value = wa_final1-ebelp.
r_data = l_document->create_simple_element( name = 'Data' value = l_value parent = r_cell ). " Data
r_data->set_attribute_ns( name = 'Type' prefix = 'ss' value = 'Number' ). " Cell format
* Material
CLEAR l_value.
r_cell = l_document->create_simple_element( name = 'Cell' parent = r_row ).
r_cell->set_attribute_ns( name = 'StyleID' prefix = 'ss' value = 'Data' ).
l_value = wa_final1-txz01.
r_data = l_document->create_simple_element( name = 'Data' value = l_value parent = r_cell ). " Data
r_data->set_attribute_ns( name = 'Type' prefix = 'ss' value = 'String' ). " Cell format
* RFQ QTY
CLEAR l_value.
r_cell = l_document->create_simple_element( name = 'Cell' parent = r_row ).
r_cell->set_attribute_ns( name = 'StyleID' prefix = 'ss' value = 'Data' ).
l_value = wa_final1-ktmng.
r_data = l_document->create_simple_element( name = 'Data' value = l_value parent = r_cell ). " Data
r_data->set_attribute_ns( name = 'Type' prefix = 'ss' value = 'Number' ). " Cell format
* UNIT
CLEAR l_value.
r_cell = l_document->create_simple_element( name = 'Cell' parent = r_row ).
r_cell->set_attribute_ns( name = 'StyleID' prefix = 'ss' value = 'Data' ).
l_value = wa_final1-meins.
r_data = l_document->create_simple_element( name = 'Data' value = l_value parent = r_cellHow to make a particular column non editable?
Make your style protected and pass that style name to your required column while passing data.
for example:
Find below the code for protection of a style.
Last two lines are very important.
* Style for Headert
r_style = l_document->create_simple_element( name = 'Style' parent = r_styles ).
r_style->set_attribute_ns( name = 'ID' prefix = 'ss' value = 'Headert' ).
r_format = l_document->create_simple_element( name = 'Font' parent = r_style ).
r_format->set_attribute_ns( name = 'Bold' prefix = 'ss' value = '1' ).
r_format = l_document->create_simple_element( name = 'Interior' parent = r_style ).
r_format->set_attribute_ns( name = 'Color' prefix = 'ss' value = '#B2FF64' ).
r_format->set_attribute_ns( name = 'Pattern' prefix = 'ss' value = 'Solid' ).
r_format = l_document->create_simple_element( name = 'Alignment' parent = r_style ).
r_format->set_attribute_ns( name = 'Vertical' prefix = 'ss' value = 'Bottom' ).
r_format->set_attribute_ns( name = 'WrapText' prefix = 'ss' value = '1' ).
r_border = l_document->create_simple_element( name = 'Borders' parent = r_style ).
r_format = l_document->create_simple_element( name = 'Border' parent = r_border ).
r_format->set_attribute_ns( name = 'Position' prefix = 'ss' value = 'Bottom' ).
r_format->set_attribute_ns( name = 'LineStyle' prefix = 'ss' value = 'Continuous' ).
r_format->set_attribute_ns( name = 'Weight' prefix = 'ss' value = '1' ).
r_format = l_document->create_simple_element( name = 'Border' parent = r_border ).
r_format->set_attribute_ns( name = 'Position' prefix = 'ss' value = 'Left' ).
r_format->set_attribute_ns( name = 'LineStyle' prefix = 'ss' value = 'Continuous' ).
r_format->set_attribute_ns( name = 'Weight' prefix = 'ss' value = '1' ).
r_format = l_document->create_simple_element( name = 'Border' parent = r_border ).
r_format->set_attribute_ns( name = 'Position' prefix = 'ss' value = 'Top' ).
r_format->set_attribute_ns( name = 'LineStyle' prefix = 'ss' value = 'Continuous' ).
r_format->set_attribute_ns( name = 'Weight' prefix = 'ss' value = '1' ).
r_format = l_document->create_simple_element( name = 'Border' parent = r_border ).
r_format->set_attribute_ns( name = 'Position' prefix = 'ss' value = 'Right' ).
r_format->set_attribute_ns( name = 'LineStyle' prefix = 'ss' value = 'Continuous' ).
r_format->set_attribute_ns( name = 'Weight' prefix = 'ss' value = '1' ).
r_format = l_document->create_simple_element( name = 'Protection' parent = r_style ).
r_format->set_attribute_ns( name = 'Protected' prefix = 'ss' value = '1' ). -
Creating schemas using xml data
Hi
I have a situation where I need to create
database schemas dynamically using <xml> data.
Any help in this regard will be much appreciated.
Thanks
RadheepI'm not sure how to write a Web Service, however data can be read from a flat file using XML Data > Load, however the flat file has to be formatted with appropriate XML tags, such as...
<data>
<variable name="Test">
<row><column>1</column><column>2</column></row>
<row><column>10</column></row>
</variable>
</data>
In addition, you have to write a scriptlet that resides on a web server, with which Xcelsius can communicate. Once your data is formatted, it is as simple as referencing the file location in the XML Data URL: field.
Web Service is a very popular solution, and probably better than XML Data in this case due to the large volume of data. If you do a forum search for "Web Service" you'll find many threads regarding its usage. -
Creation of External table by using XML files.
I am in the process of loading of XML file data into the database table. I want to use the External Table feature for this loading. Though we have the external table feature with Plain/text file, is there any process of XML file data loading into the Database table by using External table?
I am using Oracle 9i.
Appreciate your responses.
Regards
Edited by: user652422 on Dec 16, 2008 11:00 PMHi,
The XML file which U posted is working fine and that proved that external table can be created by using xml files.
Now My problem is that I have xml files which is not as the book.xml, my xml file is having some diff format. below is the extracts of the file ...
<?xml version="1.0" encoding="UTF-8" ?>
- <PM-History deviceIP="172.20.7.50">
<Error Reason="" />
- <Interface IntfName="otu2-1-10B-3">
- <TS Type="15-MIN">
<Error Reason="" />
- <PM-counters TimeStamp="02/13/2008:12:15">
<Item Name="BBE-S" Direction="Received" Validity="ADJ" Value="0" />
<Item Name="BBE-SFE" Direction="Received" Validity="ADJ" Value="0" />
<Item Name="ES-S" Direction="Received" Validity="ADJ" Value="0" />
<Item Name="ES-SFE" Direction="Received" Validity="ADJ" Value="0" />
<Item Name="SES-S" Direction="Received" Validity="ADJ" Value="0" />
<Item Name="SES-SFE" Direction="Received" Validity="ADJ" Value="0" />
<Item Name="CSES-S" Direction="Received" Validity="ADJ" Value="0" />
<Item Name="CSES-SFE" Direction="Received" Validity="ADJ" Value="0" />
<Item Name="UAS-S" Direction="Received" Validity="ADJ" Value="135" />
<Item Name="UAS-SFE" Direction="Received" Validity="ADJ" Value="0" />
<Item Name="SEF-S" Direction="Received" Validity="ADJ" Value="135" />
</PM-counters>
<PM-counters TimeStamp="03/26/2008:12:30">
<Item Name="BBE" Direction="Received" Validity="OFF" Value="0" />
<Item Name="BBE-FE" Direction="Received" Validity="OFF" Value="0" />
<Item Name="ES" Direction="Received" Validity="OFF" Value="0" />
<Item Name="ES-FE" Direction="Received" Validity="OFF" Value="0" />
<Item Name="SES" Direction="Received" Validity="OFF" Value="0" />
<Item Name="SES-FE" Direction="Received" Validity="OFF" Value="0" />
<Item Name="CSES" Direction="Received" Validity="OFF" Value="0" />
<Item Name="CSES-FE" Direction="Received" Validity="OFF" Value="0" />
<Item Name="UAS" Direction="Received" Validity="OFF" Value="0" />
<Item Name="UAS-FE" Direction="Received" Validity="OFF" Value="0" />
<Item Name="PSC" Direction="Received" Validity="OFF" Value="0" />
</PM-counters>
</TS>
</Interface>
</PM-History>
My problem is the Item Name and Direction the value of both(ex PSCReceived or UASReceived) will be treated as the coulmn name of the table and '0' would be the value of that column. I am confused how to create the external table creation program for that.
I would really appreciate your responses.
Regards -
Proxy & business Services creation using XML
Hi,
can we create a proxy service & business service in OSB using an xml? usually we use to create using a WSDL defined by a webservice. can we create it using XML ? If so can anyone provide the doc or link for that.
thanksYou may create XSD from XML and then create WSDL from XSD using JDev. Using that WSDL you may create proxy or business service in OSB.
Regards,
Anuj -
We are moving from optio to xml. I want to know how to create labels using xml.
Thanks in advance,
SumanDo you have access to Oracle® Business Intelligence Publisher User's Guide? There is some info in Chapter 5 under Tables --> Multi-column Page Support. An example they give is printing labels. Starts on Page 5-44.
I am able to generate labels, just not the right number per page! But it is a start. -
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 -
How to create a report using XML data source from Crystal Report Designer
Hi,
Iu2019m having Crystal Report Designer XI R2 SP4. Iu2019m trying to create a report using XML data source stored on disk. This is a customer order report and the xml is structured in such a way that it has an order details header part (master) and then it has several order lines (detail). One order line can have several order line characteristics (detail-detail). So what I need to know is now I can design this layout from the designer. If this was done using views I can do it with sub-reports but using xml data this seems to be different. Can you help me to design this layout? I have included the xml and xsd as well.
Thank you in advance.
Regards,
Chanaka
XML
<?xml version="1.0" encoding="UTF-8"?>
<CUSTOMER_ORDER_CONF_REP_REQUEST xmlns:xsi="http://www.w3.org/2001/XMLSchema" xmlns="urn:ifsworld-com:customer_order_conf_rep">
<CUSTOMER_ORDER_CONF_REP>
<ORDER_NO>D555809</ORDER_NO>
<PRINTED_DATE>2009-03-26T08:52:54</PRINTED_DATE>
<AUTHORIZE_NAME>Chanaka</AUTHORIZE_NAME>
<CUSTOMER_NO>CU-1473-INV</CUSTOMER_NO>
<CUST_NAME>Mr.Johan Matts</CUST_NAME>
<SHIP_ADDR_1>93,Main Street</SHIP_ADDR_1>
<SHIP_ADDR_2>Negambo Road</SHIP_ADDR_2>
<SHIP_ADDR_3>Watthala</SHIP_ADDR_3>
<SHIP_ADDR_4>SRI LANKA</SHIP_ADDR_4>
<BILL_ADDR_1>93,Main Street</BILL_ADDR_1>
<BILL_ADDR_2>Negambo Road</BILL_ADDR_2>
<BILL_ADDR_3>Watthala</BILL_ADDR_3>
<BILL_ADDR_4>SRI LANKA</BILL_ADDR_4>
<CUSTOMER_PO_NO>112984638</CUSTOMER_PO_NO>
<CUSTOMER_FAX>112984639</CUSTOMER_FAX>
<CUSTOMER_EMAIL>abcbababab</CUSTOMER_EMAIL>
<ORDER_LINES>
<ORDER_LINE>
<LINE_NO>1</LINE_NO>
<CUSTOMER_PART_NO>NW-IP11</CUSTOMER_PART_NO>
<CUSTOMER_PART_DESC>iPod</CUSTOMER_PART_DESC>
<SALE_UNIT_PRICE>1200</SALE_UNIT_PRICE>
<PRICE_TOTAL>1200</PRICE_TOTAL>
<DISCOUNT>0</DISCOUNT>
<PRICE_QTY>1</PRICE_QTY>
<ORDER_LINE_CHARACTERSTICS>
<CHARACTERISTIC_ITEM>
<CHARACTERISTIC_ID xsi:nil="1"/>
<CHARACTERISTIC_VALUE xsi:nil="1"/>
</CHARACTERISTIC_ITEM>
</ORDER_LINE_CHARACTERSTICS>
</ORDER_LINE>
<ORDER_LINE>
<LINE_NO>2</LINE_NO>
<CUSTOMER_PART_NO>NW-IP24</CUSTOMER_PART_NO>
<CUSTOMER_PART_DESC>XGA Projector</CUSTOMER_PART_DESC>
<SALE_UNIT_PRICE>500</SALE_UNIT_PRICE>
<PRICE_TOTAL>1500</PRICE_TOTAL>
<DISCOUNT>0</DISCOUNT>
<PRICE_QTY>3</PRICE_QTY>
<ORDER_LINE_CHARACTERSTICS>
<CHARACTERISTIC_ITEM>
<CHARACTERISTIC_ID>1</CHARACTERISTIC_ID>
<CHARACTERISTIC_VALUE>Free Instalation</CHARACTERISTIC_VALUE>
</CHARACTERISTIC_ITEM>
</ORDER_LINE_CHARACTERSTICS>
</ORDER_LINE>
<ORDER_LINE>
<LINE_NO>3</LINE_NO>
<CUSTOMER_PART_NO>NW-IP02</CUSTOMER_PART_NO>
<CUSTOMER_PART_DESC>Sony DVD Player</CUSTOMER_PART_DESC>
<SALE_UNIT_PRICE>1000</SALE_UNIT_PRICE>
<PRICE_TOTAL>1000</PRICE_TOTAL>
<DISCOUNT>0</DISCOUNT>
<PRICE_QTY>1</PRICE_QTY>
<ORDER_LINE_CHARACTERSTICS>
<CHARACTERISTIC_ITEM>
<CHARACTERISTIC_ID>1</CHARACTERISTIC_ID>
<CHARACTERISTIC_VALUE>Free 5 DVDs</CHARACTERISTIC_VALUE>
</CHARACTERISTIC_ITEM>
</ORDER_LINE_CHARACTERSTICS>
</ORDER_LINE>
<ORDER_LINE>
<LINE_NO>4</LINE_NO>
<CUSTOMER_PART_NO>NW-IP99</CUSTOMER_PART_NO>
<CUSTOMER_PART_DESC>Flatscreen TV</CUSTOMER_PART_DESC>
<SALE_UNIT_PRICE>1500</SALE_UNIT_PRICE>
<PRICE_TOTAL>1350</PRICE_TOTAL>
<DISCOUNT>10</DISCOUNT>
<PRICE_QTY>1</PRICE_QTY>
<ORDER_LINE_CHARACTERSTICS>
<CHARACTERISTIC_ITEM>
<CHARACTERISTIC_ID>1</CHARACTERISTIC_ID>
<CHARACTERISTIC_VALUE>Free Delivery</CHARACTERISTIC_VALUE>
</CHARACTERISTIC_ITEM>
<CHARACTERISTIC_ITEM>
<CHARACTERISTIC_ID>2</CHARACTERISTIC_ID>
<CHARACTERISTIC_VALUE>1 year additional warranty</CHARACTERISTIC_VALUE>
</CHARACTERISTIC_ITEM>
</ORDER_LINE_CHARACTERSTICS>
</ORDER_LINE>
<ORDER_LINE>
<LINE_NO>5</LINE_NO>
<CUSTOMER_PART_NO>NW-IP56</CUSTOMER_PART_NO>
<CUSTOMER_PART_DESC>Sony MP3 Player</CUSTOMER_PART_DESC>
<SALE_UNIT_PRICE>200</SALE_UNIT_PRICE>
<PRICE_TOTAL>400</PRICE_TOTAL>
<DISCOUNT>0</DISCOUNT>
<PRICE_QTY>2</PRICE_QTY>
<ORDER_LINE_CHARACTERSTICS>
<CHARACTERISTIC_ITEM>
<CHARACTERISTIC_ID>1</CHARACTERISTIC_ID>
<CHARACTERISTIC_VALUE>Free carry belt</CHARACTERISTIC_VALUE>
</CHARACTERISTIC_ITEM>
<CHARACTERISTIC_ITEM>
<CHARACTERISTIC_ID>2</CHARACTERISTIC_ID>
<CHARACTERISTIC_VALUE>Free promotional 4GB memory bar</CHARACTERISTIC_VALUE>
</CHARACTERISTIC_ITEM>
<CHARACTERISTIC_ITEM>
<CHARACTERISTIC_ID>3</CHARACTERISTIC_ID>
<CHARACTERISTIC_VALUE>No warranty on memory bar</CHARACTERISTIC_VALUE>
</CHARACTERISTIC_ITEM>
</ORDER_LINE_CHARACTERSTICS>
</ORDER_LINE>
</ORDER_LINES>
</CUSTOMER_ORDER_CONF_REP>
</CUSTOMER_ORDER_CONF_REP_REQUEST>
XSD
<?xml version="1.0" encoding="UTF-8"?>
<?report module="ORDER" package="CUSTOMER_ORDER_CONF_REP" ?>
<xs:schema targetNamespace="urn:ifsworld-com:customer_order_conf_rep" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns="urn:ifsworld-com:customer_order_conf_rep" elementFormDefault="qualified" attributeFormDefault="unqualified">
<xs:element name="CUSTOMER_ORDER_CONF_REP_REQUEST">
<xs:complexType>
<xs:all minOccurs="1" maxOccurs="1">
<xs:element name="CUSTOMER_ORDER_CONF_REP">
<xs:complexType>
<xs:choice minOccurs="0" maxOccurs="50">
<xs:element name="ORDER_NO" nillable="true" minOccurs="0">
<xs:simpleType>
<xs:restriction base="xs:string">
<xs:maxLength value="2000"/>
</xs:restriction>
</xs:simpleType>
</xs:element>
<xs:element name="PRINTED_DATE" type="xs:dateTime" nillable="true" minOccurs="0"/>
<xs:element name="AUTHORIZE_NAME" nillable="true" minOccurs="0">
<xs:simpleType>
<xs:restriction base="xs:string">
<xs:maxLength value="2000"/>
</xs:restriction>
</xs:simpleType>
</xs:element>
<xs:element name="CUSTOMER_NO" nillable="true" minOccurs="0">
<xs:simpleType>
<xs:restriction base="xs:string">
<xs:maxLength value="2000"/>
</xs:restriction>
</xs:simpleType>
</xs:element>
<xs:element name="CUSTOMER_PO_NO" nillable="true" minOccurs="0">
<xs:simpleType>
<xs:restriction base="xs:string">
<xs:maxLength value="2000"/>
</xs:restriction>
</xs:simpleType>
</xs:element>
<xs:element name="CUST_NAME" nillable="true" minOccurs="0">
<xs:simpleType>
<xs:restriction base="xs:string">
<xs:maxLength value="2000"/>
</xs:restriction>
</xs:simpleType>
</xs:element>
<xs:element name="SHIP_ADDR_1" nillable="true" minOccurs="0">
<xs:simpleType>
<xs:restriction base="xs:string">
<xs:maxLength value="2000"/>
</xs:restriction>
</xs:simpleType>
</xs:element>
<xs:element name="SHIP_ADDR_2" nillable="true" minOccurs="0">
<xs:simpleType>
<xs:restriction base="xs:string">
<xs:maxLength value="2000"/>
</xs:restriction>
</xs:simpleType>
</xs:element>
<xs:element name="SHIP_ADDR_3" nillable="true" minOccurs="0">
<xs:simpleType>
<xs:restriction base="xs:string">
<xs:maxLength value="2000"/>
</xs:restriction>
</xs:simpleType>
</xs:element>
<xs:element name="SHIP_ADDR_4" nillable="true" minOccurs="0">
<xs:simpleType>
<xs:restriction base="xs:string">
<xs:maxLength value="2000"/>
</xs:restriction>
</xs:simpleType>
</xs:element>
<xs:element name="BILL_ADDR_1" nillable="true" minOccurs="0">
<xs:simpleType>
<xs:restriction base="xs:string">
<xs:maxLength value="2000"/>
</xs:restriction>
</xs:simpleType>
</xs:element>
<xs:element name="BILL_ADDR_2" nillable="true" minOccurs="0">
<xs:simpleType>
<xs:restriction base="xs:string">
<xs:maxLength value="2000"/>
</xs:restriction>
</xs:simpleType>
</xs:element>
<xs:element name="BILL_ADDR_3" nillable="true" minOccurs="0">
<xs:simpleType>
<xs:restriction base="xs:string">
<xs:maxLength value="2000"/>
</xs:restriction>
</xs:simpleType>
</xs:element>
<xs:element name="BILL_ADDR_4" nillable="true" minOccurs="0">
<xs:simpleType>
<xs:restriction base="xs:string">
<xs:maxLength value="2000"/>
</xs:restriction>
</xs:simpleType>
</xs:element>
<xs:element name="CUSTOMER_FAX" nillable="true" minOccurs="0">
<xs:simpleType>
<xs:restriction base="xs:string">
<xs:maxLength value="2000"/>
</xs:restriction>
</xs:simpleType>
</xs:element>
<xs:element name="CUSTOMER_EMAIL" nillable="true" minOccurs="0">
<xs:simpleType>
<xs:restriction base="xs:string">
<xs:maxLength value="2000"/>
</xs:restriction>
</xs:simpleType>
</xs:element>
<xs:element name="ORDER_LINES" nillable="true" minOccurs="0">
<xs:complexType>
<xs:sequence minOccurs="0" maxOccurs="unbounded">
<xs:element name="ORDER_LINE">
<xs:complexType>
<xs:choice minOccurs="0" maxOccurs="39">
<xs:element name="LINE_NO" nillable="true" minOccurs="0">
<xs:simpleType>
<xs:restriction base="xs:string">
<xs:maxLength value="2000"/>
</xs:restriction>
</xs:simpleType>
</xs:element>
<xs:element name="SALE_UNIT_PRICE" type="xs:float" nillable="true" minOccurs="0"/>
<xs:element name="PRICE_TOTAL" type="xs:float" nillable="true" minOccurs="0"/>
<xs:element name="DISCOUNT" type="xs:float" nillable="true" minOccurs="0"/>
<xs:element name="PRICE_QTY" type="xs:float" nillable="true" minOccurs="0"/>
<xs:element name="CUSTOMER_PART_NO" nillable="true" minOccurs="0">
<xs:simpleType>
<xs:restriction base="xs:string">
<xs:maxLength value="4000"/>
</xs:restriction>
</xs:simpleType>
</xs:element>
<xs:element name="CUSTOMER_PART_DESC" nillable="true" minOccurs="0">
<xs:simpleType>
<xs:restriction base="xs:string">
<xs:maxLength value="4000"/>
</xs:restriction>
</xs:simpleType>
</xs:element>
<xs:element name="ORDER_LINE_CHARACTERSTICS" nillable="true" minOccurs="0">
<xs:complexType>
<xs:sequence minOccurs="0" maxOccurs="unbounded">
<xs:element name="CHARACTERISTIC_ITEM">
<xs:complexType>
<xs:choice minOccurs="0" maxOccurs="6">
<xs:element name="CHARACTERISTIC_ID" nillable="true" minOccurs="0">
<xs:simpleType>
<xs:restriction base="xs:string">
<xs:maxLength value="2000"/>
</xs:restriction>
</xs:simpleType>
</xs:element>
<xs:element name="CHARACTERISTIC_VALUE" nillable="true" minOccurs="0">
<xs:simpleType>
<xs:restriction base="xs:string">
<xs:maxLength value="2000"/>
</xs:restriction>
</xs:simpleType>
</xs:element>
</xs:choice>
</xs:complexType>
</xs:element>
</xs:sequence>
</xs:complexType>
</xs:element>
</xs:choice>
</xs:complexType>
</xs:element>
</xs:sequence>
</xs:complexType>
</xs:element>
</xs:choice>
</xs:complexType>
</xs:element>
</xs:all>
</xs:complexType>
</xs:element>
</xs:schema>Hi Sourashree,
Thank you for the response and ideas you have given me so far. I can get the fetch the data from the data source without any problem. That is I do the following,
1. New Report
2. From Create New Connection-> XML
3. Provide the u201CLocal XML Fileu201D and have u201CSpecify Schema Fileu201D checked -> Next
4. Provide the u201CLocal Schema Fileu201D -> Finish
Then I can see the following under XML
+ CUSTOMER_ORDER_CONF_REP_REQUEST
CUSTOMER_ORDER_CONF_REP_REQUEST
CUSTOMER_ORDER_CONF_REP_REQUEST/CUSTOMER_ORDER_CONF_REP
CUSTOMER_ORDER_CONF_REP_REQUEST/ CUSTOMER_ORDER_CONF_REP/ORDER_LINES
CUSTOMER_ORDER_CONF_REP_REQUEST/ CUSTOMER_ORDER_CONF_REP/ORDER_LINES/ORDER_LINE
CUSTOMER_ORDER_CONF_REP_REQUEST/ CUSTOMER_ORDER_CONF_REP/ORDER_LINES/ORDER_LINE/ORDER_LINE_CHARACTERSTICS
CUSTOMER_ORDER_CONF_REP_REQUEST/ CUSTOMER_ORDER_CONF_REP/ORDER_LINES/ORDER_LINE/ORDER_LINE_CHARACTERSTICS/CHARACTERSTIC_ITEM
And from here if I add the following three I can get all the fields I need to the report
CUSTOMER_ORDER_CONF_REP_REQUEST/CUSTOMER_ORDER_CONF_REP
CUSTOMER_ORDER_CONF_REP_REQUEST/ CUSTOMER_ORDER_CONF_REP/ORDER_LINES/ORDER_LINE
CUSTOMER_ORDER_CONF_REP_REQUEST/ CUSTOMER_ORDER_CONF_REP/ORDER_LINES/ORDER_LINE/ORDER_LINE_CHARACTERSTICS/CHARACTERSTIC_ITEM
Then I come to the Linking section. Here I canu2019t link anything. There is a common field called u201CInternal_IDu201D but I canu2019t link using it. So I get a message when I click Next. From here I add all the fields.
For this point onwards only I need help. How do I group, add fields and design the layout so I can get an report output as follows.
Date
Order number Authorized code
Customer No
Name
Phone
Fax email
Shipping address 1 Billing Address 1
Shipping address 2 Billing Address 2
Shipping address 3 Billing Address 3
Shipping address 4 Billing Address 4
Order Line 1 detailsu2026u2026u2026u2026u2026u2026u2026u2026u2026u2026u2026u2026u2026 LINE_NO CUSTOMER_PART_NO CUSTOMER_PART_DESC SALE_UNIT_PRICE PRICE_QTY DISCOUNT PRICE_TOTAL
Characteristic details belonging to Order line 1 CHARACTERISTIC_ID 1 CHARACTERISTIC_VALUE1
CHARACTERISTIC_ID 2 CHARACTERISTIC_VALUE2
CHARACTERISTIC_ID 3 CHARACTERISTIC_VALUE3
Order Line 2 detailsu2026u2026u2026u2026u2026u2026u2026u2026u2026u2026u2026u2026u2026u2026
Characteristic details belonging to Order line 2
Order Line 3 detailsu2026u2026u2026u2026u2026u2026u2026u2026u2026u2026u2026u2026u2026u2026
Characteristic details belonging to Order line 3
Order Line 4 detailsu2026u2026u2026u2026u2026u2026u2026u2026u2026u2026u2026u2026u2026u2026
Characteristic details belonging to Order line 4
Order Line 5 detailsu2026u2026u2026u2026u2026u2026u2026u2026u2026u2026u2026u2026u2026u2026
Characteristic details belonging to Order line 5
How can I achieve this kind of a layout using the give xml and xsd? Should I use grouping if so how should I do the grouping?
I have included the full xml and xsd in the first mail I posted but I canu2019t see it now. I can include that again if you want.
Regards,
Chanaka -
How to create new Custom XML Report without using Form Builder
Hi,
What are the steps to create new Custom XML Report without using Report Builder ?
Thanks and Regards,
AbhiHi,
Steps we now follow
1)Create Data Model in Reports Builder
2)Create xml
3)Insert xml in Publisher to build Fomat
4)FTp rdf
5)Create Data Definition and Template
6)Create executable and Concurrent Program
Is there any way we can build reports without use of Report Builder ? By writing PL SQL Package for Before Report and After Report etc ...
Thanks and Regards,
Abhijit Rode -
Creating a text output using XML Publisher
Hi All,
Recently i created a report for my client using XMl Publisher. The Data Definition was XML and the template type was RTF and i got the output in a PDF format. All was going smoothly until the client decided at the last moment that they wanted to print this in a dot matrix printer!
I've read some articles on XSL- Text layout templates. But i can't get my head around it (I'm Functio-Technical as opposed to Techno-Functional )
How do i convert my RTF template to give me a text output?
MirangaFrom what I know, you will have to create another template based on "XSL" layout or eText layout (both of them require different coding methods). The RTF can not create text outputs even in 11g. This is based on my experience so far. You can create RTF output (available by default) based on the current layout that you use for PDF and see if it can be printed in a dot matrix printer though.
-
Error while creating AW using DBMS_LOB with XML..
Hi All,
I am trying to create AW using DBMS_LOB package with XML,
while creating AW,i am facing the following error.find the code also below :
declare
xml_awcreate_clob clob;
xml_awcreate_st varchar2(4000);
begin
DBMS_LOB.CREATETEMPORARY(xml_awcreate_clob,TRUE);
dbms_lob.open(xml_awcreate_clob, DBMS_LOB.LOB_READWRITE);
dbms_lob.writeappend(xml_awcreate_clob, 48, '<?xml version = ''1.0'' encoding = ''UTF-8'' ?>');
dbms_lob.writeappend(xml_awcreate_clob, 43, '');
dbms_lob.writeappend(xml_awcreate_clob, 63, '<AWXML version = ''1.0'' timestamp = ''Mon Feb 11 13:29:11 2002'' >');
dbms_lob.writeappend(xml_awcreate_clob, 15, '<AWXML.content>');
dbms_lob.writeappend(xml_awcreate_clob, 25, ' <Create Id="Action41">');
dbms_lob.writeappend(xml_awcreate_clob, 19, ' <ActiveObject >');
dbms_lob.writeappend(xml_awcreate_clob, 163, ' <AW Name="NEW_XML_AW" LongName="NEW_XML_AW" ShortName="NEW_XML_AW" PluralName="NEW_XML_AW" Id="NEW_XML.AW"/>');
dbms_lob.writeappend(xml_awcreate_clob, 19, ' </ActiveObject>');
dbms_lob.writeappend(xml_awcreate_clob, 11, ' </Create>');
dbms_lob.writeappend(xml_awcreate_clob, 16, '</AWXML.content>');
dbms_lob.writeappend(xml_awcreate_clob, 8, '</AWXML>');
dbms_lob.close(xml_awcreate_clob);
xml_awcreate_st := sys.interactionExecute(xml_awcreate_clob);
end;
ORA-21560: argument 2 is null, invalid, or out of range
ORA-06512: at "SYS.DBMS_LOB", line 833
ORA-06512: at line 12
Any idea or thought on this would be appreciable.
Thanks in advance.
AnwarDid you change any of the text in the lob write statements ?
I believe you get this error if you increase the number of characters without increasing the 1st argument which looks as though it represents the number of characters -
Using XML file in Java script to create Google Map
Hello,
I work for a non-profit in San Diego as a GIS Specialist. I have had to teach myself about some scripting to create some dynamic maps, but I am still very limited in my skills, so I have had to explore the internet in order to discover various tutorials and examples that have led me on a positive path.
Right now I am working on a Google Mash-Up that will incorporate over 14,000 records, which will appear as separate markers that will have pop-up info bubbles with additional info inside (using html), once the marker is clicked.
Here is the XML script example that is used in the tutorial I am following:
<markers>
<marker lat="43.65654" lng="-79.90138" html="Some stuff to display in the<br>First Info Window"
label="Marker One" />
<marker lat="43.91892" lng="-78.89231" html="Some stuff to display in the<br>Second Info Window"
label="Marker Two" />
<marker lat="43.82589" lng="-79.10040" html="Some stuff to display in the<br>Third Info Window"
label="Marker Three" />
</markers>
...and this is how it looks when the file is retrieved by the java script and mapped: http://econym.googlepages.com/example_map3.htm
This is the java script that creates the Google Map. I have emboldened the section of the script that retrieves the data and parses it to create the markers:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>Google Maps</title>
<script src="http://maps.google.com/maps?file=api&v=2&key=ABQIAAAA6GoL8P5zqjQlG5A5uM1ETBSUPozAscB0cY3RG8xEGnZyeom4axRySak889rVpvHYRsV4f9OZZzbboA"
type="text/javascript"></script>
</head>
<body onunload="GUnload()">
<!-- you can use tables or divs for the overall layout -->
<table border=1>
<tr>
<td>
<div id="map" style="width: 800px; height: 1200px"></div>
</td>
<td width = 200 valign="top" style="text-decoration: underline; color: #4444ff;">
<div id="side_bar"></div>
</td>
</tr>
</table>
<noscript><b>JavaScript must be enabled in order for you to use Google Maps.</b>
However, it seems JavaScript is either disabled or not supported by your browser.
To view Google Maps, enable JavaScript by changing your browser options, and then
try again.
</noscript>
<script type="text/javascript">
//<![CDATA[
if (GBrowserIsCompatible()) {
// this variable will collect the html which will eventualkly be placed in the side_bar
var side_bar_html = "";
// arrays to hold copies of the markers used by the side_bar
// because the function closure trick doesnt work there
var gmarkers = [];
var i = 0;
// A function to create the marker and set up the event window
function createMarker(point,name,html) {
var marker = new GMarker(point);
GEvent.addListener(marker, "click", function() {
marker.openInfoWindowHtml(html);
// save the info we need to use later for the side_bar
gmarkers[i] = marker;
// add a line to the side_bar html
side_bar_html += '<a href="javascript:myclick(' + i + ')">' + name + '</a><br>';
i++;
return marker;
// This function picks up the click and opens the corresponding info window
function myclick(i) {
GEvent.trigger(gmarkers, "click");
// create the map
var map = new GMap2(document.getElementById("map"));
map.addControl(new GLargeMapControl());
map.addControl(new GMapTypeControl());
map.setCenter(new GLatLng( 37.251699,-119.604315), 7);
*// Read the data from testXML2blackpoolformat.xml*
var request = GXmlHttp.create();
request.open("GET", "testXML2blackpoolformat.xml", true);
*request.onreadystatechange = function() {*
*if (request.readyState == 4) {*
var xmlDoc = GXml.parse(request.responseText);
*// obtain the array of markers and loop through it*
var markers = xmlDoc.documentElement.getElementsByTagName("ConnectoryRecord");
*for (var i = 0; i < markers.length; i++) {*
*// obtain the attribues of each marker*
*var lat = parseFloat(markers[i].getAttribute("lat"));*
*var lng = parseFloat(markers[i].getAttribute("lng"));*
var point = new GLatLng(lat,lng);
*var html = markers[i].getAttribute("html");*
*var label = markers[i].getAttribute("label");*
*// create the marker*
var marker = createMarker(point,label,html);
map.addOverlay(marker);
// put the assembled side_bar_html contents into the side_bar div
document.getElementById("side_bar").innerHTML = side_bar_html;
request.send(null);
else {
alert("Sorry, the Google Maps API is not compatible with this browser");
// This Javascript is based on code provided by the
// Blackpool Community Church Javascript Team
// http://www.commchurch.freeserve.co.uk/
// http://econym.googlepages.com/index.htm
//]]>
</script>
</body>
</html>
Here is my delima--
This is the xml format that I need to use because it can accept the rest of my excel file and loop it through the 14,000+ records to create a functioning xml file. This is just a sample (2 records) of the larger file:
<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<ConnectoryAug2008>
<ConnectoryRecord>
<lng>-117.03683</lng>
<lat>32.944505</lat>
<ConnectoryID>1</ConnectoryID>
<Name>$2.95 Guys</Name>
<StreetAddress>13750 Stowe Drive</StreetAddress>
<City>Poway</City>
<State>CA</State>
<Zip>92064</Zip>
<Marker>White</Marker>
<IndustryGroup>Technical Services</IndustryGroup>
<ConnectoryProfileLink>http://connectory.com/search/profile_view.aspx?connectoryId=1</ConnectoryProfileLink>
</ConnectoryRecord>
<ConnectoryRecord>
<lng>-117.272843</lng>
<lat>33.13337</lat>
<ConnectoryID>2</ConnectoryID>
<Name>(GLDS) Great Lakes Data Systems</Name>
<StreetAddress>5954 Priestly Drive</StreetAddress>
<City>Carlsbad</City>
<State>CA</State>
<Zip>92008</Zip>
<Marker>Orange</Marker>
<IndustryGroup>Technology</IndustryGroup>
<ConnectoryProfileLink>http://connectory.com/search/profile_view.aspx?connectoryId=2</ConnectoryProfileLink>
</ConnectoryRecord>
</ConnectoryAug2008>
This is the tutorial where I found the formatting techniques to successfully create the large xml file that will format/convert my excel file properly: http://www.mrexcel.com/tip064.shtml
These variables should appear as html in the info bubble:
<ConnectoryID>2</ConnectoryID>
<Name>(GLDS) Great Lakes Data Systems</Name>
<StreetAddress>5954 Priestly Drive</StreetAddress>
<City>Carlsbad</City>
<State>CA</State>
<Zip>92008</Zip>
<IndustryGroup>Technology</IndustryGroup>
<ConnectoryProfileLink>http://connectory.com/search/profile_view.aspx?connectoryId=2</ConnectoryProfileLink>
The "Marker" variable instructs Google Maps to label the marker with a particular color. I will be so grateful to the person(s) that helps me get through this wall that I have been hitting for a long time. It's very difficult without having the luxury of peers who know about these types of issues.
Thank you!!Here is the relationship: They both contain geographic coordinates that produce a point on a map. I will use the rest of the information in the second xml file (company name, address, link, etc.) to produce the information for the bubble that will pop up once the marker is clicked.
My problem is that I need to try to keep the second xml file in a relatively similar format, so the rest of my records will still be accepted. If I had a smaller amount of records I could place them directly into the javascript, but because there are so many records, I need to use an xml file that can be retrieved by the java script. I chose to use the second type of xml file because I can easily copy and past the 14,000+ records that are now in excel document.
After the xml issue is corrected I need to rework the javascript that is now emboldened so that it will read the new xml file correctly. I included the first xml file so that the readers will understand what type of xml format is currently being used to produce the markers in the tutorial map. -
Using XML to create files through API
Hi.
I created a new custom type - a subclass of "Document", with a few private attributes.
I wrote a small XML file that creates an instance of that type.
I have no problem using that XML with FTP or with the web interface - it parses the XML automatically and creates my custom file.
However, when I try to use the java API to do the same, it just copies the XML file into IFS, but doesn't parse it or creates the custom file that is defined in it.
I am using the IFSFileSystem.createDocument method, with parsing set to true, and "null" for the callback parameter.
Of course, the XML parser is registered (as I said, it works with FTP and web interface).
Please help.
Thanks, Edo.Sure .. you can use XML as the data source. If you have DW8,
you can even
do it right in the Dreamweaver Interface.
Nancy Gill
Adobe Community Expert
BLOG:
http://www.dmxwishes.com/blog.asp
Author: Dreamweaver 8 e-book for the DMX Zone
Co-Author: Dreamweaver MX: Instant Troubleshooter (August,
2003)
Technical Editor: DMX 2004: The Complete Reference, DMX 2004:
A Beginner's
Guide, Mastering Macromedia Contribute
Technical Reviewer: Dynamic Dreamweaver MX/DMX: Advanced PHP
Web Development
"melneum" <[email protected]> wrote in
message
news:e7n37t$40m$[email protected]..
> Is it possable to use xml to create user lists that can
then be searched
> to
> allow access to a section of a site like you can do with
asp? I would
> prefer
> not to use any database stuff on a site i am currently
working on but need
> a
> secured login area.
>
> Any ideas??
> -
Download runtime version of rule used and create in bpm process
Dear experts,
does anybody know, if there is a possibility of updating used brm rules used in a bpm process? There seems to be a way, when you create a separate brm project:
Importing an Updated Project into the Rules Composer - Working with the Rules Manager - SAP Library
How does this work for rules coming from bpm?
Do i really have to manually export and import things e. g. over excel for this?
Regards,
MarkusDear Siddhant,
thanks a lot for your reply. You got it perfectly right.
What do you mean with "always points to the updated rules"?
Do you mean, that using the "Download runtime version" feature on the brm project helps us to keep the rule up-to-date within NWDS?
Regards,
Markus -
How to create a user using XML and specifying addional attributes that are objects
I'm trying to create a user using XML and specifying some attributes that are objects and not sure how to do it. How would I set the DirectoryUserAcl to Public?
Here's the xml file:
<?xml version = '1.0' standalone = 'yes'?>
<SimpleUser>
<UserName>mike2</UserName>
<Password>abc123</Password>
<AdminEnabled>false</AdminEnabled>
<HomeFolderRoot>/home</HomeFolderRoot>
<HasContentQuota>false</HasContentQuota>
<DirectoryUserAcl> ??? </DirectoryUserAcl>
<DefaultAclBundleAcl> ??? </DefaultAclBundleAcl>
<HomeFolderPolicyBundleAcl> ??? </HomeFolderPolicyBundleAcl>
</SimpleUser>I figured out the answer:
<?xml version = '1.0' standalone = 'yes'?>
<SimpleUser>
<UserName>mike2</UserName>
<Password>abc123</Password>
<AdminEnabled>false</AdminEnabled>
<HomeFolderRoot>/home</HomeFolderRoot>
<HasContentQuota>false</HasContentQuota>
<DirectoryUserAcl classname="SystemAccessControlList" refType="name">Public</DirectoryUserAcl>
</SimpleUser>
null
Maybe you are looking for
-
Hi, I'am building an Applet. I want to open dialog in the main window. Main window is an applet window. But, to build dialag I should pass as parameter Frame. Main class is extends applet and not Frame. Thanks, Evgeny
-
Arranging Objects In Adobe Edge
I desinged a stage in Muse with different objects. I opened those objets as a stage in Edge Animate. I created a text box in Edge that I want arranged to the front of everything. When I right click on the text box the options to arrange it are greyed
-
TRIGGER WORKFLOW IN HR MODULE FOR TERMINATION OF AN EMPLOYEE
Hi all i have an employee terminated in my organisation and i have to trigger the workflow at the background to inform through mail the line manager and the finince dept.to clear all his dues or to make a final settlement. As soon as i fill the bank
-
Computer freezes when watching TV show when Windows Audio started
Sorry in advance for the length of this post. I am currently running itunes 7.0.2.16. I can't load an earlier version because it tells me I need this version to access the itunes store. I orignally had a problem with my computer freezing (hard boot r
-
Catalyst will not load RAW .mxf files
I am having an issue loading RAW mxf files in Catalyst. When browsing through the folder structure, no MXF files appear. It has worked for me once or twice, but not consistently. In finder, the files are obviously there and can even be dragged into t