Search Results

Search found 15718 results on 629 pages for 'xml'.

Page 6/629 | < Previous Page | 2 3 4 5 6 7 8 9 10 11 12 13  | Next Page >

  • Convenience of mySQL over xml

    - by Bonechilla
    Currently I use XML to store specific information to correctly load a few things such as a list of specfied characters, scenes and music, Once more I use JAXB in combination with standard compression/decompression(ZIP) functionality to store a list of extrenous data. This data is called to add functionality to the character, somewhat like Skills in an RPG. Each skill is seperated into its own XML file with a grandlist which contains the names of each file with their extensions omitted and zipped in folder that gets encrypted. At first using xml was working fine however as the skill list grow i worry about its stability. I was wondering if I should begin storing the data in mySQL. Originally I planned to simply convert everything to JSON over xml but i think possibly mySQL would be a better move. Can anyone inform me of the key difference and pros and cons of each I guess i'm looking for the best way to store the data more conviently and would be easier to operate on. The data is mostly primatives and strings and the only arraylist of values i have i can just concat into a single field and parse later Edit: If I am going in the right direction with XML would it make sense to convert it to JSON and use maybe Kyro or EclipseLink JAXB (MOXy)

    Read the article

  • Opening an XML in Unity3D when the game is built

    - by N0xus
    At the moment, my game can open up an XML file inside the editor when I run it. In my XMLReader.cs I'm loading in my file like so: _xmlDocument.Load(Application.dataPath + "\\HV_Settings\\Settings.xml"); This class also deals with what the XML should do once it has been read in. However, when I build the game and run the exe, this file isn't called. I know that I can store this file in the C drive, but I want to keep everything in one place so when I start to release what I'm working on, the user doesn't need to do anything. Am I doing something silly which is causing the XML not to be read?

    Read the article

  • Problem deserializing xml file

    - by Andy
    I auto generated an xsd file from the below xml and used xsd2code to get a c# class. The problem is the entire xml doesn't deserialize. Here is how I'm attempting to deserialize: static void Main(string[] args) { using (TextReader textReader = new StreamReader("config.xml")) { // string temp = textReader.ReadToEnd(); XmlSerializer deserializer = new XmlSerializer(typeof(project)); project p = (project)deserializer.Deserialize(textReader); } } here is the actual XML: <?xml version='1.0' encoding='UTF-8'?> <project> <scm class="hudson.scm.SubversionSCM"> <locations> <hudson.scm.SubversionSCM_-ModuleLocation> <remote>https://svn.xxx.com/test/Validation/CPS DRTest DLL/trunk</remote> </hudson.scm.SubversionSCM_-ModuleLocation> </locations> <useUpdate>false</useUpdate> <browser class="hudson.scm.browsers.FishEyeSVN"> <url>http://fisheye.xxxx.net/browse/Test/</url> <rootModule>Test</rootModule> </browser> <excludedCommitMessages></excludedCommitMessages> </scm> <openf>Hello there</openf> <buildWrappers/> </project> When I run the above, the locations node remains null. Here is the xsd that I'm using: <?xml version="1.0" encoding="utf-8"?> <xs:schema id="NewDataSet" xmlns="" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata"> <xs:element name="project"> <xs:complexType> <xs:all> <xs:element name="openf" type="xs:string" minOccurs="0" /> <xs:element name="buildWrappers" type="xs:string" minOccurs="0" /> <xs:element name="scm" minOccurs="0"> <xs:complexType> <xs:sequence> <xs:element name="useUpdate" type="xs:string" minOccurs="0" msdata:Ordinal="1" /> <xs:element name="excludedCommitMessages" type="xs:string" minOccurs="0" msdata:Ordinal="2" /> <xs:element name="locations" minOccurs="0"> <xs:complexType> <xs:sequence> <xs:element name="hudson.scm.SubversionSCM_-ModuleLocation" minOccurs="0"> <xs:complexType> <xs:sequence> <xs:element name="remote" type="xs:string" minOccurs="0" /> </xs:sequence> </xs:complexType> </xs:element> </xs:sequence> </xs:complexType> </xs:element> <xs:element name="browser" minOccurs="0"> <xs:complexType> <xs:sequence> <xs:element name="url" type="xs:string" minOccurs="0" msdata:Ordinal="0" /> <xs:element name="rootModule" type="xs:string" minOccurs="0" msdata:Ordinal="1" /> </xs:sequence> <xs:attribute name="class" type="xs:string" /> </xs:complexType> </xs:element> </xs:sequence> <xs:attribute name="class" type="xs:string" /> </xs:complexType> </xs:element> </xs:all> </xs:complexType> </xs:element> <xs:element name="NewDataSet" msdata:IsDataSet="true" msdata:UseCurrentLocale="true"> <xs:complexType> <xs:choice minOccurs="0" maxOccurs="unbounded"> <xs:element ref="project" /> </xs:choice> </xs:complexType> </xs:element> </xs:schema>

    Read the article

  • XSD Schema for XML with multiple structures

    - by Xetius
    I am attempting to write an XML Schema to cover a number of XML conditions which I may encounter. I have the same root element (serviceRequest) with different child elements. I was trying to use the xs:extension element to define multiple versions, but it is complaining about unexpected element orderInclusionCriteria etc. Am I going about this the right way, or is there a better way to define this? The other way I thought about this was to have a single xs:choice with all the options inside it, but this seemed somewhat inelegant. These XSD files are for use within XMLBeans if that makes any difference. I have Given the following 2 examples of XML: 1) <?xml version="1.0" encoding="utf-8"?> <serviceRequest method="GOO" debug="NO"> <sessionId sID="ABC1234567" /> <orderInclusionCriteria accountId="1234567" accountNum="1234567890" /> </serviceRequest> 2) <?xml version="1.0" encoding="utf-8"?> <serviceRequest method="GOO" debug="NO"> <sessionId sID="ABC1234567" /> <action aType='MakePayment'> <makePayment accountID='CH91015165S' amount='5.00' /> </action> </serviceRequest> I thought I could use the following schema file: <?xml version="1.0" encoding="UTF-8"?> <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"> <xs:element name="serviceRequest" type="ServiceRequestType" /> <xs:element name="session" type="SessionType" /> <xs:attribute name="method" type="xs:string" /> <xs:attribute name="debug" type="xs:string" /> <xs:complexType name="SessionType"> <xs:attribute name="sID" use="required"> <xs:simpleType> <xs:restriction base="xs:string"/> </xs:simpleType> </xs:attribute> </xs:complexType> <xs:complexType name="ServiceRequestType"> <xs:sequence> <xs:element ref="session" /> </xs:sequence> <xs:attribute ref="method" /> <xs:attribute ref="debug" /> </xs:complexType> <xs:complexType name="OrderTrackingServiceRequest"> <xs:complexContent> <xs:extension base="ServiceRequestType"> <xs:complexType> <xs:sequence> <xs:element name="OrderInclusionCriteria" type="xs:string" /> </xs:sequence> </xs:complexType> </xs:extension> </xs:complexContent> </xs:complexType> <xs:complexType name="Action"> <xs:complexContent> <xs:extension base="ServiceRequestType"> <xs:complexType> <xs:sequence> <xs:element name="makePayment"> <xs:complexType> <xs:attribute name="accountID" type="xs:string" /> <xs:attribute name="amount" type="xs:string" /> <xs:complexType> </xs:element> </xs:sequence> <xs:attribute name="aType" type="xs:string" /> </xs:complexType> </xs:extension> </xs:complexContent> </xs:complexType> </xs:schema>

    Read the article

  • XML deserializer (Iserialzable)

    - by user311130
    Hey everybody, I have a class in c# that implements Iserialzable. I'm using a XMLSerializer that produces a XML from instance of that class. I get the following XML: <?xml version="1.0"?> <Configuration xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema"> <SessionConfiguration> <RemoteMachineName>HV-BENDA</RemoteMachineName> </SessionConfiguration> <SessionsCredentialsList> <CredentialsItem> <User>test0</User> <Password>Pa$$word1</Password> </CredentialsItem> <CredentialsItem> <User>test1</User> <Password>Pa$$word1</Password> </CredentialsItem> <CredentialsItem> <User>test2</User> <Password>Pa$$word1</Password> </CredentialsItem> <CredentialsItem> <User>test3</User> <Password>Pa$$word1</Password> </CredentialsItem> <CredentialsItem> <User>test4</User> <Password>Pa$$word1</Password> </CredentialsItem> </SessionsCredentialsList> <TIME_OUT /> <LOCAL_USERS_NUM>5</LOCAL_USERS_NUM> </Configuration> At some later point in the code I use a XMLSerializer again to deserial that XML document. and I get the following error: {"There is an error in XML document (1, 1)."} Inner exception: {"Data at the root level is invalid. Line 1, position 1."} Do someone knows wat could be the problem? All the best

    Read the article

  • How do I serialize an object to xml but not have it be the root element of the xml document

    - by mezoid
    I have the following object: public class MyClass { public int Id { get; set;} public string Name { get; set; } } I'm wanting to serialize this to the following xml string: <MyClass> <Id>1</Id> <Name>My Name</Name> </MyClass> Unfortunately, when I use the XMLSerializer I get a string which looks like: <?xml version="1.0" encoding="utf-8"?> <MyClass xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema"> <Id>1</Id> <Name>My Name</Name> </MyClass> I'm not wanting MyClass to be the root element the document, rather I'm eventually wanting to add the string with other similar serialized objects which will be within a larger xml document. i.e. Eventually I'll have a xml string which looks like this: <Classes> <MyClass> <Id>1</Id> <Name>My Name</Name> </MyClass> <MyClass> <Id>1</Id> <Name>My Name</Name> </MyClass> </Classes>" My first thought was to create a class as follows: public class Classes { public List<MyClass> MyClasses { get; set; } } ...but that just addes an additional node called MyClasses to wrap the list of MyClass.... My gut feeling is that I'm approaching this the wrong way and that my lack of experience with creating xml files isn't helping to point me to some part of the .NET framework or some other library that simplifies this.

    Read the article

  • How to change the extension of a processed xml file (using eXist & cocoon)

    - by Carsten C.
    Hi all, I'm really new to this whole web stuff, so please be nice if I missed something important to post. Short: Is there a possibility to change the name of a processed file (eXist-DB) after serialization? Here my case, the following request to my eXist-db: http://localhost:8080/exist/cocoon/db/caos/test.xml and I want after serialization the follwing (xslt is working fine): http://localhost:8080/exist/cocoon/db/caos/test.html I'm using the followong sitemap.xmap with cocoon (hoping this is responsible for it) <map:match pattern="db/caos/**"> <!-- if we have an xpath query --> <map:match pattern="xpath" type="request-parameter"> <map:generate src="xmldb:exist:///db/caos/{../1}/#{1}"/> <map:act type="request"> <map:parameter name="parameters" value="true"/> <map:parameter name="default.howmany" value="1000"/> <map:parameter name="default.start" value="1"/> <map:transform type="filter"> <map:parameter name="element-name" value="result"/> <map:parameter name="count" value="{howmany}"/> <map:parameter name="blocknr" value="{start}"/> </map:transform> <map:transform src=".snip./webapp/stylesheets/db2html.xsl"> <map:parameter name="block" value="{start}"/> <map:parameter name="collection" value="{../../1}"/> </map:transform> </map:act> <map:serialize type="html" encoding="UTF-8"/> </map:match> <!-- if the whole file will be displayed --> <map:generate src="xmldb:exist:/db/caos/{1}"/> <map:transform src="..snip../stylesheets/caos2soac.xsl"> <map:parameter name="collection" value="{1}"/> </map:transform> <map:transform type="encodeURL"/> <map:serialize type="html" encoding="UTF-8"/> </map:match> So my Question is: How do I change the extension of the test.xml to test.html after processing the xml file? Background: I'm generating some information out of some xml-dbs, this infos will be displayed in html (which is working), but i want to change some entrys later, after I generated the html site. To make this confortable, I want to use Jquery & Jeditable, but the code does not work on the xml files. Saving the generated html is not an option. tia for any suggestions [and|or] help CC Edit: After reading all over: could it be, that the extension is irrelevant and that this is only a problem of port 8080? I'm confused...

    Read the article

  • c# linq to xml to list

    - by WtFudgE
    I was wondering if there is a way to get a list of results into a list with linq to xml. If I would have the following xml for example: <?xml version="1.0"?> <Sports xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema"> <SportPages> <SportPage type="test"> <LinkPage> <IDList> <string>1</string> <string>2</string> </IDList> </LinkPage> </SportPage> </SportPages> </Sports> How could I get a list of strings from the IDList? I'm fairly new to linq to xml so I just tried some stuff out, I'm currently at this point: var IDs = from sportpage in xDoc.Descendants("SportPages").Descendants("SportPage") where sportpage.Attribute("type").Value == "Karate" select new { ID = sportpage.Element("LinkPage").Element("IDList").Elements("string") }; But the var is to chaotic to read decently. Isn't there a way I could just get a list of strings from this? Thanks

    Read the article

  • Best approach to convert XML to RDF/XML using an ontology

    - by krisvandenbergh
    I have an XML which uses the XPDL standard (which has an XML schema). What I'm trying to do now is to convert its content to RDF format (serialized in XML), in terms of a certain ontology. Clearly, there needs to be some sort of mapping here. I would like to do this using PHP. The thing is, I have no idea how to do this best. I know how to read an XML file, but how would the mappings occur? What would be a good approach?

    Read the article

  • How to generate XML with attributes in c#.

    - by user292815
    I have that code: ... request data = new request(); data.username = formNick; xml = data.Serialize(); ... [System.Serializable] public class request { public string username; public string password; static XmlSerializer serializer = new XmlSerializer(typeof(request)); public string Serialize() { StringBuilder builder = new StringBuilder(); XmlWriterSettings settings = new XmlWriterSettings(); settings.OmitXmlDeclaration = true; settings.Encoding = Encoding.UTF8; serializer.Serialize( System.Xml.XmlWriter.Create(builder, settings ), this); return builder.ToString(); } public static request Deserialize(string serializedData) { return serializer.Deserialize(new StringReader(serializedData)) as request; } } I want to add attributes to some nodes and create some sub-nodes. Also how to parse xml like that: <answer> <player id="2"> <coordinate axis="x"></coordinate> <coordinate axis="y"></coordinate> <coordinate axis="z"></coordinate> <action name="nothing"></action> </player> <player id="3"> <coordinate axis="x"></coordinate> <coordinate axis="y"></coordinate> <coordinate axis="z"></coordinate> <action name="boom"> <1>1</1> <2>2</2> </action> </player> </answer> p.s. it is not a xml file, it's answer from http server.

    Read the article

  • Android programming - How to acces [to draw on] XML view in main.xml layout, using code

    - by user556248
    Ok I'm a newbie at Android programming, have a hard time with the graphics part. Understand the beauty of creating layout in XML file, but lost how to access various elements, especially a View element to draw on it. See example of my layout main.xml here; <?xml version="1.0" encoding="utf-8"?> <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:id="@+id/root" android:orientation="vertical" android:layout_width="fill_parent" android:layout_height="fill_parent"> <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="fill_parent" android:layout_height="wrap_content"> <TextView xmlns:android="http://schemas.android.com/apk/res/android" android:id="@+id/Title" android:text="App title" android:layout_width="fill_parent" android:layout_height="wrap_content" android:textColor="#000000" android:background="#A0A0FF"/> </LinearLayout> <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:id="@+id/PaperLayout" android:layout_width="fill_parent" android:layout_height="0dp" android:layout_weight="1" android:orientation="horizontal" android:focusable="true"> <View android:id="@+id/Paper" android:layout_width="fill_parent" android:layout_height="fill_parent" /> </LinearLayout> <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="fill_parent" android:layout_height="wrap_content"> <Button android:id="@+id/File" android:layout_width="fill_parent" android:layout_weight="1" android:layout_height="34dp" android:layout_alignParentTop="true" android:layout_centerInParent="true" android:clickable="true" android:textSize="10sp" android:text="File" /> <Button android:id="@+id/Edit" android:layout_width="fill_parent" android:layout_weight="1" android:layout_height="34dp" android:clickable="true" android:textSize="10sp" android:text="Edit" /> </LinearLayout> </LinearLayout> As you can see I have a custom app title bar, then a View filling middle, and finally two buttons in bottom. Catching button events and responding to, for example changing title bar text and changing View background color works fine, but how the heck do I access and more importantly draw on the view defined in main.xml UPDATE: That for your suggestion, however besides that I need a View, not ImageView and you are missing a parameter on canvas.drawText and an ending bracket, it does not work. Now this is most likely because you missed the fact that I am a newbie and assuming I can fill in any blanks. Now first of all I do NOT understand why in my main.xml layout file I can create a View or even a SurfaceView element, which is what I need, but according to your solution I don't even specify the View like Anyways I edited my main.xml according to your solution, and slimmed it down a bit for simplicity; <?xml version="1.0" encoding="utf-8"?> <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:id="@+id/root" android:orientation="vertical" android:layout_width="fill_parent" android:layout_height="fill_parent"> <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="fill_parent" android:layout_height="wrap_content"> <TextView xmlns:android="http://schemas.android.com/apk/res/android" android:id="@+id/Title" android:text="App title" android:layout_width="fill_parent" android:layout_height="wrap_content" android:textColor="#000000" android:background="#A0A0FF"/> </LinearLayout> <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:id="@+id/PaperLayout" android:layout_width="fill_parent" android:layout_height="0dp" android:layout_weight="1" android:orientation="horizontal" android:focusable="true"> <com.example.MyApp.CustomView android:id="@+id/Paper" android:layout_width="fill_parent" android:layout_height="fill_parent" /> <com.example.colorbook.CustomView/> </LinearLayout> <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="fill_parent" android:layout_height="wrap_content"> <Button android:id="@+id/File" android:layout_width="fill_parent" android:layout_weight="1" android:layout_height="34dp" android:layout_alignParentTop="true" android:layout_centerInParent="true" android:clickable="true" android:textSize="10sp" android:text="File" /> </LinearLayout> </LinearLayout> In my main java file, MyApp.java, I added this after OnCreate; public class CustomView extends ImageView { @Override protected void onDraw(Canvas canvas) { super.onDraw(canvas); canvas.drawText("Your Text", 1, 1, null); } } But I get error on the "CustomView" part; "Implicit super constructor ImageView() is undefined for default constructor.Must define an explicit constructor" Eclipse suggests 3 quick fixes about adding constructor, but none helps, well it removes error but gives error on app when running. I hope somebody can break this down for me and provide a solution, and perhaps explain why I can't just create a View element in my main.xml layotu file and draw on it in code.

    Read the article

  • How to generate XML with attributes in .NET?

    - by user292815
    I have that code: ... request data = new request(); data.username = formNick; xml = data.Serialize(); ... [System.Serializable] public class request { public string username; public string password; static XmlSerializer serializer = new XmlSerializer(typeof(request)); public string Serialize() { StringBuilder builder = new StringBuilder(); XmlWriterSettings settings = new XmlWriterSettings(); settings.OmitXmlDeclaration = true; settings.Encoding = Encoding.UTF8; serializer.Serialize( System.Xml.XmlWriter.Create(builder, settings ), this); return builder.ToString(); } public static request Deserialize(string serializedData) { return serializer.Deserialize(new StringReader(serializedData)) as request; } } I want to add attributes to some nodes and create some sub-nodes. Also how to parse xml like that: <answer> <player id="2"> <coordinate axis="x"></coordinate> <coordinate axis="y"></coordinate> <coordinate axis="z"></coordinate> <action name="nothing"></action> </player> <player id="3"> <coordinate axis="x"></coordinate> <coordinate axis="y"></coordinate> <coordinate axis="z"></coordinate> <action name="boom"> <1>1</1> <2>2</2> </action> </player> </answer> p.s. it is not a xml file, it's answer from http server.

    Read the article

  • Using xsi:nil in XML

    - by Matt
    I am generating an XML file from a VB.NET app. The document was generating fine before I tried to add nillable elements. I am now testing putting in just one nil element as: <blah xsi:nil="true"></blah> Once this element is in place and I try to view the XML file in IE it is unable to display. I am receiving: > The XML page cannot be displayed > Cannot view XML input using XSL style > sheet. Please correct the error and > then click the Refresh button, or try > again later. > > -------------------------------------------------------------------------------- > > The operation completed successfully. > Error processing resource If I remove this one element it displays fine again. What am I missing here?

    Read the article

  • Unable to load huge XML document (incorrectly suppose it's due to the XSLT processing)

    - by krisvandenbergh
    I'm trying to match certain elements using XSLT. My input document is very large and the source XML fails to load after processing the following code (consider especially the first line). <xsl:template match="XMI/XMI.content/Model_Management.Model/Foundation.Core.Namespace.ownedElement/Model_Management.Package/Foundation.Core.Namespace.ownedElement"> <rdf:RDF> <rdf:Description rdf:about=""> <xsl:for-each select="Foundation.Core.Class"> <xsl:for-each select="Foundation.Core.ModelElement.name"> <owl:Class rdf:ID="@Foundation.Core.ModelElement.name" /> </xsl:for-each> </xsl:for-each> </rdf:Description> </rdf:RDF> </xsl:template> Apparently the XSLT fails to load after "Model_Management.Model". The PHP code is as follows: if ($xml->loadXML($source_xml) == false) { die('Failed to load source XML: ' . $http_file); } It then fails to perform loadXML and immediately dies. I think there are two options now. 1) I should set a maximum executing time. Frankly, I don't know how that I do this for the built-in PHP 5 XSLT processor. 2) Think about another way to match. What would be the best way to deal with this? The input document can be found at http://krisvandenbergh.be/uml_pricing.xml Any help would be appreciated! Thanks.

    Read the article

  • Python XML + Java XML interoperability.

    - by erb
    Hello. I need a recommendation for a pythonic library that can marshall python objects to XML(let it be a file). I need to be able read that XML later on with Java (JAXB) and unmarshall it. I know JAXB has some issues that makes it not play nice with .NET XML libraries so a recommendation on something that actually works would be great.

    Read the article

  • Writing to XML issue Unity3D C#

    - by N0xus
    I'm trying to create a tool using Unity to generate an XML file for use in another project. Now, please, before someone suggests I do it in something, the reason I am using Unity is that it allows me to easily port this to an iPad or other device with next to no extra development. So please. Don't suggest to use something else. At the moment, I am using the following code to write to my XML file. public void WriteXMLFile() { string _filePath = Application.dataPath + @"/Data/HV_DarkRideSettings.xml"; XmlDocument _xmlDoc = new XmlDocument(); if (File.Exists(_filePath)) { _xmlDoc.Load(_filePath); XmlNode rootNode = _xmlDoc.CreateElement("Settings"); // _xmlDoc.AppendChild(rootNode); rootNode.RemoveAll(); XmlElement _cornerNode = _xmlDoc.CreateElement("Screen_Corners"); _xmlDoc.DocumentElement.PrependChild(_cornerNode); #region Top Left Corners XYZ Values // indent top left corner value to screen corners XmlElement _topLeftNode = _xmlDoc.CreateElement("Top_Left"); _cornerNode.AppendChild(_topLeftNode); // set the XYZ of the top left values XmlElement _topLeftXNode = _xmlDoc.CreateElement("TopLeftX"); XmlElement _topLeftYNode = _xmlDoc.CreateElement("TopLeftY"); XmlElement _topLeftZNode = _xmlDoc.CreateElement("TopLeftZ"); // indent these values to the top_left value in XML _topLeftNode.AppendChild(_topLeftXNode); _topLeftNode.AppendChild(_topLeftYNode); _topLeftNode.AppendChild(_topLeftZNode); #endregion #region Bottom Left Corners XYZ Values // indent top left corner value to screen corners XmlElement _bottomLeftNode = _xmlDoc.CreateElement("Bottom_Left"); _cornerNode.AppendChild(_bottomLeftNode); // set the XYZ of the top left values XmlElement _bottomLeftXNode = _xmlDoc.CreateElement("BottomLeftX"); XmlElement _bottomLeftYNode = _xmlDoc.CreateElement("BottomLeftY"); XmlElement _bottomLeftZNode = _xmlDoc.CreateElement("BottomLeftZ"); // indent these values to the top_left value in XML _bottomLeftNode.AppendChild(_bottomLeftXNode); _bottomLeftNode.AppendChild(_bottomLeftYNode); _bottomLeftNode.AppendChild(_bottomLeftZNode); #endregion #region Bottom Left Corners XYZ Values // indent top left corner value to screen corners XmlElement _bottomRightNode = _xmlDoc.CreateElement("Bottom_Right"); _cornerNode.AppendChild(_bottomRightNode); // set the XYZ of the top left values XmlElement _bottomRightXNode = _xmlDoc.CreateElement("BottomRightX"); XmlElement _bottomRightYNode = _xmlDoc.CreateElement("BottomRightY"); XmlElement _bottomRightZNode = _xmlDoc.CreateElement("BottomRightZ"); // indent these values to the top_left value in XML _bottomRightNode.AppendChild(_bottomRightXNode); _bottomRightNode.AppendChild(_bottomRightYNode); _bottomRightNode.AppendChild(_bottomRightZNode); #endregion _xmlDoc.Save(_filePath); } } This generates the following XML file: <Settings> <Screen_Corners> <Top_Left> <TopLeftX /> <TopLeftY /> <TopLeftZ /> </Top_Left> <Bottom_Left> <BottomLeftX /> <BottomLeftY /> <BottomLeftZ /> </Bottom_Left> <Bottom_Right> <BottomRightX /> <BottomRightY /> <BottomRightZ /> </Bottom_Right> </Screen_Corners> </Settings> Which is exactly what I want. However, each time I press the button that has the WriteXMLFile() method attached to it, it's write the entire lot again. Like so: <Settings> <Screen_Corners> <Top_Left> <TopLeftX /> <TopLeftY /> <TopLeftZ /> </Top_Left> <Bottom_Left> <BottomLeftX /> <BottomLeftY /> <BottomLeftZ /> </Bottom_Left> <Bottom_Right> <BottomRightX /> <BottomRightY /> <BottomRightZ /> </Bottom_Right> </Screen_Corners> <Screen_Corners> <Top_Left> <TopLeftX /> <TopLeftY /> <TopLeftZ /> </Top_Left> <Bottom_Left> <BottomLeftX /> <BottomLeftY /> <BottomLeftZ /> </Bottom_Left> <Bottom_Right> <BottomRightX /> <BottomRightY /> <BottomRightZ /> </Bottom_Right> </Screen_Corners> <Screen_Corners> <Top_Left> <TopLeftX /> <TopLeftY /> <TopLeftZ /> </Top_Left> <Bottom_Left> <BottomLeftX /> <BottomLeftY /> <BottomLeftZ /> </Bottom_Left> <Bottom_Right> <BottomRightX /> <BottomRightY /> <BottomRightZ /> </Bottom_Right> </Screen_Corners> </Settings> Now, I've written XML files before using winforms, and the WriteXMLFile function is exactly the same. However, in my winform, no matter how much I press the WriteXMLFile button, it doesn't write the whole lot again. Is there something that I'm doing wrong or should change to stop this from happening?

    Read the article

  • XML Signature in a Web application

    - by OpenDevSoft
    Hi, We are developing an e-Banking web application for a small bank (up to 20000 clients/users). We have to implement digital signatures with X509 certificates (issued by CA on USB tokens) for signing payment information. We tried using CAPICOM but it seems that it is not working well with Windows Vista (have not tried it with Win 7). The other problem is that core banking system can process only Xml digital signatures, so we have to sign XML documents (not just a bulk-formatted text data like with CAPICOM and Win32 Crypto API). So my questions here are: Does anyone of you have similar problem and how did they solved it? Is there a plug-in, library, component or external tool (for Internet Explorer and/or Fire Fox) that supports XML Digital Signatures in a web application? Can you please recommend some of these products and write something about your experience with them? Thank you very much.

    Read the article

  • parse Linq To Xml with attribute nodes

    - by Manoj
    I am having xml with following structure <ruleDefinition appId="3" customerId = "acf"> <node alias="element1" id="1" name="department"> <node alias="element2" id="101" name="mike" /> <node alias="element2" id="102" name="ricky" /> <node alias="element2" id="103" name="jim" /> </node> </ruleDefinition> Here nodes are differentiated using alias and not with node tag. As you can see top level node element1 has same node name "node" as element2. I want to parse this XML based on attribute alias. What should be the Linq-To-Xml code (using C#)to acheive this?

    Read the article

  • XML deserialization doesn't read in second level

    - by Andy
    Sorry if the title doesn't make much sense, but I'm not too familiar with the terminology. My question is: I have a config.xml file for a program I'm working on. I created an xsd file by 'xsd.exe config.xml'. I then took this xsd and added it to the solution in visual studio. My last step used a program called xsd2code that turned that xsd file into a class I can serialize too. The problem is it doesn't read more then a layer deep in the xml tree. By this I mean the elements in the root node get deserialized into my object, but those that are in a node inside the root node are not. I found this out by putting a breakpoint after the deserialization and looking at my object. Any Ideas? Let me know if this needs some clarification or you need a snippet of something.

    Read the article

  • Element Based XML Parsing

    - by demos
    I have an XML document which reads like this: <xml> <web:Web> <web:Total>4000</web:Total> <web:Offset>0</web:Offset> </web:Web> </xml> my question is how do I access them using a library like BeautifulSoup in python? xmlDom.web["Web"].Total ? does not work?

    Read the article

  • Element Based XML Parising

    - by demos
    I have an XML document which reads like this: <xml> <web:Web> <web:Total>4000</web:Total> <web:Offset>0</web:Offset> </web:Web> </xml> my question is how do I access them using a library like BeautifulSoup in python? xmlDom.web["Web"].Total ? does not work?

    Read the article

  • Getting multiple data items in an element with linq to xml

    - by Maestro1024
    Getting multiple data items in an element with linq to xml I have an xml file like this <TopLevel> <Inside> Jibba </Inside> <Inside> Jabba </Inside> </TopLevel> I was given said xml and and want to get all the elements. Here is the code I have. var q = from c in loaded.Descendants("TopLevel") select (XElement)c.Element("Inside"); I tried c.Elements but that did not work. What do I need to do to get all of the internal elements? This code just gets the first "Inside" tag.

    Read the article

  • How to modify by loading and saving the same xml file

    - by cynthia hong
    I have a problem with modifying xml file when i first load and then save it with same file path and name. Below is my code. The error is "Access to the path C:\MyApp\Web.config is denied. If i change the path of the xdoc.Save to be different from xdoc.Load, then it will be ok. What is your recommandation to solve this problem? If possible, i need to modify the existing xml file(meaning xml file for loading and saving is the same path). XmlDocument xdoc = new XmlDocument(); xdoc.Load(@"C:\\MyApp\\Web.config"); XmlNode xn = xdoc.SelectSingleNode("//configuration/MyProvider"); XmlElement el = (XmlElement)xn; el.SetAttribute("defaultProvider", "MyCustomValue"); xdoc.Save(@"C:\\MyApp\\Web.config"); Thanks in advance.

    Read the article

< Previous Page | 2 3 4 5 6 7 8 9 10 11 12 13  | Next Page >