Search the Community
Showing results for tags 'xml'.
-
Hello, I have a Class CLASS1 containing multiple Strings, a String array and an Array of CLASS2 CLASS2 contains a String and an Integer, I currently store CLASS1 objects by Serializing them into XML and Deserializing them when I need to read them, but I want to be able to filter them more easily using SQL how can I store them in a way that I can read and filter them using one SELECT command, like I would when deserializing the xml document. The size of the Arrays isn't fixed I tried storing the two arrays in their own tables conecting them using foreign keys to the table were the rest of Class1 values are stored, but when I read them I get an extra output for every Element in each of the arrays, but I want just one output containing every element of both arrays and the other values from Class1
-
So I am currently writing an Asp.net website to track your inventory for an RPG, so I need to read the values for the items, now im wondering what would be the better format to store the items in. I have an class Item consistiong of multiple strings, ints and string[]s this file/table would not be written to by the user the program just needs to filter it to find the right item.
-
Hi, guy's I'm looking for program to: - print multiple .pdf at once (up to 500 files would be briliant) - efectivelly edit xml files (clear and organised,) - program which can insert values from excell to pre done .xml file ( according to the specific scheme) I would be glad to hear any suggestion's.
-
Typical task for me: I have a list of names of 50 local businesses and I need to find out their mailing address. I usually google them manually and copy/paste their address into my excel file. There's got to be a better way. My research shows several ways including google places api, vba code, excel power query. But the info is overwhelming and I'm not really smart enough to know what most of it means... My skill level is I can copy/paste VBA code and create various macro functions in excel. Any insight would be great. I'm willing to do my own research, just need to go down the right path, and not 100 dead ends based on my coding skill level. Thanks, Scrim Snacks
-
- google api
- xml
-
(and 2 more)
Tagged with:
-
Hello everyone, I have this XML <?xml version="1.0" encoding="UTF-8"?> <Livraria xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:x="livro.xsd" xsi:schemaLocation="x:livro.xsd LivrariaScheme.xsd" > <Secção nome="Não Ficção"> <Livros> <Livro Secção="Não Ficção"> <Título xml:lang="en">Voices from Chernobyl</Título> and this XSD <?xml version="1.0" encoding="UTF-8"?> <xs:schema version="1.0" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:x="livro.xsd" targetNamespace="livro.xsd" elementFormDefault="qualified"> <xs:element name="Livraria" type="x:TLivraria"> <xs:key name="Code_ISBN"> <xs:selector xpath="./x:Secçao/x:Livros/x:Livro"/> <xs:field xpath="x:ISBN"/> </xs:key> <xs:keyref name="Related_ISBN" refer="x:Code_ISBN"> <xs:selector xpath="x:Secção/x:Livros/x:Livro/x:Relacionados/x:RISBN"/> <xs:field xpath="."/> </xs:keyref> </xs:element> And I am getting this error cvc-elt.1: Cannot find the declaration of element 'Livraria'. [4] What am I doing wrong?
-
Hello everyone, I am doing a project on xml. Need to do a bookstore xml with xsd, xsl, all that good stuff Was wondering if this is good practice or if there is a better way to do it considering i'll be using the data on functions\variables <Título>Voices from Chernobyl <SubTítulo>The Oral History of a Nuclear Disaster</SubTítulo> </Título> So I have Título (Title) and SubTítulo (like second title or second part of title), should I have SubTitle has a attribute, some other form? Thanks
-
So, at work, we just found out that a software we use to manage our databases will be making some major changes in the next year. One major change is how we upload raw data to the database. Currently, we can upload text (tab delimited) files and/or .csv and everything works fine, but they are changing it to only accept .xml files. It won't be a big deal to start creating them as these files, the problem is that we now need to convert years worth of raw data into xml format. Is there terminal based tool (or anything else in Linux) that can handle the conversion?
- 1 reply
-
- linux
- conversion
-
(and 3 more)
Tagged with:
-
Hi, so I'm working on a bash script to convert several .txt files in a directory into .xml. I found it was pretty tricky to accomplish that directly so i attempted .txt to .html then .html to .xml and it worked perfectly. Now, I'm still kinda new to the world of bash scripts and was wondering how I might be able to accomplish some things. The first thing is, how do i set a variable equal to the number of .txt files in a directory. Second, well, here's my pseudo code... x = [number of .txt files in directory] for i in range (x): txt2html [file number i].txt -o [file of same name].html for i in range (x): tidy -q -asxml [file number i].html >[file of same name].xml rm *.html yea, i'm not exactly sure how to do for loops, or how to convert the files in a sequence and have the output file have the same name as the original, just in a new format. Any help is appreciated!
-
So I am having some serious problems with my Adobe Premier Pro CS6. Here is what I am trying to do. I edit my timeline in Premier Pro CS6, I export the XML File to be imported into Davinci Resolv for colorgrading, Then I reexport using the Premier Pro preset, I try to import the XML and NOPE. List of Issues Imported Timeline from Premier Pro to Davinci Resolv clips are not synced properly (cuts are wrong) Exported XML From Davinci Resolv is not recognised by Premier Pro Please help
- 1 reply
-
- troubleshoot
- adobe premier pro
-
(and 4 more)
Tagged with:
-
I'm currently working on a project that needs to export data to XML (creating KML file). The long of the short, I need help creating a different header and footer tag in XML.... So I have an issue I cannot find a resolution for and am looking for guidance or possible fix. I'm using JABX to make my XML script much easier to handle. So, for my KML, the first section is style. Here is the "generic" GoogleEarth KML: <Style id="s_ylw-pushpin"> <IconStyle> <scale>1.2</scale> <Icon> <href>http://maps.google.com/mapfiles/kml/shapes/placemark_circle.png</href> </Icon> </IconStyle> </Style> So, I can correctly push out everything within <IconStyle>; however, the issue I'm having is with the <Style> header. Its different than the footer (header has the id included, footer doesn't). I haven't been able to find a way in JABX to create a separate header from footer (unless I'm blind and haven't found it yet). My current IconStyle: ... (paraphrased) @XmlRootElement (name = "IconStyle") @XmlType (propOrder = ...) public class IconStyle { double scale = 1.2; String icon = "...insert location url here ..."; ....... } I've tried creating a list class to parent this, so I can serialize my <Style id= "..."> in the output. However, I cannot get that any class using JABX to function, nor manually push in my KML output class the ability to have a different header and footer (syntax issues when trying to use certain characters in the output). JABX makes the header/foot match exactly... I was pointed into the direction of using CDATA, but I am having trouble finding a nice clean example to use. If I could use Character DATA to force the header and footer, I would be completely fine with this; however, no luck as of yet. If JABX has this functionality, it would definitely make the code cleaner since manual would take up space and not look as sleek. However, I'm open to other options as well. Trying to force String output for some reason just doesn't jive well when being output into XML. Any insight, suggestions, or redirection would be much appreciated. Thank you very much in advance.
-
Ok, so I'm going to try and explain this as clearly as possible without writing a book. So we'll see how well that works out for me. Lol I'm trying to create a Lead sheet program so that we can keep track of calls that come in and which sales person it went to. I'm trying to figure out how to take this XML data and have it populate the CheckBoxes and data for the ComboBoxes automatically. Like creating a "Template" maybe, so that I show the XAML that each CheckBox should pull the information from the Service tag in the XML and then the ComboBox should get its information from the SubService tags. I have looked around online but I can't figure out what exactly I'm looking for so that doesn't help. Here's a picture of the program. An example that makes sense to me would be like: <Window> <Window.Resources> <XmlDataProvider x:Key="XMLData" Source="./Resources/Data/ProgramData.xml" XPath="/Data" IsInitialLoadEnabled="True" /> </Window.Resources> <DataTemplate> <CheckBox ItemsSource="{Binding {Source="XMLData", XPath="Services/Service/@Name"}} /> </DataTemplate> <DataTemplate> <ComboBox> <ComboBoxItem Content="{Binding {Source="XMLData", XPath="Services/Service/@Name.Value="CURRENTCHECKBOXITEMSUBSERVICE" /> </ComboBox> <!-- THIS WOULD POPULATE ALL THE COMBOBOX ITEMS FROM THE XML FILE SUBSERVICE TAGS UNDER THE CURRENT CHECKBOX ITEM --> </Window> I have the TextBoxes and everything laid out and I have the Data for the ComboBoxes in an XML file that's located at Resources/Data/ProgramData.xml with the data laid out as follows: <Data> <Users> <user id="01"> <Name>User Name</Name> <Phone>555-555-5555</Phone> <Email>someone@somewhere.com</Email> <Position>Sales</Position> <isSales>Yes</isSales> <isOffice>No</isOffice> </user> <user id="02"> <Name>User Name</Name> <Phone>666-666-6666</Phone> <Email>someone@somewhere.com</Email> <Position>Manager</Position> <isSales>No</isSales> <isOffice>Yes</isOffice> </user> </Users> <Sources> <Source Name="Radio"> <SubSource>Radio 1</SubSource> <SubSource>Radio 2</SubSource> <SubSource>Radio 3</SubSource> </Source> <Source Name="Internet"> <SubSource>Company Website</SubSource> <SubSource>FaceBook</SubSource> </Source> <Services> <Service Name="Batting"> <SubService>New Construction</SubService> <SubService>Existing Home</SubService> </Service> </Services> </Sources> </Data> The XAML for the CheckBox and ComboBox is as follows: <StackPanel Orientation="Horizontal" Grid.Column="1" Grid.Row="11" Grid.ColumnSpan="3" HorizontalAlignment="Center"> <StackPanel Orientation="Vertical"> <CheckBox Content="Fiberglass Batting" Margin="0 0 10 10" /> <ComboBox Width="135" Height="25" VerticalAlignment="Center" Margin="0 0 10 0" HorizontalAlignment="Center" ToolTip="SubService"> <ComboBoxItem Content="New Construction"/> <ComboBoxItem Content="Existing Home" /> </ComboBox> </StackPanel> </StackPanel> Well so much for keeping it short... Sorry about that I am just at a loss on how to explain this really or search for it for that matter. If someone could point me to a page that will explain this to me or help me with what to search for I'd GREATLY appreciate it. Thanks! Ryan
-
Hi, I'm pretty new to the programming world and I've been given an assignment to extract cdata from xml and then decoding it to binary by using base64 using Visual Studio. For the love of god I've been searching for 5 days on how to do this and I feel like throwing myself off a cliff. Can some kind souls help me with this and explain along the way? Unfortunately, I can't give examples as it is against my companies policy. But the data goes: <?xml version="1.0" encoding="UTF-8"?> <DispatchData> <TransactionId>526</TransactionId> <ContentFormat>CSV</ContentFormat> <Compressed>Y</Compressed> <Data><![CDATA[insert data here]]></Data> </DispatchData> Thanks for taking the time to read this. T.T
-
I am accessing an online api to get xml file with many ids. This is my code var https = require('https'); var xml2js = require('xml2js'); var parser = new xml2js.Parser({optionName: 'normalize'}); var concat = require('concat-stream'); parser.on('error', function(err) { console.log('Parser error', err); }); https.get("https://www.leaksapi.com/clinton-emails/from/<APIKEY>/Hillary%20Clinton", function(resp) { resp.on('error', function(err) { console.log('Error while reading', err); }); resp.pipe(concat(function(buffer) { var string = buffer.toString(); var cleanedString = string.replace("\ufeff", ""); parser.parseString(cleanedString, function(err, result) { console.log('Finished parsing:', err, result); }); })); }); And I keep on getting an Error: Non-whitespace before first tag. Even when I have cleared the first non-whitespace character in the line var cleanedString. Parser error Error: Non-whitespace before first tag. Line: 0 Column: 1 Char: [ at error (C:\Users\Snama\node_modules\sax\lib\sax.js:642:8) at strictFail (C:\Users\Snama\node_modules\sax\lib\sax.js:662:22) at Object.write (C:\Users\Snama\node_modules\sax\lib\sax.js:935:11) at Parser.exports.Parser.Parser.parseString (C:\Users\Snama\node_modules\xml2js\lib\xml2js.js:508:31) at Parser.parseString (C:\Users\Snama\node_modules\xml2js\lib\xml2js.js:7:59) at C:\Users\Snama\Documents\DonaldTrumpPropaganda\webreader.js:17:14 at ConcatStream.<anonymous> (C:\Users\Snama\node_modules\concat-stream\index.js:36:43) at emitNone (events.js:91:20) at ConcatStream.emit (events.js:185:7) at finishMaybe (C:\Users\Snama\node_modules\concat-stream\node_modules\readable-stream\lib\_stream_writable.js:475:14) What am I doing wrong. Thanks
- 2 replies
-
- node js
- javascript
-
(and 1 more)
Tagged with:
-
<resources> <string name ="app_name">Number guessing game</string> <string name = "texts">This is a number</string> </resources> package com.example.numberguessinggame; import androidx.appcompat.app.AppCompatActivity; import android.os.Bundle; import android.view.View; import android.widget.Button; import android.widget.TextView; public class MainActivity extends AppCompatActivity { TextView a; Button b; @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_main); a = findViewById(R.id.textView); b = findViewById(R.id.button); } public void changeNum(View view){ a.setText("6 0 0"); } } <?xml version="1.0" encoding="utf-8"?> <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:app="http://schemas.android.com/apk/res-auto" xmlns:tools="http://schemas.android.com/tools" android:layout_width="match_parent" android:layout_height="match_parent" tools:context=".MainActivity"> <TextView android:id="@+id/textView" android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="@string/texts" app:layout_constraintBottom_toBottomOf="parent" app:layout_constraintLeft_toLeftOf="parent" app:layout_constraintRight_toRightOf="parent" app:layout_constraintTop_toTopOf="parent" /> <Button android:id="@+id/button" android:layout_width="wrap_content" android:layout_height="wrap_content" android:onClick="changeNum" android:text="Button" app:layout_constraintBottom_toBottomOf="parent" app:layout_constraintEnd_toEndOf="parent" app:layout_constraintHorizontal_bias="0.498" app:layout_constraintStart_toStartOf="parent" app:layout_constraintTop_toTopOf="parent" app:layout_constraintVertical_bias="0.606" /> <TextView android:id="@+id/textView2" android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="@string/texts" app:layout_constraintBottom_toBottomOf="parent" app:layout_constraintEnd_toEndOf="parent" app:layout_constraintHorizontal_bias="0.498" app:layout_constraintStart_toStartOf="parent" app:layout_constraintTop_toTopOf="parent" app:layout_constraintVertical_bias="0.338" /> </androidx.constraintlayout.widget.ConstraintLayout> So I am using string resources instead of using hardcoded text in my layout and I want to be able to change the value of the texts string in my java activity. How do I go about this?
-
- java
- android studio
-
(and 1 more)
Tagged with:
-
Hey guys, so I'm trying to create a small calendar that will show say 7 days at the bottom of my activity in android studio and I was just wondering what on screen elements I should be using to make this? Here is an example of something extremely similar to what I am trying to create (bottom of the UI): https://cdn.segmentnext.com/wp-content/uploads/2015/09/pes-2016-live-screens.jpg I was thinking about having a frame layout as a container and then I wasn't sure what I would use to create each individual day on the calendar? I want to have each day as a square, with the number in the top left and an image view in the center to display an image if something is happening on that day (exactly like it is in the image). I was thinking maybe have 7 frame layouts within the original containing frame layout, with each of those frame layouts containg a textView and an Image view, would that be the correct way of going about that? or is there a more efficient way to set this up? Thanks in advance!
-
Hello everyone, After dwelling in stack overflow for a while I managed to solve a previous issue, but now I have a new one that I can't seem to fix. I have this .xml header: <ISEP xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="universidade" xsi:schemaLocation="universidade data.xsd"> <edíficio codigo="A"> And this .xsd header: <xs:schema attributeFormDefault="unqualified" elementFormDefault="qualified" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:x="universidade" targetNamespace="universidade" > <xs:element name="ISEP" type="x:TIsep"/> I had the same setup from a different set of files, they worked great. This one not so much, I get this errors: src-resolve.4.2: Error resolving component 'xs:Integer'. It was detected that 'xs:Integer' is in namespace 'http://www.w3.org/2001/XMLSchema', but components from this namespace are not referenceable from schema document 'file:/C:/Users/Jo%C3%A3o%20Pereira/Dropbox/LPROG%202018/LPROG_TESTES/src/lprog_testes/data.xsd'. If this is the incorrect namespace, perhaps the prefix of 'xs:Integer' needs to be changed. If this is the correct namespace, then an appropriate 'import' tag should be added to 'file:/C:/Users/Jo%C3%A3o%20Pereira/Dropbox/LPROG%202018/LPROG_TESTES/src/lprog_testes/data.xsd'. [86] src-resolve: Cannot resolve the name 'xs:Integer' to a(n) 'type definition' component. [86] src-resolve.4.1: Error resolving component 'TCodSala'. It was detected that 'TCodSala' has no namespace, but components with no target namespace are not referenceable from schema document 'file:/C:/Users/Jo%C3%A3o%20Pereira/Dropbox/LPROG%202018/LPROG_TESTES/src/lprog_testes/data.xsd'. If 'TCodSala' is intended to have a namespace, perhaps a prefix needs to be provided. If it is intended that 'TCodSala' has no namespace, then an 'import' without a "namespace" attribute should be added to 'file:/C:/Users/Jo%C3%A3o%20Pereira/Dropbox/LPROG%202018/LPROG_TESTES/src/lprog_testes/data.xsd'. [47] src-resolve: Cannot resolve the name 'TCodSala' to a(n) 'type definition' component. [47] I'm guessing that it isn't acknowledging the namespace. How do I fix this?
-
I've been using Wordpress for many years now, but I keep running into bandwidth issues or issues with my hosts. I finally decided to switch to Squarespace about a week ago. Unfortunately, I haven't been able to transfer all my posts and images from Wordpress to Squarespace because it keeps telling me the import failed and the file isn't complete. I've contacted so many support people all over. The Squarespace live chat person left me with this: "If you increase the XML export size within WordPress, the "</rss>" tag at the very end of the file is present, and it's still not importing to your Squarespace site please attach the XML file in your response here so I can test and take a closer look."
-
Good Afternoon Everyone... Trying to do something that should be stupidly simple but I just can not figure it out. I want an XML file for two lists so the name of a TV Show and an ID number. I can create an XML file no problem and it'll look something like: <?xml version="1.0" encoding="UTF-8"?> -<TVShowsN> <TVShows ID="123456" Name="The Vampire Diaries"/> <TVShows ID="987654" Name="Arrow"/> </TVShowsN> And I can happily add as many as I like.. which is great. I can load that file so that ListBox1 index 0 shows the name and Listbox2 index 0 shows the ID. Index 1 shows the next show and ID etc.... The problem is I want to be able to add more and save them at runtime. So I have another two text boxes to add a new name to listbox1 and a new ID to listbox2.... the problem is saving both listboxes to the XML file... I just can not get it to save it keeps crashing at different sections depending how I try to resolve it. If anyone knows how to save two listboxes to a single XML file that would be great. Thanks
-
UPDATE: 11/24/16 Happy thanksgiving and I have no idea how to delete this so I'll just leave this here: I HAVE ACCOMPLISHED EVERYTHING I NEEDED IN MY ORIGINAL POST SO DO NOT COMMENT PLEASE UPDATE: 8/10/16 I started school so I'm not gonna have as much time to work on this. ;-; UPDATE: 8/7/16 I fixed the Form1_Activated loop. UPDATE: 8/5/16 I will keep trying to fix the annoying loop that's caused whenever the form is activated. In the mean time I'll make a picture viewer similar to Windows Photo Viewer. I did this before but that was when I was using c# for the first time. Now I have a bit more knowledge and hopefully will improve it. UPDATE: 8/3/16 Here's what I have accomplished so far: 1. Downloading an image from a URL 2. Read and be able to select certain roots of the XML file - thanks to Nuluvius Here's what's left: 1. Close the XML file when a new or similar search is performed. There's no File.Close(); that I'm aware of. Also I'm using XDocument.Load(); to load the XML. 2. Being able to relocate the controls when the window is resized 3. Auto size the groupbox in case the the title is large and doesn't cut off(see the third picture) I will also provide the source code and .exe file's here: Updated: 8/7/16 Login: http://pastebin.com/94iLbkhF Image_Browser: http://pastebin.com/aDsbwb97 .exe: https://mega.nz/#!rAUEQK5C!xg9hjpKnGwMZrlQ4XjT6dkJ9VFhyPBllcAcutrdkJek To login: If you HAVE an Inkbunny account: type in your information and login, as soon as a SID is received, the password is destroyed. If you DON'T have one and do not wish to make one: use "guest" for the username and leave the password blank. Note that users have the option to block submissions from guests. I really hope links are allowed... I've included pictures of the app, just thought you might want to look at it, unless you don't want too. Here's the original post: *I'm just learning c# again as I haven't coded in a while, so don't make your answers too complicated please. Thanks.* I have 3 question for you guys: 1. How would I download a picture from a website? Ex. Image 2. How to read the values that I want from an xml output from a web server? 3. I want to access a variable thats in Form1(Login) from Form2(Image_Browser), how would I do this? Here's my code: http://pastebin.com/94iLbkhF Feel free to improve it, but don't steal it and claim it as your own. .-. I want to be able to get only the name of the submission, the account title, the thumbnail of the submission, the rating of the submission such as "Mature," and the full screen URL of the image from the XML output of the server, everything else is useless for me right now. I have tried nothing yet as I'm still a newbie with c#. Thanks! Here's a sample of the XML from a web server: <submission> <submission_id>...</submission_id> <hidden>...</hidden> <username> <![CDATA[ Kinaj ]]> </username> <user_id>...</user_id> <create_datetime>...</create_datetime> <create_datetime_usertime>...</create_datetime_usertime> <last_file_update_datetime>...</last_file_update_datetime> <last_file_update_datetime_usertime>...</last_file_update_datetime_usertime> <thumbnail_url_huge_noncustom>...</thumbnail_url_huge_noncustom> <thumbnail_url_large_noncustom>...</thumbnail_url_large_noncustom> <thumbnail_url_medium_noncustom> <![CDATA[ https://inkbunny.net/thumbnails/medium/1609/1609080_Kinaj_alex_marie_schlie__die_t_r_noncustom.jpg ]]> </thumbnail_url_medium_noncustom> <thumb_medium_noncustom_x>...</thumb_medium_noncustom_x> <thumb_medium_noncustom_y>...</thumb_medium_noncustom_y> <thumb_large_noncustom_x>...</thumb_large_noncustom_x> <thumb_large_noncustom_y>...</thumb_large_noncustom_y> <thumb_huge_noncustom_x>...</thumb_huge_noncustom_x> <thumb_huge_noncustom_y>...</thumb_huge_noncustom_y> <file_name>...</file_name> <title> <![CDATA[ Close the Door ]]> </title> <deleted>...</deleted> <public>...</public> <mimetype>...</mimetype> <pagecount>...</pagecount> <rating_id>...</rating_id> <rating_name> <![CDATA[ Mature ]]> </rating_name> <file_url_full> <![CDATA[ https://inkbunny.net/files/full/1609/1609080_Kinaj_alex_marie_schlie__die_t_r.png ]]> </file_url_full> <file_url_screen>...</file_url_screen> <file_url_preview>...</file_url_preview> <submission_type_id>...</submission_type_id> <type_name>...</type_name> <digitalsales>...</digitalsales> <printsales>...</printsales> <friends_only>...</friends_only> <guest_block>...</guest_block> <scraps>...</scraps> </submission>
-
Hello, I am working on a project where I want to load an xml from local storage but I can't quite manage to do it. ( Action Script below in tags) If anyone knows how I can fix this please reply ! Thanks! stop(); var nextIds:Dictionary = new Dictionary(); var xmlLoader:URLLoader = new URLLoader(); var xmlData:XML = new XML(); var xmlAry:Array = new Array(); var xmlURL:Array = new Array(); //String serverURL = "http://timetableichb.ddns.net:8181/timetable/timetable.xml"; // Online file ( Not being used atm) //xmlLoader.addEventListener(Event.COMPLETE, LoadXML); //xmlLoader.load(new URLRequest("http://timetableichb.ddns.net:8181/timetable/timetable.xml")); /* import flash.filesystem.*; //var urlString:String = "http://MAINWEBSITEIP/images/timetable/liceul/Classes/9A.JPG"; var urlReq:URLRequest = new URLRequest(urlString); var urlStream:URLStream = new URLStream(); var fileData:ByteArray = new ByteArray(); urlStream.addEventListener(Event.COMPLETE, loaded); urlStream.load(urlReq); function loaded(event:Event):void { urlStream.readBytes(fileData,0,urlStream.bytesAvailable); writeAirFile(); } function writeAirFile():void { var file:File = File.userDirectory.resolvePath("ICHB/Classes/9A.JPG"); var fileStream:FileStream = new FileStream(); fileStream.open(file, FileMode.WRITE); fileStream.writeBytes(fileData,0,fileData.length); fileStream.close(); trace("The file is written."); } */ import flash.filesystem.*; import flash.events.MouseEvent; // timetable.xml URL , FULL URL //var urlString:String = "http://timetableichb.ddns.net:8181/timetable/timetable.xml"; var urlReq:URLRequest = new URLRequest(urlString); var urlStream:URLStream = new URLStream(); var fileData:ByteArray = new ByteArray(); urlStream.addEventListener(Event.COMPLETE, loaded); urlStream.load(urlReq); function loaded(event:Event):void { urlStream.readBytes(fileData, 0, urlStream.bytesAvailable); writeAirFile(); } function writeAirFile():void { // Path for file storage var file:File = File.userDirectory.resolvePath("TIMETABLE/timetable.xml"); var fileStream:FileStream = new FileStream(); fileStream.open(file, FileMode.WRITE); fileStream.writeBytes(fileData, 0, fileData.length); fileStream.close(); trace("The file is written."); } xmlLoader.addEventListener(Event.COMPLETE, LoadXML); xmlLoader.load(new URLRequest("file:///storage/emulated/TIMETABLE/timetable.xml")); // Tried "TIMETABLE/timetable.xml" only too. hafta.visible=false; credits.addEventListener(MouseEvent.CLICK, openCredits); function openCredits(Event:MouseEvent):void { gotoAndStop(2); } cikis.addEventListener(MouseEvent.CLICK,Exit1); function Exit1(Event:MouseEvent):void { NativeApplication.nativeApplication.exit(); } function LoadXML(e:Event):void { xmlData = new XML(e.target.data); //trace("toplam ogretmen sayisi:",xmlData.teachers.teacher.length()); var harfElements:XMLList = xmlData.teachers.teacher; trace("toplam ogretmen sayisi:",harfElements.length()); var len:int = harfElements.length(); //liste.prompt = "Select Teacher"; for(var i:uint=0;i<len;i++) { xmlAry.push(xmlData..teacher.@isim[i]); xmlURL.push(xmlData..teacher[i]); liste.addItem( { label: xmlAry[i], data:i } ); liste.addEventListener(Event.CHANGE, action); var harfElement:XML = harfElements[i]; var idString:String = harfElement.@id; var id:int = parseInt(idString); nextIds[i] = id; } } function action (e:Event):void { var no:Number = Number(liste.selectedItem.data); var id:int = nextIds[e.target]; logo.visible=false; hafta.visible=true; var harfElementMatch:XMLList = xmlData.teachers.teacher.(@id==id); var harfElement:XML = xmlURL[no]; baslik.text = harfElement.@isim.toString(); for(var i:uint=1;i<=35;i++) { t1.htmlText = harfElement.t1.toString(); t2.htmlText = harfElement.t2.toString(); t3.htmlText = harfElement.t3.toString(); t4.htmlText = harfElement.t4.toString(); t5.htmlText = harfElement.t5.toString(); t6.htmlText = harfElement.t6.toString(); t7.htmlText = harfElement.t7.toString(); t8.htmlText = harfElement.t8.toString(); t9.htmlText = harfElement.t9.toString(); t10.htmlText = harfElement.t10.toString(); t11.htmlText = harfElement.t11.toString(); t12.htmlText = harfElement.t12.toString(); t13.htmlText = harfElement.t13.toString(); t14.htmlText = harfElement.t14.toString(); t15.htmlText = harfElement.t15.toString(); t16.htmlText = harfElement.t16.toString(); t17.htmlText = harfElement.t17.toString(); t18.htmlText = harfElement.t18.toString(); t19.htmlText = harfElement.t19.toString(); t20.htmlText = harfElement.t20.toString(); t21.htmlText = harfElement.t21.toString(); t22.htmlText = harfElement.t22.toString(); t23.htmlText = harfElement.t23.toString(); t24.htmlText = harfElement.t24.toString(); t25.htmlText = harfElement.t25.toString(); t26.htmlText = harfElement.t26.toString(); t27.htmlText = harfElement.t27.toString(); t28.htmlText = harfElement.t28.toString(); t29.htmlText = harfElement.t29.toString(); t30.htmlText = harfElement.t30.toString(); t31.htmlText = harfElement.t31.toString(); t32.htmlText = harfElement.t32.toString(); t33.htmlText = harfElement.t33.toString(); t34.htmlText = harfElement.t34.toString(); t35.htmlText = harfElement.t35.toString(); t36.htmlText = harfElement.t36.toString(); t37.htmlText = harfElement.t37.toString(); t38.htmlText = harfElement.t38.toString(); t39.htmlText = harfElement.t39.toString(); t40.htmlText = harfElement.t40.toString(); } }
-
Hello, I am working on a project where I want to load an xml from local storage but I can't quite manage to do it. ( Action Script below in tags) If anyone knows how I can fix this please reply ! Thanks! stop(); var nextIds:Dictionary = new Dictionary(); var xmlLoader:URLLoader = new URLLoader(); var xmlData:XML = new XML(); var xmlAry:Array = new Array(); var xmlURL:Array = new Array(); //String serverURL = "http://timetableichb.ddns.net:8181/timetable/timetable.xml"; // Online file ( Not being used atm) //xmlLoader.addEventListener(Event.COMPLETE, LoadXML); //xmlLoader.load(new URLRequest("http://timetableichb.ddns.net:8181/timetable/timetable.xml")); /* import flash.filesystem.*; //var urlString:String = "http://MAINWEBSITEIP/images/timetable/liceul/Classes/9A.JPG"; var urlReq:URLRequest = new URLRequest(urlString); var urlStream:URLStream = new URLStream(); var fileData:ByteArray = new ByteArray(); urlStream.addEventListener(Event.COMPLETE, loaded); urlStream.load(urlReq); function loaded(event:Event):void { urlStream.readBytes(fileData,0,urlStream.bytesAvailable); writeAirFile(); } function writeAirFile():void { var file:File = File.userDirectory.resolvePath("ICHB/Classes/9A.JPG"); var fileStream:FileStream = new FileStream(); fileStream.open(file, FileMode.WRITE); fileStream.writeBytes(fileData,0,fileData.length); fileStream.close(); trace("The file is written."); } */ import flash.filesystem.*; import flash.events.MouseEvent; // timetable.xml URL , FULL URL //var urlString:String = "http://timetableichb.ddns.net:8181/timetable/timetable.xml"; var urlReq:URLRequest = new URLRequest(urlString); var urlStream:URLStream = new URLStream(); var fileData:ByteArray = new ByteArray(); urlStream.addEventListener(Event.COMPLETE, loaded); urlStream.load(urlReq); function loaded(event:Event):void { urlStream.readBytes(fileData, 0, urlStream.bytesAvailable); writeAirFile(); } function writeAirFile():void { // Path for file storage var file:File = File.userDirectory.resolvePath("TIMETABLE/timetable.xml"); var fileStream:FileStream = new FileStream(); fileStream.open(file, FileMode.WRITE); fileStream.writeBytes(fileData, 0, fileData.length); fileStream.close(); trace("The file is written."); } xmlLoader.addEventListener(Event.COMPLETE, LoadXML); xmlLoader.load(new URLRequest("file:///storage/emulated/TIMETABLE/timetable.xml")); // Tried "TIMETABLE/timetable.xml" only too. hafta.visible=false; credits.addEventListener(MouseEvent.CLICK, openCredits); function openCredits(Event:MouseEvent):void { gotoAndStop(2); } cikis.addEventListener(MouseEvent.CLICK,Exit1); function Exit1(Event:MouseEvent):void { NativeApplication.nativeApplication.exit(); } function LoadXML(e:Event):void { xmlData = new XML(e.target.data); //trace("toplam ogretmen sayisi:",xmlData.teachers.teacher.length()); var harfElements:XMLList = xmlData.teachers.teacher; trace("toplam ogretmen sayisi:",harfElements.length()); var len:int = harfElements.length(); //liste.prompt = "Select Teacher"; for(var i:uint=0;i<len;i++) { xmlAry.push(xmlData..teacher.@isim[i]); xmlURL.push(xmlData..teacher[i]); liste.addItem( { label: xmlAry[i], data:i } ); liste.addEventListener(Event.CHANGE, action); var harfElement:XML = harfElements[i]; var idString:String = harfElement.@id; var id:int = parseInt(idString); nextIds[i] = id; } } function action (e:Event):void { var no:Number = Number(liste.selectedItem.data); var id:int = nextIds[e.target]; logo.visible=false; hafta.visible=true; var harfElementMatch:XMLList = xmlData.teachers.teacher.(@id==id); var harfElement:XML = xmlURL[no]; baslik.text = harfElement.@isim.toString(); for(var i:uint=1;i<=35;i++) { t1.htmlText = harfElement.t1.toString(); t2.htmlText = harfElement.t2.toString(); t3.htmlText = harfElement.t3.toString(); t4.htmlText = harfElement.t4.toString(); t5.htmlText = harfElement.t5.toString(); t6.htmlText = harfElement.t6.toString(); t7.htmlText = harfElement.t7.toString(); t8.htmlText = harfElement.t8.toString(); t9.htmlText = harfElement.t9.toString(); t10.htmlText = harfElement.t10.toString(); t11.htmlText = harfElement.t11.toString(); t12.htmlText = harfElement.t12.toString(); t13.htmlText = harfElement.t13.toString(); t14.htmlText = harfElement.t14.toString(); t15.htmlText = harfElement.t15.toString(); t16.htmlText = harfElement.t16.toString(); t17.htmlText = harfElement.t17.toString(); t18.htmlText = harfElement.t18.toString(); t19.htmlText = harfElement.t19.toString(); t20.htmlText = harfElement.t20.toString(); t21.htmlText = harfElement.t21.toString(); t22.htmlText = harfElement.t22.toString(); t23.htmlText = harfElement.t23.toString(); t24.htmlText = harfElement.t24.toString(); t25.htmlText = harfElement.t25.toString(); t26.htmlText = harfElement.t26.toString(); t27.htmlText = harfElement.t27.toString(); t28.htmlText = harfElement.t28.toString(); t29.htmlText = harfElement.t29.toString(); t30.htmlText = harfElement.t30.toString(); t31.htmlText = harfElement.t31.toString(); t32.htmlText = harfElement.t32.toString(); t33.htmlText = harfElement.t33.toString(); t34.htmlText = harfElement.t34.toString(); t35.htmlText = harfElement.t35.toString(); t36.htmlText = harfElement.t36.toString(); t37.htmlText = harfElement.t37.toString(); t38.htmlText = harfElement.t38.toString(); t39.htmlText = harfElement.t39.toString(); t40.htmlText = harfElement.t40.toString(); } }
-
Hey I am new to VB.NET, I played around with VB6 almost 10 years ago and am just trying to learn again. I am trying to make a basic program and I need to save a settings file. Name, Department, Account Number, Reference Number. I only need one account and reference number but multiple names and departments. I was trying to do it with an INI file and was told that an XML file would be easier and give me more room to expand if need be as it has a lot more options. A basic example of the settings file would be; [Users] John Smith=Department 1 Jane Smith= Department 2 Alex Smith=Department 1 Oliva Smith=Departmnet 3 [Accounts] AccountNumber=123456 ReferenceNumber=987654 and it to save it into some sort of file so that the program would be able to read and save the data. I need to be able to add and delete users from the program. Thanks
-
Hey, trying to restore a backup I just made with DriveImage XML and I get a CRC error, any way to bypass and copy anyway (or skip the file all together)?
-
- runtime
- driveimage
- (and 8 more)
-
I'm working on a project that involves fetching some data from another server (which is beyond my control). This data happens to be broken into several (hundreds) of fairly small XML files. Now, this server (or the connected to it) is fairly slow, it takes a few seconds to grab each file. Consequently, if I linearly fetch all of these XML files, the PHP script takes minutes to execute. Now, I have minimal experience with threading, but what I do know is that you shouldn't create a plethora of threads. For example, after compiling php with thread support, I tried to humor myself by creating one thread per file to download. Low and behold my script executed in seconds, with accurate results. Unfortunately this is plays havoc with the thread management and all that, and after executing a few times the pc just dies, which is a behavior I wasn't expecting. Does anyone know the best solution to this type of problem? Am I close, or am I approaching it in completely the wrong way. (If possible I'd rather avoid using PHP threads, because I don't like using my self-compiled apache/php. I much prefer the debian bundled versions)
-
Hello LTT! Instead of getting some work done from someone on freelancer.com I decided to do it on my own. I plan on making a website like: quibids.com - Java based. I haven't learn't much yet, just the basics. So I was wondering if I was thinking this out right, and if each Java based segment be its own class? index Nav PHP Jumbo PHP (How many users are online) Recent Auctions Java (Show most recent Complete Auctions) Recent Testimonials Java (Show most recent Testimonials) Footer PHP Current Auctions Java Displays all auctions that are currently being run in the order of Lowest Time to Highest time left. Auction Page Java More Details on that auction. Completed Auctions Java Displays all auctions marked "complete" in MySQL - Basically just a Giant list of the auctions. All Admin Pages related to the bidding are Java Login - Resister and Profile pages will also be Java So I was wondering if I was thinking this out right, and if each Java based segment(page) be its own class? Thanks for any help.