Hello
I have an XML document in which I need to change a namespace.
<root
xmlns:abc=http://www.abc.com/20090930
>
Within the XML file I have elements within the abc namespace:
<abc:myElement>123456</abc:myElement>
I use the following code to modify the namespace:
XmlDocument myXmlDoc = new...
In case anyone comes across this thread in the future, here's the solution:
Basically, use the 'setNamedItem' method of the Attributes property.
Function replaceAttributeValue(ByRef doc As DOMDocument60, xmlNode As IXMLDOMNode, oldAttValue As String, newAttValue As String) As IXMLDOMElement...
In case anyone comes across this thread in the future, here's the solution:
Basically, use the 'setNamedItem' method of the Attributes property.
Function replaceAttributeValue(ByRef doc As DOMDocument60, xmlNode As IXMLDOMNode, oldAttValue As String, newAttValue As String) As IXMLDOMElement...
Hello folks. I've also posted this in the XML forum.
Having a tough time trying to figure this one out.
I have a schema (xsd) file with namespaces declared in the root element as shown:
<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema"...
tsuji
I know where the VBA forum is, but I thin this is more related to XML and DOM. Regardless of whether it's VBA, C# or Java, this would still be an issue.
Hello folks.
Having a tough time trying to figure this one out.
I have a schema (xsd) file with namespaces declared in the root element as shown:
<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:ci-com="http://xbrl.us/stm/ci/com/2008-03-31">
I would like to change the...
I should probably give a little back story here.
I have a set of XML "templates" (not XSL templates) that I am using as a foundation for what we call a DTS (Discoverably Taxonomy Set) for building XBRL (Extensible Buisiness Reporting Language) financial reports. All I need to do is copy these...
well, this is lame, but I know it will work.
I will have to read in the XML attribute then take a sledgehammer, open the XML file up as a text file, and just replace the text that way.
That's what I was doing before, but it takes a few pages of code vs. the one or two lines I was hoping to...
well...
I've been trying so many things that I've now returned to what the actual problem was. Here's the xml:
<root xmlns="http://xml.org" xmlns:link="http://www.xbrl.org/2003/linkbase">
<sub link:attr="foo">
</sub>
</root>
If I try to change the 'xmlns:link' attribute, I get the read-only...
sorry, posted that last one before your reply.
you are right about the valid xml and I think that was the problem.
I was able to get it to work.
Sometimes it helps to have a second pair of eyeballs look at it. Especially when it's damn allergy season.
*sneeze*
no can do. The namespace prefix is part of the XML file I'm processing. The XML file is generated from an external application. The namespace prefix needs to be here.
Hello Folks,
I am having a hard time changing the attribute value in the XML file below. I am using XML in a VBA environment.
I have the following XML data:
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<root xmlns:link="http://foo.com">
<sub xmlns:attr="foo">
</sub>
</root>
I...
In the event someone runs across this later, here's how I did it:
public static string cleanupHtml(string sourceHtml)
{
string temp = System.IO.Path.GetTempPath();
TextReader tr = new StreamReader(sourceHtml);
FileStream fout = new FileStream(temp +...
Hello Folks,
I have an HTML file that I'm processing that contains comments. Unfortunately, the application that generates this HTML file, malforms the comments. We are working to get the developer of this tool to fix the problem, but in the meantime I'd like to develop a workaround. The...
Thanks Jason. I may give this a try. I had some help figuring another method using regex. If I can get that to work the way I need it to, I'll post here.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.