Save XML file?
I have a blog on Blogger http://www.enduringepilepsy.com that I want to design my own template for. I'm fairly familiar with HTML and CSS, and I've been working on the code for a few days.
The problem: Blogger will only upload an XML file. And if you copy and paste the HTML into the Blogger editor, Blogger gives errors.
I've been writing the theme in a program called TextWrangler, which is nice because it numbers the code lines and colors it as you type. http://http://www.barebones.com/products/textwrangler/ However, although you can save the file in TextWrangler as XML, its only showing in Finder as a TXT; so it won't upload.
This problem is making it that I can't see the progress of my work and wouldn't be able to use the final theme.
Can anyone tell me how to save an XML file on my MacBook? *I'm running Mountain Lion 10.8.4
Blogger kicks it back giving parse errors about the code, usually for the open/close of HTML tags; which is part of what led me to believe it was the file. Also because my other XML files (downloaded back-ups) look like this in Finder:
Being that it was showing up differently, and errors, I thought it was a problem saving as XML.
If the first image is how your TextWrangler files appear - a few questions:
do you use yours on Blogger? can you view the code by dragging to a browser? have you been able to upload anywhere without a problem?
I've even just edited my old template, which was a downloaded free template, but if I save it can't upload - so I'm really stumped by this
Similar Messages
-
Hi,
It is urgent for me to know how to save xml file. I use VC++6.0, Oracle xdk 9.0.0.0.0 or 9.0.0.0.0Abeta under windows98.
It is OK to compile the program with print() method. But system will tell me there is illegal operation when I run it. If I delete the line with print(), the result will be normal.
in class node, there is two functions
void print(ostream *out = &cout, uword level = 0,uword step = 4);
void print(DOMString buffer, size_t bufsize, uword level = 0, uword step = 4);
Is there anyone who may tell me how to use them? to write back specific xml file?
Without print(), I can not save the xml file...It seems in Oracle xdk9.0.0.0.0, there is no obvious function to save the file.(or because I am a new comer , not familier with DOM)
Can anyone tell me how to save xml file? or just paste an example! It is very a little urgent to me...Hope you give me some ideas....
Many thanks in advance!!!!
yours,
FienaHi,
goto sxmb_adm > intergration engine configration > specific configration
go in edit mode > new entry
choose
Category -> IDoc
Parameters -> XML_CONVERSION
current value -> 2
Regards,
Manisha -
Using "Save As" execCommand in IE8 to save XML file in ANSI format instead of UCS2-Little Endian
I am currently trying to save an XML data using "SaveAs" execCommand from Javascript in Internet Explorer 8 only.I am using document.write(xml) to write the xml content after i open a window.The document object in IE8 uses a saveAs Exec
Command to allow the user to save the xml file in the local folder.The XML file is generated but it doesnt set the encoding to my preferred type for a different interface where i need to send this XML which is ANSI/UTF-8 encoding.I can only save
the XML in UCS2 little Endian encoding format.Below is the code i am using.
var location = "D:\\export_to_MCT"+dateTime+".xml";
var xml = tmpSelectedConfigurationXML.transformNode(xslDoc);// XML Is generated here
alert(xml);
**var testlink = window.open ("about:blank","_blank","toolbar=no,status=no,menubar=no,scrollbars=no,resizable=no,left=10000, top=10000, width=10, height=10, visible=none");
testlink.document.write(xml); //fileData has contents for the file
testlink.document.close();
testlink.document.execCommand('SaveAs', false, location);**
testlink.close();
My purpose is to save the xml in ANSI/UTF-8 encoding without BOM format.I cant use Scripting.FileSystemObject method of ActiveX object.Please suggest@panda Boy--
But my intention isnt that .I need to download the xml in ANSI format -
How to Save XML file in the same directory as the swf file automatically?
Hi all,
I'm really new here with flash and actionscript 3, so i might not make any sense, probably. Any input is greatly appreciated.
So here's my problem, i'm trying to make a Top Score history for a flash game, which i load from an XML file. The problem comes to when i want to update the XML file. how do i do that automatically without prompting the user (ofcourse). I want it to be saved automatically to the same directory as the flash file.
here's my code right now, but it prompts the user where it wants to be saved, which i don't want to happen:
var xml:XML = <XML>
<topScoreList>
</topScoreList>
</XML>;
for(var i:Number=0; i<10; i++)
var Record:XML = <Record>
<score></score>
<playerName></playerName>
</Record>;
Record.score.appendChild(topScores[i].toString()); //topScores[] -> class variable containing scores
Record.playerName.appendChild(topNames[i].toString()); //topNames[] -> class variable containing names
xml.topScoreList.appendChild(Record);
var ba:ByteArray = new ByteArray();
ba.writeUTFBytes(xml);
var fr:FileReference = new FileReference();
fr.save(ba, "topScoreList.xml");yeah that makes sense, actually - after reading a dozen more forums. It's really weird tho that flash doesn't have a Buffer writer, unlike other programming frameworks.
But yeah, thanks. i'll start reading on flash.net.SharedObject, correct ? Thanks.
Anyways, if anyone out there has a different input, will be greatly appreciated!! -
How to save xml files in audition 4?
im using audition 3 on my PC, my buddy is using audition 4 on his mac (across the country). we are trying to record a song together, but whenever he saves a session he can only save it as sesx. is there a way he can save it as a XML file so I can open it in Audition 3?
PLEASE HELP!!!!Would Suite Spot Studios "AA Translator" achieve this? If you navigate to his web site you can test the app by submitting a test project to him and he/they will attempt to "convert" it for you. (Only one of you, you or your buddy, would need to buy and have the app installed).
I realise this is something of a "long shot" since "suitespot" does not use a Mac and this "new" session format (.sesx) may not be readable by his app.
Jeff -
SAVE XML FILE Only For cetrain field with Condition
Hi Team,
I have to save my journal entries as XML File.
I have written this code ...It is working
oJE.GetByKey(3)
oJE.SaveXML("C:\Documents and Settings\Firos C\Desktop\MyXML3.xml")
So this code will save all data from OJDT and JDT1. So I dont want to save JDT1.SysCred Field How we do this
or how we can delete JDT1.SysCred Field once we save our XML.
Also I need to give condition while selecting where OJDT.Ref2 <> Null
How we can resolve this issue...?
By
FirosResolved by using XML node deletion operations
-
I was trying to replace a Node in an XML file (see attached VI - LV 2010), but for some reason the Load or Save XML VI's are changing the format of the XML Header (only by a couple of \n characters, but enough for the application reading the XML file to say it is corrupt). In the Load XML VI I have left all the Inputs at their default values (ie. Preserve Whitespace) so why is the file being modified?
What the original file header contents look like.....
<?xml version="1.0" encoding="iso8859-1" standalone="no" ?>
<METRONFile Type="Record" Version="2.0.1">
<Application Name="Ansur" Version="2.9.4">
What the Header looks like after using the LabVIEW Load/Save XML VI's.
<?xml version="1.0" encoding="iso8859-1" standalone="no" ?><METRONFile Type="Record" Version="2.0.1">
<Application Name="Ansur" Version="2.9.4">
Chris
Attachments:
XML Replace Node Value.vi 16 KBBelieve me I have tried all possible variations of the inputs to the NI_XML.lvlib:Load XML File.vi, none of them make a difference. Also the Block Diagram of this VI doesn't help much since it is just a couple of Property and Invoke Nodes so nothing to debug really.
I have attached the XML file that we are working with if you want to experiment - thanks
Note: I had to change the extension of the attached file from *.mtr to *.txt since the website says it is not a valid extension for an attachment.
Chris
Attachments:
0350E141014545182220110131_new.txt 11 KB -
Save XML file error permission
Hi everyone,
I read a XML file, edit it and save again:
var filePath:String = File.applicationDirectory.resolvePath("alerts.xml").nativePath;
var file:File = new File(filePath);
var fs:FileStream = new FileStream();
fs.open(file, FileMode.READ);
fs.addEventListener(IOErrorEvent.IO_ERROR, editsettings_IOError);
var xml:XML = XML(fs.readUTFBytes(fs.bytesAvailable));
fs.close();
fs.open(file, FileMode.WRITE);
xml[key] = value;
xml.toXMLString();
fs.writeUTFBytes(xml);
fs.close();
When I´m in debug mode, everything is fine, but when I generate a Executable installer (native installer), it doesn´t work.
I don´t have permission.
Any solution?Hello,
That's explicitely marked in documentation to not use "applicationDirectory" for write (updates/modification/deletion/etc), e.g.:
The File class includes static properties that let you reference commonly used directory locations. These static properties include:
File.applicationStorageDirectory—a storage directory unique to each installed AIR application
File.applicationDirectory—the read-only directory where the application is installed (along with any installed assets)
and later on the same page:
Modifying content in the application directory is a bad practice, for security reasons, and is blocked by the operating system on some platforms. If you want to store application-specific data, consider using the application storage directory (File.applicationStorageDirectory).
http://help.adobe.com/en_US/FlashPlatform/reference/actionscript/3/flash/filesystem/File.h tml#applicationDirectory
So as pointed in docs you could use applicationStorageDirectory as location where you application-specific content is to be stored/created/updated/written/etc.
(otherwise everything works fine when running local ADT/debug session - but it could fail at any time when deployed)
hth,
kind regards,
Peter -
Is Flex able to take form data, put it into an XML file, and
then save that xml file in a specific folder on my server? If so,
could someone point me to a tutorial or an example? Thanks so much
for your help.I think we are in a bad neighborhood of Flex. Here's what I
found from the forums so far:
"'ve been down this road before, and it isn't possible right
now. It is on our list for the future as this is a much-desired
feature. We are limited to what the browser environment offers.
Plus we have a deep committment to maintain a high standard of
security. Allowing Flash applications to read and write files
directly to the user's hard drive would violate that trust. So part
of our future task is to figure out how to do this in keeping with
the spirit of our security efforts.
Peter Ent
Senior Flex Product Support Engineer
http://weblogs.macromedia.com/pent
Since "we're limited to what the browser environment offers"
we can always use the Save As... to save content directly to the
server or hard drive. I know that's brute force and not what you
are looking for but it is a start. There was some discussion about
Active X which I am not a fan of either. Oh Well... -
Unable to save xml files.
I am using frameMakker 11 and the authoring platform for the creation of S1000D xml modules withing a CSDB environment. We author in frameMaker but when we try and save we receive the following error message.
has anyone else encocuntered this and what has been done to correct it.The file name is developed using S1000D file naming conventions as directed by the International Specification for technical Publications "s1000d_Issue_4_0
The working location we are saving to is on our local C drive.
This problem does not occur all the time and there is nothing specific that will trigger it. -
Error while saving xml file using PDFDocument API
Hi,
I am trying to save xml file using byte array obtained from interactive form element in webdynpro java.
The file gets saved but I get fllowing error message when I open the file.
The XML page cannot be displayed
Cannot view XML input using style sheet. Please correct the error and then click the Refresh button, or try again later.
An invalid character was found in text content. Error processing resource 'http://uxjciesk.wdf.sap.corp:50000/irj/go/km/doc...
The code I am trying to achieve the functionality is:
byte[] byteArray = wdContext.currentContextElement().getPdfSource();
IWDPDFDocumentHandler pdfDocumentHandler = WDPDFDocumentFactory.getDocumentHandler();
IWDPDFDocumentAccessibleContext documentAccessibleContext = pdfDocumentHandler.getDocumentAccessibleContext();
documentAccessibleContext.setPDF(byteArray);
IWDPDFDocument pdfDocument = documentAccessibleContext.execute();
ByteArrayInputStream dataInputStream = (ByteArrayInputStream) pdfDocument.getPDFAsStream();
further, the datainputstream is used to store the file. I am able to save same xdp template in pdf file format successfully, the error only occurs for xml file storage.
Please, advise.
Regards,
UrvashiHi Urvashi,
Try this code
String contentStr = getXMLData(wdContext.currentContextElement().getPdfSource().read(false));
String data = "";
ByteArrayOutputStream pdfSourceOutputStream = new ByteArrayOutputStream();
try {
InputStream pdfSourceInputStream = wdContext.currentContextElement().getData().read(false);
BufferedInputStream bufferedInputStream = new BufferedInputStream(wdContext.currentContextElement().getData().read(false));
int aByte;
while ((aByte = bufferedInputStream.read()) != -1) {
pdfSourceOutputStream.write(aByte);
pdfSourceOutputStream.flush();
pdfSourceOutputStream.close();
IWDPDFDocument pdfDocument = null;
try {
// Create an instance for PDFDocumnetHandler
IWDPDFDocumentHandler pdfDocumentHandler = WDPDFDocumentFactory.getDocumentHandler();
//Create an Inatance for PDFDocumentAccessibleContext
IWDPDFDocumentAccessibleContext documentAccessibleContext = pdfDocumentHandler.getDocumentAccessibleContext();
//set the pdf data as OutputStream to the PDFDocumentAccessibleContext instance
documentAccessibleContext.setPDF(pdfSourceOutputStream);
//call the server to get the data
pdfDocument = documentAccessibleContext.execute();
//get the xml data in a InputStream
ByteArrayInputStream dataInputStream = (ByteArrayInputStream) pdfDocument.getData();
} catch (Exception e) {
data = "Null";
} catch (IOException e) {
Regards,
Mathan -
Hi guys,
I'm having quite simple task, but no idea how to achieve it. A have a While loop, inside it I have som form to fill in and the output of this form is saved into xml file (using older MSXML library) and OK button for running parser and writting data into right place in XML file. All I need to do is to save XML file after the Stop button is hit, or after e.g. five minutes of application run. Just simple autosave feature.
For better ilustration, please see picture, or example.vi file.
I am running LV 2012
Thank you for your answers.
Attachments:
Example.vi 9 KBYou could put these functions in an event structure within the loop. Have a shift register on the loop, passing the value through the various states of the event stucture. Have the "save" button trigger an event to save your data, and at the same time (bad pun) put the current millisecond timer value onto the shift register. In the time out case of the event structure (with a time out value of, say, 100mS wired to it to cause the timeout case to trigger regularly), compare the value of the shift register with the current millisecond count and when enough time (x) has passed have it: 1) put the new time count on the shift register, 2) save the file. This should ensure that the file is saved every x within a 100mS window of time error.
Putnam
Certified LabVIEW Developer
Senior Test Engineer
Currently using LV 6.1-LabVIEW 2012, RT8.5
LabVIEW Champion -
File Receiver Adapter:Can't write a large xml file completely
Hi Folks
I am doing an IDOC - Xi - FILE scenario where i am writing the xml file as it is onto XI directory.
The problem i m facing is - the adapter does not write complete file. If i check from AL11 the file i am getting is not exceeding length 660.
I am not using any content conversion because my requirement is to save xml file as it is.
This is how it is getting saved:
<?xml version="1.0" encoding="UTF-8"?>
<ns0:MT_TEST xmlns:ns0="http://test.com/test_sapXi">
<Account>
<Account>9899999610</Account>
<Party>9800000611</Party>
<Invoice>
<No>100</No>
<InvoiceDate>25062010</InvoiceDate>
<Date>30062010</Date>
<Total>7</Total>
<Gross>100</Gross>
<Net>1000</Net>
<Line>
<No>100</No>
<Date>25062010</Date>
<Order>100</Order>
<Product>YAG</Product>
<Item>100</Item>
<Total>7</Total>
<Gross>1000</Gross>
i.e. some tags of <Line> are missing and then closing tags are also missing.
Could anyone please help how to extend the length.
Thanks
NainaSo Sorry the structure is like this
<?xml version="1.0" encoding="UTF-8"?>
<ns0:MT_TEST xmlns:ns0="http://test.com/test_sapXi">
<Account>
<Account>9899999610</Account>
<Party>9800000611</Party>
<Invoice>
<No>100</No>
<InvoiceDate>25062010</InvoiceDate>
<Date>30062010</Date>
<Total>7</Total>
<Gross>100</Gross>
<Net>1000</Net>
<Line>
<No>100</No>
<Date>25062010</Date>
<Order>100</Order>
<Product>YAG</Product>
<Item>100</Item>
<Total>7</Total>
<Gross>1000</Gross>
Shabarish
I saved the file to .htm from AL11 and saw that this much of the file is getting saved.
also if i goto communication channel monitoring i could see that in the MESSAGE DISPLAY TOOL it shows
Write to file "/inbound/xi/107/sss/AB1020100702-132041-124.txt" as text (character encoding US-ASCII) size 660 bytes
What could be the issue ??
Naina -
Saving xml files in oracle database
hi all
anyone who could tell me how can i save xml files in the database?In order to provide an intelligent answer we need much more information. Please describe the problem you are trying to solve in more detail. The kind of information that would help is
Database Version ?
What is the source of the XML Files ?
What is the size of the Files ?
How are they stored prior to wanting to load them into the database, on the database server or on a client ?
What is you preferred programming language ?
What kind of querys to do you want to run against the files once they are stored in the database ?
Note if your database version is pre 9i then the question can be better answered in the forum Technologies -> XML -> General
I can move you post there if appropriate -
Difference in registering versus not registering an XSD with xml files
SQL> select * from v$version ;
BANNER
Oracle Database 11g Enterprise Edition Release 11.1.0.7.0 - 64bit Production
PL/SQL Release 11.1.0.7.0 - Production
CORE 11.1.0.7.0 Production
TNS for 64-bit Windows: Version 11.1.0.7.0 - Production
NLSRTL Version 11.1.0.7.0 - Production
With the help of members of this forum, I have been able to successfully register an XSD, save xml files into tables with xmltype columns, and select data from the xml files. For this I am very grateful.
Forgive me not knowing this but, I can currently do these two things.
1. Register an XSD and create a table with an xmltype column based off of this XSD. Insert xml into this table that matches the format of the xsd.
2. Insert an xml document into a table with an xmltype column without registering it's corresponding XSD and then select data from this table too.
Is there a performance benefit to registering the XSD the xml file is based off of, when it comes to inserting into the table or selecting data from the tables after the insert ?
The xml files we insert could be anywhere from 1MB to beyond 500MB+ in size, as it depends on the amount of audit data generated. Is there a sweet spot as to how big or small you would keep the size of the xml files to avoid performance issues. If we need to do an audit in the future we would be inserting all the generated xml files into a table and run selects on that table. This data could be anywhere from a day's worth to everything from the time the system went live.
We want to avoid any over head associated with XSDs if they do hinder performance.
Thanks for your help in advance.
WallyThe xml files we insert could be anywhere from 1MB to beyond 500MB+ in size, as it depends on the amount of audit data generated.Schema-based XMLType (aka Object-Relational or structure storage) is exactly what you need in this case.
- When you register a schema within the database, Oracle automatically creates a set of object types, collections and tables that map the XML structure to the SQL data model.
- When you insert an XML instance document in the schema-based table, the XML content is then stored in the underlying relational structure.
- When you issue queries against the XMLType table, for example using XQuery and XMLTable, Oracle automatically rewrites the query to access the relational objects where the data resides. This process results in very efficient queries whose performance compares to queries against regular tables. The Object-Relational structure also supports indexing.
The documentation has whole chapters about it :
http://docs.oracle.com/cd/B28359_01/appdev.111/b28369/xdb05sto.htm#g1070409
http://docs.oracle.com/cd/B28359_01/appdev.111/b28369/xdb_rewrite.htm#BABHJECG
http://docs.oracle.com/cd/B28359_01/appdev.111/b28369/xdb06stt.htm#BABGFCFG
Maybe you are looking for
-
My hard drive took a nose dive not too long ago, and I've gotten a new one, but having problems transferring all my music from my iPod touch to the new PC. When I searched for help the only thing I found said it didn't apply to the iPod touch. Can an
-
Regarding MD04, Stock requirement Report
Hi SAP Guru, Hi Sir I am running MRP for the 05 finished material. All the Finished material has some material common and and Semi-finsief also.Lot SIze for the SFG and raw material are FZ and safety stock maintained,MRP ty
-
Smart value help autocomplete doesn't work
Hello, We are using CRM 7.0. We want to provide an autocomplete option for some customer input field. We decided to implement it with smart value help (F4) functionality. This customer field belongs to the customer Z view. When we use this Z view in
-
Safari won't open. Message appears: "Safari won't open any more."
Safari won't open. Message appears: "Safari won't open any more." Computer is connected to the internet. Mozilla Firefox works perfectly.
-
Printing on Preprinted form with EPSON LQ300 & EPSON LQ500 dot matrix print
Dear Expert, im having requirement to print form on preprinted page whose size is 6*9 inches which is smaller than A4 size paper and using EPSON LQ300 & EPSON LQ500 dot mattrix printer. my question is that 1)do i need to create diff. o/p type for di