How can I create a XML document from a DOM?
Hello,
I'm using the parser for C, version 2 in the DOM modus. How can I dump the object model to a (XML) string after changing some field?
Do I need to create my own function or is there a function in the DOM interface??
You need to create your own function. The Java XML parser has such a function
and we'll probably add one in a future release as well.
Oracle XML Team
Similar Messages
-
How to create an XML document from a String.
Can anyone help,
In the Microsoft XML Document DOM there is a load function load(string) which will create an XML document, but now we are switching to Java and I do not know how to create and XML document from a string, this string �xml document� is passed to my program from a webservice and I need to read several xml elements form it in a web server.
This string is a well formatted XML document:
<?xml version="1.0" encoding="UTF-8"?>
<Countries NumberOfRecords="1" LanguageID="en-us">
<Country>
<CountryCode>AU</CountryCode>
<CountryName>AUSTRALIA</CountryName>
</Country>
</Countries>Thanks PC!
I made it work using:
DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance();
DocumentBuilder builder = factory.newDocumentBuilder();
factory.setIgnoringComments(true); // We want to ignore comments
// Now use the factory to create a DOM parser
DocumentBuilder parser = factory.newDocumentBuilder();
//TransformThisStringBuffer is a string buffer wich contain the 'XML document (String)'
InputStream in = new ByteArrayInputStream(TransformThisStringBuffer.toString().getBytes());
// Parse the InputStream and build the document
Document document = parser.parse(in);
But which one is faster InputSource or InputStream, were would you put the "new InputSource(new StringReader(yourString))" in the above code? -
How to Create an XML document from XSQL servlet which follows a particular DTD struct
how to Create an XML document from XSQL servlet which follows a particular DTD structure.Could anyone send me a sample code for this.
You'll need to associate an XSLT transformation with your XSQL page that transforms the canonical result into your DTD-valid format.
For example, given an XSQL page like:
<?xml version="1.0"?>
<?xml-stylesheet type="text/xsl" href="rss.xsl" ?>
<xsql:query max-rows="3" connection="demo" xmlns:xsql="urn:oracle-xsql">
select title,id,description,url,to_char(timestamp,'Mon DD') timestamp
from site_entry
order by id desc
</xsql:query>and an "rss.xsl" stylesheet that looks like this:
<?xml version="1.0"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
<xsl:output method="xml" indent="yes" doctype-system="rss-0.91.dtd"/>
<xsl:template match="/">
<xsl:for-each select="ROWSET/ROW">
<rss version="0.91">
<channel>
<title>Do You XML?</title>
<link>http://xml.us.oracle.com</link>
<description>Oracle XML Website Demo</description>
<language>en-us</language>
<xsl:for-each select="ITEM">
<item>
<title><xsl:value-of select="TITLE"/></title>
<link><xsl:value-of select="URL"/></link>
<description><xsl:value-of select="DESCRIPTION"/></description>
</item>
</xsl:for-each>
</channel>
</rss>
</xsl:for-each>
</xsl:template>
</xsl:stylesheet>You produce DTD-valid output against the rss-0.91.dtd DTD that looks like:
<?xml version = '1.0' encoding = 'UTF-8'?>
<!DOCTYPE rss SYSTEM "rss-0.91.dtd">
<rss version="0.91">
<channel>
<title>Do You XML?</title>
<link>http://xml.us.oracle.com</link>
<description>Oracle XML Website Demo</description>
<language>en-us</language>
</channel>
</rss>
<rss version="0.91">
<channel>
<title>Do You XML?</title>
<link>http://xml.us.oracle.com</link>
<description>Oracle XML Website Demo</description>
<language>en-us</language>
</channel>
</rss>
<rss version="0.91">
<channel>
<title>Do You XML?</title>
<link>http://xml.us.oracle.com</link>
<description>Oracle XML Website Demo</description>
<language>en-us</language>
</channel>
</rss> -
Create an XML document from a HTML form???
Good morning, is it possible to create an XML document from a HTML form
if yes, can someone tell me how to proceed exactely, I would be very thankful!Hi,
A very simple intro at this link. Apologies for anything unclear.
http://cswww.essex.ac.uk/TechnicalGroup/TechnicalHelp/xmlCreate.htm
best
kev -
How can I create a single order from multiple quotations?
How can I create a single order from multiple quotations that I have created by the transaction VA21 ?
Thanks in advance for the answers.hi
Go to transaction: /nva01
Enter order type : ZOR
Sale org :xxxx
Dist.channel:xx
Division :xx
Press enter
Click on Sale document and select Create with reference
Then enter 1st quotation number & click on COPY or Selection list. Then click on Copy .Then all line items which belong to quoation1 copy to order.
Then,
Click on Sale document and select Create with reference
Then enter 2nd quotation number & click on COPY or Selection list. Then click on Copy .Then all line items which belong to quoation2 copy to order.
Then,
Click on Sale document and select Create with reference
Then enter 3rd quotation number & click on COPY or Selection list. Then click on Copy .Then all line items which belong to quoation3 copy to order.
Now save the sale document.
Kindly give reward points
Edited by: WISH on Mar 19, 2008 2:25 PM -
How to extract the actual XML document from soap message?
My problem is " how to extract the actual XML document from soap message? "
i just want to extract the attachment i.e. (pure XML document without any soap header or envolope).
i could be ver thank full if u could solve my problem.
[email protected]Hi,
This is some skeleton code for extracting an attachment from a SOAPMessage.
import javax.activation.DataHandler.;
import javax.xml.soap.*;
import javax.xml.message.*;
Iterator allAttachments = message.getAttachments();
AttachmentPart ap1 = null;
while(allAttachments.hasNext()){
ap1 = (AttachmentPart)allAttachments.next();
//Check that the attachment is correct one. By looking at its mime headers
//Convert the attachment part into its DOM representation:
if(ap1.getContentType() == "text/xml"){
//Use the activation dataHandler class to extract the content, then create a StreamSource from
//the content.
DataHandler attachmentContent = ap1.getDataHandler();
StreamSource attachmentStream = new StreamSource(attachmentContent.getInputStream());
DOMResult domAttachment = getDOMResult(attachmentStream);
domAttachment holds an xml representation of the attachment.
Hope this helps. -
How do you create a PDF document from excel???
How do you create a PDF document from excel???
Hi Kwasi Debra,
You might need to sign up at "https://cloud.acrobat.com/" using your Adobe ID credentials.
Then, select 'Create PDF' tab and click on 'Select PDF files to export' option.
Upload your excel file and it will get converted to PDF format within a couple of minutes.
Later, you can even download the converted file onto your system.
Please try in the same manner and check.
Regards,
Anubha -
Using pages, how can I create a label run from contacts
Using pages, how can I create a label run from contacts?
You mean you want to use XML to create a flat file, right? Not that the database is using XML in some way? If so, why do you want to use XML?
-
How can I get the XML structure from a flat structure?
Hi all,
in my XI SP 12 I use a JMS adapter to read information using the WebSphereMQ transport protocol.
The structure that I receive have this format:
<Name_A.KeyFieldValue><Name_A.fieldName_A1_Value>...<Name_A.fieldName_AN_Value>
<NumberRecordType_B><NumberRecordType_c>
<Name_B.KeyFieldValue><Name_B.fieldName_B1_Value>...<Name_B.fieldName_BN_Value>
<Name_B.KeyFieldValue><Name_B.fieldName_B1_Value>...<Name_B.fieldName_BN_Value>
<Name_C.KeyFieldValue><Name_C.fieldName_C1_Value>...<Name_C.fieldName_CN_Value>
<Name_C.KeyFieldValue><Name_C.fieldName_C1_Value>...<Name_C.fieldName_CN_Value>
the problem is that in this structure each line is not separated by a carriage return or a comma, I have all the information in a single line:
<Name_A.KeyFieldValue><Name_A.fieldName_A1_Value>...<Name_A.fieldName_AN_Value><NumberRecordType_B><NumberRecordType_c><Name_B.KeyFieldValue><Name_B.fieldName_B1_Value>...<Name_B.fieldName_BN_Value>...<Name_B.KeyFieldValue><Name_B.fieldName_B1_Value>...<Name_B.fieldName_BN_Value><Name_C.KeyFieldValue><Name_C.fieldName_C1_Value>...<Name_C.fieldName_CN_Value>...<Name_C.KeyFieldValue><Name_C.fieldName_C1_Value>...<Name_C.fieldName_CN_Value>
and the customer don't want to insert a line separator.
Then, the question is:
How can I get the XML structure from this structure?
If possible, I don't want to develop new Module and add it in the JMS Module Sequence.
PS I have already read the article "How to Use the Content Conversion Module with the XI 3 J2EE JMS Adapter.pdf" and it doesn't seem to help me.
Best Regards,
PaoloTo get context parameters from your web.xml file you can simply get the ActionServlet object from an implementing action object class. In the perform (or execute) method make the following call.
ServletContext context = getServlet().getServletContext();
String tempContextVar =
context.getInitParameter("<your context param >"); -
How can I create an audio CD from the audio only portion of my iMovie?
Hello, I brought in about 50 min of Digital video into iMovie, I separated (split) the audio from the video, I unlocked the audio, I deleted the video, and now I want to just create an audio CD from the audio that is left.
Can I do this? and if yes how? If I can not, how can I create an Audio CD from on my G5 off a tape on my digital camcorder?
Any help would be apprecaited.This is how:
Go to:
'File'
'Share'
'Quicktime'
'Expert Settings'
'Audio as AIFF' or pick your brand of compression.
Drag and drop the resulting file into iTunes.
Enjoy!
P.S. - You didn't need to delete the video but I think that'll be okay. -
How can I download a .pdf document from a web link without Adobe Reader starting automatically and preempting the download?
That depends on your operating system and browser. On Windows, e.g. using Firefox, you right-click on the link, then select 'Save link as...'.
-
Can we create multiple billing document from delivery with single line item
can we create multiple billing document from delivery with single line item
Hi
Please check the link
[can v create multiple billing document from delivery with single line item]
and as Lakshmi said, check the forum before posting an issue.
Regards
AA -
Can v create multiple billing document from delivery with single line item
can v create multiple billing document from delivery with single line item
Dear Sandesh
Go to VOV7, select your item category. In this maintain K for Billing Relevance
Now go to VF01, give the delivery number and do not press Enter. Instead click on Selection list on the next screen, select the items you want to bill and click copy and continue if necessary
thanks
G. Lakshmipathi -
HT201441 how can i create and audio cd from a music track I have on my ipod
how can i create and audio cd from a music track I have on my ipod
This is how:
Go to:
'File'
'Share'
'Quicktime'
'Expert Settings'
'Audio as AIFF' or pick your brand of compression.
Drag and drop the resulting file into iTunes.
Enjoy!
P.S. - You didn't need to delete the video but I think that'll be okay. -
How can i create my own file from the Adobe Export PDF to Word ?
How can I create my own file from the file of the Adobe Export PDF to Wodrd?
If there is handwritten content in your PDF then ExportPDF can't convert that to word.
~Deepak
Maybe you are looking for
-
Topic says it all... My friend started a installation of Windows Vista, but pulled out after deleting all partitions... So now i power it on, get a blank screen (seems a bit gray because of backlighting, should show the apple logo right?)... Then aft
-
I rented a movie from itunes on my ipad and now want to play it on my appletv, but cannot get it to show up. What do I need to do?
-
How to fetch columns in cursor using FETCH?
create or replace PROCEDURE newprocedur(outname OUT VARCHAR2,outroll OUT NUMBER) AS CURSOR c1 IS select Name,Rollno,Section from emp; BEGIN Open c1; fetch c1 into outname,outroll; Here out of 3 columns in cursor is it possible to fetch only two colum
-
Callback Visual C++ 6.0 and DAQmx
I'm using Visual C++ 6.0 and trying to use a callback function in DAQmx. I am using the example "VC_ContGen_IntClk". This program compiles and runs fine in .NET but in Visual C++ 6.0 I get an undeclared indentifier error. In my .h file for class CniD
-
Cannot uninstall reader 9.3.2 or install update
The latest update will not install. When I try to uninstall Acrobat Reader I get this message: The installation source for this product is not available... Windows Installer CleanUp Utility is no longer available. How do I uninstall Reader? I an