xml-namespaces

What's a RDF triple?

纵饮孤独 提交于 2019-11-28 16:11:09
问题 In layman's terms, what's a RDF triple? 回答1: I think the question needs to be split into two parts - what is a triple and what makes an "RDF triple" so special? Firstly, a triple is, as most of the other commenters here have already pointed out, a statement in "subject/predicate/object" form - i.e. a statement linking one object (subject) to another object(object) or a literal, via a predicate. We are all familiar with triples: a triple is the smallest irreducible representation for binary

Unqualified XSD global attribute references

做~自己de王妃 提交于 2019-11-28 13:53:16
The following XML schema fails to validate with following XML instance document. Is there any way to rewrite the schema so the instance document validates, within the given constraints? Constraints The attribute cannot be local to the element The instance document must be unchanged (Invalid) Schema <?xml version="1.0" encoding="utf-8"?> <xs:schema targetNamespace="http://tempuri.org/XMLSchema.xsd" elementFormDefault="qualified" xmlns="http://tempuri.org/XMLSchema.xsd" xmlns:xs="http://www.w3.org/2001/XMLSchema"> <xs:attribute name="sample-attribute" type="xs:string" /> <xs:element name="sample

What are the “$ns” and “$is_prefix” parameters about?

孤人 提交于 2019-11-28 13:52:59
The SimpleXMLElement::__construct() method and the related functions simplexml_load_string() and simplexml_load_file() all have an optional pair of parameters related to XML Namepspaces: $ns and $is_prefix . Despite I can see that those are related to XML namespaces I wonder what they are for and how they work. According to PHP manual, those two parameters have been added in PHP version 5.2. The official PHP 5 changelog does not note these changes explicitly but the PHP 5.2 update readme has these . Then looking into the 5.2 source for the constructor ( in lxr ) it shows that this is related

Use XPath with XML namespace

随声附和 提交于 2019-11-28 13:09:34
I want to process the xml below with XPath: <?xml version="1.0" encoding="utf-8"?> <ServiceConfiguration serviceName="Cloud" xmlns="http://schemas.microsoft.com/ServiceHosting/2008/10/ServiceConfiguration" osFamily="4" osVersion="*" schemaVersion="2014-01.2.3"> <Role name="Worker"> <Instances count="2" /> <ConfigurationSettings> <Setting name="setting1" value="value1" /> <Setting name="setting2" value="value2" /> </ConfigurationSettings> <Certificates> </Certificates> </Role> </ServiceConfiguration> Tere's a xmlns for the root element. My code is this: XElement doc = XElement.Load(xmlFilePath)

edit xml file using c#,getting error invalid token

我的未来我决定 提交于 2019-11-28 12:17:49
问题 My Problem Is My XML file having Two namespace ,so i cant change text of xml in SelectingNode Method XmlTextReader reader = new XmlTextReader("C:\\test.xml"); XmlDocument doc = new XmlDocument(); doc.Load(reader); //Assuming reader is your XmlReader XmlNamespaceManager oManager = new XmlNamespaceManager(doc.NameTable); oManager.AddNamespace("ns", "http://schemas.microsoft.com//sqlserver//reporting//2005/01//reportdefinition"); oManager.AddNamespace("rd", "http://schemas.microsoft.com/

JSF - xmlns:h not being recognized? [duplicate]

左心房为你撑大大i 提交于 2019-11-28 12:04:50
问题 This question already has an answer here: JSF returns blank/unparsed page with plain/raw XHTML/XML/EL source instead of rendered HTML output 1 answer In the "search" XHTML portion of my project, the "h" tags arent being recognized. I really have no clue why they aren't working. Any insight? Here's a link to the xhtml file hosted on google code so the entire project can be viewed. https://code.google.com/p/xdsgui/source/browse/trunk/Frontend/WebContent/search.xhtml Thanks. 回答1: They are

SimpleXMLElement Access elements with namespace?

和自甴很熟 提交于 2019-11-28 10:59:00
问题 I have the following XML: <ns1:getBannerLinksResponse xmlns:ns1="http://endpoint.website.com/"> <ns1:return> <ns1:campaignID>0</ns1:campaignID> <ns1:categoryID>200230455</ns1:categoryID> <ns1:categoryName>Promotion</ns1:categoryName> <ns1:linkID>10001599</ns1:linkID> <ns1:linkName>KFL-20% off No Min</ns1:linkName> <ns1:mid>3071</ns1:mid> <ns1:nid>1</ns1:nid> <ns1:clickURL> http://someurl </ns1:clickURL> <ns1:endDate>Oct 15, 2012</ns1:endDate> <ns1:height>250</ns1:height> <ns1:iconURL> http:/

Adding namespaces to root element of xml using jaxb

家住魔仙堡 提交于 2019-11-28 10:47:31
I am creating an xml file whose root elemenet structure shuould be like: <RootElement xmlns="http://www.mysite.com" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.mysite.com/abc.xsd"> i created package-info.java class but i can get only one namespace by writing this code: @XmlSchema( namespace = "http://www.mysite.com", elementFormDefault = javax.xml.bind.annotation.XmlNsForm.QUALIFIED) package myproject.myapp; import javax.xml.bind.annotation.XmlSchema; Any idea? Below is some demo code that will produce the XML you are looking for. You can use the

Blank xml namespace in child nodes in SQL Server

谁说胖子不能爱 提交于 2019-11-28 10:39:18
问题 Hi i need help with the following in sql: I need to create a xml file in this format <Document xmlns="urn:iso:std:iso:20022:tech:xsd:001.002.001.04"> <FIToFIPmtStsRpt> <GrpHdr> <MsgId></MsgId> </GrpHdr> <OrgnlGrpInfAndSts> <OrgnlMsgId /> </OrgnlGrpInfAndSts> </FIToFIPmtStsRpt> </document> at the moment i have a variable that holds the main info and i build up the between info (take it that grphdr can be inserted multiple times back into the main xml, with different info) declare @xml xml='

How to add xsi schemalocation to root c # object XmlSerializer

江枫思渺然 提交于 2019-11-28 09:12:05
I am using XmlSerializer to create an object representing an XML file and now i want to add a schemalocation to the rootelement of my xml file. I can add namespaces like the following XmlSerializer serializer = new XmlSerializer(typeof(MyClass)); System.IO.FileStream fs = new FileStream(@"C:\test.xml", FileMode.Create); TextWriter writer = new StreamWriter(fs, new UTF8Encoding()); XmlSerializerNamespaces ns = new XmlSerializerNamespaces(); ns.Add("xy","http://www.w3.org/2005/08/addressing"); ns.Add("xlink","http://www.w3.org/1999/xlink"); serializer.Serialize(writer, myObject, ns); But how do