Questions tagged [xml-nil]

About XML nil attributes

From W3C

XML Schema:Structures introduces a mechanism for signaling that an element should be accepted as "valid" when it has no content despite a content type which does not require or even necessarily allow empty content. An element may be "valid" without content if it has the attribute xsi:nil with the value true. An element so labeled must be empty, but can carry attributes if permitted by the corresponding complex type.

70 questions
1
vote
1 answer

How can I check for a nil="true" value on XML that is passed back from webservice call?

I am receiving xml from a webservice call that contains a nil="true": I used the Flex DataService (webservice) wizard to create the service objects for the cacheEntry component. This object will…
jaja
  • 23
  • 4
1
vote
0 answers

netbeans jaxb marshaller does not generate xsi:nil

I have next problem. My XSD schema "searchevents.xsd" is:
torosg
  • 81
  • 1
  • 3
1
vote
3 answers

OPENXML, Xsi:nil and Decimals

I have some XML containing xsi:nil="true" for certain string and numeric elements. Here's an example: declare @data xml set @data = '
d4nt
  • 15,475
  • 9
  • 42
  • 51
1
vote
2 answers

NSXMLParser error 201 when it reaches xsi:nil

I have a NSXMLParser parsing and XML source and one of my tags is . When the parser reaches this tag, it throws an NSXMLParserErrorDomain error 201. If I remove this tag from my XML source, I get no error. Any ideas why this…
Wise Shepherd
  • 2,228
  • 4
  • 31
  • 43
1
vote
2 answers

How to generate xsi:nil element with attributes?

I have a WCF client that needs to generate a request containing this XML fragment : The schema is determined by the server and isn't under my control. The generated proxy code has a class…
Paul Lalonde
  • 5,020
  • 2
  • 32
  • 35
1
vote
1 answer

Soap - Element doesn't have xsi:nil as a property, but deserializing doesn't make the object not null

I'm a total noob when it comes to XML and SOAP messages. ...Here's the SOAP message.
DavidAndroidDev
  • 2,371
  • 3
  • 25
  • 41
1
vote
2 answers

Processing - Element xsi:nil vs. no element

In C#, when processing XML that contains elements that are defined in schema as both nillable="true" and minOccurs="0", what is the most elegant solution to tell a nil element from an omitted element? The use case is a situation where a service…
Grismar
  • 27,561
  • 4
  • 31
  • 54
1
vote
2 answers

What are all these null collection entries in my DataContract XML?

Does anybody know why the NetDataContractSerializer might add "nil" entries in a serialized collection? For example, <_items z:Id="18" z:Size="4"> Job1
user1228
1
vote
2 answers

Ruby on Rails to_xml nil="True"

I need your help on to_xml function. How can i make all nil="True" value to a default value '' (blank) when exporting to xml from active record.
Ben
  • 11
  • 3
1
vote
0 answers

jaxb unmarshalls java.lang.Long and java.math.BigDecimal in a different way

I am comparing the unmarshalling of private Long longVar private boolean isLongSetterCalled; private BigDecimal bigDecVar private boolean isBigDecimalSetterCalled; @XmlElement(nillable = true) public Long getLongVar() { return…
user1414745
  • 1,317
  • 6
  • 25
  • 45
1
vote
1 answer

Special Characters in XML Attribute and ColdFusion

I need to create an XML Document with an element that requires the attribute i:nil=true. I've tried , but it returns the error The right hand side of the assignment is not of…
RHPT
  • 2,560
  • 5
  • 31
  • 43
1
vote
1 answer

@XmlElement on a collection of attributes only element doesn't print xsi:nil

I have a very curious situation. public class Child { @XmlAttribute public String name; } @XmlRootElement public class Parent { public static void main(final String[] args) throws Exception { final Parent parent = new…
Jin Kwon
  • 20,295
  • 14
  • 115
  • 184
1
vote
1 answer

Php xml how to create/add attribute xsi:nil="true"

Trying to get such output 5 Can not create If use just $ParskCeturksnis = new…
user2465936
  • 1,030
  • 4
  • 17
  • 32
1
vote
1 answer

NIL/NULL attributes in XML and JAXB

I have some XML that is mapped to a Java class and contains an attribute like which means, that attribute is mapped to a Boolean field and can be true/false or null. I do need to be able to explicitly set it, in…
zakmck
  • 2,715
  • 1
  • 37
  • 53
1
vote
1 answer

How do I add xsi:nil="true" to only one field while generating an xml file from SQL Server 2008 using for 'xml path'

Here is the code I am using: DECLARE @returnXML XML SELECT @ReturnXML = (SELECT [StudentID/SSN] = ssn, [StudentName/LastName] = lastname, [StudentName/FirstName] = firstname, [StudentName/MiddleInitial] = Middlename, …