xml-parsing

How to restrict entry of null value in coredata?

时光怂恿深爱的人放手 提交于 2019-12-23 02:26:40
问题 I am working on XMLparsing based project and I used coredata to store url . But some time coredata enter's null value I don't know why such type of problem occurs. Here is my code which I have tried. - (void)feedParserDidFinish:(MWFeedParser *)parser { NSFetchRequest *fetchRequest = [NSFetchRequest fetchRequestWithEntityName:@"demo"]; fetchRequest.predicate = [NSPredicate predicateWithFormat:@"urloffeed = %@", self.Feedlink]; NSManagedObjectContext *context = [self managedObjectContext]; if (

Python read xml with related child elements

▼魔方 西西 提交于 2019-12-23 02:22:12
问题 I have a xml file with this structure: <?DOMParser ?> <logbook:LogBook xmlns:logbook="http://www/logbook/1.0" version="1.2"> <product> <serialNumber value="764000606"/> </product> <visits> <visit> <general> <startDateTime>2014-01-10T12:22:39.166Z</startDateTime> <endDateTime>2014-03-11T13:51:31.480Z</endDateTime> </general> <parts> <part number="03081" name="WSSA" index="0016"/> </parts> </visit> <visit> <general> <startDateTime>2013-01-10T12:22:39.166Z</startDateTime> <endDateTime>2013-03

C++: Trouble loading long string from XML file using Mini-XML

ε祈祈猫儿з 提交于 2019-12-23 02:05:53
问题 I'm using the Mini-XML library to parse and XML file. I am able to load just about every element and attribute, but I am having trouble loading a long string. Here is the relevant part of the code: //Load XML file into XmlO void load(wxString filenam){ //First, convert wxString to std::string for safety (char* is transient), then to const char* std::string tmp_filenam = std::string(filenam.mb_str()); const char* tmp_filenam2 = tmp_filenam.c_str(); //Get pointer to file fp = fopen(tmp_filenam2

Parsing : String to XML

 ̄綄美尐妖づ 提交于 2019-12-23 02:01:38
问题 my API is supposed to take a string and typecast it to XML format. But i am consistently getting this error : ParseError: mismatched tag: line 1, column 764 XML <?xml version="1.0" encoding="utf-8" ?> <MasterDetails IssuerId="5" Version="12.2"> <XMLRequest /> <BookingDetails Amount="768" Comment="Hotel Travel Purchase" CurrencyCode="INR" PurchaseType="Hotel" SupplierName="SomeHotel" CardAlias="C_ALIAS" ValidFor="-1D" CurrencyType="B" /> <CDFs> <CDF FieldName="Order Date" FieldValue="2015-01

Parsing : String to XML

|▌冷眼眸甩不掉的悲伤 提交于 2019-12-23 02:01:23
问题 my API is supposed to take a string and typecast it to XML format. But i am consistently getting this error : ParseError: mismatched tag: line 1, column 764 XML <?xml version="1.0" encoding="utf-8" ?> <MasterDetails IssuerId="5" Version="12.2"> <XMLRequest /> <BookingDetails Amount="768" Comment="Hotel Travel Purchase" CurrencyCode="INR" PurchaseType="Hotel" SupplierName="SomeHotel" CardAlias="C_ALIAS" ValidFor="-1D" CurrencyType="B" /> <CDFs> <CDF FieldName="Order Date" FieldValue="2015-01

Java: convert StreamResult to DOM

五迷三道 提交于 2019-12-23 01:36:15
问题 I am performing a xslt transformation from one xml format to another with saxon and xslt, after what transforming the result xml into Java DOM to work with it further: System.setProperty("javax.xml.transform.TransformerFactory", "net.sf.saxon.TransformerFactoryImpl"); TransformerFactory tFactory = TransformerFactory.newInstance(); Transformer transformer = tFactory.newTransformer(new StreamSource(new File("xslt.xsl"))); transformer.transform(new StreamSource(new File(inputXML)), new

Is it valid to specify xsi:type for an local complexType?

℡╲_俬逩灬. 提交于 2019-12-23 00:23:43
问题 We are having a problem with xsi:type since upgrading our server to jaxb 2. The xml client request in question was parsed ok when the server was running jaxb 1, but since upgrading to jaxb 2 we are seeing an error along the lines of: Error::cvc-elt.4.2: Cannot resolve 'er-request' to a type definition for element 'er-request' A client is specifying xsi:type as an attribute in a xml tag, but I don't think it's valid since the complex type in question has no such name. <?xml version="1.0"

Python lxml library fails to parse < and >

妖精的绣舞 提交于 2019-12-22 12:50:47
问题 I have an XSLT with javascript in it which uses "&lt ;" and "&gt ;" inside for loop <?xml version="1.0" encoding="UTF-8"?> <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"> <xsl:template match="/"> <html> <head> </head> <body> <script language="javascript" type="text/javascript"> function example() { var trs = document.getElementsByTagName("tr"); for (var i = 0; i < trs.length; i++) { } } </script> </body> </html> I am using PYTHON LXML library to generate HTML

Parsing XML into a list

柔情痞子 提交于 2019-12-22 12:23:58
问题 I have a quite elaborate XML I have been able to parse most of it however im coming across a tree that just has me stumped and im afraid that I'm making harder then it needs to be. here is the XML I'm referring to. <Codes> <CustomFieldValueSet name="Account" label="Account" distributionType="PercentOfPrice"> <CustomFieldValue distributionValue="10.00" splitindex="0"> <Value>7200</Value> <Description>General Supplies</Description> </CustomFieldValue> <CustomFieldValue distributionValue="45.00"

Displaying the contents of the xml page

夙愿已清 提交于 2019-12-22 11:18:27
问题 I am new to iphone development.I want to parse an xml page .The source code contains some htmls tags.This html tag is displayed in my simulator.I want to filter the tags and display only the content.The sorce code of xml is like <description> <![CDATA[<br /><p class="author"><span class="by">By: </span>By Sydney Ember</p><br><p>In the week since an earthquake devastated Haiti ...</p>]]> </description> I want "in the week since an ..." to be displayed and not the html tags.Please help me out