XML Parsing of a file which keeps getting appended by another process
Hi:
What's the best method to parse an XML file as it's getting appended by another process. I need a functionality similar to UNIX "tail -f" where the reader waits for more input after reading is complete.
I am getting SAXParseException because the end root tag is not yet written but the parser thinks it has finished reading the file.
Any help will be appreciated.
I would not use a file, a better solution would be to use a message pipeline. The (JAXM) Java API for XML Messaging, is designed to do this type of task.
http://search.java.sun.com/ClickThru?url=http%3A%2F%2Fjava.sun.com%2Fxml%2Fjaxm%2F&qt=JAXM&pathInfo=%2Fjava&hitNum=1&col=jsun0&col=jsun1
Similar Messages
-
When I upload files and correct in lightroom then I export to another named file I keep getting two duplicates. numbered 1 and 2. this never happened before
When I first upload to lightroom I set up a file called new photos. When I correct them I export to a newly named file. But when I go to the newly named
File on my harddrive there are duplicate files
Stan -
IMovie HD creates corrupt db file which not get deleted out of trash
iMovie HD creates corrupt db file which not get deleted out of trash.
How to delete this file ?
Please help me out,
Thank You.Where is what file created? (Do you see it in iMovie or Finder?)
Which trash, iMovie's or Finder's? -
Losing Line-feed in XML parsing (XMLTRANSFORM) or File output (clob2file)?
Hi all, need some help please!
I'm using a xslt file to transferm a XML file into a txt format file. Within the XSLT file, there is a carriage-return (<xsl:text>
</xsl:text>) (it disappeared already, here is what i'm using "#xD" or "#xA", have to take the '&' and ';' away), but the final output txt file seems to lose this carriage-return/line-feed information. The output data became one-line.
Here are the steps I've used:
1. lv_xml_data = XMLTRANSFORM (a.xml_data, b.f_xslt)
=> output data into XMLTYPE;
2. using XMLTYPE.getclobval to get the output data into CLOB format.
lv_output_clob := XMLTYPE.getclobval (lv_xml_data);
3. using encoding:
lv_output_clob :=
DBMS_XMLGEN.CONVERT (lv_output_clob, DBMS_XMLGEN.entity_decode);
4. using clob2file write to a file with txt format.
DBMS_XSLPROCESSOR.clob2file (lv_output_clob,
lv_output_dir,
lv_filename,
NLS_CHARSET_ID ('UTF8')
Been struggling with these a few days already. Any help is appreciated. I would really like to get some input to see what might cause the carriage-return/line-feed characters lost.
Thanks in advance!
-Jane
Edited by: user9084567 on Feb 1, 2010 1:45 PM
Edited by: user9084567 on Feb 1, 2010 1:47 PM
Edited by: user9084567 on Feb 1, 2010 1:48 PMA_non,
After a few testing, I can identify the CRLF was lost in XMLTRANSFORM. I had read your other thread related to this, and try to run this sample code:
/* Formatted on 2010/02/03 15:32 (Formatter Plus v4.8.8) */
DECLARE --Local variables here
v_xml XMLTYPE
:= XMLTYPE
('<
offers xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="xsd.xsd"><
submit type="DAM" date="2007-03-28" name="MKTPART1" mode="NORMAL"/><
offer name="Jamestown" flag="true" version_no="1.0"><
standing date="2007-03-29" type="WED"/><
identifier external_id="523736560"/><
/offer><
/offers>'
v_xslt XMLTYPE
:= XMLTYPE
('<
xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"> <
xsl:output method="text"/> <
xsl:variable name="new_line" select="''
''" /> <
xsl:template match="/"> <
xsl:value-of select="/offers/offer/...name"/><
xsl:value-of select="$new_line" /><
xsl:value-of select="/offers/submit/...date"/><
xsl:value-of select="$new_line" /><
xsl:value-of select="/offers/offer/standing/...date"/><
xsl:value-of select="$new_line" /><
xsl:value-of select="/offers/offer/standing/...type"/><
xsl:value-of select="$new_line" /><
/xsl:template><
/xsl:stylesheet>'
BEGIN -- Test statements here
DBMS_OUTPUT.put_line (XMLTYPE.transform (v_xml, v_xslt).getstringval ());
END;
But come out these error:
Error at line 2
ORA-31011: XML parsing failed
ORA-19202: Error occurred in XML processing
LPX-00230: invalid character 10 (U+000A) found in a Name or Nmtoken
Error at line 4
ORA-06512: at "SYS.XMLTYPE", line 310
ORA-06512: at line 2
Can not figure out why. Try to use this <xsl:variable name="new_line" select="''& # x A ;''" /> inside my style sheet, but it seems not taking it. Not too sure what's exactly should be the quotes for "''& # x A ;''" (w/o space). If I used doub quote + two single quotes, it returns error, LPX-00601: Invalid token in: ' '; if I used single quote + double quote, it did not bring in CRLF at all.
Any input?
Thanks in advance. -
In Oracle 10g for XML parsing what jar files have to be loaded?
I am trying to parse the sample xml file. I want to know what are the jar files which needs to be loaded in Oracle 10g. In Oracle 9i I have files which have been asked to load in to the database.
1) xmlparserv2.jar and
2) xmlplsql.jar
But in Oracle 10g under lib I could see only xmlparserv2.jar.What are the jar files which have to be loaded using loadjava in this case?Something like this ?
SELECT REGEXP_REPLACE('TABLE_COLUMN_1_ID,TABLE_COLUMN_2_VALUE,TABLE_COLUMN_3_DESC',
'([^,]+)', ' \1 = \1') x
FROM DUAL;
X
TABLE_COLUMN_1_ID = TABLE_COLUMN_1_ID, TABLE_COLUMN_2_VALUE = TABLE_COLUMN_2_VALUE, TABLE_COLUMN_3_DESC = TABLE_COLUMN_3_DESC -
C5- Regarding the original files which we get in P...
By mistakely if I had deleted the files which are provided originaly in the Phone and memory card while we purchase the brand new piece.
How can I get the lost contents. Are those files originaly provided in the phone memory and memory card important.
I would also like to know what is the purpose of folders originaly provided in memory card e.g. 'Cities' . The folder 'Cities' in my phone consists of 137 MB. What if i delete that entire folder.
I hope I would get replies on my questions asked aboveHi,
Depend of what was preloaded it is not important for your phone to function correct. Usual it is games, pictures and some music files. Those can be on the memory card or in the phone memory it is different from phone to phone. You will need to get the phone re-flashed in a service center to re-create the date.
The folder cities will consist of map data for the application MAPS. You can re-create or change those files by installing OVI suite. -
I keep getting the message that another device on the network is using my IP address. I have no other devices except for an IPhone. What should I do?
Turn the iPhone off ... turn it back on again.
-
I keep getting "Problem during delivery processing" messages
This morning I started getting "Problem during delivery processing" messages like this one...
Same problem here. And i can't fine apple support contact for submit this problem. Bad bad bad bad support page appe .
-
Cant open pdf files.I keep getting invite to buy Adobe Arobat Pro. Help!
I can't open pdf files anymore. Every time I try to open a pdf file I get a message trying to sell me Adobe Arobat Pro which I had on trial earlier this year. I am a student and need to open pdf documents every day. Please help or offer a work around.
Many thanks.Uninstall Acrobat, the install Reader. http://get.adobe.com/reader/enterprise/
-
Forgot to mention I'm using Firefox V.4
Hey Jorge,
I've checked Reader, and there are no updates. I've run a Windows version compatibility test - although it only goes up to Vista, and not Windows 7.
Anyway, it appears I can now open Adobe files - but I've found another issue: when I right-click on a file and scroll down to the 'send to email recipient', it doesn't automatically open an Outlook email with the file as an attachment - in fact it doesn't open Outlook at all, let alone automatically?
Any clues? -
I'm trying to open a PDF file but keep getting error message "Access denied." Help.
Every time I try to open a PDF attached to an email I get the error message "Access denied." How do I fix this?
Actually my son directed me to a help site run by a guy named Brian Stevenson. Here is what I did --
1. Launch Adobe Acrobat Reader XI
2. Go to Edit>Preferences
3. Click on Security (Enhanced)
4. Uncheck "Enable Protected Mode at startup"
5. Click Yes when dialog box open to remind closing of application
6. Click OK to save
7. Exit Adobe Reader
Worked like a charm!! -
my mac mail is corrupted or being infiltrated. emails are being sent to whomever and where ever. the recipients are not from my known contacts list, and these emails are also being rejected. where can I report this problem to, specifically what can I do about it.
Thinking about it, ClamX will find Windows as well as Mac malware. This might not have been a Mac trojan. Here's a list of recent Mac malware in the ClamX catalog.
• Backdoor.OSX.BlackHole
• Trojan.OSX.MacDefender
• Trojan.OSX.MacDefender.B
• Trojan.OSX.MacDefender.C
• OSX.Defma-1
• OSX.Defma-2
• Trojan.OSX.MacBack
• Trojan-Downloader.OSX.Fav.A
• Trojan-Downloader.OSX.Fav.B
• OSX.RSPlug
• Trojan.OSX.iservices.A
• Trojan.OSX.iservices.B
• OSX.DNSChanger.dmg
• OSX.DNSChanger.dmg-1
• Trojan.OSX.RSPlug.F.dmg
• Trojan.OSX.RSPlug.F.dmg-1
• Trojan.OSX.RSPlug.F.dmg-2
• Trojan.OSX.RSPlug.F.dmg-3
• Trojan.OSX.RSPlug.F.dmg-4
• Trojan.OSX.RSPlug.F.dmg-5
• Trojan.OSX.RSPlug.G.dmg
• Trojan.OSX.RSPlug.G
• Exploit.OSX.Safari
• Trojan.OSX.Cowhand
• OSX.DNSChanger
• OSX.Trojan-2
• Trojan.OSX.Opener
• Trojan.OSX.RSPlug.C
• Trojan.OSX.RSPlug.D
• OSX.Tored
• OSX.RSPlug-2
• Trojan.OSX.OpinionSpy.B
• Trojan.OSX.OpinionSpy.A -
downloaded creative cloud. downloaded trial lightroom etc. now how do I open these apps? HELP!! so lost!
YOu launch them like any other program on your system - from the start menu/ launchpad/ dock or the application install folder.
Mylenium -
Hi,
I am using Windows Server 2012 R2 Standard, SSIS 2012. I am trying to copy files from a remote location by calling pscp.exe through a batch file (FileCopy.bat at location M:\bin\) which is referenced in a SSIS Execute Process Task. My batch file content
is,
ECHO OFF
echo. >> M:\Prod\bin\SourceFile_FileLog.txt
echo %date% - %time% - Copy Start (XYZ_a201211155952avx0_69999.NOR.gz) >> M:\Prod\bin\SourceFile_FileLog.txt
M:\ProdFiles\bin\pscp.exe -unsafe -scp -pw aaaaa myuser@sourceserver:/ABC_data/*.NOR.gz M:\Prod\FromMediation\
echo %date% - %time% - Copy Complete >> M:\Prod\bin\SourceFile_FileLog.txt
The error I am getting is
[Execute Process Task] Error: In Executing "M:\bin\FileCopy.bat" "" at "", The process exit code was "1" while the expected was "0".
Exactly same setup but using Windows Server 2003 R2 Enterprise and SSIS 2005, this works fine and copies the files successfully.
Please provide some guidance on this.
Thank you!
'In Persuit of Happiness' and ..... learning SQL.Hi,
This is what I am getting while running the batch file from command prompt
M:\bin\mttrb1>CDR_FileCopy
M:\bin\mttrb1>ECHO OFF
The system cannot find the path specified.
The system cannot find the path specified.
scp: M:\Prod\FromMediation\: Cannot create file
scp: M:\Prod\FromMediation\: Cannot create file
scp: M:\Prod\FromMediation\: Cannot create file
The system cannot find the path specified.
'In Persuit of Happiness' and ..... learning SQL. -
I have bought 2 ringtones Rome iTunes which I have received but it won't let me delete card details as saying payment error with second song but I have it on phone an now it's saying payment processing is not available an d cannot get any free apps form App Store either how can I sort this
See this thread for background on why iTunes can end up with duplicates and how they can be systematically removed. The script there is for Windows users and the "show duplicates" menus have moved around in iTunes 11, but the advice on clearing recently made duplicates should still hold.
As given in my older post "Reorganize library" is meant as a one time command to change the structure of a pre-iTunes 9 library into the newer layout that places music in its own subfolder of the media folder. Once used, if the option becomes available again that suggests that a file called .iTunes Preferences.plist in the media folder has been deleted or editied.
See also this post.
tt2
Maybe you are looking for
-
Difference between BEx tansport and normal transport
Dear Experts, Could someone please explain the difference between normal transport truck button and the truck with 'BEx' as label. Please let me know the context where these will be using Kind regards Shanthi
-
Finding pdf files on my android based smartphone with the new Adobe Acrobat DC
All of a sudden, I no longer have Adobe Reader, which was very efficient. Had a directory so that I could access all of my files. Highlight and comment tools. Now I have nothing. It would have been better to provide an option to retain the app rathe
-
How do you track a photo book you purchased through aperture?
I have made a photo book in aperture and I would like to find out the status of the order. Does anyone know where I can find this?
-
Hello - I'm running Oracle 10g on Solaris 9. When I was on Oracle 8 on Solaris 8, I was able to run a long query, and the results were displayed in sqlplus while the query was running. In 10g, the query is running, but no output is displayed on the s
-
Importing a mime object from mime repository.
Hi, Where to place our own image files in mime repository, and tell me the process of importing it to our application. Regards, Sachidanand.B