I have a hierarchy of objects that are transmitted via XML. The hierarchy rules are easy to express in XML Schema by stating which element may contain which child elements. A simplifed example of the XML data would be (the actual object data is contained in attributes and omitted for brevity):
<root>
<channel>
<router>
<mess...
Does anyone know how I can check if a string contains well-formed XML without using something like XmlDocument.LoadXml() in a try/catch block? I currently have code that does this;
private bool IsValidXML(string value)
{
try
{
// Check we actually have a value
if (string.IsNullOrEmpty(value) == false)
{
...
Hi all,
I'm getting two different hashes of the same xml document when I directly canonicalize some xml than when I perform a digital signature on it which also performs the same canonicalization algoririth on the xml before hashing it? I worked out that the digital signature canonicalization includes the new line characters '\n' and s...
I'm trying to build XmlDocument so that after serialization I could achieve something like this xml:
<?xml version="1.0" encoding="UTF-8"?>
<wnio:element xmlns:wnio="somuri" xmlns:xf="abcd">
<xf:nestedelement>somtext</xf:nestedelement>
</wnio:element>
The things is that XmlElement allows to specify ONLY ONE namespace via NamespaceU...
I am using XML::Simple and I have the following XML structure in a variable $xmldata which I need to access through Perl code.
<root>
<a>sfghs</a>
<b>agaga</b>
<c>
<c1>sgsfs</c1>
<c2>sgsrsh</c2>
</c>
<d>
<d1>agaga</d1>
<d2>asgsg</d2>
</d>
</root>
I can access the value of a and b b...
<?xml version="1.0" ?>
<NBR>
<resultGroups>
<result>Hello</result>
</resultGroups>
</NBR>
i have a n xml created in PHP ike this. i am retruning this XML into javascript and is trying to acces the value of node "result" using
alert($(xmlObj).children('result').text());
In firefox its working fine. but in IE it gives o...
I am trying to insert new lines into an Excel XML document. The entity that I need to insert is but whenever I insert that into PHP DOM, it just converts it to a normal line break.
This is what I am getting:
<Cell><Data>text
text2
</Data></Cell>
This is what I want:
<Cell><Data>text text2 </Data></Cell>
I cannot figu...
Hi all,
This is best explained using an example. I have an xml document that has namespace qualified elements. What I want to do is search the xmlList to see how many namespace qualifier elements and/or attributes there are. So for example
some text
So for the above xml doc the namespace xsi would have 1 node returned from a search...
I have the following errors reported in my (scorm 2004) xml file, what is causing this error since the referenced include file imsss_v1p0util.xsd is present in the same folder.
row 8 has this tag:
< xs:include schemaLocation = "imsss_v1p0util.xsd"/ >
parser output:
Validating the XML for Wellformedness
The XML is Well-formed
Valid...
Hello
I would like to know how to stream over a very large, deeply nested, XML Document using LINQ, while streaming it, filter nodes based on some criteria and then write the streamed output to a file, while maintaining the same original structure of the XML.
This should happen without loading the entire document into memory.
Is this ...
I've been trying to figure out how to use an XML Schema to validate XML files as I load them into an application. I've got that part working, but I can't seem to get the schema to recognise anything other than the root element as valid. For instance, I have the following XML file:
<fun xmlns="http://ttdi.us/I/am/having/fun"
xmlns...
I need to load wikipedia revision histories into POJOs, so I'm using JAXB to unmarshall the wikipeida data dump (well, individual pages of it). The problem is that the text nodes occasionally contain entities that are not defined in the wikipedia xml dump. eg: (`°' pleases keep in mind that I do not know the complete set of entiti...
using xsl 2.0, how would you convert an xs:float value to a hex-string representation of its binary value? i have no problem doing this for an integer (divide by 16 recursively and concatenate chars 0-9A-F), but float/double is stumping me.
<xsl:function name="my:float-to-hex" as="xs:string">
<xsl:param name="in" as="xs:float"/>
...
Thank you all for the help ahead of time.
I am using XSL Templates to serve as web page templates for a web framework, the end output being XHTML 1.0 Strict; it takes xml input and outputs the XHTML. It works perfectly except for 1 problem - the end output is also outputting a xml node instead of just the contents. Here is the basic xml...
This is something I've been wondering for a while now. I'll occasionally come across an RSS feed that is broken, and blown to pieces all because line 23 say "Sanford & Sons." The most confusing thing is the fact that if you convert the & into &, all is well, even though your alternative still contains the problem-char!
Please somebo...
I'm trying to create a message validation program and would like to create easily modifiable rules that apply to certain message types. Due to the risk of the rules changing I've decided to define these validation rules external to the object code.
I've created a basic interface that defines a rule and am wondering what the best way to...
I came across How to convert XML to JSON in ASP.NET C# (link) and one in javascript (at goessner.net/download/prj/jsonxml/). But have yet to find one in c++ that takes just a string as input (Or a tinyxml node as I'm using that library).
...
I'm using Python 2.x [not negotiable] to read XML documents [created by others] that allow the content of many elements to contain characters that are not valid XML characters by escaping them using the _xHHHH_ convention e.g. ASCII BEL aka U+0007 is represented by the 7-character sequence u"_x0007_". Neither the functionality that allow...
Validating the XML against the
Controlling Documents ERROR:
cvc-complex-type.2.4.c: The matching
wildcard is strict, but no declaration
can be found for element
'adlcp:datafromlms'. line: 21, col: 24
here is error line in my xml file:
< adlcp:datafromlms>course=e7.txt;lesson=1< /adlcp:datafromlms>
this is from XSD:
...
I have an XML document having structure similar to the following
<envelop>
<header>blaa</header>
<message>blaa blaa</message>
<footer></footer>
</envelop>
I want to digitally sign the header and message elements and add the signature to the footer element.
How can I sign the elements and then later verify the signature (...